question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Components testing - screenshot causes screen to move causing undesired possible mouse over and other artifacts

See original GitHub issue

Current behavior

To demonstrate this I created a simple component testing where the component will have a different background color on mouse hover via CSS.

The recorded gif bellow illustrate the issue. After I press the “Run all tests” button then the rendering area of the component will be moved to be under the mouse and the component will receive the hover style of the css before taking the screenshot.

Peek 2022-08-12 00-22

Resulting in the following diff generated by the snapshot plugin (left is expected / right is actual

image

In some other cases it will capture the cypress ui’s tooltip:

image

Desired behavior

Screenshot to no receive mouse hover or cypress elements

Test code to reproduce

Clone this repository https://gitlab.com/souf/react-webpack-playground/-/tree/cypress-screenshot-blinking using branch cypress-screenshot-blinking.

  • Run yarn install and yarn cypress:open
  • open the component testing specs “App”
  • press the button to run again all test, or to reload the page while the mouse is hover the spot where the dom element will be when “blinking”.
  • see screenshot in cypress/screenshots

Cypress Version

10.6.0

Node version

16.x

Operating System

linux

Debug Logs

nc

Other

It’s a funky one but as bothering as a mosquito 😄

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rachelrudermancommented, Aug 30, 2022

Ohhhhh big derp! @gsouf thank you for the wonderful reproduction repo, your patience and for clarifying! I was on the lookout for the tooltip. I agree, it like you’ve found a buggo. I’ll have this routed to the appropriate team 🙏

Note: I was able to reproduce on MacOS

1reaction
gsoufcommented, Aug 30, 2022

@rachelruderman on the video you sent the issue is reproduced with success.

From the video: image

The square is green (mouse hover). It is expected to be red (no mouse hover).

Does that make sense ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexplained Windows or software behavior may be caused ...
Components of Windows or other programs no longer work. Cause. This issue may occur when deceptive software, such as spyware that is known...
Read more >
gsouf - PullAnswer
Components testing - screenshot causes screen to move causing undesired possible mouse over and other artifacts. 0 Likes 9 Replies.
Read more >
Taking Screenshots | Detox
If --take-screenshots failing is set, and the test passes, the screenshot won't be saved to <artifacts-location> after the test ends. In the other...
Read more >
Visual Testing with Chromatic - DEV Community ‍ ‍
Snapshot tests work by comparing the output of a test against a version-controlled golden file, failing on a mismatch. Intentional changes ...
Read more >
How to Fix the Most Annoying Things in Windows - PCMag
In Windows 11, go to Settings > Windows Update > Advanced Options > Active Hours, then set them manually, or go with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found