Skip to content

Conversation

@juliajforesti
Copy link
Contributor

@juliajforesti juliajforesti commented Aug 20, 2025

CORE-1571

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Accessibility Improvements

    • Added alt text for avatars and accessible titles for user dialogs for improved screen-reader support.
  • Localization

    • Added English translations, including a label for the user card and a username-based profile picture placeholder.
  • Tests

    • Migrated end-to-end tests to use accessibility/role-based selectors for more stable, user-facing checks.

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Aug 20, 2025

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

@changeset-bot
Copy link

changeset-bot bot commented Aug 20, 2025

⚠️ No Changeset found

Latest commit: 98045df

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

This PR includes no changesets

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

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

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

@codecov
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.60%. Comparing base (c805070) to head (98045df).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36757      +/-   ##
===========================================
- Coverage    70.65%   70.60%   -0.06%     
===========================================
  Files         3143     3143              
  Lines       108693   108684       -9     
  Branches     19557    19514      -43     
===========================================
- Hits         76797    76735      -62     
- Misses       29886    29949      +63     
+ Partials      2010     2000      -10     
Flag Coverage Δ
e2e 60.16% <87.50%> (-0.02%) ⬇️
e2e-api 47.41% <ø> (-1.08%) ⬇️
unit 71.71% <50.00%> (-0.03%) ⬇️

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

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Removed many data-qa* test selectors from client UI components, replaced E2E page-object locators with accessibility role-based queries, deleted the home-sidenav page-object fragment and re-exports, and added three English i18n keys (including User_card).

Changes

Cohort / File(s) Summary
Client components — data-qa removal
apps/meteor/client/components/UserCard/UserCard.tsx, apps/meteor/client/components/avatar/UserAvatarEditor/UserAvatarEditor.tsx, apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateChannelModal.tsx, apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateDirectMessage.tsx, apps/meteor/client/sidebar/RoomList/SidebarItemTemplateWithData.tsx, apps/meteor/client/sidebar/RoomList/SidebarItemWithData.tsx, apps/meteor/client/views/account/profile/AccountProfilePage.tsx, apps/meteor/client/views/account/security/ChangePassphrase.tsx, apps/meteor/client/views/account/security/ResetPassphrase.tsx, apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx, apps/meteor/client/views/admin/permissions/PermissionsPage.tsx, apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTableFilter.tsx, apps/meteor/client/views/home/CustomHomePage.tsx, apps/meteor/client/views/home/DefaultHomePage.tsx, apps/meteor/client/views/home/HomePageHeader.tsx, apps/meteor/client/views/marketplace/components/AppInstallModal/AppInstallModal.tsx, apps/meteor/client/views/omnichannel/..., apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersActions.tsx, apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoActions.tsx
Removed data-qa, data-qa-id, and similar QA attributes across many components; small prop refactors (e.g., UserCard now receives title={t('User_card')} and avatar gets alt via i18n). No behavioral changes.
E2E page-objects — locator migration
apps/meteor/tests/e2e/federation/page-objects/account-profile.ts, apps/meteor/tests/e2e/federation/page-objects/fragments/home-content.ts, apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts, apps/meteor/tests/e2e/page-objects/account-profile.ts, apps/meteor/tests/e2e/page-objects/account-security.ts, apps/meteor/tests/e2e/page-objects/fragments/home-content.ts, apps/meteor/tests/e2e/page-objects/fragments/home-flextab-members.ts
Replaced CSS/data-qa locators with accessibility-focused selectors (getByRole, getByAltText, dialog/heading queries). Method signatures unchanged except internal locator implementations.
E2E specs — selector refactoring
apps/meteor/tests/e2e/admin-room.spec.ts, apps/meteor/tests/e2e/homepage.spec.ts, apps/meteor/tests/e2e/settings-assets.spec.ts, apps/meteor/tests/e2e/settings-int.spec.ts
Updated tests to wait/assert using ARIA role-based queries (main/heading/table) instead of data-qa selectors; assertions/flow preserved.
Page-object fragment removal & consumer updates
apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts, apps/meteor/tests/e2e/page-objects/fragments/index.ts, apps/meteor/tests/e2e/page-objects/home-channel.ts, apps/meteor/tests/e2e/page-objects/home-discussion.ts, apps/meteor/tests/e2e/page-objects/omnichannel-room-info.ts
Deleted HomeSidenav fragment and its re-export; removed sidenav usages from consumers and added/adjusted homepageHeader getter where applicable. Public class and getters/methods removed from the fragment.
i18n additions
packages/i18n/src/locales/en.i18n.json
Added keys: VoIP_TeamCollab_Internal_SIP_Beta_Alert, __username__profile_picture, and User_card.
UI library small change
packages/ui-client/src/components/Page/PageHeaderNoShadow.tsx
Removed data-qa-type attribute from the page title H1.
Manifest
package.json
No public API changes; manifest present in diff metadata.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

stat: ready to merge

Suggested reviewers

  • dougfabris
  • juliajforesti
  • ggazzo

Poem

🐰 I hopped through code with care and cheer,
data-qa traces disappear,
ARIA paths now light the track,
tests more friendly — I’ve got your back! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes some changes outside core CORE-1571 scope: removed the HomeSidenav class entirely and added i18n translations, which appear to go beyond the stated objective of replacing selectors. Clarify whether removing HomeSidenav and adding i18n translations (User_card, profile picture) are intentional refactoring changes or should be excluded from this PR focused on selector migration.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing data-qa attributes with accessible locators across test files and components.
Linked Issues check ✅ Passed The PR fulfills the CORE-1571 objective to replace data-qa locators with accessible alternatives. Changes include role-based selectors, alt attributes, and aria locators while respecting exclusions.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test/replace-data-qa

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.1GiB 1.1GiB +11MiB
rocketchat 355MiB 345MiB +11MiB
omnichannel-transcript-service 132MiB 132MiB +1.1KiB
queue-worker-service 132MiB 132MiB +119B
ddp-streamer-service 126MiB 126MiB +787B
account-service 113MiB 113MiB +251B
authorization-service 111MiB 111MiB -664B
presence-service 111MiB 111MiB +434B

📊 Historical Trend

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

Statistics (last 30 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.1GiB
ℹ️ About this report

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

  • Tag: pr-36757
  • Baseline: develop
  • Timestamp: 2025-12-29 15:42:18 UTC
  • Historical data points: 30

Updated: Mon, 29 Dec 2025 15:42:19 GMT

@juliajforesti juliajforesti modified the milestones: 7.14.0, 8.1.0 Dec 29, 2025
@juliajforesti juliajforesti marked this pull request as ready for review December 29, 2025 13:21
@juliajforesti juliajforesti requested a review from a team as a code owner December 29, 2025 13:21
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

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/page-objects/omnichannel-room-info.ts (1)

35-41: Replace page.locator() with semantic locators.

These methods use page.locator() with string selectors, which violates the Playwright testing guideline. Semantic locators like getByText() are more maintainable and resilient.

🔎 Proposed refactor
 getInfo(value: string): Locator {
-	return this.page.locator(`span >> text="${value}"`);
+	return this.page.getByText(value, { exact: true });
 }

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

Based on coding guidelines: "Avoid using page.locator() in Playwright tests - always prefer semantic locators such as page.getByRole(), page.getByLabel(), page.getByText(), or page.getByTitle()."

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

37-37: Replace locator() with semantic selectors.

Multiple instances use page.locator() with deprecated role= syntax or text selectors. The coding guidelines require using semantic locators like getByRole(), getByText(), getByLabel() instead of locator().

🔎 Proposed refactoring
-await expect(adminPage.locator('role=button[name="Customize"]')).toBeVisible();
+await expect(adminPage.getByRole('button', { name: 'Customize' })).toBeVisible();

-await expect(adminPage.locator('div >> text="Admins may insert content html to be rendered in this white space."')).toBeVisible();
+await expect(adminPage.getByText('Admins may insert content html to be rendered in this white space.')).toBeVisible();

-await expect(adminPage.locator('role=button[name="Show to workspace"]')).toBeDisabled();
+await expect(adminPage.getByRole('button', { name: 'Show to workspace' })).toBeDisabled();

-await expect(adminPage.locator('role=button[name="Show only this content"]')).toBeDisabled();
+await expect(adminPage.getByRole('button', { name: 'Show only this content' })).toBeDisabled();

-await expect(adminPage.locator('span >> text="Not visible to workspace"')).toBeVisible();
+await expect(adminPage.getByText('Not visible to workspace')).toBeVisible();

-await expect(adminPage.locator('role=heading[name="Welcome to Rocket.Chat"]')).not.toBeVisible();
+await expect(adminPage.getByRole('heading', { name: 'Welcome to Rocket.Chat' })).not.toBeVisible();

Apply similar changes to all other locator() usages in the file.

As per coding guidelines, avoid using page.locator() - always prefer semantic locators for better readability and maintainability.

Also applies to: 52-52, 56-57, 61-61, 73-73, 77-78, 93-93, 97-98, 102-102, 125-125, 141-141, 165-165, 189-189, 211-211

🧹 Nitpick comments (6)
apps/meteor/tests/e2e/page-objects/home-discussion.ts (1)

21-35: Consider modernizing locator syntax to use Playwright's semantic selectors.

The current implementation uses the older string-based page.locator('role=...') syntax. Playwright's modern API provides dedicated semantic methods that are more readable and maintainable.

🔎 Proposed refactor using modern Playwright API
 get inputChannelName(): Locator {
-  return this.page.locator('role=textbox[name="Parent channel or team"]');
+  return this.page.getByRole('textbox', { name: 'Parent channel or team' });
 }

 get inputName(): Locator {
-  return this.page.locator('role=textbox[name="Name"]');
+  return this.page.getByRole('textbox', { name: 'Name' });
 }

 get inputMessage(): Locator {
-  return this.page.locator('role=textbox[name="Message"]');
+  return this.page.getByRole('textbox', { name: 'Message' });
 }

 get btnCreate(): Locator {
-  return this.page.locator('role=dialog >> role=group >> role=button[name="Create"]');
+  return this.page.getByRole('dialog').getByRole('group').getByRole('button', { name: 'Create' });
 }

Based on coding guidelines and learnings.

apps/meteor/tests/e2e/federation/page-objects/account-profile.ts (1)

11-11: Existing selector also uses localized text.

The inputName locator uses an XPath selector with the localized string "Name", which has the same i18n fragility as the newly changed selectors. While this predates the current PR, consider refactoring it to use a stable selector for consistency:

-return this.page.locator('//label[contains(text(), "Name")]/..//input');
+return this.page.getByLabel('Name'); // or use data-testid for stability

Note: getByLabel with text still has i18n concerns; a data-testid would be more stable.

Based on learnings, prefer stable selectors over localized text for i18n compatibility.

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

123-123: Consider using semantic locator for main.

The selector chain uses this.page.locator('main') which could be replaced with this.page.getByRole('main') for consistency with Playwright's semantic locator patterns.

🔎 Proposed refactor
-		return this.page.locator('main').getByRole('heading', { name: 'Home' });
+		return this.page.getByRole('main').getByRole('heading', { name: 'Home' });

As per coding guidelines.

apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts (2)

44-44: Replace XPath with semantic selector.

XPath selectors are harder to maintain and less readable than semantic selectors. Replace with getByLabel():

🔎 Proposed refactor
-			await this.page.locator('//label[contains(text(), "Choose users")]/..//input').type(username);
+			await this.page.getByLabel(/Choose users/i).type(username);

Note: This also uses localized text, so the same language-stability concern from line 23 applies here as well.


38-38: Consider semantic selectors instead of class-based selectors.

These selectors rely on internal CSS class names which may change during refactoring. Consider:

  • Adding data-testid attributes to these elements for stable selection
  • Using semantic selectors where applicable (e.g., getByRole() for the danger button)

Note: Lines 52-53 also use localized text ("Online", "All"), raising the same language-stability concerns as line 23.

Also applies to: 52-53

apps/meteor/tests/e2e/admin-room.spec.ts (1)

26-27: Consider extracting selectors to the AdminRooms page object.

For consistency with the Page Object Model pattern used elsewhere in the codebase, these selectors could be extracted to getter methods in the AdminRooms class:

// In AdminRooms page object
get pageHeading() {
  return this.page.getByRole('main').getByRole('heading', { level: 1, name: 'Rooms', exact: true });
}

get roomsTable() {
  return this.page.getByRole('main').getByRole('table');
}

Then use in the test:

await expect(adminRooms.pageHeading).toBeVisible();
await expect(adminRooms.roomsTable).toBeVisible();

This improves reusability and maintains consistency with the pattern used in other tests (e.g., line 31 uses adminRooms.inputSearchRooms).

As per coding guidelines for Page Object Model pattern.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a8a84ab and d328ea1.

⛔ Files ignored due to path filters (1)
  • apps/meteor/client/views/admin/permissions/PermissionsTable/__snapshots__/PermissionsTable.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (45)
  • apps/meteor/client/components/UserCard/UserCard.tsx
  • apps/meteor/client/components/avatar/UserAvatarEditor/UserAvatarEditor.tsx
  • apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateChannelModal.tsx
  • apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateDirectMessage.tsx
  • apps/meteor/client/sidebar/RoomList/SidebarItemTemplateWithData.tsx
  • apps/meteor/client/sidebar/RoomList/SidebarItemWithData.tsx
  • apps/meteor/client/views/account/profile/AccountProfilePage.tsx
  • apps/meteor/client/views/account/security/ChangePassphrase.tsx
  • apps/meteor/client/views/account/security/ResetPassphrase.tsx
  • apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx
  • apps/meteor/client/views/admin/permissions/PermissionsPage.tsx
  • apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTableFilter.tsx
  • apps/meteor/client/views/home/CustomHomePage.tsx
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/client/views/home/HomePageHeader.tsx
  • apps/meteor/client/views/marketplace/components/AppInstallModal/AppInstallModal.tsx
  • apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItemWithData.tsx
  • apps/meteor/client/views/omnichannel/additionalForms/AutoCompleteUnits.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentEdit.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentInfo.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMultipleAgent.tsx
  • apps/meteor/client/views/omnichannel/customFields/CustomFieldsTable.tsx
  • apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentAgentsTable/DepartmentAgentsTable.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTable.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardErrorState.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersActions.tsx
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoActions.tsx
  • apps/meteor/tests/e2e/admin-room.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • packages/i18n/src/locales/en.i18n.json
  • packages/ui-client/src/components/Page/PageHeaderNoShadow.tsx
💤 Files with no reviewable changes (10)
  • apps/meteor/client/views/room/contextualBar/UserInfo/UserInfoActions.tsx
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/client/sidebar/RoomList/SidebarItemWithData.tsx
  • apps/meteor/client/views/navigation/sidebar/RoomList/SidebarItemWithData.tsx
  • apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateDirectMessage.tsx
  • apps/meteor/client/sidebar/RoomList/SidebarItemTemplateWithData.tsx
  • apps/meteor/client/views/omnichannel/components/AutoCompleteMultipleAgent.tsx
  • apps/meteor/client/views/omnichannel/additionalForms/AutoCompleteUnits.tsx
  • apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-content.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/client/views/marketplace/components/AppInstallModal/AppInstallModal.tsx
  • apps/meteor/client/views/home/CustomHomePage.tsx
  • apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTableFilter.tsx
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/client/views/account/security/ChangePassphrase.tsx
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/client/views/omnichannel/agents/AgentEdit.tsx
  • apps/meteor/client/components/avatar/UserAvatarEditor/UserAvatarEditor.tsx
  • apps/meteor/client/views/omnichannel/customFields/CustomFieldsTable.tsx
  • apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateChannelModal.tsx
  • apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersActions.tsx
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/client/views/home/HomePageHeader.tsx
  • apps/meteor/client/views/omnichannel/reports/components/ReportCardErrorState.tsx
  • apps/meteor/client/views/account/security/ResetPassphrase.tsx
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/client/views/account/profile/AccountProfilePage.tsx
  • apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx
  • apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTable.tsx
  • apps/meteor/client/views/omnichannel/agents/AgentInfo.tsx
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx
  • apps/meteor/client/components/UserCard/UserCard.tsx
  • packages/ui-client/src/components/Page/PageHeaderNoShadow.tsx
  • apps/meteor/client/views/omnichannel/departments/DepartmentAgentsTable/DepartmentAgentsTable.tsx
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
  • apps/meteor/client/views/admin/permissions/PermissionsPage.tsx
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.ts
**/*.spec.ts

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

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

Files:

  • apps/meteor/tests/e2e/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
apps/meteor/tests/e2e/**/*.spec.ts

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

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

Files:

  • apps/meteor/tests/e2e/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/homepage.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.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/account-security.ts
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.ts
🧠 Learnings (26)
📓 Common learnings
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 : Avoid using `page.locator()` in Playwright tests - always prefer semantic locators such as `page.getByRole()`, `page.getByLabel()`, `page.getByText()`, or `page.getByTitle()`
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 : 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 : Prefer web-first assertions (`toBeVisible`, `toHaveText`, etc.) in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.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 `expect` matchers for assertions (`toEqual`, `toContain`, `toBeTruthy`, `toHaveLength`, etc.) instead of `assert` statements in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/homepage.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 : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files

Applied to files:

  • apps/meteor/tests/e2e/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/client/views/home/CustomHomePage.tsx
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file

Applied to files:

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

Applied to files:

  • apps/meteor/tests/e2e/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/client/views/home/CustomHomePage.tsx
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/client/views/home/DefaultHomePage.tsx
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/federation/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/homepage.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/admin-room.spec.ts
  • apps/meteor/tests/e2e/settings-assets.spec.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/homepage.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/settings-assets.spec.ts
  • apps/meteor/tests/e2e/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.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/settings-int.spec.ts
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/tests/e2e/homepage.spec.ts
📚 Learning: 2025-10-30T19:30:46.541Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37244
File: apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.spec.tsx:125-146
Timestamp: 2025-10-30T19:30:46.541Z
Learning: In the AdminABACRoomAttributesForm component (apps/meteor/client/views/admin/ABAC/AdminABACRoomAttributesForm.tsx), the first attribute value field is mandatory and does not have a Remove button. Only additional values beyond the first have Remove buttons. This means trashButtons[0] corresponds to the second value's Remove button, not the first value's.

Applied to files:

  • apps/meteor/client/views/account/security/ChangePassphrase.tsx
  • apps/meteor/client/views/account/security/ResetPassphrase.tsx
  • apps/meteor/client/views/account/profile/AccountProfilePage.tsx
  • apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx
  • apps/meteor/client/views/admin/permissions/PermissionsPage.tsx
📚 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/account-security.ts
  • apps/meteor/tests/e2e/page-objects/account-profile.ts
  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/page-objects/omnichannel-room-info.ts
📚 Learning: 2025-10-07T15:08:37.419Z
Learnt from: cardoso
Repo: RocketChat/Rocket.Chat PR: 36942
File: apps/meteor/client/lib/e2ee/pbkdf2.ts:13-45
Timestamp: 2025-10-07T15:08:37.419Z
Learning: In apps/meteor/client/lib/e2ee/pbkdf2.ts, the team has decided to use Latin-1 encoding (via Binary.toArrayBuffer and Binary.toString) for password encoding and decrypt output instead of UTF-8 encoding. This is a deliberate choice for E2EE password/key material handling.

Applied to files:

  • apps/meteor/client/views/account/security/ResetPassphrase.tsx
📚 Learning: 2025-09-19T15:15:04.642Z
Learnt from: rodrigok
Repo: RocketChat/Rocket.Chat PR: 36991
File: apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts:219-221
Timestamp: 2025-09-19T15:15:04.642Z
Learning: The Federation_Matrix_homeserver_domain setting in apps/meteor/server/services/federation/infrastructure/rocket-chat/adapters/Settings.ts is part of the old federation system and is being deprecated/removed, so configuration issues with this setting should not be flagged for improvement.

Applied to files:

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

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-channel.ts
  • apps/meteor/tests/e2e/page-objects/home-discussion.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:

  • 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
📚 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:

  • packages/i18n/src/locales/en.i18n.json
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure clean state for each test execution in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/page-objects/home-discussion.ts
  • apps/meteor/tests/e2e/homepage.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.beforeAll()` and `test.afterAll()` for setup/teardown in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/homepage.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/homepage.spec.ts
🧬 Code graph analysis (2)
apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTable.tsx (1)
packages/ui-client/src/components/GenericTable/GenericTableHeaderCell.tsx (1)
  • GenericTableHeaderCell (14-31)
apps/meteor/tests/e2e/page-objects/omnichannel-room-info.ts (1)
apps/meteor/tests/e2e/page-objects/fragments/sidebar.ts (1)
  • RoomSidebar (21-115)
⏰ 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
🔇 Additional comments (36)
apps/meteor/tests/e2e/settings-assets.spec.ts (1)

16-16: Use semantic getByRole() assertions with English text, following the established pattern in the test suite.

This change aligns with the codebase convention—similar role-based assertions with hardcoded English text appear consistently throughout e2e tests (homepage.spec.ts, settings-int.spec.ts, admin-room.spec.ts, etc.). Tests are not configured for multi-language execution, and the migration from data-qa selectors to semantic accessibility-driven locators is the intended approach across all settings and admin page tests.

apps/meteor/tests/e2e/page-objects/home-discussion.ts (2)

3-3: LGTM! Import cleanup aligns with removed HomeSidenav class.

The removal of HomeSidenav from the imports is consistent with the broader refactoring that deleted the home-sidenav.ts fragment.


14-19: Sidenav removal is safe and verified.

The comprehensive search across all test files found zero references to sidenav, confirming that the removal of the sidenav member from the constructor will not break any existing tests.

apps/meteor/tests/e2e/page-objects/account-security.ts (1)

43-43: This change aligns with the project's established pattern and direction.

The current implementation using semantic locators with localized text is consistent throughout the file (lines 19, 23, 27, 31, 35, 39) and across the page-objects directory in similar structures. The project is actively migrating away from data-qa selectors toward semantic locators, as evidenced by recent commits in this area. While localized text can be fragile for i18n, the project's approach prioritizes accessible, semantic selectors per the coding guidelines.

No changes needed.

Likely an incorrect or invalid review comment.

apps/meteor/client/views/omnichannel/agents/AgentInfo.tsx (3)

16-17: LGTM!

Import reordering has no functional impact.


72-72: No E2E tests currently target this component.

The AgentInfo component is not covered by E2E tests, so the removal of data-qa attributes does not break any existing test infrastructure. If E2E tests are added in the future for agent information display, follow the project guidelines to use semantic locators (e.g., getByRole(), getByLabel()) rather than custom attributes.


57-57: No action needed; UserInfoAvatar is not tested via data-qa attributes.

UserInfoAvatar is a simple wrapper component around UserAvatar with no data-qa attributes. Since the component is not directly referenced in E2E tests and no data-qa selectors are associated with it, there are no test stability concerns from this change. The broader PR effort to replace data-qa selectors in E2E tests is separate from this component's usage.

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

3-3: Import cleanup looks correct.

The removal of HomeSidenav from imports aligns with the elimination of the sidenav member and the deletion of the HomeSidenav page-object fragment.

apps/meteor/tests/e2e/page-objects/omnichannel-room-info.ts (3)

3-3: LGTM!

The import change from HomeSidenav to RoomSidebar is correct and aligns with the refactoring to use the updated fragment.


8-13: LGTM!

The property rename from homeSidenav to sidebar and the constructor update are internally consistent with the import change.


72-74: Localization stability concern with selector approach.

The refactoring from this.homeSidenav to this.sidebar is correct. However, getBadgeIndicator chains getSidebarItemByName(), which uses getByRole('link', { name }) and getByText(name) with the name parameter. Both name and the title parameter passed to getByTitle() are localized text, which may cause test failures when the UI language changes. While this appears to be an intentional shift toward semantic locators per the PR objectives, verify that the team accepts the localization stability tradeoff and confirm whether tests for localized content should be handled separately.

apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersActions.tsx (1)

37-37: This component was newly created without data-qa-id; no existing selector was removed.

The review assumes data-qa-id='UserUserInfo-menu' was removed, but the file was created fresh in commit d328ea1 without ever having this attribute. No E2E tests reference this selector anywhere in the codebase, so there are no test migrations or breaking changes to verify. The architectural decision to create this new component without data-qa-id is intentional and part of the broader refactoring effort.

Likely an incorrect or invalid review comment.

apps/meteor/client/views/omnichannel/agents/AgentEdit.tsx (1)

125-125: No issues found. The removal of data-qa-id from the name field is intentional and follows a consistent pattern: read-only fields (name, username, email) use only id attributes for accessibility, while interactive fields (status, save button) retain data-qa-id for test selectors. Tests do not interact with read-only fields, so alternative selectors are not needed. The page object confirms this pattern with no getter defined for the name field.

apps/meteor/client/views/omnichannel/reports/components/ReportCardErrorState.tsx (1)

16-16: LGTM - Verify replacement selectors in tests.

The removal of the data-qa attribute is consistent with the PR objective. The error state component maintains clear structure with semantic Fuselage components.

Ensure that any E2E tests targeting this error state use stable, language-agnostic selectors rather than localized button text.

apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx (1)

224-224: LGTM - Verify save button selector stability in tests.

The removal of data-qa-id from the Save button aligns with the PR objective. The button retains all functional attributes and proper disabled state logic.

Based on learnings, verify that replacement test selectors for this save button are stable and not reliant on translated button text, as this can cause test failures when UI language changes.

apps/meteor/client/views/omnichannel/departments/DepartmentAgentsTable/DepartmentAgentsTable.tsx (1)

28-28: LGTM - Good accessibility retained, verify test selector stability.

The removal of data-qa from the AddAgent component aligns with PR objectives. The component appropriately retains the aria-labelledby attribute for accessibility.

Based on learnings, ensure that replacement test selectors are stable and not dependent on localized text to prevent test failures when UI language changes.

apps/meteor/client/views/admin/permissions/PermissionsTable/PermissionsTableFilter.tsx (1)

20-20: LGTM - Cosmetic formatting improvement.

The change from multi-line to single-line JSX for the TextInput is purely stylistic. All props are preserved, and there are no functional changes.

apps/meteor/client/views/account/security/ChangePassphrase.tsx (1)

199-199: LGTM - Verify E2EE password save button test selectors are stable.

The removal of data-qa-type from the Save button aligns with the PR objective. The button maintains all functional attributes and proper disabled state logic based on form validation.

Based on learnings, ensure that replacement test selectors for this security-related save action are stable and not dependent on translated button text, as language-dependent selectors can cause test failures.

apps/meteor/client/views/omnichannel/customFields/CustomFieldsTable.tsx (1)

107-107: Verify that replacement test selectors for the custom fields table are stable.

The removal of the data-qa attribute aligns with the PR objective. The table retains good accessibility attributes (aria-busy, aria-live). Ensure that any E2E tests targeting this table use stable selectors (e.g., data-qa-id attributes or semantic role-based locators) rather than localized UI text, as language-dependent selectors can cause test failures when the UI language changes.

apps/meteor/client/views/home/HomePageHeader.tsx (1)

15-15: The removal of data-qa-id='home-header' has no impact on tests—this selector was never referenced in the test suite.

Tests already rely on a stable semantic selector: getByRole('heading', { level: 1, name: 'Home', exact: true }), which binds to the component's accessibility role and title prop. This selector is language-agnostic because the title value is dynamic (sourced from the Layout_Home_Title setting). The test suite validates that the header text updates correctly when the setting changes, confirming the selector strategy is robust across different UI languages.

apps/meteor/client/views/account/security/ResetPassphrase.tsx (1)

17-17: LGTM!

Clean removal of the test selector attribute. Functionality remains unchanged.

apps/meteor/client/views/marketplace/components/AppInstallModal/AppInstallModal.tsx (1)

71-71: LGTM!

Clean removal of the test selector attribute. Functionality remains unchanged.

apps/meteor/client/views/admin/permissions/PermissionsPage.tsx (1)

68-70: LGTM!

Clean removal of the test selector attribute with improved formatting. Functionality remains unchanged.

apps/meteor/client/views/home/DefaultHomePage.tsx (1)

27-31: LGTM!

Clean removal of test selector attributes. Functionality remains unchanged.

apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTable.tsx (1)

66-66: LGTM!

Clean removal of the test selector attribute. Functionality remains unchanged.

apps/meteor/client/views/account/profile/AccountProfilePage.tsx (1)

142-144: LGTM!

Clean removal of the test selector attribute with improved formatting. Functionality remains unchanged.

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

314-316: Verify localization stability of text-based selector.

The new selector uses the localized text "User card" which may cause test failures if the UI language changes or if translations are updated.

Based on learnings, stable selectors like data-qa-id are preferred over localized text to prevent test fragility across different language settings.

Consider either:

  1. Ensuring tests always run in a fixed language (e.g., English)
  2. Using a non-localized attribute selector if stability across languages is required
  3. Adding language-specific test validation separately

Based on learnings, text-based selectors can break when UI language changes.

apps/meteor/tests/e2e/page-objects/account-profile.ts (1)

14-36: Verify localization stability of text-based selectors.

Multiple selectors now use localized text ('Use URL for avatar', 'Add URL', 'Save changes', 'profile picture'), which may cause test failures if the UI language changes or translations are updated.

Based on learnings, stable selectors like data-qa-id are preferred over localized text to prevent test fragility across different language settings.

Consider either:

  1. Ensuring tests always run in a fixed language (e.g., English)
  2. Using non-localized attribute selectors if stability across languages is required
  3. Adding language-specific test validation separately

Based on learnings, text-based selectors can break when UI language changes.

packages/ui-client/src/components/Page/PageHeaderNoShadow.tsx (1)

40-42: LGTM!

The removal of the data-qa-type attribute is appropriate and aligns with the PR objective to replace data-qa selectors with accessibility-driven approaches. The h1 semantic element and title content remain available for role-based selectors.

apps/meteor/client/components/UserCard/UserCard.tsx (1)

52-52: LGTM! Accessibility improvement.

The change from data-qa='UserCard' to title={t('User_card')} improves accessibility by providing a translated title for the dialog. This aligns well with the PR objective to use accessibility-driven selectors.

apps/meteor/client/navbar/NavBarPagesGroup/actions/CreateChannelModal.tsx (1)

249-249: LGTM!

The removal of data-qa-type attributes from the topic input and create button is appropriate. These elements remain accessible via semantic selectors:

  • The topic input has a proper label association (htmlFor={topicId})
  • The submit button can be selected by role and type attributes

Also applies to: 408-410

apps/meteor/client/components/avatar/UserAvatarEditor/UserAvatarEditor.tsx (1)

83-83: LGTM! Excellent accessibility improvement.

Adding the alt attribute with a translated, descriptive label significantly improves accessibility compliance for screen readers. This change replaces the removed data-qa-id attributes with a more semantic and user-friendly approach.

apps/meteor/client/views/admin/engagementDashboard/EngagementDashboardCardErrorBoundary.tsx (1)

35-37: LGTM!

The removal of the data-qa attribute is appropriate. The error boundary's UI elements remain accessible through semantic selectors (the "Retry" button can be selected by role and text content).

packages/i18n/src/locales/en.i18n.json (2)

5763-5763: VoIP beta alert copy looks good

Text is clear, matches existing “beta” warnings in tone and casing, and is scoped specifically to internal SIP routing. No changes needed.


7084-7085: New profile‑picture and user‑card labels are consistent

  • __username__profile_picture correctly uses {{username}} interpolation and reads naturally as alt/aria text.
  • User_card label is simple and aligned with existing keys like User_Info.

Just make sure the caller passes the actual username string into {{username}} (not a full name) so the alt text matches what tests and users expect. Based on learnings, keeping these as English‑only additions here is the right workflow.

apps/meteor/tests/e2e/federation/page-objects/fragments/home-flextab-members.ts (1)

10-12: No action needed: data-qa selector is correct and functional.

The data-qa="MemberItem-${username}" attribute exists in the RoomMembersItem component (apps/meteor/client/views/room/contextualBar/RoomMembers/RoomMembersItem.tsx, line 69) and is properly used here. The locator is correctly encapsulated in the Page Object Model method following test conventions.

Copy link
Contributor

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

Choose a reason for hiding this comment

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

1 issue found across 46 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/meteor/tests/e2e/homepage.spec.ts">

<violation number="1" location="apps/meteor/tests/e2e/homepage.spec.ts:206">
P1: Case sensitivity bug: &#39;Rocket.chat&#39; should be &#39;Rocket.Chat&#39;. With `exact: true`, this selector will never match the actual heading text, making the test ineffective (it will always pass regardless of whether the element is visible).</violation>
</file>

Reply to cubic to teach it or ask questions. Tag @cubic-dev-ai to re-run a review.

Copy link
Member

@dougfabris dougfabris left a comment

Choose a reason for hiding this comment

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

LGTM!

@dougfabris dougfabris changed the title test: replace data-qa test: Replace data-qa by accessible locators Dec 29, 2025
@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Dec 29, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 29, 2025
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Dec 29, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/meteor/tests/e2e/page-objects/account-security.ts (1)

46-76: Complete the migration to semantic locators for consistency.

While securityHeader (line 43) was successfully migrated to use getByRole(), the remaining locators in this file still use page.locator() with CSS selectors or role selector strings. This creates inconsistency within the page object.

As per coding guidelines, prefer semantic locators (getByRole(), getByLabel(), getByText()) over page.locator(). Consider completing the migration:

  • Lines 47-56: Replace page.locator('[role="button"]:has-text("...")') with page.getByRole('button', { name: '...' })
  • Lines 59, 63: Replace page.locator("role=button[name='...']") with page.getByRole('button', { name: '...' })
  • Lines 67, 71: Can be simplified using getByLabel() or nested getByRole()
  • Line 75: Replace page.locator('dialog >> button') with page.getByRole('dialog').getByRole('button')
🔎 Example refactor for consistent semantic locators
 get securityPasswordSection(): Locator {
-  return this.page.locator('[role="button"]:has-text("Password")');
+  return this.page.getByRole('button', { name: 'Password' });
 }

 get security2FASection(): Locator {
-  return this.page.locator('[role="button"]:has-text("Two Factor Authentication")');
+  return this.page.getByRole('button', { name: 'Two Factor Authentication' });
 }

 get securityE2EEncryptionSection(): Locator {
-  return this.page.locator('[role="button"]:has-text("End-to-end encryption")');
+  return this.page.getByRole('button', { name: 'End-to-end encryption' });
 }

 get securityE2EEncryptionResetKeyButton(): Locator {
-  return this.page.locator("role=button[name='Reset E2EE password']");
+  return this.page.getByRole('button', { name: 'Reset E2EE password' });
 }

 get securityE2EEncryptionSavePasswordButton(): Locator {
-  return this.page.locator("role=button[name='Save changes']");
+  return this.page.getByRole('button', { name: 'Save changes' });
 }

 get required2faModalSetUpButton(): Locator {
-  return this.page.locator('dialog >> button');
+  return this.page.getByRole('dialog').getByRole('button');
 }
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d328ea1 and 98045df.

📒 Files selected for processing (2)
  • apps/meteor/tests/e2e/page-objects/account-security.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
💤 Files with no reviewable changes (1)
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js}

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

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

Files:

  • apps/meteor/tests/e2e/page-objects/account-security.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/account-security.ts
apps/meteor/tests/e2e/**/*.{ts,spec.ts}

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

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

Files:

  • apps/meteor/tests/e2e/page-objects/account-security.ts
🧠 Learnings (11)
📓 Common learnings
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 : Avoid using `page.locator()` in Playwright tests - always prefer semantic locators such as `page.getByRole()`, `page.getByLabel()`, `page.getByText()`, or `page.getByTitle()`
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/**/*.{ts,spec.ts} : Store commonly used locators in variables/constants for reuse
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (`test`, `page`, `expect`) for consistency in test files
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Avoid using `page.locator()` in Playwright tests - always prefer semantic locators such as `page.getByRole()`, `page.getByLabel()`, `page.getByText()`, or `page.getByTitle()`

Applied to files:

  • apps/meteor/tests/e2e/page-objects/account-security.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/page-objects/account-security.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,spec.ts} : Follow Page Object Model pattern consistently in Playwright tests

Applied to files:

  • apps/meteor/tests/e2e/page-objects/account-security.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/page-objects/account-security.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/account-security.ts
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (`toBeVisible`, `toHaveText`, etc.) in Playwright tests

Applied to files:

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

Applied to files:

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

Applied to files:

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

Applied to files:

  • apps/meteor/tests/e2e/page-objects/account-security.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/account-security.ts
⏰ 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 (1)
apps/meteor/tests/e2e/page-objects/account-security.ts (1)

42-44: The role-based locator using getByRole('heading', { level: 1, name: 'Security' }) is correct and aligns with the PR objectives and coding guidelines. The hardcoded text 'Security' is acceptable here because the account-security tests do not currently include language-switching scenarios. If multilingual test support is added for this page in the future, the locators should be updated accordingly, but this is not a blocker for the current change.

@juliajforesti juliajforesti added the stat: ready to merge PR tested and approved waiting for merge label Dec 29, 2025
@dougfabris dougfabris added stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge labels Dec 29, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 29, 2025
@kodiakhq kodiakhq bot merged commit af0600c into develop Dec 29, 2025
51 checks passed
@kodiakhq kodiakhq bot deleted the test/replace-data-qa branch December 29, 2025 17:10
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants