Cypress sets the height of the size-container to 0px
See original GitHub issueHi there,
Current behavior:
I’m working on a single page web app that is built with React, React router 3.x and Redux. I use Cypress to test login, signup, create posts pages, etc. It all works well. But when I’m testing two particular pages. Their page height(on .size-container
element) is sometimes set to 0px
(see the screenshot, click on the screenshot to get a bigger view). And so the page cannot be seen. The test can be passed when I reset the viewport with cy.viewport()
after visiting the page with cy.visit()
but then I ended up with so many cy.viewport()
in my test suites.
Desired behavior:
The height of the .size-container
should not be 0px
.
Steps to reproduce:
I’ve been trying to reproduce this bug but without success. These two particular pages are a bit different when compare with others:
- They redirect from another route via react-router: when you go to the route
forum/list
, it will redirect you toforum/list/:category/:sort/
. - They use Chinese characters in the URL: something like
forum/list/中文/中文
Versions
Cypress: 3.0.1 OS: macOS High Sierra 10.13.5 Browser: Google Chorme 67.0.3396.99 (Official Build) (64-bit)
Sorry, I know this is not a valid bug report since I cannot reproduce the bug. But I’ve been battling with this bug for two days and cannot find any directions from Google or stackoverflow.
Thanks for the help!
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Closing as resolved. Please comment if you are still having this issue and we will consider reopening.
@tkociemba-olx Could you try blacklisting the googletagmanager consistently and see if this happens due to that? https://on.cypress.io/configuration#blacklistHosts
So in your
cypress.json
config: