Replies: 2 comments 1 reply
-
Can you provide any more details? Like the repo you are trying to run in? In general, recreating a screenshot outside a container that is controlled, like a Docker container is very flakey and produces different images. I even had to switch to Docker container to create repeatable images, especially between the local machine and the CI machine, see the playlist of videos https://www.youtube.com/playlist?list=PLP9o9QNnQuAYhotnIDEUQNXuvXL7ZmlyZ |
Beta Was this translation helpful? Give feedback.
-
Below are my configs and simple test that just logs in and take screenshots of couple of elements on page. The pictures presented have overpainted parts. Today I reverted all my code and restested:
Please look at the video ... I think it might be the case, resizing screen intoduces some white parts which normally are not present. I am almost sure that this resize make failure because screenshot is made to fast. Look at the right vertical edge of the window. Unfortunately results once are pass, other time such a picture "shift" is noticed and random failures happen :( I also tried this https://docs.cypress.io/api/plugins/browser-launch-api#Set-screen-size-when-running-headless (with resolution as in example). It would be a pitty if I could not do test with various resolutions because then I cannot make UI tests if my app is displayed on a smaller screen where some automatic CSS adjustments are made in the app. Anyway always the failure is as on the screenshots. plugins.index.js
support/commands/commands.ts
support/commands/index.js
cypress.json
Simple test:
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I wanted to implement simple tests to check basic parts of my application (some headers, sidebars etc.)
No matter which plugin I take, no matter how I configure cypress the results differs among runs :(
Did anyone manage to have repetitive test results?
I use Cypress 7.1.0, tried plugins cypress-image-snapshot, and cypress-image-diff-js and I lean to statemenet that there's something wrong with Cypress.
I tried via cypress open / run, 1920x1080, 1280x720 and also default Cypress viewport size.
Always some picture is shifted down couple of lines, or some pixels to the left.
Beta Was this translation helpful? Give feedback.
All reactions