Skip to content

refactor!: run cypress headlessly by default; add test:*:dev commands #183

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

Merged
merged 3 commits into from
Oct 21, 2022

Conversation

haoqunjiang
Copy link
Member

for headed environment and testing against dev server.

I think this better reflects the real-world use case.

People don't usually need an app window to run the tests against
the production bundle, but faster feedback loops with dev server are
useful.

Inspired by @elevatebart 's comment on twitter: https://twitter.com/elevatebart/status/1582790882088009728

I think it is not very useful unless we use `--strictPort` here,
and keeping it makes it harder for us to customize the port number
on command line.
for headed environment and testing against dev server.

I think this better reflects the real-world use case.

People don't usually need an app window to run the tests against
the production bundle, but faster feedback loops with dev server are
useful.
"test:e2e": "start-server-and-test preview http://localhost:4173/ 'cypress open --e2e'",
"test:e2e:ci": "start-server-and-test preview http://localhost:4173/ 'cypress run --e2e'"
"test:e2e": "start-server-and-test preview :4173 'cypress run --e2e'",
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' :4173 'cypress open --e2e'"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to force the dev server to run on 4173 instead of 5173 as in the playwright PR #182 because start-server-and-test doesn't have an option like reuseExistingServer, therefore has a higher chance of port collisions during dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy