feat(ui): Build Cypress e2e test specs with Vite#16197
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
|
Images are ready for the commit at 9b88126. To use with deploy scripts, first |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16197 +/- ##
==========================================
+ Coverage 48.81% 48.83% +0.01%
==========================================
Files 2718 2718
Lines 202948 202948
==========================================
+ Hits 99074 99101 +27
+ Misses 96081 96060 -21
+ Partials 7793 7787 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@dvail: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Looks like this needs a little bit more work before merging. |
4bc18d5 to
aad77c6
Compare
The security warning is not relevant to this code that only runs in test environments, and does not accept user input. The AI bot also apparently cannot remove the "Changes requested" status even if it agrees with a comment stating the previous.
pedrottimark
left a comment
There was a problem hiding this comment.
Super investigation and solutions, as usual.
Description
Do not merge until 4.10A
Changes Cypress to use Vite instead of Webpack to compile e2e test specs before execution.
Why?
Two changes were needed to make this happen:
path.joinin individual test files, this was moved to a cypresstaskhelper. The reason for this is that Vite does not polyfill nodejs built in modules, and callingpathfrom browser code fails.cypress-axewhen the cypress config loads. Otherwise, the library attempts to do this dynamically at runtime with CommonJSrequire, which also fails due to Vite not supporting it out of the box.User-facing documentation
Testing and quality
Automated testing
How I validated my change
npm run cypress-openlocally, run a spec, and observe the absense of a bundle-analyzer tab.CI