cypress-plugin-snapshots icon indicating copy to clipboard operation
cypress-plugin-snapshots copied to clipboard

Question about fixed elements

Open Emiliano-Bucci opened this issue 5 years ago • 0 comments

Hello! I've recently started to use both Cypress and cypress-plugin-snapshots and i have a doubt regarding fixed elements, like for example a fixed Header at the top of the page. In the docs says:

When passing fullPage to the capture option, Cypress scrolls the application under test from top to bottom, takes screenshots at each point and stitches them together. Due to this, elements that are position: fixed or position: sticky will appear multiple times in the final screenshot

for some reason, in different pages (which share some fixed components - in my case a fixed menu on the left) i'm getting different results, like this:

image

image

The first screen is correct: during scroll, the elements of the menu aren't repeated. On the second screen, after cypress scroll to the bottom, he's repeating some elements of the left fixed menu. Screen were taken using cypress open

The weird part is that, sometimes, result changes if for example during test running, chrome is opened in fullscreen or not. Could be that cypress have difficults, during screenshot elaboration, to mix repeated elements?

Emiliano-Bucci avatar Oct 23 '19 14:10 Emiliano-Bucci