-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
viewport
not getting recognized in CI
#18230
Comments
The The application under test in your case will render at a size of Let me know if this helps. |
Thank you for the detailed answer. Is there any global option to set that and override this via cy.viewport(); ? The option in the configuration is not getting recognized somehow. That makes it so strange it is working sometimes and sometimes not. |
We fixed it. By calling on every test case we wrote |
@jennifer-shehane is here anything new? |
So we finally figured out, that the rendered HTML was too slow. So we increased |
Current behavior
packages:
node version: 14.17.6
We setup Cypress Testing for e2e. Locally the
viewportHeight
andviewportWidth
in the cypress.json is getting recognized and it works like a charm. => Tests are passing.When we push to Github our GithubAction will execute
yarn test:e2e
which is described in thepackage.json
as the following:The weird behavior is that sometimes the tests are passing (probably the viewport option is getting recognized) and sometimes not. The test actually logs in a user and clicks a logout button in the sidebar navigation which is not visible in Mobile. (collapsed sidebar)
We tried a lot and also the solutions described in: #2102 but it did not work as well.
The behavior is flacky sometimes it fails sometimes it works.
First commit (passing) from screenshot above:
Second commit (failing) from screenshot above:
The Test which is failing caused by the invisible Logout Button collapsed in the sidebar.
The code from the test which fails:
Desired behavior
No response
Test code to reproduce
Create a Github Action with the following:
package.json
cypress.json
Cypress Version
8.4.1
Other
No response
The text was updated successfully, but these errors were encountered: