-
Notifications
You must be signed in to change notification settings - Fork 96
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
feat: use the --expect parameter to specify HTTP response code #343
Conversation
🎉 This PR is included in version 1.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This seems like a breaking change to me. Just tried to upgrade from I am wondering if anyone else faced this issue. Specific issueIn my case, a local test-environment with a vitest web-server & cypress was working fine but the pipeline on GitLab broke because Cypress could not find the application with Anyways. Will post more information when I get more insights. |
Why did you pick Logs would be useful to understand your error. |
I first used As said, locally everything works fine but as soon as I run it on the CI job, it fails. Running the same script locally as in the CI. LogsThe logs are not quite interesting since we only see the Cypress tests fail:
The only difference is that Cypress can resolve the running web-server and the application locally but not in the CI. As already said, |
I don't see the failure in your logs. Perhaps you are getting something like:
How are you starting If you are getting the above error then npx vite --host may get you better results. See Vite documentation Server Options server.host. "Specify which IP addresses the server should listen on. Set this to 0.0.0.0 or true to listen on all addresses, including LAN and public addresses. This can be set via the CLI using --host 0.0.0.0 or --host." |
Sorry for my late response! But yes, this fixed it. My bad, was too easy ... 😄 |
UpdateNo, I have not fixed my issue that way (as I wrote in my previous comment). I still had the issue that cypress was suddenly not running correctly in the CI and noticed the following: Local setupIn my local setup, I run cypress with an existing The mocking just sets a Executing the script that we use in the CI (GitLab) locally, works fine. The storage variable is being set correctly. However, the CI setup & execution is a bit different. CI setupFor once, the repository does not include the .gitlab-yml.ci file: script:
- npm run ci:test:e2e -- --env oauth_authority=${E2E_OAUTH_AUTHORITY},oauth_client_id=${E2E_OAUTH_CLIENT_ID} while It appears, that this was working _before the upgrade to _ The {
"scripts": {
"ci:test:e2e": "tests/e2e/scripts/start-headless-e2e-tests.sh"
}
} with the #!/bin/bash
# the arguments passed to this script are handed to npm run cypress:headless
npx start-server-and-test preview:e2e http://localhost:7357 \'npm run cypress:headless -- "$@"\' with {
"scripts": {
"cypress:headless": "cypress run --browser chrome",
}
} So far so good. But something must have happened between version 1.14.0 and 2.0.0 that the arguments of my I fixed this by creating a I still wonder why the arguments could not been passed down anymore, only due to the upgrade of 1.14.0 to 2.0.0. |
closes #339