Skip to content

Conversation

@juliajforesti
Copy link
Contributor

@juliajforesti juliajforesti commented Jan 8, 2026

CORE-1661

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • New Features

    • Added accessibility labels to message composer components in rooms and threads to enhance support for screen readers.
  • Chores

    • Improved clarity of error messages for video camera access and audio recording features.

✏️ Tip: You can customize this high-level summary in your review settings.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jan 8, 2026

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

@changeset-bot
Copy link

changeset-bot bot commented Jan 8, 2026

⚠️ No Changeset found

Latest commit: d22a81e

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

The PR refactors e2e test page-objects by introducing a new Composer abstraction layer encapsulating composer UI element locators. It adds aria-label accessibility attributes to RoomComposer and ThreadComposer components, defines Composer, RoomComposer, and ThreadComposer classes, and updates dozens of e2e tests to use the reorganized page-object structure.

Changes

Cohort / File(s) Change Summary
Accessibility Enhancements
apps/meteor/client/views/room/body/RoomBody.tsx, apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
Added aria-label attributes to RoomComposer and ThreadComposer components with translated strings (Room_composer and Thread_composer).
Page-Object Core Refactoring
apps/meteor/tests/e2e/page-objects/fragments/composer.ts
New file introducing abstract Composer class with public getters for inputMessage, btnJoinRoom, toolbarPrimaryActions, allPrimaryActions, and formatting/action buttons. Concrete RoomComposer and ThreadComposer subclasses wire root locators to footer selectors.
Page-Object Integration
apps/meteor/tests/e2e/page-objects/fragments/home-content.ts, apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts, apps/meteor/tests/e2e/page-objects/fragments/index.ts
Integrated RoomComposer and ThreadComposer into HomeContent and HomeOmnichannelContent; removed legacy direct element getters (inputMessage, btnJoinRoom) in favor of composer composition; added new methods for thread messaging.
Home Channel Page-Object
apps/meteor/tests/e2e/page-objects/home-channel.ts
Added public RoomComposer and ThreadComposer instances; removed legacy getters (composer, composerBoxPopup, composerToolbar); added emoji-picker related getters and utility methods (getEmojiPickerTabByName, pickEmoji).
E2E Test Selector Updates (Core)
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-file-encryption.spec.ts, apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
Updated test selectors from content.inputMessage, content.btnMenuMoreActions to composer.inputMessage, composer.btnMenuMoreActions.
E2E Test Selector Updates (Embedded & Emojis)
apps/meteor/tests/e2e/embedded-layout.spec.ts, apps/meteor/tests/e2e/emojis.spec.ts
Restructured composer interactions to use nested composer.inputMessage and composer.toolbarPrimaryActions; updated emoji-picker paths from content.* to top-level accessors.
E2E Test Selector Updates (Feature & Image)
apps/meteor/tests/e2e/feature-preview.spec.ts, apps/meteor/tests/e2e/image-gallery.spec.ts
Replaced content.btnMenuMoreActions and content.btnJoinRoom with composer.btnMenuMoreActions and composer.btnJoinRoom.
E2E Test Selector Updates (Message Composer)
apps/meteor/tests/e2e/message-composer.spec.ts
Refactored toolbar interactions from composerToolbar and composerToolbarActions to composer.toolbarPrimaryActions, composer.allPrimaryActions, and explicit button accessors (btnBoldFormatter, btnItalicFormatter, etc.); updated input and popup references.
E2E Test Selector Updates (Mentions, Messaging, Quotes)
apps/meteor/tests/e2e/message-mentions.spec.ts, apps/meteor/tests/e2e/messaging.spec.ts, apps/meteor/tests/e2e/quote-messages.spec.ts
Updated input interactions from composer to composer.inputMessage for typing, focus, and value checks.
E2E Test Selector Updates (Permissions, Preview, Voice Calls)
apps/meteor/tests/e2e/permissions.spec.ts, apps/meteor/tests/e2e/preview-public-channel.spec.ts, apps/meteor/tests/e2e/voice-calls-ee.spec.ts
Updated composer-related selectors (upload buttons, join button, input message) to use composer.* paths.
E2E Test Selector Updates (Omnichannel)
apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts, apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts, apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts, apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts, apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts, apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts, apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts, apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
Updated omnichannel test selectors from content.inputMessage, content.btnJoinRoom to composer.inputMessage, composer.btnJoinRoom; added HomeOmnichannel import in contact-center-chats test.
Internationalization
packages/i18n/src/locales/en.i18n.json
Added new translation keys Message_composer, Thread_composer, Room_composer; updated Camera_access_not_allowed and Message_Audio_Recording_Disabled strings with prefixes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • dougfabris
  • ggazzo

Poem

🐰 A composer so neat, reorganized with care,
Locators now nested, with aria labels fair,
From content to composer, the tests all align,
E2E pages dance in a pattern so fine! ✨

🚥 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 Title accurately describes the main change: reorganization of composer-related page objects and test locators used in E2E tests.
Linked Issues check ✅ Passed Changes comprehensively implement CORE-1661 requirements by reorganizing composer locators into a structured page object, extracting composition-based helpers, and updating all E2E tests to use the new API surface.
Out of Scope Changes check ✅ Passed All changes are directly related to composer page object reorganization and E2E test updates; minimal translation updates for accessibility labels are integral to implementation.
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.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test/composer

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.

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.64%. Comparing base (020dfbc) to head (d22a81e).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38104      +/-   ##
===========================================
+ Coverage    70.62%   70.64%   +0.02%     
===========================================
  Files         3148     3148              
  Lines       108850   108850              
  Branches     19584    19621      +37     
===========================================
+ Hits         76870    76895      +25     
+ Misses       29971    29948      -23     
+ Partials      2009     2007       -2     
Flag Coverage Δ
e2e 60.18% <ø> (+0.03%) ⬆️
e2e-api 47.32% <ø> (ø)
unit 71.78% <ø> (+0.02%) ⬆️

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 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", "01/12 17:44 (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-38104
  • Baseline: develop
  • Timestamp: 2026-01-12 17:44:39 UTC
  • Historical data points: 30

Updated: Mon, 12 Jan 2026 17:44:39 GMT

@juliajforesti juliajforesti force-pushed the test/composer branch 2 times, most recently from c69e990 to 66ab37b Compare January 9, 2026 00:28
@juliajforesti juliajforesti added this to the 8.1.0 milestone Jan 9, 2026
@juliajforesti juliajforesti marked this pull request as ready for review January 9, 2026 14:24
@juliajforesti juliajforesti requested a review from a team as a code owner January 9, 2026 14:24
Copy link
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 33 files

Copy link
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: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/meteor/tests/e2e/feature-preview.spec.ts (2)

258-266: Use stable selector for Discussion menu item instead of localized text.

The page.getByRole('menuitem', { name: 'Discussion' }) selector is language-dependent. Use page.locator('[data-qa-id="start-discussion"]') for reliability across UI language changes, consistent with test patterns in federation tests.

The btnMenuMoreActions selector is already stable (getByRole with accessible name 'More actions'), and waitForChannel() ensures readiness by confirming the message list is not busy.


584-593: Add readiness guards before clicking "More Actions" button for robustness.

The composer's "More Actions" button should be checked for visibility and enabled state before interaction. While similar code paths in the file (e.g., line 262) don't currently include these guards, adding them improves test reliability for dynamic UI elements.

Proposed diff
 			await test.step('create discussion in DM', async () => {
+				await expect(poHomeChannel.composer.btnMenuMoreActions).toBeVisible();
+				await expect(poHomeChannel.composer.btnMenuMoreActions).toBeEnabled();
 				await poHomeChannel.composer.btnMenuMoreActions.click();
 				await page.getByRole('menuitem', { name: 'Discussion' }).click();
🤖 Fix all issues with AI agents
In
@apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx:
- Line 110: The aria-label on the RoomComposer was changed to a localized string
(RoomComposer in ThreadChat.tsx) which breaks the ThreadComposer page object's
hardcoded selector page.locator('footer[aria-label="Thread composer"]'); add a
stable test hook instead: add a data-qa-id (e.g. data-qa-id="thread-composer")
to the footer/RoomComposer element while keeping the
aria-label={t('Thread_composer')}, and update the Page Object selector to use
footer[data-qa-id="thread-composer"] (or similar locale-independent attribute)
so tests no longer rely on English aria text.

In @apps/meteor/tests/e2e/image-gallery.spec.ts:
- Around line 26-31: After calling
poHomeChannel.navbar.openChat(targetChannelLargeImage) and
poHomeChannel.navbar.openChat(targetChannel), insert an explicit wait/assertion
that poHomeChannel.composer.btnJoinRoom is visible/attached before invoking
poHomeChannel.composer.btnJoinRoom.click(); specifically, after each
openChat(...) call assert the visibility/readiness of the btnJoinRoom element
(e.g., using your test framework's toBeVisible/waitForDisplayed style assertion)
so the click only runs when the button is present and interactable.

In @packages/i18n/src/locales/en.i18n.json:
- Line 3403: Update the locale value for the key
Message_Audio_Recording_Disabled to a tighter, punctuated phrase; replace "Audio
message - message audio recording disabled" with "Audio message - audio
recording is disabled." so it matches style and clarity (refer to the JSON key
Message_Audio_Recording_Disabled).
- Line 1015: The "Camera_access_not_allowed" i18n value should match the
phrasing and punctuation pattern used by other "*_access_not_allowed" keys;
locate other keys like "Microphone_access_not_allowed" or similar and mirror
their prefix/sentence structure and terminal punctuation (e.g., whether they use
"Video message - ..." vs "Video message — ...", sentence casing, and a trailing
period). Update the "Camera_access_not_allowed" string to exactly follow that
established convention so all media access messages are consistent.
🧹 Nitpick comments (8)
apps/meteor/client/views/room/body/RoomBody.tsx (1)

276-289: Avoid using localized aria-label as the primary E2E selector; add a stable data-qa-id/test id for the composer root.

Given apps/meteor/tests/e2e/page-objects/fragments/composer.ts roots via footer[aria-label="Room composer"], any translation/copy change can break tests. Keep the localized aria-label for a11y, but introduce a stable attribute (e.g., data-qa-id="room-composer") on the same DOM node and update the page object to use it. Based on learnings, prefer stable selectors over localized text.

Also please verify that RoomComposer actually forwards aria-label to the underlying DOM footer; otherwise tests expecting it won’t find the node.

apps/meteor/tests/e2e/quote-messages.spec.ts (1)

52-58: Good migration to composer.inputMessage; consider pressing Enter on the locator (focus safety).

Optional tweak to reduce focus-related flakes:

Proposed diff
-			await poHomeChannel.composer.inputMessage.fill(editedQuoteText);
-			await page.keyboard.press('Enter');
+			await poHomeChannel.composer.inputMessage.fill(editedQuoteText);
+			await poHomeChannel.composer.inputMessage.press('Enter');
apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts (1)

346-350: Composer-based edit input is consistent; consider a visibility gate before fill() to reduce flake risk.

Migration to poHomeChannel.composer.inputMessage matches the new POM structure. If edit-mode transitions are occasionally slow, adding await expect(poHomeChannel.composer.inputMessage).toBeVisible() right before fill() can make this more robust. As per coding guidelines, prefer web-first assertions.

Also applies to: 370-374

apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts (1)

123-131: Join flow update to composer.* looks correct; watch localized system-message assertions.

The join/read-mode gating via composer.btnJoinRoom and composer.inputMessage is a good fit for the new page-object structure. The lastSystemMessageBody assertion on 'joined the channel' can be brittle under i18n; consider a more stable signal (data-qa/state) if available. Based on learnings, prefer stable selectors over localized text.

apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts (1)

64-71: Prefer toHaveValue() over expect(await inputValue()) for a web-first, retrying assertion.

Proposed change
-			expect(await poHomeChannel.composer.inputMessage.inputValue()).toBe('any_description');
+			await expect(poHomeChannel.composer.inputMessage).toHaveValue('any_description');

As per coding guidelines, prefer web-first assertions to reduce flakiness.

apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts (1)

155-165: Consider consistent page object usage across test suite.

This test initializes a separate poHomeOmnichannel instance only for the join room interactions, while other tests in the same file continue using poOmnichats.content.* (e.g., line 209 uses poOmnichats.content.btnTakeChat). This mixing of page objects within the same test suite may cause confusion.

Consider whether:

  • All tests should use poHomeOmnichannel for consistency
  • Or initialize poHomeOmnichannel in beforeEach if multiple tests need it
  • Or document why this specific test requires a different page object
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (2)

8-9: Remove redundant constructor assignments.

TypeScript automatically assigns constructor parameters declared with access modifiers (lines 5-6), making explicit assignments in lines 8-9 unnecessary.

♻️ Proposed refactor
 	constructor(
 		protected root: Locator,
 		protected page?: Page,
-	) {
-		this.root = root;
-		this.page = page;
-	}
+	) {}

17-17: Prefer semantic locators over .locator() with attribute selectors.

Several getters use .locator() with attribute/CSS selectors instead of Playwright's semantic locators:

  • Line 17: .locator('[name="msg"]') could use getByRole('textbox') with appropriate filters
  • Line 57: .locator('[role="menu"][name="ComposerBoxPopup"]') should use getByRole('menu', { name: 'ComposerBoxPopup' })
  • Lines 67, 73: .locator('footer[aria-label="..."]') should use getByRole() or getByLabel()
♻️ Proposed refactors

For line 57:

 	get boxPopup(): Locator {
-		return this.root.locator('[role="menu"][name="ComposerBoxPopup"]');
+		return this.root.getByRole('menu', { name: 'ComposerBoxPopup' });
 	}

For lines 67 and 73:

 export class RoomComposer extends Composer {
 	constructor(page: Page) {
-		super(page.locator('footer[aria-label="Room composer"]'));
+		super(page.getByLabel('Room composer'));
 	}
 }
 export class ThreadComposer extends Composer {
 	constructor(page: Page) {
-		super(page.locator('footer[aria-label="Thread composer"]'));
+		super(page.getByLabel('Thread composer'));
 	}
 }

Based on learnings, prefer stable selectors like data-qa-id attributes when available.

Also applies to: 57-57, 67-67, 73-73

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e9a46d8 and 66ab37b.

📒 Files selected for processing (33)
  • apps/meteor/client/views/room/body/RoomBody.tsx
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • 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-file-encryption.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • packages/i18n/src/locales/en.i18n.json
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/client/views/room/body/RoomBody.tsx
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
**/*.spec.ts

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

**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use .spec.ts extension for test files (e.g., login.spec.ts)

Files:

  • apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
apps/meteor/tests/e2e/**/*.spec.ts

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

apps/meteor/tests/e2e/**/*.spec.ts: All test files must be created in apps/meteor/tests/e2e/ directory
Avoid using page.locator() in Playwright tests - always prefer semantic locators such as page.getByRole(), page.getByLabel(), page.getByText(), or page.getByTitle()
Use test.beforeAll() and test.afterAll() for setup/teardown in Playwright tests
Use test.step() for complex test scenarios to improve organization in Playwright tests
Group related tests in the same file
Utilize Playwright fixtures (test, page, expect) for consistency in test files
Prefer web-first assertions (toBeVisible, toHaveText, etc.) in Playwright tests
Use expect matchers for assertions (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements in Playwright tests
Use page.waitFor() with specific conditions instead of hardcoded timeouts in Playwright tests
Implement proper wait strategies for dynamic content in Playwright tests
Maintain test isolation between test cases in Playwright tests
Ensure clean state for each test execution in Playwright tests
Ensure tests run reliably in parallel without shared state conflicts

Files:

  • apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/fragments/index.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
🧠 Learnings (27)
📓 Common learnings
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/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.
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/**/*.spec.ts : Avoid using `page.locator()` in Playwright tests - always prefer semantic locators such as `page.getByRole()`, `page.getByLabel()`, `page.getByText()`, or `page.getByTitle()`
📚 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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
📚 Learning: 2025-12-10T21:00:54.909Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:54.909Z
Learning: Rocket.Chat monorepo: Jest testMatch pattern '<rootDir>/src/**/*.spec.(ts|js|mjs)' is valid in this repo and used across multiple packages (e.g., packages/tools, ee/packages/omnichannel-services). Do not flag it as invalid in future reviews.

Applied to files:

  • apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.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/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`

Applied to files:

  • apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
📚 Learning: 2025-09-23T19:22:59.217Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.

Applied to files:

  • apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
📚 Learning: 2025-11-19T18:20:37.116Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: apps/meteor/server/services/media-call/service.ts:141-141
Timestamp: 2025-11-19T18:20:37.116Z
Learning: In apps/meteor/server/services/media-call/service.ts, the sendHistoryMessage method should use call.caller.id or call.createdBy?.id as the message author, not call.transferredBy?.id. Even for transferred calls, the message should appear in the DM between the two users who are calling each other, not sent by the person who transferred the call.

Applied to files:

  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.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 `test.step()` for complex test scenarios to improve organization in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ce.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.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/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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 : Ensure tests run reliably in parallel without shared state conflicts

Applied to files:

  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.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 : Ensure clean state for each test execution in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
📚 Learning: 2025-12-16T17:29:45.163Z
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:45.163Z
Learning: In page object files under `apps/meteor/tests/e2e/page-objects/`, always import `expect` from `../../utils/test` (Playwright's async expect), not from Jest. Jest's `expect` has a synchronous signature and will cause TypeScript errors when used with web-first assertions like `toBeVisible()`.

Applied to files:

  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • packages/i18n/src/locales/en.i18n.json
📚 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 : All test files must be created in `apps/meteor/tests/e2e/` directory

Applied to files:

  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.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/fragments/index.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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 `test.beforeAll()` and `test.afterAll()` for setup/teardown in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/image-gallery.spec.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 **/*.spec.ts : Use descriptive test names that clearly communicate expected behavior in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
📚 Learning: 2025-09-18T17:32:33.969Z
Learnt from: aleksandernsilva
Repo: RocketChat/Rocket.Chat PR: 36974
File: apps/meteor/client/components/Omnichannel/OutboundMessage/components/OutboundMessageWizard/forms/MessageForm/MessageForm.tsx:124-129
Timestamp: 2025-09-18T17:32:33.969Z
Learning: The ARIA mismatch issue in MessageForm's template field (where FieldError id used templateId instead of messageFormId) was addressed in PR #36972 through refactoring the template field into a separate TemplateField component, which uses consistent templateFieldId for both aria-describedby and FieldError id.

Applied to files:

  • apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • packages/i18n/src/locales/en.i18n.json
📚 Learning: 2025-11-17T22:38:48.631Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37505
File: packages/i18n/src/locales/en.i18n.json:3765-3765
Timestamp: 2025-11-17T22:38:48.631Z
Learning: Rocket.Chat i18n copy: Keep sentence case for the value of "Notification_Desktop_show_voice_calls" in packages/i18n/src/locales/en.i18n.json (“Show desktop notifications for voice calls”) per design directive; do not change to Title Case even if nearby labels differ.

Applied to files:

  • packages/i18n/src/locales/en.i18n.json
🧬 Code graph analysis (6)
apps/meteor/client/views/room/body/RoomBody.tsx (1)
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (1)
  • RoomComposer (65-69)
apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts (1)
apps/meteor/tests/e2e/page-objects/home-omnichannel.ts (1)
  • HomeOmnichannel (16-63)
apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx (1)
packages/ui-composer/src/MessageComposer/index.ts (1)
  • MessageComposer (15-15)
apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx (1)
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (1)
  • RoomComposer (65-69)
apps/meteor/tests/e2e/page-objects/home-channel.ts (1)
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (2)
  • RoomComposer (65-69)
  • ThreadComposer (71-75)
apps/meteor/tests/e2e/page-objects/fragments/home-content.ts (1)
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (2)
  • RoomComposer (65-69)
  • ThreadComposer (71-75)
⏰ 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). (10)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: cubic · AI code reviewer

Copy link
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: 3

🤖 Fix all issues with AI agents
In @apps/meteor/tests/e2e/page-objects/fragments/composer.ts:
- Line 13: Replace localized text-based queries in the Composer page-object
(calls using this.root.getByRole(..., { name: '...' }) and similar queries) with
stable data-qa-id selectors: change the Join button selector, the toolbar
aria-label query, Emoji/Audio/Video/Upload file button selectors, Format buttons
(Bold/Italic/Link) and the read-only footer message to use this.root.getByTestId
or this.root.querySelector('[data-qa-id="..."]') targeting new data-qa-id
attributes; update the corresponding UI components to include those data-qa-id
values (e.g., data-qa-id="composer-join", "composer-toolbar", "composer-emoji",
"composer-audio", "composer-video", "composer-upload", "composer-bold",
"composer-italic", "composer-link", "composer-readonly-footer") so tests no
longer rely on localized names.

In @apps/meteor/tests/e2e/page-objects/home-channel.ts:
- Line 109: Replace the fragile localized selector by adding a stable attribute:
add a data-qa-id (e.g., data-qa-id="emoji-picker") to the EmojiPickerContainer
component (EmojiPickerContainer in
packages/ui-client/src/components/EmojiPicker/EmojiPickerContainer.tsx), then
update the test in apps/meteor/tests/e2e/page-objects/home-channel.ts to target
that attribute (e.g., locator for [data-qa-id="emoji-picker"] or test-id
equivalent) instead of using getByRole('dialog', { name: 'Emoji picker' }).
🧹 Nitpick comments (3)
apps/meteor/tests/e2e/message-composer.spec.ts (1)

141-141: Replace hardcoded timeout with a specific wait condition.

This hardcoded 1-second timeout should be replaced with a specific wait condition (e.g., waiting for the audio recording to reach a certain state or duration indicator to be visible).

As per coding guidelines, use page.waitFor() with specific conditions instead of hardcoded timeouts.

apps/meteor/tests/e2e/page-objects/fragments/composer.ts (1)

4-6: Remove redundant assignment in constructor.

The constructor parameter protected root: Locator already assigns the value to this.root, making the explicit assignment on line 5 redundant.

♻️ Proposed fix
 export abstract class Composer {
 	constructor(protected root: Locator) {
-		this.root = root;
 	}
apps/meteor/tests/e2e/page-objects/home-channel.ts (1)

121-121: Prefer semantic locators over page.locator() with role strings.

These lines use locator() with role selector strings (e.g., role=tablist >> role=tab[name="${name}"]). As per coding guidelines, avoid using page.locator() and prefer semantic locators such as getByRole().

♻️ Proposed refactor
 getEmojiPickerTabByName(name: string) {
-	return this.dialogEmojiPicker.locator(`role=tablist >> role=tab[name="${name}"]`);
+	return this.dialogEmojiPicker.getByRole('tablist').getByRole('tab', { name });
 }

 getEmojiByName(name: string) {
-	return this.dialogEmojiPicker.locator(`role=tabpanel >> role=button[name="${name}"]`);
+	return this.dialogEmojiPicker.getByRole('tabpanel').getByRole('button', { name });
 }

Also applies to: 125-125

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 579bd35 and dea6c3b.

📒 Files selected for processing (4)
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
**/*.spec.ts

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

**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use .spec.ts extension for test files (e.g., login.spec.ts)

Files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
apps/meteor/tests/e2e/**/*.spec.ts

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

apps/meteor/tests/e2e/**/*.spec.ts: All test files must be created in apps/meteor/tests/e2e/ directory
Avoid using page.locator() in Playwright tests - always prefer semantic locators such as page.getByRole(), page.getByLabel(), page.getByText(), or page.getByTitle()
Use test.beforeAll() and test.afterAll() for setup/teardown in Playwright tests
Use test.step() for complex test scenarios to improve organization in Playwright tests
Group related tests in the same file
Utilize Playwright fixtures (test, page, expect) for consistency in test files
Prefer web-first assertions (toBeVisible, toHaveText, etc.) in Playwright tests
Use expect matchers for assertions (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements in Playwright tests
Use page.waitFor() with specific conditions instead of hardcoded timeouts in Playwright tests
Implement proper wait strategies for dynamic content in Playwright tests
Maintain test isolation between test cases in Playwright tests
Ensure clean state for each test execution in Playwright tests
Ensure tests run reliably in parallel without shared state conflicts

Files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.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/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/composer.ts
🧠 Learnings (22)
📓 Common learnings
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: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.
📚 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/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.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/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`

Applied to files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/message-composer.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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 : Ensure clean state for each test execution in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
📚 Learning: 2025-12-16T17:29:45.163Z
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:45.163Z
Learning: In page object files under `apps/meteor/tests/e2e/page-objects/`, always import `expect` from `../../utils/test` (Playwright's async expect), not from Jest. Jest's `expect` has a synchronous signature and will cause TypeScript errors when used with web-first assertions like `toBeVisible()`.

Applied to files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
📚 Learning: 2025-09-23T19:22:59.217Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.

Applied to files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/message-composer.spec.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 `test.step()` for complex test scenarios to improve organization in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/message-composer.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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 **/*.spec.ts : Use descriptive test names that clearly communicate expected behavior in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/message-composer.spec.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 : Ensure tests run reliably in parallel without shared state conflicts

Applied to files:

  • apps/meteor/tests/e2e/emojis.spec.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/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/emojis.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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 : All test files must be created in `apps/meteor/tests/e2e/` directory

Applied to files:

  • apps/meteor/tests/e2e/emojis.spec.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/composer.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/composer.ts
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
🧬 Code graph analysis (1)
apps/meteor/tests/e2e/page-objects/home-channel.ts (1)
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (2)
  • RoomComposer (69-73)
  • ThreadComposer (75-79)
⏰ 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

Copy link
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: 1

🤖 Fix all issues with AI agents
In @apps/meteor/tests/e2e/page-objects/fragments/composer.ts:
- Around line 60-62: The Locator getter get boxPopup uses a non-standard name
attribute; update the component to add a stable data-qa-id attribute (e.g.,
data-qa-id="composer-box-popup") and change the selector in the get boxPopup
locator to use [data-qa-id="composer-box-popup"] instead of
[role="menu"][name="ComposerBoxPopup"] so the page-object targets a stable,
standard attribute; locate the get boxPopup getter in the composer fragment and
update the selector string and add the corresponding data-qa-id to the rendered
element in the component.
🧹 Nitpick comments (3)
apps/meteor/tests/e2e/message-mentions.spec.ts (1)

110-116: LGTM! The refactor to use composer.inputMessage aligns with the page object reorganization.

The change correctly moves the input interaction to the new composer abstraction while maintaining the test's intent of triggering the mention popup.

Optional: Consider refactoring lines 114-115 to use semantic locators per coding guidelines. As per coding guidelines, prefer getByRole() over .locator().

♻️ Suggested improvement (optional, out of scope)
-		await expect(poHomeChannel.content.messagePopupUsers.locator('role=listitem >> text="all"')).toBeVisible();
-		await expect(poHomeChannel.content.messagePopupUsers.locator('role=listitem >> text="here"')).toBeVisible();
+		await expect(poHomeChannel.content.messagePopupUsers.getByRole('listitem', { name: 'all' })).toBeVisible();
+		await expect(poHomeChannel.content.messagePopupUsers.getByRole('listitem', { name: 'here' })).toBeVisible();
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (2)

4-6: Remove redundant assignment.

The this.root = root assignment is redundant since TypeScript's parameter property shorthand (protected root: Locator) already assigns the parameter to the instance property.

Suggested fix
 export abstract class Composer {
-	constructor(protected root: Locator) {
-		this.root = root;
-	}
+	constructor(protected root: Locator) {}

64-66: Consider using a stable selector for read-only footer.

The getByText('This room is read only') locator uses hard-coded English text that could break if the UI language changes. This text is translatable (mapped to This_room_is_read_only in i18n), so add a data-qa attribute to the MessageComposerHint component and update the page-object to use it instead. This aligns with the pattern used throughout the page-objects codebase.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between dea6c3b and d22a81e.

📒 Files selected for processing (30)
  • apps/meteor/client/views/room/body/RoomBody.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • 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-file-encryption.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
🚧 Files skipped from review as they are similar to previous changes (17)
  • apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.ts
  • apps/meteor/tests/e2e/permissions.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.ts
  • apps/meteor/tests/e2e/emojis.spec.ts
  • apps/meteor/tests/e2e/quote-messages.spec.ts
  • apps/meteor/tests/e2e/message-composer.spec.ts
  • apps/meteor/tests/e2e/channel-management.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.ts
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/client/views/room/body/RoomBody.tsx
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
**/*.spec.ts

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

**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use .spec.ts extension for test files (e.g., login.spec.ts)

Files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
apps/meteor/tests/e2e/**/*.spec.ts

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

apps/meteor/tests/e2e/**/*.spec.ts: All test files must be created in apps/meteor/tests/e2e/ directory
Avoid using page.locator() in Playwright tests - always prefer semantic locators such as page.getByRole(), page.getByLabel(), page.getByText(), or page.getByTitle()
Use test.beforeAll() and test.afterAll() for setup/teardown in Playwright tests
Use test.step() for complex test scenarios to improve organization in Playwright tests
Group related tests in the same file
Utilize Playwright fixtures (test, page, expect) for consistency in test files
Prefer web-first assertions (toBeVisible, toHaveText, etc.) in Playwright tests
Use expect matchers for assertions (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements in Playwright tests
Use page.waitFor() with specific conditions instead of hardcoded timeouts in Playwright tests
Implement proper wait strategies for dynamic content in Playwright tests
Maintain test isolation between test cases in Playwright tests
Ensure clean state for each test execution in Playwright tests
Ensure tests run reliably in parallel without shared state conflicts

Files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
🧠 Learnings (25)
📓 Common learnings
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/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/**/*.spec.ts : Avoid using `page.locator()` in Playwright tests - always prefer semantic locators such as `page.getByRole()`, `page.getByLabel()`, `page.getByText()`, or `page.getByTitle()`
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.
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
📚 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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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/page-objects/**/*.ts : Utilize existing page objects pattern from `apps/meteor/tests/e2e/page-objects/`

Applied to files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
📚 Learning: 2025-12-10T21:00:54.909Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:54.909Z
Learning: Rocket.Chat monorepo: Jest testMatch pattern '<rootDir>/src/**/*.spec.(ts|js|mjs)' is valid in this repo and used across multiple packages (e.g., packages/tools, ee/packages/omnichannel-services). Do not flag it as invalid in future reviews.

Applied to files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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 : Ensure tests run reliably in parallel without shared state conflicts

Applied to files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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 `test.step()` for complex test scenarios to improve organization in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
📚 Learning: 2025-12-16T17:29:45.163Z
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:45.163Z
Learning: In page object files under `apps/meteor/tests/e2e/page-objects/`, always import `expect` from `../../utils/test` (Playwright's async expect), not from Jest. Jest's `expect` has a synchronous signature and will cause TypeScript errors when used with web-first assertions like `toBeVisible()`.

Applied to files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/image-gallery.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
📚 Learning: 2025-09-23T19:22:59.217Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36987
File: apps/meteor/tests/e2e/page-objects/fragments/room-toolbar.ts:10-20
Timestamp: 2025-09-23T19:22:59.217Z
Learning: In Playwright e2e tests, prefer stable selectors like data-qa-id attributes over localized text in getByRole() or getByText() calls to prevent test failures when UI language changes. Test translations separately by validating actual text content after ensuring UI interactions work with stable selectors.

Applied to files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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 : Ensure clean state for each test execution in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/image-gallery.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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/omnichannel/omnichannel-canned-responses-usage.spec.ts
  • apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts
  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/embedded-layout.spec.ts
  • apps/meteor/tests/e2e/messaging.spec.ts
  • apps/meteor/tests/e2e/message-mentions.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.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 : All test files must be created in `apps/meteor/tests/e2e/` directory

Applied to files:

  • apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts
  • apps/meteor/tests/e2e/feature-preview.spec.ts
  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
📚 Learning: 2025-11-27T17:56:26.050Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37557
File: apps/meteor/client/views/admin/ABAC/AdminABACRooms.tsx:115-116
Timestamp: 2025-11-27T17:56:26.050Z
Learning: In Rocket.Chat, the GET /v1/abac/rooms endpoint (implemented in ee/packages/abac/src/index.ts) only returns rooms where abacAttributes exists and is not an empty array (query: { abacAttributes: { $exists: true, $ne: [] } }). Therefore, in components consuming this endpoint (like AdminABACRooms.tsx), room.abacAttributes is guaranteed to be defined for all returned rooms, and optional chaining before calling array methods like .join() is sufficient without additional null coalescing.

Applied to files:

  • apps/meteor/client/views/room/body/RoomBody.tsx
📚 Learning: 2025-09-18T17:32:33.969Z
Learnt from: aleksandernsilva
Repo: RocketChat/Rocket.Chat PR: 36974
File: apps/meteor/client/components/Omnichannel/OutboundMessage/components/OutboundMessageWizard/forms/MessageForm/MessageForm.tsx:124-129
Timestamp: 2025-09-18T17:32:33.969Z
Learning: The ARIA mismatch issue in MessageForm's template field (where FieldError id used templateId instead of messageFormId) was addressed in PR #36972 through refactoring the template field into a separate TemplateField component, which uses consistent templateFieldId for both aria-describedby and FieldError id.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • apps/meteor/tests/e2e/page-objects/fragments/composer.ts
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • apps/meteor/tests/e2e/page-objects/fragments/composer.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/fragments/composer.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
📚 Learning: 2025-11-19T18:20:37.116Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: apps/meteor/server/services/media-call/service.ts:141-141
Timestamp: 2025-11-19T18:20:37.116Z
Learning: In apps/meteor/server/services/media-call/service.ts, the sendHistoryMessage method should use call.caller.id or call.createdBy?.id as the message author, not call.transferredBy?.id. Even for transferred calls, the message should appear in the DM between the two users who are calling each other, not sent by the person who transferred the call.

Applied to files:

  • apps/meteor/tests/e2e/voice-calls-ee.spec.ts
🧬 Code graph analysis (3)
apps/meteor/client/views/room/body/RoomBody.tsx (1)
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (1)
  • RoomComposer (69-73)
apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx (1)
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (1)
  • RoomComposer (69-73)
apps/meteor/tests/e2e/page-objects/fragments/home-content.ts (1)
apps/meteor/tests/e2e/page-objects/fragments/composer.ts (2)
  • RoomComposer (69-73)
  • ThreadComposer (75-79)
⏰ 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (18)
apps/meteor/tests/e2e/image-gallery.spec.ts (1)

26-30: LGTM — correctly migrates join action to the composer fragment.

The refactor properly moves btnJoinRoom interactions from content to composer, aligning with the PR's objective to consolidate composer-related page object elements. This is a logical placement since the join button appears in the composer area of the UI.

apps/meteor/client/views/room/body/RoomBody.tsx (1)

277-288: LGTM! Good accessibility enhancement.

The aria-label attribute provides proper accessibility labeling and enables stable selectors for the e2e page object (RoomComposer class uses footer[aria-label="Room composer"]). This aligns well with the Page Object Model pattern. Based on learnings, using aria-labels as selectors is preferable for accessibility-focused components.

apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx (1)

110-135: LGTM! Distinct aria-label for thread context.

Using 'Thread_composer' (vs 'Room_composer' in RoomBody.tsx) correctly differentiates the thread composer for both accessibility and test targeting purposes. This allows the ThreadComposer page object class to use a distinct selector while reusing the same RoomComposer component.

apps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.ts (1)

348-348: LGTM! Consistent migration to the new composer API.

The changes correctly update the message input access path from content.inputMessage to composer.inputMessage, aligning with the broader refactor introducing the nested Composer abstraction. Based on learnings, this follows the Page Object Model pattern consistently.

Also applies to: 372-372

apps/meteor/tests/e2e/messaging.spec.ts (1)

90-90: LGTM! Correct migration to composer API for navigation and editing tests.

The changes properly update all composer input interactions:

  • Focus assertion in navigation test (line 90)
  • Click interaction for focus restoration test (line 127)
  • Value retrieval for message edition test (line 168)

All updates align with the nested composer.inputMessage pattern introduced by this PR. Based on learnings, this follows the Page Object Model pattern consistently.

Also applies to: 127-127, 168-168

apps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.ts (1)

59-59: LGTM! Correct visibility assertions for omnichannel queue/chat states.

The updates properly use the new composer.inputMessage path for visibility assertions:

  • Line 59: Correctly asserts the composer input is not visible when viewing a queued chat
  • Line 70: Correctly asserts the composer input becomes visible after taking the chat

Uses web-first assertions as per coding guidelines. Based on learnings, this follows the Page Object Model pattern consistently.

Also applies to: 70-70

apps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.ts (1)

110-110: LGTM! Comprehensive migration for canned responses tests.

All interactions with the message input are correctly updated to use composer.inputMessage:

  • Value assertions after using canned responses (lines 110, 169, 196, 202)
  • Click and keyboard interactions for modifying responses (lines 165, 167)

The test logic remains intact while adopting the new composer abstraction. Based on learnings, this follows the Page Object Model pattern consistently.

Also applies to: 165-169, 196-196, 202-202

apps/meteor/tests/e2e/feature-preview.spec.ts (1)

262-262: LGTM! Correct migration of More Actions button to composer.

The "More Actions" menu button is semantically part of the composer toolbar, so moving it from content.btnMenuMoreActions to composer.btnMenuMoreActions is appropriate. Both occurrences are used to open the discussion creation flow from the composer menu. Based on learnings, this follows the Page Object Model pattern consistently.

Also applies to: 588-588

apps/meteor/tests/e2e/voice-calls-ee.spec.ts (1)

32-32: LGTM!

The migration from content.inputMessage to composer.inputMessage is consistent across all test steps and aligns with the new page object structure. The tests continue to use proper web-first assertions and test organization.

Also applies to: 56-56, 110-110, 141-141

apps/meteor/tests/e2e/embedded-layout.spec.ts (4)

68-70: LGTM!

Clean migration to the new composer API. The assertions correctly target composer.inputMessage and composer.btnJoinRoom, maintaining the test's intent to verify member functionality in embedded layout.


88-95: LGTM!

The composer functionality test properly uses the new composer.inputMessage and composer.toolbarPrimaryActions paths. The fill/assert pattern for testing input behavior remains sound.


105-118: LGTM!

Non-member functionality tests correctly migrated to use composer.btnJoinRoom for join actions and composer.inputMessage for input state verification. The test flow for joining and messaging is properly maintained.


133-135: LGTM!

Direct message functionality test correctly uses the new composer paths for visibility and state assertions.

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

6-6: LGTM!

Good use of composition pattern. The HomeContent class now properly composes RoomComposer and ThreadComposer instances, providing a clean separation of concerns. Using protected visibility correctly allows subclasses to access these composers while maintaining encapsulation.

Also applies to: 18-25


76-84: LGTM!

The joinRoomIfNeeded() method correctly delegates to the composer's locators for checking input state and triggering the join action.


86-109: LGTM!

The sendMessage() method properly uses composer.inputMessage for filling text and composer.btnSend for clicking send. The enforcement logic with response waiting remains intact.


517-525: LGTM!

Good addition of sendMessageInThread() using threadComposer. The sendMessageInVideoConfPopup() correctly uses the dialog context directly since the video conference popup has its own separate composer.

apps/meteor/tests/e2e/page-objects/fragments/composer.ts (1)

69-78: LGTM!

RoomComposer and ThreadComposer correctly extend the abstract Composer class and target the appropriate footer elements via aria-label. This aligns with accessibility improvements made in RoomBody.tsx and ThreadChat.tsx.

@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Jan 12, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jan 12, 2026
@kodiakhq kodiakhq bot merged commit 3e54a03 into develop Jan 12, 2026
78 of 81 checks passed
@kodiakhq kodiakhq bot deleted the test/composer branch January 12, 2026 18:51
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants