Skip to content

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