Skip to content

test(playwright): trim the pre-flight E2E suite for CI - #26284

Draft
AtilaU19 wants to merge 87 commits into
bigbluebutton:v4.1.x-developfrom
AtilaU19:task-2890
Draft

AtilaU19 wants to merge 87 commits into
bigbluebutton:v4.1.x-developfrom
AtilaU19:task-2890

Conversation

@AtilaU19

@AtilaU19 AtilaU19 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Cuts the pre-flight E2E tests that run on every PR from 82 to 34, without dropping an assertion.

  • Cases that start from the same meeting run as steps of one test, each step titled after the case it replaces. Where a case needs a room of its own, its step calls the former method on a new page.
  • 15 fault-injection, race and edge cases move to describes tagged @nightly, which npm run test-nightly runs and the per-PR gates leave out. No test is removed: the Nightly tests workflow (.github/workflows/nightly-tests.yml, job recording-livekit) runs every @nightly test on v4.1.x-develop every night, started by the schedule in nightly-schedule.yml since ci: start the nightly tests of every branch from one schedule #26667.

Stacked on #26261, #26255, #26188, #26180, #26113 and #26099; their commits sit below these four.

In detail:

Closes Issue(s)

None

How to test

From bigbluebutton-tests/playwright:

  1. npx playwright test pre-flight/ --list --project=chromium --grep @ci lists 34 tests, and --grep @nightly lists 16: the 15 moved here and the Esc case from the feat(pre-flight): change the room mode during the session #26255 review.
  2. npx playwright test pre-flight/ --project=chromium --workers=1 passes. Locally, on LiveKit with one worker, each of the 49 tests passed 3 times out of 3. The @ci tests take 14.0 minutes, against 30.1 before; the whole folder takes 23.7.
  3. Every should … assertion message in pre-flight/*.ts is still there (332 distinct before and after).

Changelog

Technical — The pre-flight E2E suite runs 34 @ci tests instead of 82: cases sharing a meeting are merged, and fault-injection and edge cases run nightly.

User-facing — None.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@germanocaumo germanocaumo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging the cases looks right: all the should … messages are still there, each step starts from the right state, and the CI test shards pass.

The problem is @nightly: no workflow runs it. Every CI job runs --grep @ci only, and test-nightly isn't used anywhere in .github. So the 15 moved tests would stop running. Some of them are the only check for things this series promises: after changing the mode, a reload or a second moderator applies nothing again; a mode set by another moderator during the join is kept; the apply deadline; and the event is still there after the meeting ends. release-testing.md also still calls those steps automated.

To check:

npx playwright test pre-flight/ --list --project=chromium --grep @nightly   # 15 tests
git grep -n nightly .github                                                # nothing

I ran the 15 nightly tests on a dev server and they pass, so nothing is broken today. I'd keep those cases under @ci (merged like the others if time is the concern), or add a scheduled job that runs npm run test-nightly.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

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

Carry a room-level mode id on the meeting (empty means not configured),
readable by every client, including those still on the pre-flight, and
writable by a moderator through meetingSetRoomMode.

- bbb-common-message: SetRoomModeCmdMsg and RoomModeChangedEvtMsg
- akka-bbb-apps: MeetingStatus2x mirror, handler (moderator only, not
  in breakout rooms), MeetingDAO column and update, event broadcast
- bbb-graphql-server: meeting."roomMode" column, exposed to bbb_client
  and bbb_client_not_in_meeting, and the meetingSetRoomMode action
- bbb-graphql-actions: meetingSetRoomMode handler (moderator only, id
  validated as ^([a-z][a-z0-9-]{0,31})?$)
- bbb-graphql-middleware: allow the getRoomMode operation for users who
  have not joined yet
- bigbluebutton-html5: read roomMode in the meeting subscription
- tests: pre-flight/roomMode.spec.ts
Address the inline comments of the bigbluebutton#26099 review:

- bbb-graphql-actions: refuse a breakout room up front; akka refuses it
  too, but only after the call has answered true
- akka-bbb-apps: log RoomModeChangedEvtMsg in AnalyticsActor
- playwright: runMutation returns a rejected call as errors, so callers
  get one shape
- playwright: skip, naming the requirement, when the Apollo probe is not
  exposed (allowOverrideClientSettingsOnCreateCall)
- playwright: assert user_current.joined is false on the pre-join read
- playwright: cover the refusals only akka makes (a moderator still on the
  pre-flight, a breakout room) and invalid ids
- playwright: drop the viewer removal from the reload case, which could
  not fail on the room mode
feat(pre-flight): add room mode state on the meeting

Carry a room-level mode id on the meeting (empty means not configured),
readable by every client, including those still on the pre-flight, and
writable by a moderator through meetingSetRoomMode.

- bbb-common-message: SetRoomModeCmdMsg and RoomModeChangedEvtMsg
- akka-bbb-apps: MeetingStatus2x mirror, handler (moderator only, not
  in breakout rooms), MeetingDAO column and update, event broadcast
- bbb-graphql-server: meeting."roomMode" column, exposed to bbb_client
  and bbb_client_not_in_meeting, and the meetingSetRoomMode action
- bbb-graphql-actions: meetingSetRoomMode handler (moderator only, id
  validated as ^([a-z][a-z0-9-]{0,31})?$)
- bigbluebutton-html5: read roomMode in the meeting subscription and in
  userCurrentSubscription (user_current.meeting), which users who have
  not joined yet already receive
- tests: pre-flight/roomMode.spec.ts
Refuse an empty room mode, in bbb-graphql-actions and in akka. Empty is
only the column's default: accepting it let any moderator reopen the
pre-flight panel for everyone arriving after them, and no client path
needs to clear the mode. The invalid-mode case now also sends ''.
Follow the probe's switch upstream from the raw create module (APOLLO_CLIENT_SETTINGS_MODULE) to APOLLO_CLIENT_SETTINGS_OVERRIDE through createClientSettingsOverride.
Sort the breakout create import as simple-import-sort expects (playwright-code-validation).
The pre-flight is getting a room mode panel for moderators entering a
room nobody has configured. Picking a mode applies nothing to the room
yet, so the panel needs a switch of its own, off by default and apart
from the pre-flight's.

Add public.app.preFlight.roomModes.enabled (false), overridable per
session with userdata-bbb_pre_flight_room_modes, and
isRoomModePanelEnabled, which also requires the pre-flight and is
therefore off in breakout rooms.
The join's notices ("Device permission pending", joining without
audio) live in the join step's header, and the join button points at
one of them with aria-describedby. A second panel beside the setup one
has to show the same notices above its own footer and start the room
with the same join.

Move the notices into JoinNotices, rendered by exactly one place, and
let JoiningRoomHeader leave them out. JoiningRoomActions takes an
optional label and a secondary action shown before the button. The
screen itself is unchanged.
The pre-flight lays out the setup panel and the join step side by
side, stacked on a phone. The moderator's room mode panel needs a
place of its own beside the setup panel.

PreFlight takes an optional panel. Beside the setup panel it replaces
the join step, with the actions as its footer; the session's heading
stays in the page, visually hidden, as its heading and title. An error
still takes the panel's place, as it takes the join step's.

On a phone the panels become tabs, "Set up devices" and "Set up room",
with the actions pinned below both. The panels stay mounted and are
only hidden, so the camera preview and the picks survive switching.
The setup panel is always inside the tabs on a phone, with the tab
list hidden while it is alone, so a panel arriving later does not
remount it.
A moderator entering a room nobody has configured has nowhere in the
pre-flight to say what the session is for.

With the room mode panel setting on, a moderator entering a room whose
room mode is empty (not a bot, not in a breakout) gets a "Room mode"
panel beside the setup panel. The mode is read before the join through
the getRoomMode operation, which the middleware lets through for users
who have not joined yet. A spinner holds the join button's place while
it is read; a read that fails or gets no answer in 10 seconds falls
back to the regular join step.

Class and Meeting can be picked; Event, Streamed session (Webinar) and
Thesis defense are listed as coming soon. The cards form a radio
group, with the arrow keys moving between the modes that can be
picked. Until a pick, the panel shows an illustration, with a dark
variant for the dark theme since an image cannot read its tokens; then
the selected mode. Cancel clears the pick (not on a phone, as in the
design) and Start room joins, with or without a mode.

The pick only lives in the pre-flight's state: nothing reaches the
room yet, so starting leaves the room as it was created.
feat(pre-flight): add the moderator room mode panel

A moderator entering a room nobody has configured has nowhere in the
pre-flight to say what the session is for.

With the room mode panel setting on, a moderator entering a room whose
room mode is empty (not a bot, not in a breakout) gets a "Room mode"
panel beside the setup panel. The mode is read before the join from
user_current.meeting, which userCurrentSubscription already carries for
users who have not joined yet. A spinner holds the join button's place
until it arrives.

Class and Meeting can be picked; Event, Streamed session (Webinar) and
Thesis defense are listed as coming soon. The cards form a radio
group, with the arrow keys moving between the modes that can be
picked. Until a pick, the panel shows an illustration, with a dark
variant for the dark theme since an image cannot read its tokens; then
the selected mode. Cancel clears the pick (not on a phone, as in the
design) and Start room joins, with or without a mode.

The pick only lives in the pre-flight's state: nothing reaches the
room yet, so starting leaves the room as it was created.
Nothing left BBB when a room mode was applied, so the front-end that
owns the room could not learn what the moderator chose.

SetRoomModeCmdMsgHdlr now sends RoomConfiguredEvtMsg for every room
mode it accepts, the current one included: the Room modes tab applies
the current mode again when one of its settings is edited. The event
carries the mode, the settings the room has once the mode is applied,
who applied it and when. The settings are read from the meeting's
state; the client applies them before it sets the mode, through the
same meeting actor, so they are in place when the event is built.
RoomModeChangedEvtMsg is still sent only when the mode changes.

The recorder stores the event as RoomConfiguredEvent, with the
settings as JSON in the base settings' shape, so it reaches events.xml
in meetings that keep their events (record or meetingKeepEvents).
roomModeReport.spec covers RoomConfiguredEvent in two cases. Each
apply is recorded once, with the room's settings and who applied it:
from the pre-flight, a change in the Room modes tab, and the same mode
applied again there with an edit. A reload or a second moderator
records nothing, and the record is still in the meeting's events after
the meeting ends.

The events are read where the server keeps them: from its Redis with
redis-cli (core/recordedEvents), or from the archived events.xml once
the recording is archived. The tests skip when that Redis does not
hold the meeting, so they run on the BBB host, as in CI. The room is
created with meetingKeepEvents=true, so a server that stops recording
fails them instead.
…s events

Add the manual steps for roomModeReport.spec.ts to release-testing.md, from the PR's How to test.
The room mode specs ran 63 cases, each creating its own meeting and
going through the pre-flight before checking anything. CI splits the
@ci tests into shards by count, so each case pushed heavier tests of
other features into shards 2 and 8, which then ran past the 25-minute
limit of their Run tests step.

Cases that start from the same meeting now run as steps of one test,
each step titled after the case it replaces, with every assertion kept.
Where a case needs a room of its own (another create parameter, a
viewport set before the join), the steps call the former methods on a
new page from newPageForNextRoom(), the way api/checksum runs one
meeting per algorithm. The breakout case moves into the panel's
breakout test, and the summary on a phone into its phone and tablet
test.

The room mode specs go from 63 to 35 tests, and from 21.2 to 17.7
minutes when run locally one at a time.
Five pairs of preFlight.spec cases start the same way: a moderator in
the room and an attendee on the pre-flight. Each pair now runs in one
meeting, with a new attendee for its second step. closeAttendee()
closes the previous attendee and clears the GraphQL routing state the
connection cases keep on the class. The methods themselves are
unchanged.

The guest denial pair stays apart: the second case's toggle would
collapse the waiting list the first one leaves open.

preFlight.spec goes from 19 to 14 tests.
Fault injection (held or refused operations, a dropped connection, the
apply deadline), races between moderators and edge layouts are the
slowest pre-flight tests and the least likely to break with an
unrelated change. Each spec now keeps them in a describe tagged
@nightly, which npm run test-nightly runs and the per-PR gates leave
out. No test is removed.

The pre-flight's @ci tests go from 49 to 34, about 15 of the 25
minutes the folder takes locally.
Five room mode cases sampled the mode, or waited out a quiet spell, for
5 seconds (10 in CI) to show that nothing applied it. The room renders
only once the applier has finished or skipped, and without a pick it
never starts, so a single read settles it once the room is up: after a
reload of a room that has a mode, a start without a pick, a skip
because another moderator is in, and a failed step.

The windows stay where no such signal exists, or where akka drops a
refused command without answering. Each of the five cases is about 15
seconds shorter.

@germanocaumo germanocaumo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The schedule only fires from the default branch (v4.0.x-develop), and that copy of the workflow tests inputs.branch || 'v4.0.x-develop'. Every nightly run so far is on 4.0: the one you linked tested 932c31d, which has no pre-flight/ specs. So on 4.1 these cases only run if someone starts the workflow by hand. I opened #26663 to get a nightly on v4.1.x-develop.

Give the focus back to the window when a room mode change fails: it
sat on "Change room mode", disabled while applying, so it fell to the
page and Esc did nothing until a click inside the window. It goes back
to the button, or to the window when the button stays disabled, and
only when it is not in the window already. roomModeSwitch covers it by
dropping SetRoomMode and pressing Esc once the change is given up.
Give the guest policy row a key of its own,
app.preFlight.roomMode.settings.guestPolicy ("Guest policy"): the
app.guest-policy.title it used left en.json in 707b4ff, so the
summary showed the message id. The summary test now checks that no
label shows a message id.
# Conflicts:
#	bigbluebutton-tests/playwright/pre-flight/roomModeSwitch.spec.ts
#	bigbluebutton-tests/playwright/pre-flight/roomModeSwitch.ts
A reload lands on the pre-flight once the server has removed the user
who left, and the room layout never shows. The reload step now accepts
both landings: on the pre-flight, it checks there is no panel and joins
the room.
The reload after the switch can land on the pre-flight once the server
has removed the user who left. It now goes through reloadsIntoRoom,
which accepts both landings.
…s events

The reload can land on the pre-flight once the server has removed the
user who left. It now goes through reloadsIntoRoom, which accepts both
landings.
# Conflicts:
#	bigbluebutton-tests/playwright/pre-flight/roomModeApply.ts
The reload step can land on the pre-flight once the server has removed
the user who left. It now goes through reloadsIntoRoom, which accepts
both landings.
@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

This branch has not been deployed

No deployments
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.

3 participants