-
Notifications
You must be signed in to change notification settings - Fork 715
fix: resolve flaky behavior in dashboard tests #8840
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
PR Reviewer Guide 🔍(Review updated until commit ba8fee1)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to ba8fee1
Previous suggestionsSuggestions up to commit af931fd
|
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 364 | 343 | 0 | 19 | 2 | 94% | 4m 38s |
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 17 | 14 | 0 | 2 | 1 | 82% | 38.4s |
Testdino Test Results
|
Testdino Test Results
|
Testdino Test Results
|
Testdino Test Results
|
Testdino Test Results
|
Testdino Test Results
|
Testdino Test Results
|
11f89a2 to
848a70f
Compare
Testdino Test Results
|
3a9861e to
a23d0c2
Compare
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 364 | 343 | 0 | 19 | 2 | 94% | 4m 39s |
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 190 | 178 | 0 | 11 | 1 | 94% | 3m 31s |
a23d0c2 to
ba8fee1
Compare
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 365 | 342 | 0 | 19 | 4 | 94% | 4m 41s |
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 365 | 343 | 0 | 19 | 3 | 94% | 4m 41s |
|
Persistent review updated to latest commit ba8fee1 |
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.
Greptile Overview
Summary
Replaced unreliable networkidle waits with explicit canvas element waits to fix flaky dashboard tests.
Key Changes:
dashboard.spec.js: removed twowaitForLoadState("networkidle")calls, added explicit wait for canvas element attachment before validationdashboard-transpose.spec.js: addedwaitForChartToRender()call to ensure chart rendering completes before capturing data.github/workflows/playwright.yml: downgradedactions/setup-nodefrom v5 to v4 (unrelated to flakiness fix)
Impact:
The changes improve test stability by waiting for specific DOM elements rather than network activity, which is a best practice for Playwright tests. The explicit canvas wait ensures charts are actually rendered before assertions run.
Confidence Score: 4/5
- This PR is safe to merge with minimal risk
- The changes follow Playwright best practices by replacing networkidle waits with explicit element waits, which should reduce test flakiness. The test logic and validation remain intact. Minor concern about the unrelated workflow downgrade from setup-node v5 to v4.
- .github/workflows/playwright.yml - verify the setup-node downgrade is intentional
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| tests/ui-testing/playwright-tests/dashboards/dashboard.spec.js | 5/5 | Replaced networkidle waits with explicit canvas element wait, improving test stability |
| .github/workflows/playwright.yml | 4/5 | Downgraded actions/setup-node from v5 to v4 without explanation |
Sequence Diagram
sequenceDiagram
participant Test as Dashboard Test
participant Page as Browser Page
participant Chart as Chart Renderer
Note over Test,Chart: Before (Flaky)
Test->>Page: Click apply dashboard
Test->>Page: waitForLoadState("networkidle")
Note over Page: Waits for ALL network to idle
Note over Page: Can timeout or miss chart renders
Page-->>Test: Continue
Test->>Chart: Validate chart rendered
Note over Test,Chart: After (Stable)
Test->>Page: Click apply dashboard
Test->>Chart: waitForSelector('[data-test="chart-renderer"] canvas')
Note over Chart: Explicit wait for canvas element
Chart-->>Test: Canvas attached
Test->>Chart: Validate chart rendered
3 files reviewed, 1 comment
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v5 | ||
| uses: actions/setup-node@v4 |
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.
style: downgraded from v5 to v4 - verify this is intentional and not accidentally included in this PR
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/playwright.yml
Line: 330:330
Comment:
**style:** downgraded from v5 to v4 - verify this is intentional and not accidentally included in this PR
How can I resolve this? If you propose a fix, please make it concise.…ate comments in transpose test for clarity
ba8fee1 to
d7db73b
Compare
PR Type
Bug fix, Tests
Description
Stabilize dashboard chart rendering waits
Replace network idle with canvas detection
Add explicit chart render wait helper
Adjust workflow Node action version
Diagram Walkthrough
File Walkthrough
dashboard-transpose.spec.js
Add explicit chart render wait in transpose testtests/ui-testing/playwright-tests/dashboards/dashboard-transpose.spec.js
dashboard.spec.js
Use canvas-based wait to reduce flakinesstests/ui-testing/playwright-tests/dashboards/dashboard.spec.js
playwright.yml
Update GitHub Action setup-node to v4.github/workflows/playwright.yml