Cypress test: pages/eventRegistration.js fails
See original GitHub issueWhere to find the issue
Describe the issue
npm ci
npm run test:prepare
npm run test
shows the test for pages/eventRegistration.js failing.
Test Event Registration Page
1) "before each" hook for "Basic page assertions"
0 passing (660ms)
1 failing
1) Test Event Registration Page
"before each" hook for "Basic page assertions":
CypressError: `cy.visit()` failed trying to load:
http://localhost:8000/undefined/eventregistration
The response we received from your web server was:
> 404: Not Found
This was considered a failure because the status code was not `2xx`.
Change was introduced by PR https://github.com/corona-warn-app/cwa-website/pull/1499.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Page occasionally does not load from cy.visit() #2938 - GitHub
Your page did not fire its 'load' event within '60000ms'. You can try increasing the 'pageLoadTimeout' value in 'cypress.json' to wait longer.
Read more >Error Messages | Cypress Documentation
We found an error preparing your test file. This message means that Cypress encountered an error when compiling and/or bundling your test file....
Read more >Cypress task fails and complains that task event has not been ...
task('copycsvFile') failed with the following error: The 'task' event has not been registered in the plugins file. You must register it before ...
Read more >Listen To The Application Events From Cypress Tests
How the Cypress tests can receive the DOM and jQuery events sent by ... to the event sent at the application's startup is...
Read more >Filtering app errors in Cypress tests - YouTube
This video shows how Cypress catches exceptions thrown from the ... Then it shows how to register the error handler for all tests....
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 FreeTop 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
Top GitHub Comments
There is new text in the README.md file which says:
cypress.env.json
file with the following valuesThe blog_spec.js test is carried out automatically on both the English (en) and German (de) pages. Could the eventregistration test also be aligned to test both languages automatically?
blog_spec.js uses
clickLanguage
to do this.The instructions don’t say that the comments only apply to the eventregistration test. Where is the file
cypress.env.json
supposed to be created? (I had to read the cypress documentation to find out the answer: it goes into the root directory, next tocypress.json
.)@chrisenitan
It looks like https://github.com/corona-warn-app/cwa-website/blob/master/cypress/integration/pages/eventRegistration.js is a work-in-progress which does not test the German language page correctly, even though the README.md suggests otherwise.
Please let us have your comments in the follow-on issue https://github.com/corona-warn-app/cwa-website/issues/1513.