Skip to content

test(4.0): fix Playwright suite failures and stabilize flaky breakout test - #25501

Merged
antobinary merged 7 commits into
bigbluebutton:v4.0.x-developfrom
antobinary:fix-40-playwright-tests
Jul 23, 2026
Merged

antobinary merged 7 commits into
bigbluebutton:v4.0.x-developfrom
antobinary:fix-40-playwright-tests

Conversation

@antobinary

Copy link
Copy Markdown
Member

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 toHaveScreenshot baselines.

Before → After

Area Before After
Recording (recording.ts) beforeAll assumed playback.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 threw playback 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. Selects the presentation format from the format array and waits for it to be published (getRecordingsWithRetry, retries 5→8). All 6 recording tests pass.
Presentation → Send to chat for download (presentation.ts) Awaited the attendee download link for 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. Waits UPLOAD_PDF_WAIT_TIME (30 s × multiplier), matching the PDF-processing time. Passes.
Whiteboard ×19 / Options ×2 / Presentation ×3 — visual snapshots if (!CI) toHaveScreenshot comparisons (which do not run in CI) failed because the committed reference PNGs no longer matched this environment's rendering (whole-page pixel offset). Regenerated the reference PNGs (47 files); each re-verified with a second run (update → verify held).
Breakout → "Lock settings ARE propagated…" (flaky) (create.ts) Under parallel load, the breakout room's audio modal appeared after closeAudioModalIfPresent's 5 s window, so its ReactModal overlay 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. Waits for the breakout client (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:

cd bigbluebutton-tests/playwright

# Does NOT reproduce in isolation (misleading): 5/5 pass
npx playwright test breakout.spec.ts:81 --project=Chromium --repeat-each=5

# Reproduces under contention: 17/20 FAIL before this PR, 20/20 pass after
npx playwright test breakout.spec.ts:81 --project=Chromium --repeat-each=20 --workers=4

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=Chromium

Snapshot baselines were regenerated + verified with:

npx playwright test whiteboard options.spec.ts:25 options.spec.ts:29 \
  presentation.spec.ts:90 presentation.spec.ts:156 presentation.spec.ts:162 \
  --project=Chromium --update-snapshots     # regenerate
# then re-run the same selection without --update-snapshots -> all pass

Notes for reviewers

  • The 24 snapshot tests are !CI-guarded, so CI is unaffected by the regenerated PNGs — they only run locally with CI unset. Run the suite the CI way to avoid these environment-specific false failures: npm run test-chromium-ci.
  • The regenerated baselines are rendered on the test server; local runs on a differently-rendering machine may still diff. The intent is to unblock local runs against this environment.
  • The 11 skipped tests were reviewed and are all legitimate environment/config gates (LiveKit has no listen-only mode; @only-headed "Copy stats"; Apollo not exposed on a production build; gridTileCount needs a small grid config) — no changes needed.

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.
@antobinary antobinary added this to the Release 4.0 milestone Jul 22, 2026
@antobinary
antobinary requested a review from ramonlsouza July 22, 2026 18:46
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e43707f3-6bf5-4ed6-a45a-50bcb7598741

📥 Commits

Reviewing files that changed from the base of the PR and between b54b47e and 48d22c3.

⛔ Files ignored due to path filters (47)
  • bigbluebutton-tests/playwright/options/options.spec.ts-snapshots/moderator-page-dark-mode-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/options/options.spec.ts-snapshots/moderator-page-font-size-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/presentation/presentation.spec.ts-snapshots/mod-hide-toolbars-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/presentation/presentation.spec.ts-snapshots/moderator-pptx-presentation-screenshot-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/presentation/presentation.spec.ts-snapshots/moderator-txt-presentation-screenshot-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/presentation/presentation.spec.ts-snapshots/user-toolbars-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/presentation/presentation.spec.ts-snapshots/viewer-new-presentation-screenshot-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/presentation/presentation.spec.ts-snapshots/viewer-pptx-presentation-screenshot-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/presentation/presentation.spec.ts-snapshots/viewer-txt-presentation-screenshot-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-arrow-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-change-color-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-dash-drawing-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-delete-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-duplicate-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-ellipse-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-eraser-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-fill-drawing-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-line-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-pencil-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-realtime-text-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-rectangle-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-redo-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-rotate-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-size-drawing-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-sticky-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-text-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-triangle-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/moderator-undo-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-arrow-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-change-color-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-dash-drawing-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-delete-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-duplicate-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-ellipse-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-eraser-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-fill-drawing-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-line-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-pencil-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-realtime-text-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-rectangle-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-redo-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-rotate-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-size-drawing-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-sticky-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-text-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-triangle-Chromium-linux.png is excluded by !**/*.png
  • bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.ts-snapshots/viewer-undo-Chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • bigbluebutton-tests/playwright/breakout/create.ts
  • bigbluebutton-tests/playwright/presentation/presentation.ts
  • bigbluebutton-tests/playwright/recording/recording.ts

Walkthrough

Playwright 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 presentation playback format before proceeding; recording validation also selects that format by type.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: ramonlsouza, arthurk12, gustavotrott

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing Playwright failures and stabilizing a flaky breakout test.
Description check ✅ Passed The description matches the Playwright test fixes, snapshot regeneration, and breakout stabilization in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@antobinary
antobinary merged commit 8aa405b into bigbluebutton:v4.0.x-develop Jul 23, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants