cypress-image-diff icon indicating copy to clipboard operation
cypress-image-diff copied to clipboard

Component's transform translate changes unexpectedly during screenshot

Open NikoDi2000 opened this issue 1 year ago • 1 comments

Description

I am encountering an issue with cypress-image-diff where the transform property's translate value of a component changes unexpectedly when capturing screenshots. The translate value before and after the screenshot appears to be different, which is not observed when interacting with the component without the screenshot command.

Steps To Reproduce

  1. Navigate to the page where the component is rendered.
  2. Start a visual test using cypress-image-diff.
  3. Capture a screenshot of the component in question.
  4. Observe the component's state before and after the screenshot.

Expected behavior

The state of the component, specifically the transform's translate value, should remain consistent before and after taking the screenshot.

Actual behavior

The component's translate value changes right after the screenshot is taken, which does not align with the expected behavior.

Additional Information

  • Cypress version: 11.2.0
  • cypress-image-diff version: 2.1.4
  • Browser and version: edge 123
  • Operating System: macOS

before and after screenshot: image screenshot: image

Possible Solutions Tried

  • Ensuring no CSS transitions or animations are active when taking the screenshot
  • Adding explicit waits for elements to be stable before capturing the screenshot
  • Using .should() assertions to confirm the state of the DOM element

Despite trying the above, the issue still persists.

I would greatly appreciate any guidance on this issue and look forward to any suggestions you may have.

Thank you for your assistance.

NikoDi2000 avatar Mar 27 '24 02:03 NikoDi2000

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Apr 27 '24 01:04 github-actions[bot]

This issue was closed because it has been inactive for 30 days since being marked as stale.

github-actions[bot] avatar May 27 '24 01:05 github-actions[bot]