Skip to content

[4.0] test: Improve health of flaky/disabled tests and bring to ci pool - #25731

Merged
ramonlsouza merged 11 commits into
bigbluebutton:v4.0.x-developfrom
antobinary:playwright40-notci-sep01
Sep 2, 2026
Merged

ramonlsouza merged 11 commits into
bigbluebutton:v4.0.x-developfrom
antobinary:playwright40-notci-sep01

Conversation

@antobinary

Copy link
Copy Markdown
Member

What does this PR do?

Repairs the Playwright tests that sit outside the CI gate (not @ci, or quarantined by @flaky/@flaky-3.1/@need-update/@setting-required) and then retires the @flaky-3.1 tag entirely. Running that 96-test complement against BBB 4.0 produced 43 failures; triage showed almost all were tests broken by 4.0 UI evolution and misfiled as "flaky", plus one suspected product regression (below). Every deterministically-fixable test now passes; the remainder is correctly labeled or documented, and 22 healthy tests return to the CI gate.

Test repairs (verified passing)

  • External video family (7 tests): the share flow moved into the media area — the input lost its video-modal-input id and the confirm button was renamed startNewVideo → ShareExternalVideo. Includes a client commit exposing data-test="externalVideoUrlInput" on the input (it shipped with MUI's copy-pasted id="standard-basic" and no automation hook); the test selector keeps an id fallback so it also matches bundles that predate the client commit.
  • Participants panel flows: the manageUsers gear dropdown no longer exists — downloadUserNamesList is a direct header button, mute-all-except-presenter is a direct crowd-action button (muteAllUsers).
  • Settings notification checkboxes: data-test moved to the MUI Checkbox root; the settings modal saves via saveSettingsButton, not modalConfirmButton.
  • Lock viewers family: renamed lock-modal hook (hideViewersAnnotation → lockShareWhiteboard), 3.x-style row-click menu entry replaced with the row's moreOptions toolbar button, lockEditSharedNotes rewritten from the Etherpad iframe to BlockNote (with a new post-unlock editable assertion), and two genuine test-logic bugs: unlock targeted the .first() user list row (the moderator's own row, or the wrong attendee — hasText: "Attendee" also matches "Attendee2"), and unlock menuitem clicks landed on hidden duplicates that closed MUI menus leave in the DOM — portal order is not chronological, so neither nth=1 nor .last() is reliable; clicks now use a :visible filter.
  • Chat breakout delete: same hidden-menuitem failure mode on askToJoinRoom1, same :visible fix.
  • Polling issue-25320 regression tests (2): their join-sync barrier waits for the attendee's userListItem; the participants panel is closed by default on 4.0, so the panel is opened first.
  • Root-permission suites (4 tests): checkRootPermission() now skips with a reason instead of failing when passwordless sudo is unavailable — a machine precondition, not a defect.

Retagged @need-update (cannot pass as written; each carries a comment saying why)

  • Layout describe (6 tests): the manual layout selection modal was removed in 3ef18df in favor of unified layout — rewrite tracked separately
  • Timer: redesigned panel — no in-panel countdown, renamed duration inputs
  • Disable users join muted, Clear all status icon: features removed from the client (orphaned locale strings remain)
  • Select Slide, whiteboard Pan, Lock see other viewers annotations: unguarded canvas toHaveScreenshot compares fail wherever canvas rendering diverges from the committed baseline (e.g. 983x553 vs 993x559 across machines) — needs suite-wide canvas-size normalization

@flaky-3.1 retired

The version-suffixed tag was stale and had come to mean three different things. Split by evidence:

  • @flaky — genuinely intermittent or environment-sensitive (Smart Slides, PRESENTATION_ONLY/MEDIA_ONLY, Enforce Layout, large-presentation upload, webcam resize, breakout message delete)
  • @need-update — deterministically broken by 4.0 changes (see above)
  • @known-issue — new tag, added to the CI gate excludes in package.json and documented in the README's new tag taxonomy: the test asserts correct behavior blocked by a known or suspected product issue. Applied to auto-hide whiteboard toolbar (test: Adding flaky flag to failing tests related to the whiteboard #24367), Save user names, and the three hide-user-list leave-notification tests.

The Manage describe loses its blanket quarantine: its members pass and count toward the CI gate again — 410 → 432 gate tests.

Suspected product regression found (not addressed here)

With the hide user list lock active, user-leave toast notifications stop arriving for everyone, moderators included — join toasts still work, and plain leave notifications (no lock) pass. Reproduced consistently across 4 runs by the three Hide user list ... leave notification tests; they assert the correct behavior and stay @known-issue until the client is fixed. Issue to be filed separately, after which linkIssue(N) should be added to the three tests.

Known remaining failures (documented, out of scope)

  • External video Pause/Seek/End/presenter-change and screenshare-stops-video: YouTube embed player controls (.ytp-play-button) are unreliable headless — the reason these are @flaky
  • Save user names: the download button clicks, but the GET_USER_NAMES flow produces no download event and no client console error; needs interactive debugging (@known-issue)
  • nonTextContrast: 12 real contrast violations (border #B8C9D8 on white, 1.7:1) — correctly @need-update
  • Stress joins: single-container capacity

How was this tested?

Iterated against a local 4.0.0-rc.1 dev container (v4.0.x-develop @ c96ebe9): full 96-test not-in-CI run as baseline (49 pass / 43 fail), three fix-verify cycles, family sweep of the lock-viewers set at PASS 13 / FAIL 5 with all five failures in the documented classes above and zero regressions among previously-passing tests. The plain notification tests (CI set) pass with the changed selectors. After the Manage promotion, the full user.spec CI-gate set was burned in at 49/50, the single failure being the annotations test quarantined @need-update above.

The media-sharing external video input shipped with MUI's documentation
default id (standard-basic) and no data-test, leaving automation nothing
stable to target after the share flow moved into the media area. Expose
data-test=externalVideoUrlInput on the input itself (via inputProps, as
the data-test lands on the component root otherwise) and give the field
a meaningful id.
connectionFailure and reconnection tests kill TCP sessions, which needs
root. checkRootPermission() used to hard-fail the four tests on any
machine without passwordless sudo - a setup precondition, not a product
defect - so convert the assertion into a skip with an explicit reason.
…s panel

All of these broke when the client moved external video into the media
area, replaced the participants panel's manageUsers gear dropdown with
direct crowd-action buttons, and rebuilt settings checkboxes on MUI:

- videoModalInput: the input id (video-modal-input) is gone; match the
  new data-test hook with a fallback for builds that predate it
- startShareVideoBtn: startNewVideo was renamed to ShareExternalVideo
- userJoin/LeavePopupAlerts: data-test moved from the <input> to the MUI
  Checkbox root, so drop the input prefix
- hideViewersAnnotation: the lock modal renamed the input hook to
  lockShareWhiteboard
- saveSettings() clicked modalConfirmButton, which the settings modal
  does not use - its footer button is saveSettingsButton
- saveUserNames/muteAllUsersExceptPresenter: the manageUsers dropdown is
  gone; downloadUserNamesList is a direct panel header button and mute
  all except presenter is a direct crowd-action button (muteAllUsers)
… menus

Beyond selector drift, this fixes two genuine test-logic bugs that the
4.0 UI surfaced:

- unlocking targeted .first() user list row, which is the moderator's
  own row (its menu has no unlock item) or whichever attendee sorts
  first - target the intended attendee by exact username instead, since
  a bare hasText filter also matches names that extend the target's
  (Attendee vs Attendee2)
- unlock menu items: previously-closed MUI menus leave hidden duplicate
  unlockUserButton menuitems in the DOM and portal order is not
  chronological, so neither nth=1 nor .last() reliably lands on the open
  menu - click the :visible menuitem instead

Also: the hide-user-list flows still opened the per-user menu the 3.x
way (clicking the row); 4.0 requires the row's moreOptions toolbar
button. lockEditSharedNotes asserted against the Etherpad iframe, which
a default 4.0 server does not run - rewritten against BlockNote
(read-only editor when locked, editable again after unlock). Two
cursor-parking hovers targeted the removed chatButton hook.
The issue-25320 smart slides tests wait for the attendee's userListItem
as a join barrier. The participants panel is closed by default on 4.0,
so the item is never in the DOM - open the panel first.
These cannot pass on 4.0 no matter how selectors are updated, and their
@flaky-3.1 tags misfiled them as intermittent:

- Layout describe (6 tests): the manual layout selection modal was
  removed in 3ef18df in favor of unified layout
- Timer: the redesigned timer panel has no in-panel countdown and
  renamed its duration inputs
- Disable users join muted / Clear all status icon: both features are
  gone from the client, only orphaned locale strings remain

Each retag carries a comment stating exactly what upstream needs to
decide (restore the feature, or rewrite/drop the test).
… flow

Menus opened earlier in the message-actions flow leave hidden duplicate
menuitems in the DOM, so the plain visible-wait on askToJoinRoom1 could
land on a stale one - same failure mode and same :visible fix as the
lock-viewers unlock items.
The version-suffixed name was stale and, worse, the tag had come to mean
three different things. Split it by what the evidence actually shows:

- @flaky: genuinely intermittent or environment-sensitive tests
  (Smart Slides, PRESENTATION_ONLY/MEDIA_ONLY, Enforce Layout, large
  presentation upload, webcam resize, breakout message delete)
- @need-update: deterministically broken by 4.0 changes - Select Slide
  and whiteboard Pan (canvas baselines), Lock see other viewers
  annotations (unguarded canvas screenshot compares)
- @known-issue (new tag, added to the CI gate excludes and documented in
  the README): the test asserts correct behavior blocked by a known or
  suspected product issue - auto-hide whiteboard toolbar (issue 24367),
  Save user names (download never fires), and the three hide-user-list
  leave-notification tests (leave toasts stop arriving for everyone
  while the lock is active; join toasts unaffected)

The Manage describe loses its blanket quarantine: its members pass and
now count toward the CI gate again (410 -> 432 gate tests; the full
user.spec gate set was burned in at 49/50 with the one failure being the
annotations test quarantined above).
@antobinary antobinary added this to the Release 4.0 milestone Sep 1, 2026
@antobinary
antobinary marked this pull request as ready for review September 1, 2026 18:11
@coderabbitai

coderabbitai Bot commented Sep 1, 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: Team

Run ID: 28070975-6443-47db-928e-f75a41b6f294

📥 Commits

Reviewing files that changed from the base of the PR and between 2017c93 and 55b3200.

📒 Files selected for processing (2)
  • bigbluebutton-tests/playwright/accessibility/document-title.spec.ts
  • bigbluebutton-tests/playwright/presentation/presentation.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

The change aligns Playwright coverage with BigBlueButton 4.0 UI changes. It adds stable external-video input hooks and updates selectors for relocated or renamed controls. It updates participant, shared-notes, menu, polling, settings, accessibility, and presentation interactions. It changes missing root-permission checks to skips. It documents quarantine tags, excludes known issues in CI, reclassifies affected tests, and adds an exported-annotation overlap test.

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

Merge Risk: ⚪ Minimal · up to 55b32

The PR repairs and reclassifies Playwright coverage and adds a localized external-video test hook without introducing a demonstrated product risk. No actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 19 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: improving quarantined Playwright test health and returning suitable tests to the CI pool.
Description check ✅ Passed The description directly explains the test repairs, quarantine-tag changes, CI promotion, and validation results described in the changeset.
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.
  • Fix all pre-merge checks with AI
✨ 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

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Both pre-date this branch and exist on v4.0.x-develop as well - the
playwright typecheck only runs via the husky pre-commit hook, which was
being skipped, so they went unnoticed. Surfaced while resolving the merge
with develop:

- presentation.ts used ELEMENT_WAIT_EXTRA_LONG_TIME in three timeouts
  without importing it from core/constants
- document-title.spec.ts referenced e.userListToggleBtn, which no side
  ever defined in core/elements; the sidebar toggle it wants is
  e.userListButton (button[accesskey=U])
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

✅ Automated tests have 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