cypress
cypress copied to clipboard
feat: support vite v5
- Closes #28347
Additional details
Adds support for vite@5
. To add support, the scaffolding config needs to support vite v4 as well as @cypress/vite-dev-server
. The current architecture for @cypress/vite-dev-server
is to roll forward and add support. Since significant changes aren't required and haven't been in the past, this works.
Note: if users are referencing the absolute public path in their config, they will likely need to set devServerPublicPathRoute
to the expected destination of their public path. Since this default is shipped with Cypress, we cannot actively change it. Since we don't have a dedicated section to CT bundlers in our documentation, I have added it in the README of the package.
System tests are also added/updated. Unit/system tests are added for vite 5, and older system tests are updated to be on at least vite 4. This is NOT a breaking change, but gets us more in alignment with our unofficially supported last two versions.
Since I needed to change some of the path resolution behavior within the dev server, I added a new unit test, initCypressTests
, since none existed and felt I needed to verify the new behavior. which additionally documents what is expected.
After this PR goes in I will work on getting the other packages updated to latest vite in the monorepo using vite@4 currently.
Steps to test
Run the added unit/system tests as well as test the build binary against a vite 5 project
How has the user experience changed?
PR Tasks
- [x] Have tests been added/updated?
- [ ] Has a PR for user-facing changes been opened in
cypress-documentation
? - [ ] Have API changes been updated in the
type definitions
?
6 flaky tests on run #55508 ↗︎
![]() |
![]() |
![]() |
![]() |
![]() |
Details:
refactor resolveConfig test | |||
Project: cypress | Commit: 029f5581a0 |
||
Status: Passed | Duration: 20:57 💡 | ||
Started: May 21, 2024 4:04 PM | Ended: May 21, 2024 4:25 PM |
scaffold-component-testing.cy.ts • 1 flaky test • launchpad-e2e
Test | Artifacts | |
---|---|---|
scaffolding component testing > vuecli4vue3 > scaffolds component testing for Vue CLI 4 w/ Vue 3 project |
Test Replay
Screenshots
|
commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-electron
Test | Artifacts | |
---|---|---|
... > stops waiting when an fetch request is canceled |
Test Replay
|
commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-chrome:beta
Test | Artifacts | |
---|---|---|
... > stops waiting when an fetch request is canceled |
Test Replay
|
commands/net_stubbing.cy.ts • 3 flaky tests • 5x-driver-webkit
Test | Artifacts | |
---|---|---|
network stubbing > intercepting request > can delay and throttle a StaticResponse |
Review all test suite changes for PR #29518 ↗︎ |
We've been trying to get a component test running after upgrading Vite to 5.0 (node 20.13). The only test failures we're having are from selectFile, like this: cy.get('[data-cy="prime-drop-target"] > input[type=file]').selectFile('cypress/test-files/test.file', { action: 'drag-drop', force: true, }); We get a system error, "FS" does not exist.
We've been trying to get a component test running after upgrading Vite to 5.0 (node 20.13). The only test failures we're having are from selectFile, like this: cy.get('[data-cy="prime-drop-target"] > input[type=file]').selectFile('cypress/test-files/test.file', { action: 'drag-drop', force: true, }); We get a system error, "FS" does not exist.
@jdenekat are you able to open an issue with a reproduction?
Released in 13.10.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v13.10.0, please open a new issue.