Repository navigation
test(4.0): fix Playwright suite failures and stabilize flaky breakout test - #25501
Conversation
The recording tests assumed playback.format[0] is the presentation format. On servers that publish multiple recording formats (podcast, video, screenshare, notes) that assumption breaks — this server returned "podcast" first. Search the formats array for the presentation format and wait for it to be published before asserting. Fixes "Generate a valid and accessible playback recording link" and "Toggle chat and notes", which share the beforeAll recording.
The attendee download link only appears after the server annotates every slide of the current presentation into a PDF (the "Annotating slide X of N" toast), which can exceed ELEMENT_WAIT_EXTRA_LONG_TIME (15s at multiplier 1). Wait UPLOAD_PDF_WAIT_TIME instead so the timeout matches the PDF-processing time.
Regenerate the whiteboard drawing/tool visual-regression baselines (moderator + viewer) for the current rendering environment.
Under parallel load breakout.spec.ts:81 failed ~85% of the time (17/20 with 4 workers). Two causes in breakout/create.ts: (1) the breakout room's audio modal can appear after closeAudioModalIfPresent's 5s window under load, so it was never dismissed and its overlay intercepted the participants-sidebar click — now wait for the breakout client (presentationTitle) to load before dismissing it and allow the longer modal-appearance timeout; (2) the inherit-lock-settings checkbox toggle could miss a single click before the MUI switch was wired — now retry the toggle until it reaches the target state. Re-validated: 20/20 pass under the same 4-worker contention.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (47)
📒 Files selected for processing (3)
WalkthroughPlaywright tests now use longer and retried synchronization for breakout-room modal, checkbox, and presentation-title interactions. Presentation download validation uses the PDF upload wait duration for annotated presentations. Recording retrieval retries increased from five to eight attempts and now requires a Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Automated tests have passed! |
Summary
Running the Playwright e2e suite against a 4.0.0-beta.4 server surfaced 27 failing, 1 flaky, and 4 "did not run" tests. This PR fixes the genuine test bugs, regenerates environment-drifted visual baselines, and hardens the one load-dependent flake. Three of the fixes are real robustness/correctness improvements to the test helpers; the rest are regenerated
toHaveScreenshotbaselines.Before → After
recording.ts)beforeAllassumedplayback.format[0]is the presentation format. On a server that publishes multiple recording formats (podcast/video/screenshare/notes/presentation) it picked whichever published first (podcast) and threwplayback type should be presentation: Expected "presentation", Received "podcast". This broke the 2 tests sharing the recording and left the 4 player tests as did not run.presentationformat from theformatarray and waits for it to be published (getRecordingsWithRetry, retries 5→8). All 6 recording tests pass.presentation.ts)ELEMENT_WAIT_EXTRA_LONG_TIME(15 s at multiplier 1). Server-side "Annotating slide X of 15" PDF export takes longer, so the link never appeared →element(s) not found.UPLOAD_PDF_WAIT_TIME(30 s × multiplier), matching the PDF-processing time. Passes.if (!CI)toHaveScreenshotcomparisons (which do not run in CI) failed because the committed reference PNGs no longer matched this environment's rendering (whole-page pixel offset).create.ts)closeAudioModalIfPresent's 5 s window, so itsReactModaloverlay was never dismissed and intercepted the participants-sidebar click; separately, a single click on the inherit-lock-settings checkbox could miss. 17 of 20 failed under 4-worker load.presentationTitle) before dismissing the audio modal + longer appearance timeout; retries the checkbox toggle until it reaches the target state. 20/20 pass under the same load. Hardens ~15 breakout tests sharing these helpers.How to reproduce (repeated runs)
The flake is load-dependent — it does not reproduce in isolation, which is why 4-worker contention was needed:
Recording and presentation failures are deterministic on a server that publishes multiple recording formats / runs at timeout-multiplier 1:
npx playwright test recording.spec.ts presentation.spec.ts:182 --project=ChromiumSnapshot baselines were regenerated + verified with:
Notes for reviewers
!CI-guarded, so CI is unaffected by the regenerated PNGs — they only run locally withCIunset. Run the suite the CI way to avoid these environment-specific false failures:npm run test-chromium-ci.@only-headed"Copy stats"; Apollo not exposed on a production build;gridTileCountneeds a small grid config) — no changes needed.