Cypress doesn't take correct snapshots in 'fullPage' mode in Electron and Chrome browsers
See original GitHub issueCurrent behavior:
When I use cy.screenshot()
in the test code for visual regression, I wanna take a picture of all DOM element, not only its visible part.
But cypress cannot capture the whole element. The screenshots have the correct size but with only recurring visible part.
Desired behavior:
To take full element as screenshot independently of the DOM element size or viewport settings
Steps to reproduce:
Test code:
it('Take a long snapshot', () => {
cy.visit('https://twitter.com/Irine_Meier/status/1172003419458088960');
cy.wait(2000);
cy.get('#stream-items-id').screenshot({ capture: 'fullPage', scale: true });
});
I took twitter long read for example of App code
https://twitter.com/Irine_Meier/status/1172003419458088960
As u can see the getter #stream-items-id
is the twitter tread, the DOM element has a specific length and width
Versions
Windows: win 10 x64 Cypress: 3.7.0 Browsers: Electron 73, Chrome 78
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Troubleshooting | Cypress Documentation
Run the same tests in both Electron and Chrome, then compare the screenshots/videos. Look for and isolate any differences in the Command Log....
Read more >Launching Browsers | Cypress Documentation
To use this command in CI, you need to install the browser you want - or use one of our docker images. By...
Read more >Cross Browser Testing - Cypress Documentation
Cypress has the capability to run tests across multiple browsers. Currently, Cypress has support for Chrome-family browsers (including Electron and.
Read more >End-to-End Snapshot Testing - Cypress
But these end-to-end tests are running inside a real browser (Electron or any Chrome-based one), and just saving and loading a snapshot file ......
Read more >Error Messages | Cypress Documentation
This message means that Cypress was unable to find tests in the specified file. You'll likely get this message if you have an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jennifer-shehane Any thoughts on this. No library is helping out in the visual regression front with Cypress. It would be really great if someone from Cypress fixes the cy.screenshot() which is not taking fullPage screenshot… Could you please throw some light on this.
@jennifer-shehane any proposed solution for this?