-
Notifications
You must be signed in to change notification settings - Fork 491
refactor!: use prod bundle & preview server for playwright testing on CI #182
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
Conversation
Cc @mxschmitt @lmiller1990 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me, but it requires an additional step for running e2e tests.
I feel like customers would run into issues, e.g. that they run tests against outdated build directory, or are not easily able to run tests against a dev server (not easily means they would need to change playwright config file baseURL and webServer run command).
Was also thinking about something like this: only run the webserver when it's on CI, for the other cases rely on the user to use npm run dev / npm run build+preview
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.
977882c
to
4c399f6
Compare
As `npm` and `npx` add `./node_modules/.bin` to `$PATH`, the `vite` command should be available when playwright is running. (Not sure if this works on Windows, let's wait and see the CI results.)
And I also opened a PR to apply the similar changes to the Cypress templates: #183 |
I feel this is a better option. |
Co-authored-by: Max Schmitt <max@schmitt.mx>
To make it consistent with the Cypress configurations.
Background: https://twitter.com/haoqunjiang/status/1582692547188920322
Alternative: use
npm run dev
in Cypress configuration, as suggested in #39