Skip to content

test: Reorg flextabs locators#38533

Merged
dionisio-bot[bot] merged 24 commits intodevelopfrom
test/reorg-flextabs
Apr 7, 2026
Merged

test: Reorg flextabs locators#38533
dionisio-bot[bot] merged 24 commits intodevelopfrom
test/reorg-flextabs

Conversation

@dougfabris
Copy link
Copy Markdown
Member

@dougfabris dougfabris commented Feb 6, 2026

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

CORE-1989

Summary by CodeRabbit

  • Accessibility

    • Improved username semantics and label associations in user info for screen readers.
    • Added accessible label to the channel “Add existing” modal.
  • Refactor

    • Reworked end-to-end test page-object architecture for more consistent test interactions.
    • Consolidated flex-tab fragments and toolbar behaviors to simplify UI automation.
  • Style

    • Expanded an info-panel component to accept additional layout/styling props.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Feb 6, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: e093616

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dougfabris dougfabris added this to the 8.2.0 milestone Feb 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 6, 2026

Walkthrough

Reorganized e2e flextab page-objects into a new fragments/flextabs namespace, added many FlexTab/modal/user-card fragments, refactored RoomToolbar/menu flows, updated Home* page objects to compose new fragments, migrated ~50 e2e specs to the new APIs, and applied small UI/accessibility tweaks and a component prop change.

Changes

Cohort / File(s) Summary
Flextabs — New fragments
apps/meteor/tests/e2e/page-objects/fragments/flextabs/* (e.g. admin-edit-room-flextab.ts, channels-flextab.ts, edit-room-flextab.ts, members-flextab.ts, notification-preferences-flextab.ts, prune-messages-flextab.ts, room-info-flextab.ts, threads-flextab.ts, user-info-flextab.ts, export-messages-flextab.ts, files-flextab.ts)
Added many specialized FlexTab fragments, standardized names (ExportMessages → ExportMessagesFlexTab), and exposed tab-specific locators/actions.
Flextabs — infra & re-exports
apps/meteor/tests/e2e/page-objects/fragments/flextabs/index.ts, .../flextab.ts
Added barrel export for flextabs and adjusted base FlexTab imports/pathing and constructor docs.
Modal & helper fragments
.../fragments/modals/*, .../fragments/modals/index.ts, apps/meteor/tests/e2e/page-objects/fragments/modals/confirm-remove-modal.ts, apps/meteor/tests/e2e/page-objects/fragments/user-card.ts
Added ConfirmDeleteRoom/Team, ConfirmRemoveModal, ConfirmPrune modal helpers and a new UserCard fragment with avatar locator and openUserInfo().
Removed legacy HomeFlextab fragments
apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts, home-flextab-*.ts, .../home-flextab-channels.ts, .../home-flextab-members.ts, .../home-flextab-room.ts, .../home-flextab-pruneMessages.ts
Deleted older HomeFlextab/home-* fragments; functionality migrated into the new flextabs modules.
Home page objects & composition
apps/meteor/tests/e2e/page-objects/home-channel.ts, home-discussion.ts, home-team.ts, home-omnichannel.ts, encrypted-room.ts
HomeChannel now composes multiple FlexTab fragments and a userCard; HomeDiscussion extends HomeChannel; HomeTeam adds headerToolbar; EncryptedRoomPage uses EncryptedRoomToolbar.
Toolbar refactor
apps/meteor/tests/e2e/page-objects/fragments/toolbar.ts
RoomToolbar now delegates menu-item lookups to menu.getMenuItem(...), adds menu getters (export/notifications/E2EE), introduces openMoreOptions(), and adds TeamToolbar/EncryptedRoomToolbar subclasses.
Page-object import updates & path fixes
assorted apps/meteor/tests/e2e/page-objects/*, apps/meteor/tests/e2e/page-objects/omnichannel/*
Updated many imports to fragments/flextabs, adjusted constructor signatures/types (e.g., EncryptedRoomPage, AdminRooms.editRoom).
E2E tests — API migrations
apps/meteor/tests/e2e/*.spec.ts (e.g., channel-management.spec.ts, e2ee-*.spec.ts, export-messages.spec.ts, feature-preview.spec.ts, prune-messages.spec.ts, retention-policy.spec.ts, team-management.spec.ts, message-actions.spec.ts, etc.)
Updated tests to use new page-object APIs: poHomeChannel.roomToolbar.openMoreOptions() + menu items, poHomeChannel.tabs.* flextabs, poHomeTeam flows, UserCard.openUserInfo(), ExportMessagesFlexTab or poHomeChannel.tabs.exportMessages, and label-based checkbox interactions.
Page-object index consolidation
apps/meteor/tests/e2e/page-objects/fragments/index.ts
Removed some old re-exports and consolidated flextab exports under ./flextabs.
App accessibility / UI component tweaks
apps/meteor/client/components/UserInfo/UserInfo.tsx, apps/meteor/client/views/teams/.../AddExistingModal/AddExistingModal.tsx, packages/ui-client/src/components/InfoPanel/InfoPanelField.tsx
Added stable useId() and dt/dd structure for username label, added aria-label to AddExistingModal Modal, and widened InfoPanelField props to forward Box props.
Miscellaneous tests & path cleanup
assorted page-object and spec files
Adjusted selectors/usages (UserCard, page-object replacements, test assertions) and removed/renamed obsolete helpers.

Sequence Diagram(s)

sequenceDiagram
    participant Test as E2E Test
    participant Home as HomeChannel / HomeTeam
    participant Toolbar as RoomToolbar
    participant Menu as MenuMore
    participant Dialog as FlexTab/Dialog

    Test->>Home: open room/team UI
    Home->>Toolbar: access toolbar instance
    Test->>Toolbar: openMoreOptions()
    Toolbar->>Menu: click btnMoreOptions
    Menu->>Menu: render menu
    Test->>Menu: getMenuItem("Export" / "Enable E2E" / "Notifications")
    Menu->>Dialog: click menu item
    Dialog->>Dialog: open FlexTab dialog or perform action
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test: Reorg flextabs locators' is concise, specific, and clearly describes the main change: reorganizing flextab locators in e2e tests.
Linked Issues check ✅ Passed The PR successfully addresses all primary objectives from CORE-1989: restructuring flextab page objects, aligning with UI patterns (MenuMore/MenuOptions), refactoring RoomInfoFlexTab and RoomToolbar, simplifying EditRoomFlexTab, and fixing E2EE tests.
Out of Scope Changes check ✅ Passed Changes to UserInfo.tsx (semantic HTML for accessibility) and InfoPanelField (props expansion) are slightly outside the stated scope of e2e test reorganization but are minimal and support the larger refactoring effort.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

📦 Docker Image Size Report

➡️ Changes

Service Current Baseline Change Percent
sum of all images 0B 0B 0B
account-service 0B 0B 0B
authorization-service 0B 0B 0B
ddp-streamer-service 0B 0B 0B
omnichannel-transcript-service 0B 0B 0B
presence-service 0B 0B 0B
queue-worker-service 0B 0B 0B
rocketchat 0B 0B 0B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 21:03", "12/22 18:54", "12/23 16:16", "12/24 19:38", "12/25 17:51", "12/26 13:18", "12/29 19:01", "12/30 20:52", "02/10 00:04 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.00]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.00]
  line "queue-worker-service" [0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  line "rocketchat" [0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.00]
Loading

Statistics (last 30 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.4GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 0B
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-38533
  • Baseline: develop
  • Timestamp: 2026-02-10 00:04:03 UTC
  • Historical data points: 30

Updated: Tue, 10 Feb 2026 00:04:04 GMT

@alfredodelfabro alfredodelfabro removed this from the 8.2.0 milestone Feb 20, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.51%. Comparing base (8ebf44b) to head (e093616).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38533      +/-   ##
===========================================
- Coverage    70.57%   70.51%   -0.07%     
===========================================
  Files         3270     3271       +1     
  Lines       116766   116804      +38     
  Branches     21091    21112      +21     
===========================================
- Hits         82409    82361      -48     
- Misses       32304    32381      +77     
- Partials      2053     2062       +9     
Flag Coverage Δ
e2e 60.40% <100.00%> (-0.08%) ⬇️
e2e-api 48.12% <ø> (-0.95%) ⬇️
unit 70.98% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dougfabris dougfabris added this to the 8.3.0 milestone Feb 23, 2026
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Feb 24, 2026
@alfredodelfabro alfredodelfabro removed this from the 8.3.0 milestone Mar 17, 2026
@dougfabris dougfabris added this to the 8.4.0 milestone Mar 19, 2026
@dougfabris dougfabris removed the stat: QA assured Means it has been tested and approved by a company insider label Apr 2, 2026
@dougfabris dougfabris marked this pull request as ready for review April 5, 2026 21:49
@dougfabris dougfabris requested a review from a team as a code owner April 5, 2026 21:49
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 65 files

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🧹 Nitpick comments (5)
apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/AddExistingModal.tsx (1)

32-32: Consider removing or addressing the TODO comment.

The TODO comment violates the coding guideline to avoid code comments in the implementation. Either address this by using GenericModal now, or track it in an issue and remove the comment.

As per coding guidelines: "Avoid code comments in the implementation".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/AddExistingModal.tsx`
at line 32, Remove or resolve the TODO comment in AddExistingModal: either
refactor the component to use GenericModal instead of Modal (update imports and
replace Modal usage within the AddExistingModal component) or create a tracked
issue and remove the inline TODO; if choosing the issue route, add the issue ID
in a short comment and delete the TODO. Ensure the change references the
AddExistingModal component and the Modal/GenericModal symbols so reviewers can
verify the replacement or the created issue.
apps/meteor/tests/e2e/page-objects/fragments/flextabs/flextab.ts (1)

6-8: Consider removing the JSDoc comment.

While this documents a design decision, it could be seen as violating the guideline to avoid code comments. An alternative is to track this refactoring task in an issue.

As per coding guidelines: "Avoid code comments in the implementation".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/tests/e2e/page-objects/fragments/flextabs/flextab.ts` around
lines 6 - 8, Remove the JSDoc comment above the public property "root" in
flextab.ts (the comment that explains why root is public) and replace that
in-repo explanation with a tracked issue instead; simply delete the comment
block so the code no longer contains the implementation-level justification, and
create/link an issue to track the refactor of making root protected in the
future.
apps/meteor/tests/e2e/page-objects/fragments/modals/confirm-remove-modal.ts (1)

5-8: Constructor can be simplified.

The constructor only passes root to the parent class without additional logic, making it redundant in TypeScript.

♻️ Proposed simplification
 export class ConfirmRemoveModal extends Modal {
-	constructor(root: Locator) {
-		super(root);
-	}
-
 	get btnRemove() {

Note: This requires the parent Modal class to have a public constructor that accepts Locator.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/tests/e2e/page-objects/fragments/modals/confirm-remove-modal.ts`
around lines 5 - 8, The ConfirmRemoveModal constructor is redundant because it
only forwards `root` to the parent; remove the constructor from the
`ConfirmRemoveModal` class so it inherits `Modal`'s constructor directly. Ensure
the parent `Modal` class has a public constructor signature that accepts a
`Locator` (update `Modal` to export a public constructor if needed) so instances
of `ConfirmRemoveModal` continue to be constructible with a `Locator`.
apps/meteor/tests/e2e/page-objects/fragments/flextabs/admin-edit-room-flextab.ts (1)

10-47: Prefer semantic role/label locators in this flextab page object.

Line 10-Line 47 currently rely on CSS/text-engine selectors (locator('input[...]'), label >> text=...); migrating to getByRole/getByLabel would make these locators more resilient to markup refactors.

Based on learnings: "In RocketChat e2e tests, avoid using data-qa attributes to locate elements. Prefer semantic locators such as getByRole, getByLabel, getByText, getByTitle and ARIA-based selectors. Apply this rule to all TypeScript files under apps/meteor/tests/e2e to improve test reliability, accessibility, and maintainability."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/meteor/tests/e2e/page-objects/fragments/flextabs/admin-edit-room-flextab.ts`
around lines 10 - 47, The current getters (roomNameInput, privateLabel,
privateInput, roomOwnerInput, archivedLabel, archivedInput, favoriteLabel,
favoriteInput, defaultLabel, defaultInput) use CSS/text selectors; replace them
with semantic Playwright locators like getByLabel/getByRole/getByText/getByTitle
or ARIA-based selectors (e.g., use getByLabel for inputs by their visible label,
getByRole('checkbox'/'textbox'/'switch') with name for inputs, and getByText for
labels) to make selectors resilient—update each getter to use the corresponding
semantic locator instead of locator('input[...]') or 'label >> text=...'; ensure
you do not switch to data-qa attributes.
apps/meteor/tests/e2e/page-objects/home-team.ts (1)

14-20: Consider caching tabs instances.

The tabs getter creates new TeamInfoFlexTab and EditTeamFlexTab instances on every access. While this follows the existing pattern in the codebase and works correctly, caching these instances (similar to other properties like headerToolbar) would be slightly more efficient.

♻️ Optional: Cache tabs instances
 export class HomeTeam extends HomeChannel {
 	readonly headerToolbar: TeamToolbar;
+	private readonly _room: TeamInfoFlexTab;
+	private readonly _editRoom: EditTeamFlexTab;

 	constructor(page: Page) {
 		super(page);
 		this.headerToolbar = new TeamToolbar(page);
+		this._room = new TeamInfoFlexTab(page);
+		this._editRoom = new EditTeamFlexTab(page);
 	}

 	override get tabs() {
 		return {
 			...super.tabs,
-			room: new TeamInfoFlexTab(this.page),
-			editRoom: new EditTeamFlexTab(this.page),
+			room: this._room,
+			editRoom: this._editRoom,
 		};
 	}
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/tests/e2e/page-objects/home-team.ts` around lines 14 - 20, The
tabs getter currently instantiates new TeamInfoFlexTab and EditTeamFlexTab
objects on every access (override get tabs), which is inefficient; change it to
cache those instances on the class (similar to headerToolbar) by creating
private properties (e.g., _tabs or _teamInfoTab/_editTeamTab) and return the
cached objects from the tabs getter, instantiating them only if the cache is
empty; ensure you still spread super.tabs when building the returned object.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/meteor/tests/e2e/avatar-settings.ts`:
- Line 94: The test is calling the async DOM method getAttribute('src') without
awaiting and asserting its return directly; replace that with a Playwright
web-first assertion by awaiting expect on the image locator
(poHomeChannel.userCard.imgUserCard) and using toHaveAttribute('src', avatarUrl)
so the assertion is retried and stable; update the assertion from
expect(poHomeChannel.userCard.imgUserCard.getAttribute('src')).toBe(avatarUrl)
to an awaited web-first form (await
expect(poHomeChannel.userCard.imgUserCard).toHaveAttribute('src', avatarUrl)).

In `@apps/meteor/tests/e2e/page-objects/fragments/flextabs/members-flextab.ts`:
- Around line 123-125: The showAllUsers() helper is not idempotent because it
always queries the trigger by its current label ('Online') and fails once 'All'
is selected; update showAllUsers() to short-circuit when 'All' is already
selected or to target the filter control independent of its displayed value:
first inspect the listbox/current selection (e.g., read the selected option text
or an aria-selected attribute on the listbox) and return immediately if it
equals 'All', otherwise open the filter control (locate the toggle by a stable
selector instead of name, or locate the listbox container and click its toggle)
and then call listbox.selectOption('All'); ensure you update references to
root.getByRole('button', { name: 'Online' }) and listbox.selectOption('All')
accordingly so the helper works whether the current value is 'Online' or 'All'.

In
`@apps/meteor/tests/e2e/page-objects/fragments/flextabs/notification-preferences-flextab.ts`:
- Around line 15-20: The XPath locators in the methods are bypassing this.root
because they start with '//' (absolute); change them to relative XPath by using
'.//' so they stay scoped to the notification-preferences dialog—update the
locator in the method that returns
this.root.locator(`//div[`@id`="${device}Alert"]`) and in async
selectDropdownById(text: string) which uses
this.root.locator(`//div[`@id`="${text}"]`) to use './/div[`@id`="..."]' instead.

In `@apps/meteor/tests/e2e/page-objects/fragments/flextabs/threads-flextab.ts`:
- Around line 6-8: The constructor for ThreadsFlexTab currently binds to a
generic dialog via super(page.getByRole('dialog')), which can attach to the
wrong dialog; update the locator to scope by name by calling
page.getByRole('dialog', { name: 'Threads' }) (i.e., change the super(...) call
in the ThreadsFlexTab constructor) so it follows the established pattern used by
FilesFlexTab, SearchMessagesFlexTab, and UserInfoFlexTab and prevents flakiness
when multiple dialogs are present.
- Around line 14-16: Update the lastThreadMessage getter to avoid data-qa-type
selectors: within the existing lastThreadMessage accessor (which uses
listThreadMessages), replace the chain that locates '[data-qa-type="message"]'
with listThreadMessages.getByRole('listitem').last() and then access the message
body using .locator('.rcx-message-body') so it follows the semantic locator
pattern used in home-content.ts.

In `@apps/meteor/tests/e2e/page-objects/fragments/modals/confirm-delete-modal.ts`:
- Around line 21-23: The dialog locator in the ConfirmDeleteRoomModal
constructor (super(page.getByRole('dialog', { name: 'Delete' }))) is performing
substring matching and can collide with other dialogs; update the locator to use
exact matching by adding exact: true to the options object so the constructor
targets only the dialog with the exact name "Delete".

In `@apps/meteor/tests/e2e/page-objects/fragments/modals/confirm-remove-modal.ts`:
- Line 1: Change the Locator import in this fragment to use the project's common
Playwright package: replace the current import of Locator from 'playwright-core'
with an import from '@playwright/test' so the file's top-level import (the
Locator type used in this module) matches other modal page-object files.

In `@apps/meteor/tests/e2e/page-objects/fragments/toolbar.ts`:
- Around line 127-138: The openTeamMembers method clicks menuItemTeamMembers
without opening the overflow menu first; update openTeamMembers in TeamToolbar
to open the menu (e.g., await this.menu.open()) before awaiting
this.menuItemTeamMembers.click() so the menu item is visible and clickable —
ensure you use the existing menu accessor and keep the method async/await flow
intact.

In `@apps/meteor/tests/e2e/prune-messages.spec.ts`:
- Around line 64-65: The test is asserting checkboxes via label element locators
(pruneMessages.labelFilesOnly and pruneMessages.labelDoNotPrunePinned), but
Playwright's .toBeChecked() only works on input elements; change those locators
to semantic label-to-input resolvers using getByLabel with the exact label text
(e.g., getByLabel('Only remove the attached files, keep messages') and
getByLabel('Do not prune pinned messages')) so the assertions target the actual
checkbox inputs and not the label elements, then update the assertions to use
those new locators.

---

Nitpick comments:
In
`@apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/AddExistingModal.tsx`:
- Line 32: Remove or resolve the TODO comment in AddExistingModal: either
refactor the component to use GenericModal instead of Modal (update imports and
replace Modal usage within the AddExistingModal component) or create a tracked
issue and remove the inline TODO; if choosing the issue route, add the issue ID
in a short comment and delete the TODO. Ensure the change references the
AddExistingModal component and the Modal/GenericModal symbols so reviewers can
verify the replacement or the created issue.

In
`@apps/meteor/tests/e2e/page-objects/fragments/flextabs/admin-edit-room-flextab.ts`:
- Around line 10-47: The current getters (roomNameInput, privateLabel,
privateInput, roomOwnerInput, archivedLabel, archivedInput, favoriteLabel,
favoriteInput, defaultLabel, defaultInput) use CSS/text selectors; replace them
with semantic Playwright locators like getByLabel/getByRole/getByText/getByTitle
or ARIA-based selectors (e.g., use getByLabel for inputs by their visible label,
getByRole('checkbox'/'textbox'/'switch') with name for inputs, and getByText for
labels) to make selectors resilient—update each getter to use the corresponding
semantic locator instead of locator('input[...]') or 'label >> text=...'; ensure
you do not switch to data-qa attributes.

In `@apps/meteor/tests/e2e/page-objects/fragments/flextabs/flextab.ts`:
- Around line 6-8: Remove the JSDoc comment above the public property "root" in
flextab.ts (the comment that explains why root is public) and replace that
in-repo explanation with a tracked issue instead; simply delete the comment
block so the code no longer contains the implementation-level justification, and
create/link an issue to track the refactor of making root protected in the
future.

In `@apps/meteor/tests/e2e/page-objects/fragments/modals/confirm-remove-modal.ts`:
- Around line 5-8: The ConfirmRemoveModal constructor is redundant because it
only forwards `root` to the parent; remove the constructor from the
`ConfirmRemoveModal` class so it inherits `Modal`'s constructor directly. Ensure
the parent `Modal` class has a public constructor signature that accepts a
`Locator` (update `Modal` to export a public constructor if needed) so instances
of `ConfirmRemoveModal` continue to be constructible with a `Locator`.

In `@apps/meteor/tests/e2e/page-objects/home-team.ts`:
- Around line 14-20: The tabs getter currently instantiates new TeamInfoFlexTab
and EditTeamFlexTab objects on every access (override get tabs), which is
inefficient; change it to cache those instances on the class (similar to
headerToolbar) by creating private properties (e.g., _tabs or
_teamInfoTab/_editTeamTab) and return the cached objects from the tabs getter,
instantiating them only if the cache is empty; ensure you still spread
super.tabs when building the returned object.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3bd3b19b-d644-496b-a04b-d182066ee96f

📥 Commits

Reviewing files that changed from the base of the PR and between 8ebf44b and fad7b5a.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/components/UserInfo/__snapshots__/UserInfo.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (64)
  • apps/meteor/client/components/UserInfo/UserInfo.tsx
  • apps/meteor/client/views/teams/contextualBar/channels/AddExistingModal/AddExistingModal.tsx
  • apps/meteor/tests/e2e/account-profile.spec.ts
  • apps/meteor/tests/e2e/avatar-settings.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-pdf-export.spec.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/message-actions.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-device-management.ts
  • apps/meteor/tests/e2e/page-objects/admin-emojis.ts
  • apps/meteor/tests/e2e/page-objects/admin-rooms.ts
  • apps/meteor/tests/e2e/page-objects/encrypted-room.ts
  • apps/meteor/tests/e2e/page-objects/fragments/edit-room-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/admin-edit-room-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/admin-flextab-emoji.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/channels-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/device-info-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/edit-contact-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/edit-room-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/edit-user-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/export-messages-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/files-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/index.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/members-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/notification-preferences-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/prune-messages-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/search-messages-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/threads-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/user-info-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab-channels.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab-pruneMessages.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/page-objects/fragments/modals/confirm-delete-modal.ts
  • apps/meteor/tests/e2e/page-objects/fragments/modals/confirm-remove-modal.ts
  • apps/meteor/tests/e2e/page-objects/fragments/modals/index.ts
  • apps/meteor/tests/e2e/page-objects/fragments/room-info-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toolbar.ts
  • apps/meteor/tests/e2e/page-objects/fragments/user-card.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/page-objects/home-omnichannel.ts
  • apps/meteor/tests/e2e/page-objects/home-team.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-agents.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-contact-center/omnichannel-contact-center-chats.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-contact-center/omnichannel-contact-center-contacts.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-custom-fields.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-info.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-priorities.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-sla-policies.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-tags.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-triggers.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel/omnichannel-units.ts
  • apps/meteor/tests/e2e/prune-messages.spec.ts
  • apps/meteor/tests/e2e/retention-policy.spec.ts
  • apps/meteor/tests/e2e/team-management.spec.ts
  • packages/ui-client/src/components/InfoPanel/InfoPanelField.tsx
💤 Files with no reviewable changes (8)
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab-pruneMessages.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab-channels.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab-room.ts
  • apps/meteor/tests/e2e/page-objects/fragments/edit-room-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/room-info-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-flextab-members.ts

Copy link
Copy Markdown
Contributor

@aleksandernsilva aleksandernsilva left a comment

Choose a reason for hiding this comment

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

Just a few nitpicks and questions.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts (1)

109-115: Prefer getByText over locator() for text-based selectors.

These methods use locator() with CSS/text selectors, which is inconsistent with the semantic locator pattern used elsewhere in this file and the codebase.

♻️ Proposed refactor to use semantic locators
 getInfo(value: string): Locator {
-	return this.root.locator(`span >> text="${value}"`);
+	return this.root.getByText(value, { exact: true });
 }

 getLabel(label: string): Locator {
-	return this.root.locator(`div >> text="${label}"`);
+	return this.root.getByText(label, { exact: true });
 }

Based on learnings: "In RocketChat e2e tests, avoid using data-qa attributes to locate elements. Prefer semantic locators such as getByRole, getByLabel, getByText, getByTitle and ARIA-based selectors."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts`
around lines 109 - 115, Replace the text-based locator calls in getInfo and
getLabel with semantic getByText locators: locate the two methods getInfo(value:
string) and getLabel(label: string) and change their return from
this.root.locator(`...text=...`) to this.root.getByText(...) (using the
value/label parameter) so the file uses semantic Playwright locators instead of
CSS/text locator strings; preserve exact-match behavior if intended by passing
the original string directly to getByText.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts`:
- Around line 109-115: Replace the text-based locator calls in getInfo and
getLabel with semantic getByText locators: locate the two methods getInfo(value:
string) and getLabel(label: string) and change their return from
this.root.locator(`...text=...`) to this.root.getByText(...) (using the
value/label parameter) so the file uses semantic Playwright locators instead of
CSS/text locator strings; preserve exact-match behavior if intended by passing
the original string directly to getByText.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8663aefd-15de-47c4-93fe-1971f7b61d54

📥 Commits

Reviewing files that changed from the base of the PR and between 0d17a52 and e093616.

📒 Files selected for processing (6)
  • apps/meteor/tests/e2e/account-profile.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/user-info-flextab.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/page-objects/home-omnichannel.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/meteor/tests/e2e/page-objects/home-omnichannel.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/meteor/tests/e2e/account-profile.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/user-info-flextab.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
apps/meteor/tests/e2e/page-objects/**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

Utilize existing page objects pattern from apps/meteor/tests/e2e/page-objects/

Files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
apps/meteor/tests/e2e/**/*.{ts,spec.ts}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

apps/meteor/tests/e2e/**/*.{ts,spec.ts}: Store commonly used locators in variables/constants for reuse
Follow Page Object Model pattern consistently in Playwright tests

Files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
🧠 Learnings (17)
📓 Common learnings
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/home-content.ts:60-82
Timestamp: 2026-02-24T19:36:55.089Z
Learning: In RocketChat/Rocket.Chat e2e tests (apps/meteor/tests/e2e/page-objects/fragments/home-content.ts), thread message preview listitems do not have aria-roledescription="message", so lastThreadMessagePreview locator cannot be scoped to messageListItems (which filters for aria-roledescription="message"). It should remain scoped to page.getByRole('listitem') or mainMessageList.getByRole('listitem').
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/omnichannel/omnichannel-send-pdf-transcript.spec.ts:66-67
Timestamp: 2026-02-24T19:22:52.984Z
Learning: In RocketChat/Rocket.Chat Playwright e2e tests, prefer using translated text and ARIA roles (getByRole, getByText, etc.) over data-qa locators. If translation values change, update the corresponding test locators accordingly. Never prefer data-qa locators.
Learnt from: ggazzo
Repo: RocketChat/Rocket.Chat PR: 35995
File: apps/meteor/app/api/server/v1/rooms.ts:1107-1112
Timestamp: 2026-02-23T17:53:18.785Z
Learning: In Rocket.Chat PR reviews, maintain strict scope boundaries—when a PR is focused on a specific endpoint (e.g., rooms.favorite), avoid reviewing or suggesting changes to other endpoints that were incidentally refactored (e.g., rooms.invite) unless explicitly requested by maintainers.
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Follow Page Object Model pattern consistently in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Store commonly used locators in variables/constants for reuse
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2026-02-24T19:36:55.089Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/home-content.ts:60-82
Timestamp: 2026-02-24T19:36:55.089Z
Learning: In RocketChat/Rocket.Chat e2e tests (apps/meteor/tests/e2e/page-objects/fragments/home-content.ts), thread message preview listitems do not have aria-roledescription="message", so lastThreadMessagePreview locator cannot be scoped to messageListItems (which filters for aria-roledescription="message"). It should remain scoped to page.getByRole('listitem') or mainMessageList.getByRole('listitem').

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Follow Page Object Model pattern consistently in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Store commonly used locators in variables/constants for reuse

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Avoid using `page.locator()` in Playwright tests - always prefer semantic locators such as `page.getByRole()`, `page.getByLabel()`, `page.getByText()`, or `page.getByTitle()`

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-12-16T17:29:40.430Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37834
File: apps/meteor/tests/e2e/page-objects/fragments/admin-flextab-emoji.ts:12-22
Timestamp: 2025-12-16T17:29:40.430Z
Learning: In all page-object files under apps/meteor/tests/e2e/page-objects/, import expect from ../../utils/test (Playwright's async expect) instead of from Jest. Jest's expect is synchronous and incompatible with web-first assertions like toBeVisible, which can cause TypeScript errors.

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Implement proper wait strategies for dynamic content in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (`toBeVisible`, `toHaveText`, etc.) in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2026-02-24T19:39:42.247Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/message.ts:7-7
Timestamp: 2026-02-24T19:39:42.247Z
Learning: In RocketChat e2e tests, avoid using data-qa attributes to locate elements. Prefer semantic locators such as getByRole, getByLabel, getByText, getByTitle and ARIA-based selectors. Apply this rule to all TypeScript files under apps/meteor/tests/e2e to improve test reliability, accessibility, and maintainability.

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `expect` matchers for assertions (`toEqual`, `toContain`, `toBeTruthy`, `toHaveLength`, etc.) instead of `assert` statements in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `page.waitFor()` with specific conditions instead of hardcoded timeouts in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts
🔇 Additional comments (7)
apps/meteor/tests/e2e/page-objects/fragments/flextabs/room-info-flextab.ts (3)

8-63: Well-structured modal and flextab page objects.

The ConfirmLeaveRoomModal and RoomInfoFlexTab classes follow the Page Object Model pattern correctly. Good use of semantic locators (getByRole, getByLabel) and proper composition with MenuMore and modal fragments.


65-102: Good extension pattern for team-specific flows.

ConfirmConvertIntoChannelModal and TeamInfoFlexTab properly extend base classes and add team-specific functionality (deleteTeam, convertIntoChannel). The dialog scoping with { name: 'Team info' } is appropriate.


117-123: LGTM!

getInfoByLabel and getTagInfoByLabel correctly use semantic locators (getByLabel, getByRole, getByText).

apps/meteor/tests/e2e/page-objects/home-channel.ts (4)

3-24: Clean import organization for the new fragment-based architecture.

The imports are well-organized, consolidating flextab fragments from the central ./fragments barrel export while keeping specialized fragments (RoomToolbar, UserCard, VoiceCalls) as separate imports.


38-52: Good typed structure for flextab composition.

The _tabs object is properly typed with specific flextab classes, providing type safety and IDE autocompletion for test authors.


70-83: Proper use of semantic locators for dialog-scoped flextabs.

The room and editRoom tabs are correctly scoped to their respective dialogs using getByRole('dialog', { name: '...' }), which aligns with the PR objective of using more accurate locators to reduce flakiness.


91-93: Getter pattern acknowledged.

The private _tabs + getter pattern was discussed in a previous review thread, and the author confirmed it's intentional.

@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Apr 7, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 7, 2026
@dionisio-bot dionisio-bot bot enabled auto-merge April 7, 2026 16:32
@dionisio-bot dionisio-bot bot added this pull request to the merge queue Apr 7, 2026
Merged via the queue into develop with commit 2031ba8 Apr 7, 2026
46 checks passed
@dionisio-bot dionisio-bot bot deleted the test/reorg-flextabs branch April 7, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants