-
Notifications
You must be signed in to change notification settings - Fork 13k
test: Reorg composer page objects #38104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughThe 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
c69e990 to
66ab37b
Compare
There was a problem hiding this 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
There was a problem hiding this 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. Usepage.locator('[data-qa-id="start-discussion"]')for reliability across UI language changes, consistent with test patterns in federation tests.The
btnMenuMoreActionsselector is already stable (getByRolewith accessible name 'More actions'), andwaitForChannel()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 localizedaria-labelas the primary E2E selector; add a stabledata-qa-id/test id for the composer root.Given
apps/meteor/tests/e2e/page-objects/fragments/composer.tsroots viafooter[aria-label="Room composer"], any translation/copy change can break tests. Keep the localizedaria-labelfor 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
RoomComposeractually forwardsaria-labelto the underlying DOMfooter; otherwise tests expecting it won’t find the node.apps/meteor/tests/e2e/quote-messages.spec.ts (1)
52-58: Good migration tocomposer.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 beforefill()to reduce flake risk.Migration to
poHomeChannel.composer.inputMessagematches the new POM structure. If edit-mode transitions are occasionally slow, addingawait expect(poHomeChannel.composer.inputMessage).toBeVisible()right beforefill()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 tocomposer.*looks correct; watch localized system-message assertions.The join/read-mode gating via
composer.btnJoinRoomandcomposer.inputMessageis a good fit for the new page-object structure. ThelastSystemMessageBodyassertion 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: PrefertoHaveValue()overexpect(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
poHomeOmnichannelinstance only for the join room interactions, while other tests in the same file continue usingpoOmnichats.content.*(e.g., line 209 usespoOmnichats.content.btnTakeChat). This mixing of page objects within the same test suite may cause confusion.Consider whether:
- All tests should use
poHomeOmnichannelfor consistency- Or initialize
poHomeOmnichannelinbeforeEachif 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 usegetByRole('textbox')with appropriate filters- Line 57:
.locator('[role="menu"][name="ComposerBoxPopup"]')should usegetByRole('menu', { name: 'ComposerBoxPopup' })- Lines 67, 73:
.locator('footer[aria-label="..."]')should usegetByRole()orgetByLabel()♻️ 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.
📒 Files selected for processing (33)
apps/meteor/client/views/room/body/RoomBody.tsxapps/meteor/client/views/room/composer/messageBox/MessageBox.tsxapps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsxapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tspackages/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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/client/views/room/body/RoomBody.tsxapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/client/views/room/composer/messageBox/MessageBox.tsxapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsxapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsextension for test files (e.g.,login.spec.ts)
Files:
apps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/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 inapps/meteor/tests/e2e/directory
Avoid usingpage.locator()in Playwright tests - always prefer semantic locators such aspage.getByRole(),page.getByLabel(),page.getByText(), orpage.getByTitle()
Usetest.beforeAll()andtest.afterAll()for setup/teardown in Playwright tests
Usetest.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
Useexpectmatchers for assertions (toEqual,toContain,toBeTruthy,toHaveLength, etc.) instead ofassertstatements in Playwright tests
Usepage.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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/voice-calls-ee.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/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.tsapps/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.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/voice-calls-ce.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/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.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/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.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/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.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/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.tspackages/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.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/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.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/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
apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
Show resolved
Hide resolved
apps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsx
Show resolved
Hide resolved
There was a problem hiding this 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: Locatoralready assigns the value tothis.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 usingpage.locator()and prefer semantic locators such asgetByRole().♻️ 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.
📒 Files selected for processing (4)
apps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/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.tsapps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsextension for test files (e.g.,login.spec.ts)
Files:
apps/meteor/tests/e2e/message-composer.spec.tsapps/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 inapps/meteor/tests/e2e/directory
Avoid usingpage.locator()in Playwright tests - always prefer semantic locators such aspage.getByRole(),page.getByLabel(),page.getByText(), orpage.getByTitle()
Usetest.beforeAll()andtest.afterAll()for setup/teardown in Playwright tests
Usetest.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
Useexpectmatchers for assertions (toEqual,toContain,toBeTruthy,toHaveLength, etc.) instead ofassertstatements in Playwright tests
Usepage.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.tsapps/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.tsapps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/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.tsapps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/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.tsapps/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.tsapps/meteor/tests/e2e/emojis.spec.tsapps/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.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/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.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/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.tsapps/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.tsapps/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
…ry` `omnichannel` `preview-public-channel`
dea6c3b to
d22a81e
Compare
There was a problem hiding this 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 usecomposer.inputMessagealigns with the page object reorganization.The change correctly moves the input interaction to the new
composerabstraction 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 = rootassignment 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 toThis_room_is_read_onlyin i18n), so add adata-qaattribute to theMessageComposerHintcomponent 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.
📒 Files selected for processing (30)
apps/meteor/client/views/room/body/RoomBody.tsxapps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsxapps/meteor/tests/e2e/channel-management.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-file-encryption.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-passphrase-management.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/emojis.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/message-composer.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-auto-onhold-chat-closing.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-contact-center-chats.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manager-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-monitor-role.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-takeChat.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/meteor/tests/e2e/page-objects/fragments/home-omnichannel-content.tsapps/meteor/tests/e2e/page-objects/fragments/index.tsapps/meteor/tests/e2e/page-objects/home-channel.tsapps/meteor/tests/e2e/permissions.spec.tsapps/meteor/tests/e2e/preview-public-channel.spec.tsapps/meteor/tests/e2e/quote-messages.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/client/views/room/body/RoomBody.tsxapps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsxapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/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.tsextension for test files (e.g.,login.spec.ts)
Files:
apps/meteor/tests/e2e/image-gallery.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/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 inapps/meteor/tests/e2e/directory
Avoid usingpage.locator()in Playwright tests - always prefer semantic locators such aspage.getByRole(),page.getByLabel(),page.getByText(), orpage.getByTitle()
Usetest.beforeAll()andtest.afterAll()for setup/teardown in Playwright tests
Usetest.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
Useexpectmatchers for assertions (toEqual,toContain,toBeTruthy,toHaveLength, etc.) instead ofassertstatements in Playwright tests
Usepage.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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/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.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsxapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsxapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/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.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/meteor/tests/e2e/page-objects/fragments/home-content.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-canned-responses-usage.spec.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/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.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/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.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsxapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/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.tsapps/meteor/client/views/room/contextualBar/Threads/components/ThreadChat.tsxapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/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.tsapps/meteor/tests/e2e/omnichannel/omnichannel-manual-selection-logout.spec.tsapps/meteor/tests/e2e/e2e-encryption/e2ee-encrypted-channels.spec.tsapps/meteor/tests/e2e/embedded-layout.spec.tsapps/meteor/tests/e2e/messaging.spec.tsapps/meteor/tests/e2e/message-mentions.spec.tsapps/meteor/tests/e2e/page-objects/fragments/composer.tsapps/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.tsapps/meteor/tests/e2e/feature-preview.spec.tsapps/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.tsxapps/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.tsapps/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.tsapps/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
btnJoinRoominteractions fromcontenttocomposer, 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-labelattribute provides proper accessibility labeling and enables stable selectors for the e2e page object (RoomComposerclass usesfooter[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'inRoomBody.tsx) correctly differentiates the thread composer for both accessibility and test targeting purposes. This allows theThreadComposerpage object class to use a distinct selector while reusing the sameRoomComposercomponent.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.inputMessagetocomposer.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.inputMessagepattern 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.inputMessagepath 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.btnMenuMoreActionstocomposer.btnMenuMoreActionsis 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.inputMessagetocomposer.inputMessageis 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.inputMessageandcomposer.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.inputMessageandcomposer.toolbarPrimaryActionspaths. The fill/assert pattern for testing input behavior remains sound.
105-118: LGTM!Non-member functionality tests correctly migrated to use
composer.btnJoinRoomfor join actions andcomposer.inputMessagefor 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
HomeContentclass now properly composesRoomComposerandThreadComposerinstances, providing a clean separation of concerns. Usingprotectedvisibility 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 usescomposer.inputMessagefor filling text andcomposer.btnSendfor clicking send. The enforcement logic with response waiting remains intact.
517-525: LGTM!Good addition of
sendMessageInThread()usingthreadComposer. ThesendMessageInVideoConfPopup()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!
RoomComposerandThreadComposercorrectly extend the abstractComposerclass and target the appropriate footer elements viaaria-label. This aligns with accessibility improvements made inRoomBody.tsxandThreadChat.tsx.
CORE-1661
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.