The e2e tests failed due to Vite optimizing the dependencies in the dev mode. When Vite optimizes the dependencies, the page will reload.
Set the start command tonpx vite preview --port 3333 to start the production build and prevent Vite optimizes the dependencies during testing.
Here are the simulation steps of test markdown:
click on the about link
check if URL is equal to /about
[vite] ✨ optimized dependencies changed. reloading
(page load)--page loaded-- -> localhost:3333/
check timeout -> test fail
Reproduce locally
open cypress
run a spec, then configure the network option to Slow 3G or Fast 3G in the dev tool
Description
The e2e tests failed due to Vite optimizing the dependencies in the dev mode. When Vite optimizes the dependencies, the page will reload.
Set the start command to
npx vite preview --port 3333
to start the production build and prevent Vite optimizes the dependencies during testing.Here are the simulation steps of test
markdown
:click on the
about
link check if URL is equal to/about
[vite] ✨ optimized dependencies changed. reloading (page load)--page loaded-- -> localhost:3333/ check timeout -> test failReproduce locally
Slow 3G
orFast 3G
in the dev toolvite --port 3333 --force
Linked Issues
none
Additional context
none