test(e2e): fix service worker flaky tests#7017
Conversation
Summary of ChangesHello @stormslowly, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the debugging and reporting capabilities for Playwright end-to-end tests. By enabling the HTML reporter, test results will be presented in a more visual and interactive format. Additionally, activating tracing will provide comprehensive logs of test execution, making it easier to identify and resolve issues. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enables the HTML reporter for Playwright tests and turns on tracing for all test runs. While enabling the HTML reporter is a good addition for better test reporting, enabling tracing for all tests with trace: 'on' can be inefficient. I've suggested a more optimal configuration for tracing that will only retain traces for failed tests, which should improve performance and reduce storage usage in your CI environment.
Deploying rsbuild-v2 with
|
| Latest commit: |
786f12e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://172cb334.rsbuild-v2.pages.dev |
| Branch Preview URL: | https://chore-e2e-report.rsbuild-v2.pages.dev |
There was a problem hiding this comment.
Pull request overview
Fixes flaky Playwright service worker E2E tests by switching from Playwright’s serviceworker event waiting to an in-page readiness signal, and adds CI artifacts for easier debugging of failures.
Changes:
- Update the service worker E2E test to wait for SW readiness via
navigator.serviceWorker/window.swStatus. - Enable Playwright HTML reporting and trace collection.
- Upload Playwright report/results as CI artifacts for later inspection.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| e2e/playwright.config.ts | Adds HTML reporter and configures trace collection for debugging failures. |
| e2e/cases/workers/service-worker-environments/index.test.ts | Reworks SW readiness waiting logic to reduce flakiness. |
| .github/workflows/test.yml | Uploads Playwright HTML report and test results as CI artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deploying rsbuild with
|
| Latest commit: |
e0f23f6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5afde219.rsbuild-v2.pages.dev |
| Branch Preview URL: | https://chore-e2e-report.rsbuild-v2.pages.dev |
|
E2E tracing performance:
|
Summary
playwright show-report <path to playwright-report>Related Links
Checklist