Skip to content

Conversation

@dougfabris
Copy link
Member

@dougfabris dougfabris commented Nov 3, 2025

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Restructured end-to-end tests for clarity and maintainability.
    • Replaced a generic utilities approach with focused authenticated and toast helpers to stabilize login and notification checks.
    • Centralized admin action dispatching to simplify user state operations in tests.
    • Updated export/dialog and alert handling to use explicit fragment helpers for more reliable assertions and clearer test flows.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 3, 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 Nov 3, 2025

⚠️ No Changeset found

Latest commit: 78c105e

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

This PR includes no changesets

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

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

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

@dougfabris dougfabris added this to the 7.13.0 milestone Nov 3, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 3, 2025

Walkthrough

Replace the generic Utils page-object with a focused Authenticated/Main base, remove Utils, add ToastMessages and MenuMoreActions, refactor ExportMessagesTab to extend FlexTab, and introduce AdminUsers.dispatchUserAction(...); update tests to use new fragments and APIs.

Changes

Cohort / File(s) Summary
Tests: Utils → Authenticated
apps/meteor/tests/e2e/admin-users-status-management.spec.ts, apps/meteor/tests/e2e/delete-account.spec.ts, apps/meteor/tests/e2e/iframe-authentication.spec.ts, apps/meteor/tests/e2e/login.spec.ts, apps/meteor/tests/e2e/register.spec.ts
Replace Utils import with Authenticated; rename poUtilspoAuth; instantiate new Authenticated(page); replace main-content checks with poAuth.waitForDisplay().
Tests: Alert / toast handling & imports
apps/meteor/tests/e2e/export-messages.spec.ts, apps/meteor/tests/e2e/preview-public-channel.spec.ts, apps/meteor/tests/e2e/administration.spec.ts
Remove Utils usage; import ExportMessagesTab / ToastMessages where applicable; replace Utils.getAlertByText() with page.locator('[role="alert"]', { hasText: ... }) or ToastMessages.waitForDisplay(); initialize poToastMessage per-test.
Tests: Admin users flows
apps/meteor/tests/e2e/admin-users-role-management.spec.ts, apps/meteor/tests/e2e/admin-users.spec.ts
Replace two-step menu interactions with single dispatchUserAction({ username, action }) calls for Make/Remove Admin and Activate/Deactivate; add row-filter count assertion in one test.
Page-objects: Auth / Main base
apps/meteor/tests/e2e/page-objects/auth.ts
Add Main base class (root, waitForDisplay, waitForDismissal); refactor Registration to extend Main; add Authenticated class with root #main-content.
Page-objects: Admin users & menu fragments
apps/meteor/tests/e2e/page-objects/admin-users.ts, apps/meteor/tests/e2e/page-objects/fragments/menu.ts
Add readonly userRowMenu: MenuMoreActions; make openUserActionMenu private; remove direct menu-item getters; add dispatchUserAction(username, action); add MenuMoreActions class for "More actions" menu.
Page-objects: Fragments (toast, export tab, barrel)
apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts, apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts, apps/meteor/tests/e2e/page-objects/fragments/index.ts
Add ToastMessages.waitForDisplay({ type, message }) and alert helper; refactor ExportMessagesTab to extend FlexTab; re-export toast-messages, export-messages-tab, and menu from fragments index.
Public exports / deletions
apps/meteor/tests/e2e/page-objects/index.ts, apps/meteor/tests/e2e/page-objects/utils.ts
Remove export * from './utils' from page-objects index; delete Utils class file (utils.ts).

Sequence Diagram(s)

sequenceDiagram
    participant Test as E2E Test
    participant AdminPO as AdminUsers (page-object)
    participant Menu as MenuMoreActions
    participant UI as Browser/UI
    participant Toast as ToastMessages

    Note over AdminPO: New API: dispatchUserAction({ username, action })
    Test->>AdminPO: dispatchUserAction({ username:"alice", action:"Make Admin" })
    AdminPO->>Menu: open row menu for username
    Menu->>UI: click "Make Admin"
    UI-->>Menu: action completed (toast triggered)
    Menu-->>AdminPO: resolved
    AdminPO-->>Test: resolved
    Test->>Toast: waitForDisplay({ message: "made admin" })
    Toast->>UI: query toast locator
    UI-->>Toast: toast visible
    Toast-->>Test: resolved
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Focus review on:
    • Complete removal/replacement of Utils references and exports.
    • Correctness of ToastMessages.waitForDisplay selectors and optional message matching.
    • dispatchUserAction mapping to exact menu labels and integration with MenuMoreActions.
    • Main.waitForDisplay()/waitForDismissal() behavior and its usage in Registration/Authenticated.

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • MartinSchoeler

Poem

🐰
I hopped through tests with nimble paws,
Swapped Utils for Authenticated laws.
Toasts now wait and menus sing,
dispatchUserAction does the thing.
Hooray — the burrow's tests take a bow! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (2 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: removing the Utils page object from the test suite, which is a significant refactor affecting multiple E2E test files.
✨ 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/remove-utils

📜 Recent review details

Configuration used: CodeRabbit 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 ca0d906 and c4e529e.

📒 Files selected for processing (3)
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts (2 hunks)
  • apps/meteor/tests/e2e/admin-users.spec.ts (2 hunks)
  • apps/meteor/tests/e2e/page-objects/admin-users.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
apps/meteor/tests/e2e/**/*.spec.ts

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

apps/meteor/tests/e2e/**/*.spec.ts: All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)
Use descriptive test names that clearly communicate expected behavior
Use test.beforeAll() and test.afterAll() for setup and teardown
Use test.step() to organize complex test scenarios
Group related tests in the same file
Utilize Playwright fixtures (test, page, expect) consistently
Prefer web-first assertions (e.g., toBeVisible, toHaveText)
Use expect matchers (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements
Maintain test isolation between test cases
Ensure a clean state for each test execution
Ensure tests run reliably in parallel without shared state conflicts

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}

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

apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}: Write concise, technical TypeScript/JavaScript with accurate typing
Follow DRY by extracting reusable logic into helper functions or page objects
Avoid code comments in the implementation

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
apps/meteor/tests/e2e/**/*.{ts,tsx}

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

apps/meteor/tests/e2e/**/*.{ts,tsx}: Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle
Store commonly used locators in variables/constants for reuse
Use page.waitFor() with specific conditions and avoid hardcoded timeouts
Implement proper wait strategies for dynamic content
Follow the Page Object Model pattern consistently

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
apps/meteor/tests/e2e/page-objects/**/*.ts

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

Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/

Files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
🧠 Learnings (16)
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use descriptive test names that clearly communicate expected behavior

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
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-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure a clean state for each test execution

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Write concise, technical TypeScript/JavaScript with accurate typing

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use test.beforeAll() and test.afterAll() for setup and teardown

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use test.step() to organize complex test scenarios

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Follow the Page Object Model pattern consistently

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Follow DRY by extracting reusable logic into helper functions or page objects

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Store commonly used locators in variables/constants for reuse

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (e.g., toBeVisible, toHaveText)

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use expect matchers (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements

Applied to files:

  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
🧬 Code graph analysis (1)
apps/meteor/tests/e2e/page-objects/admin-users.ts (2)
apps/meteor/tests/e2e/page-objects/fragments/user-info-flextab.ts (1)
  • UserInfoFlexTab (6-25)
apps/meteor/tests/e2e/page-objects/fragments/menu.ts (1)
  • MenuMoreActions (23-27)
🔇 Additional comments (5)
apps/meteor/tests/e2e/admin-users-role-management.spec.ts (1)

39-39: Good addition of exact-count assertion.

The .toHaveCount(1) assertion ensures exactly one matching user row exists, preventing false positives from duplicate or multiple matching rows.

apps/meteor/tests/e2e/page-objects/admin-users.ts (4)

4-6: Good type safety with UserActions alias.

The UserActions type alias provides strong typing for the action parameter and makes the API self-documenting.


13-13: LGTM - Consistent fragment initialization.

The userRowMenu property follows the same pattern as other fragments (editUser, userInfo) and is properly typed and initialized.

Also applies to: 19-19


23-23: Good use of exact matching.

The exact: true option prevents partial text matches and makes the locators more precise.

Also applies to: 27-27


46-48: Good encapsulation of internal method.

Making openUserActionMenu private is appropriate since it's only used internally by dispatchUserAction.


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

❤️ Share

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

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.07%. Comparing base (276ec51) to head (78c105e).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37371      +/-   ##
===========================================
- Coverage    67.08%   67.07%   -0.01%     
===========================================
  Files         3419     3419              
  Lines       117938   117938              
  Branches     21578    21531      -47     
===========================================
- Hits         79114    79106       -8     
- Misses       36132    36143      +11     
+ Partials      2692     2689       -3     
Flag Coverage Δ
e2e 57.48% <ø> (+<0.01%) ⬆️
unit 72.13% <ø> (-0.02%) ⬇️

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

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

@dougfabris dougfabris marked this pull request as ready for review November 5, 2025 14:13
@dougfabris dougfabris requested a review from a team as a code owner November 5, 2025 14:13
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: 4

🧹 Nitpick comments (1)
apps/meteor/tests/e2e/export-messages.spec.ts (1)

91-94: Consider extracting repeated alert locator pattern.

The alert locator pattern page.locator('[role="alert"]', { hasText: ... }) is repeated. While functional, consider extracting to a helper method in the test file or a page object for improved maintainability.

Example:

const getAlertByText = (text: string) => page.locator('[role="alert"]', { hasText: text });

Based on learnings

Also applies to: 107-111

📜 Review details

Configuration used: CodeRabbit 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 31ab78f and 5401ea3.

📒 Files selected for processing (17)
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts (2 hunks)
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts (3 hunks)
  • apps/meteor/tests/e2e/administration.spec.ts (4 hunks)
  • apps/meteor/tests/e2e/delete-account.spec.ts (7 hunks)
  • apps/meteor/tests/e2e/export-messages.spec.ts (5 hunks)
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts (4 hunks)
  • apps/meteor/tests/e2e/login.spec.ts (3 hunks)
  • apps/meteor/tests/e2e/page-objects/admin-users.ts (3 hunks)
  • apps/meteor/tests/e2e/page-objects/auth.ts (1 hunks)
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts (1 hunks)
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts (1 hunks)
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts (1 hunks)
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts (1 hunks)
  • apps/meteor/tests/e2e/page-objects/index.ts (0 hunks)
  • apps/meteor/tests/e2e/page-objects/utils.ts (0 hunks)
  • apps/meteor/tests/e2e/preview-public-channel.spec.ts (4 hunks)
  • apps/meteor/tests/e2e/register.spec.ts (5 hunks)
💤 Files with no reviewable changes (2)
  • apps/meteor/tests/e2e/page-objects/index.ts
  • apps/meteor/tests/e2e/page-objects/utils.ts
🧰 Additional context used
📓 Path-based instructions (4)
apps/meteor/tests/e2e/**/*.spec.ts

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

apps/meteor/tests/e2e/**/*.spec.ts: All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)
Use descriptive test names that clearly communicate expected behavior
Use test.beforeAll() and test.afterAll() for setup and teardown
Use test.step() to organize complex test scenarios
Group related tests in the same file
Utilize Playwright fixtures (test, page, expect) consistently
Prefer web-first assertions (e.g., toBeVisible, toHaveText)
Use expect matchers (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements
Maintain test isolation between test cases
Ensure a clean state for each test execution
Ensure tests run reliably in parallel without shared state conflicts

Files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/register.spec.ts
apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}

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

apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}: Write concise, technical TypeScript/JavaScript with accurate typing
Follow DRY by extracting reusable logic into helper functions or page objects
Avoid code comments in the implementation

Files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
apps/meteor/tests/e2e/**/*.{ts,tsx}

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

apps/meteor/tests/e2e/**/*.{ts,tsx}: Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle
Store commonly used locators in variables/constants for reuse
Use page.waitFor() with specific conditions and avoid hardcoded timeouts
Implement proper wait strategies for dynamic content
Follow the Page Object Model pattern consistently

Files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
apps/meteor/tests/e2e/page-objects/**/*.ts

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

Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/

Files:

  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
🧠 Learnings (23)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Follow DRY by extracting reusable logic into helper functions or page objects
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Follow the Page Object Model pattern consistently
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : 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-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use descriptive test names that clearly communicate expected behavior
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Implement proper wait strategies for dynamic content
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use test.beforeAll() and test.afterAll() for setup and teardown
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (e.g., toBeVisible, toHaveText)

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use descriptive test names that clearly communicate expected behavior

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use expect matchers (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/register.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Follow the Page Object Model pattern consistently

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Follow DRY by extracting reusable logic into helper functions or page objects

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/menu.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Store commonly used locators in variables/constants for reuse

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Avoid code comments in the implementation

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure a clean state for each test execution

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/register.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
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/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/register.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/register.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Write concise, technical TypeScript/JavaScript with accurate typing

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-11-04T16:49:19.107Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37377
File: apps/meteor/ee/server/hooks/federation/index.ts:86-88
Timestamp: 2025-11-04T16:49:19.107Z
Learning: In Rocket.Chat's federation system (apps/meteor/ee/server/hooks/federation/), permission checks follow two distinct patterns: (1) User-initiated federation actions (creating rooms, adding users to federated rooms, joining from invites) should throw MeteorError to inform users they lack 'access-federation' permission. (2) Remote server-initiated federation events should silently skip/ignore when users lack permission. The beforeAddUserToRoom hook only executes for local user-initiated actions, so throwing an error there is correct. Remote federation events are handled separately by the federation Matrix package with silent skipping logic.

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Use page.waitFor() with specific conditions and avoid hardcoded timeouts

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/register.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Implement proper wait strategies for dynamic content

Applied to files:

  • apps/meteor/tests/e2e/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/export-messages.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/register.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/preview-public-channel.spec.ts
  • apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file

Applied to files:

  • apps/meteor/tests/e2e/page-objects/fragments/index.ts
  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/administration.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use test.beforeAll() and test.afterAll() for setup and teardown

Applied to files:

  • apps/meteor/tests/e2e/delete-account.spec.ts
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/administration.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
  • apps/meteor/tests/e2e/register.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)

Applied to files:

  • apps/meteor/tests/e2e/page-objects/auth.ts
  • apps/meteor/tests/e2e/iframe-authentication.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/login.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use test.step() to organize complex test scenarios

Applied to files:

  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
  • apps/meteor/tests/e2e/admin-users-status-management.spec.ts
  • apps/meteor/tests/e2e/register.spec.ts
🧬 Code graph analysis (7)
apps/meteor/tests/e2e/delete-account.spec.ts (1)
apps/meteor/tests/e2e/page-objects/auth.ts (1)
  • Authenticated (17-21)
apps/meteor/tests/e2e/iframe-authentication.spec.ts (1)
apps/meteor/tests/e2e/page-objects/auth.ts (2)
  • Registration (23-115)
  • Authenticated (17-21)
apps/meteor/tests/e2e/administration.spec.ts (1)
apps/meteor/tests/e2e/page-objects/fragments/toast-messages.ts (1)
  • ToastMessages (5-31)
apps/meteor/tests/e2e/admin-users-status-management.spec.ts (1)
apps/meteor/tests/e2e/page-objects/auth.ts (2)
  • Authenticated (17-21)
  • Registration (23-115)
apps/meteor/tests/e2e/login.spec.ts (1)
apps/meteor/tests/e2e/page-objects/auth.ts (2)
  • Registration (23-115)
  • Authenticated (17-21)
apps/meteor/tests/e2e/page-objects/admin-users.ts (2)
apps/meteor/tests/e2e/page-objects/fragments/user-info-flextab.ts (1)
  • UserInfoFlexTab (6-25)
apps/meteor/tests/e2e/page-objects/fragments/menu.ts (1)
  • MenuMoreActions (23-27)
apps/meteor/tests/e2e/register.spec.ts (1)
apps/meteor/tests/e2e/page-objects/auth.ts (2)
  • Registration (23-115)
  • Authenticated (17-21)
🔇 Additional comments (20)
apps/meteor/tests/e2e/page-objects/fragments/menu.ts (1)

23-27: LGTM!

The MenuMoreActions class follows the established pattern of the existing MenuMore class and correctly uses semantic locators.

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

4-4: LGTM!

The migration from Utils to Authenticated is correctly implemented. The use of waitForDisplay() provides a cleaner assertion pattern and aligns with the new Page Object Model structure.

Also applies to: 10-10, 14-14, 45-45, 55-55

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

13-15: LGTM!

The new fragment exports follow the established barrel export pattern and correctly expose the new page object fragments.

apps/meteor/tests/e2e/page-objects/auth.ts (3)

5-15: LGTM!

The Main base class provides a clean abstraction for display/dismissal wait patterns, reducing code duplication across page objects. The implementation follows best practices with proper typing and web-first assertions.

Based on learnings.


17-21: LGTM!

The Authenticated class correctly extends Main and provides a focused page object for authenticated state verification using the #main-content selector.


23-26: LGTM!

Refactoring Registration to extend Main eliminates code duplication while maintaining backward compatibility with existing locators.

apps/meteor/tests/e2e/iframe-authentication.spec.ts (1)

5-5: LGTM!

The migration from Utils to Authenticated is correctly implemented and consistent with the broader refactor across the test suite.

Also applies to: 13-13, 31-31, 80-80, 103-103

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

24-30: LGTM!

The waitForDisplay method provides a flexible API for toast verification with proper web-first assertions and support for optional message matching.

apps/meteor/tests/e2e/admin-users-role-management.spec.ts (2)

42-42: LGTM!

The higher-level makeUserAdmin method improves test readability and maintainability by encapsulating the action menu interaction logic.

Based on learnings.


62-62: LGTM!

The higher-level removeUserAdmin method improves test readability and maintainability by encapsulating the action menu interaction logic.

Based on learnings.

apps/meteor/tests/e2e/page-objects/fragments/export-messages-tab.ts (1)

3-8: LGTM! Clean base class refactor.

The refactor to extend FlexTab is well-executed. The dialog locator with accessible name provides semantic identification, and all existing methods correctly leverage this.root from the base class.

apps/meteor/tests/e2e/delete-account.spec.ts (2)

2-2: LGTM! Consistent page object refactor.

The migration from Utils to Authenticated is clean and consistent throughout the test suite.

Also applies to: 11-11, 28-28


46-46: LGTM! Proper wait strategy.

Using waitForDisplay() provides a proper wait strategy for authentication state verification.

Also applies to: 84-84, 125-125

apps/meteor/tests/e2e/administration.spec.ts (2)

7-7: LGTM! Proper fragment extraction.

Extracting toast message handling into a dedicated ToastMessages fragment follows the Page Object Model pattern and improves reusability.

Based on learnings

Also applies to: 118-122


172-172: LGTM! Improved assertion pattern.

Using waitForDisplay() provides better synchronization than direct element checks.

Also applies to: 182-182

apps/meteor/tests/e2e/page-objects/admin-users.ts (1)

64-72: LGTM! Excellent encapsulation.

The new high-level methods makeUserAdmin and removeUserAdmin properly encapsulate menu interactions, improving test readability and maintainability.

Based on learnings

apps/meteor/tests/e2e/admin-users-status-management.spec.ts (1)

5-5: LGTM! Consistent refactoring pattern.

The migration from Utils to Authenticated is consistent with the broader PR changes and improves semantic clarity.

Also applies to: 25-25, 31-31, 47-47

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

141-141: LGTM! Proper wait strategy.

Using waitForDisplay() ensures the export dialog is visible before interaction, following Playwright best practices for dynamic content.

As per coding guidelines

Also applies to: 169-169

apps/meteor/tests/e2e/register.spec.ts (2)

3-3: LGTM! Clean test setup refactor.

The migration to Authenticated page object simplifies the beforeEach setup and aligns with the new architecture.

Also applies to: 9-14


44-44: LGTM! Consistent authentication verification.

Using waitForDisplay() provides reliable post-registration authentication state checks.

Also applies to: 80-80, 209-209

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: 2

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

48-48: Consider extracting the action type for reusability.

The inline union type 'Remove Admin' | 'Make Admin' | 'Activate' | 'Deactivate' could be extracted to a type alias for better maintainability and reusability across tests.

+export type UserAction = 'Remove Admin' | 'Make Admin' | 'Activate' | 'Deactivate';
+
-	async dispatchUserAction({ username, action }: { username: string; action: 'Remove Admin' | 'Make Admin' | 'Activate' | 'Deactivate' }) {
+	async dispatchUserAction({ username, action }: { username: string; action: UserAction }): Promise<Locator> {
📜 Review details

Configuration used: CodeRabbit 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 5401ea3 and 251b974.

📒 Files selected for processing (3)
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts (2 hunks)
  • apps/meteor/tests/e2e/admin-users.spec.ts (2 hunks)
  • apps/meteor/tests/e2e/page-objects/admin-users.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
🧰 Additional context used
📓 Path-based instructions (4)
apps/meteor/tests/e2e/**/*.spec.ts

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

apps/meteor/tests/e2e/**/*.spec.ts: All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)
Use descriptive test names that clearly communicate expected behavior
Use test.beforeAll() and test.afterAll() for setup and teardown
Use test.step() to organize complex test scenarios
Group related tests in the same file
Utilize Playwright fixtures (test, page, expect) consistently
Prefer web-first assertions (e.g., toBeVisible, toHaveText)
Use expect matchers (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements
Maintain test isolation between test cases
Ensure a clean state for each test execution
Ensure tests run reliably in parallel without shared state conflicts

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}

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

apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}: Write concise, technical TypeScript/JavaScript with accurate typing
Follow DRY by extracting reusable logic into helper functions or page objects
Avoid code comments in the implementation

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
apps/meteor/tests/e2e/**/*.{ts,tsx}

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

apps/meteor/tests/e2e/**/*.{ts,tsx}: Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle
Store commonly used locators in variables/constants for reuse
Use page.waitFor() with specific conditions and avoid hardcoded timeouts
Implement proper wait strategies for dynamic content
Follow the Page Object Model pattern consistently

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
apps/meteor/tests/e2e/page-objects/**/*.ts

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

Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/

Files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Follow DRY by extracting reusable logic into helper functions or page objects
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use descriptive test names that clearly communicate expected behavior

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure a clean state for each test execution

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Write concise, technical TypeScript/JavaScript with accurate typing

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
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-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use test.beforeAll() and test.afterAll() for setup and teardown

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Follow DRY by extracting reusable logic into helper functions or page objects

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Implement proper wait strategies for dynamic content

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Follow the Page Object Model pattern consistently

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Store commonly used locators in variables/constants for reuse

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (e.g., toBeVisible, toHaveText)

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.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/admin-users.ts
🧬 Code graph analysis (1)
apps/meteor/tests/e2e/page-objects/admin-users.ts (3)
apps/meteor/tests/e2e/page-objects/fragments/edit-user-flextab.ts (1)
  • EditUserFlexTab (5-57)
apps/meteor/tests/e2e/page-objects/fragments/user-info-flextab.ts (1)
  • UserInfoFlexTab (6-25)
apps/meteor/tests/e2e/page-objects/fragments/menu.ts (1)
  • MenuMoreActions (23-27)
⏰ 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 (2)
apps/meteor/tests/e2e/page-objects/admin-users.ts (2)

4-4: LGTM: MenuMoreActions integration follows Page Object Model.

The MenuMoreActions fragment is properly imported, declared as a readonly property, and initialized in the constructor, consistent with other fragments in this class.

Also applies to: 11-12, 17-17


20-26: LGTM: Added exact matching for button locators.

Using exact: true improves selector precision and prevents partial text matches, following Playwright best practices.

MartinSchoeler
MartinSchoeler previously approved these changes Nov 5, 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: 1

🧹 Nitpick comments (2)
apps/meteor/tests/e2e/admin-users.spec.ts (1)

25-25: Optional: Extra blank line.

The added blank line after beforeEach is not necessary but doesn't affect functionality.

apps/meteor/tests/e2e/page-objects/admin-users.ts (1)

37-38: Prefer semantic locators over page.locator().

The coding guidelines recommend avoiding page.locator() in favor of semantic locators. Consider using getByRole('row') with a filter.

Apply this diff:

 	getUserRowByUsername(username: string): Locator {
-		return this.page.locator('tr', { hasText: username });
+		return this.page.getByRole('row').filter({ hasText: username });
 	}

As per coding guidelines

📜 Review details

Configuration used: CodeRabbit 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 251b974 and ca0d906.

📒 Files selected for processing (3)
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts (2 hunks)
  • apps/meteor/tests/e2e/admin-users.spec.ts (2 hunks)
  • apps/meteor/tests/e2e/page-objects/admin-users.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/tests/e2e/admin-users-role-management.spec.ts
🧰 Additional context used
📓 Path-based instructions (4)
apps/meteor/tests/e2e/**/*.spec.ts

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

apps/meteor/tests/e2e/**/*.spec.ts: All Playwright test files must be located under apps/meteor/tests/e2e/ and use the .spec.ts extension (e.g., login.spec.ts)
Use descriptive test names that clearly communicate expected behavior
Use test.beforeAll() and test.afterAll() for setup and teardown
Use test.step() to organize complex test scenarios
Group related tests in the same file
Utilize Playwright fixtures (test, page, expect) consistently
Prefer web-first assertions (e.g., toBeVisible, toHaveText)
Use expect matchers (toEqual, toContain, toBeTruthy, toHaveLength, etc.) instead of assert statements
Maintain test isolation between test cases
Ensure a clean state for each test execution
Ensure tests run reliably in parallel without shared state conflicts

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}

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

apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx}: Write concise, technical TypeScript/JavaScript with accurate typing
Follow DRY by extracting reusable logic into helper functions or page objects
Avoid code comments in the implementation

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
apps/meteor/tests/e2e/**/*.{ts,tsx}

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

apps/meteor/tests/e2e/**/*.{ts,tsx}: Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle
Store commonly used locators in variables/constants for reuse
Use page.waitFor() with specific conditions and avoid hardcoded timeouts
Implement proper wait strategies for dynamic content
Follow the Page Object Model pattern consistently

Files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
apps/meteor/tests/e2e/page-objects/**/*.ts

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

Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/

Files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use descriptive test names that clearly communicate expected behavior

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
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-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure a clean state for each test execution

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use test.step() to organize complex test scenarios

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use test.beforeAll() and test.afterAll() for setup and teardown

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Utilize Playwright fixtures (test, page, expect) consistently

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Follow DRY by extracting reusable logic into helper functions or page objects

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx,js,jsx} : Write concise, technical TypeScript/JavaScript with accurate typing

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Group related tests in the same file

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Avoid using page.locator(); prefer semantic locators like page.getByRole, page.getByLabel, page.getByText, and page.getByTitle

Applied to files:

  • apps/meteor/tests/e2e/admin-users.spec.ts
  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/page-objects/**/*.ts : Utilize and place Page Object implementations under apps/meteor/tests/e2e/page-objects/

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Follow the Page Object Model pattern consistently

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.{ts,tsx} : Store commonly used locators in variables/constants for reuse

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
📚 Learning: 2025-09-16T22:08:51.490Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-09-16T22:08:51.490Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Prefer web-first assertions (e.g., toBeVisible, toHaveText)

Applied to files:

  • apps/meteor/tests/e2e/page-objects/admin-users.ts
🧬 Code graph analysis (1)
apps/meteor/tests/e2e/page-objects/admin-users.ts (2)
apps/meteor/tests/e2e/page-objects/fragments/user-info-flextab.ts (1)
  • UserInfoFlexTab (6-25)
apps/meteor/tests/e2e/page-objects/fragments/menu.ts (1)
  • MenuMoreActions (23-27)
⏰ 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). (2)
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (3)
apps/meteor/tests/e2e/admin-users.spec.ts (1)

51-51: Critical issue from previous review is now resolved.

The previous review flagged that the returned locator was not clicked. The current implementation of dispatchUserAction in admin-users.ts (line 50) now performs the click internally, so this call correctly executes the 'Deactivate' action.

Also applies to: 59-59

apps/meteor/tests/e2e/page-objects/admin-users.ts (2)

21-21: Good use of exact matching.

Adding exact: true to button locators improves specificity and reduces the risk of matching unintended elements.

Also applies to: 25-25

Also applies to: 25-25


44-46: Good encapsulation.

Making openUserActionMenu private properly encapsulates the implementation detail, with dispatchUserAction providing the public API.

@dougfabris dougfabris added the stat: QA assured Means it has been tested and approved by a company insider label Nov 5, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 5, 2025
@kodiakhq kodiakhq bot merged commit 4b8d0df into develop Nov 6, 2025
114 of 116 checks passed
@kodiakhq kodiakhq bot deleted the test/remove-utils branch November 6, 2025 01:21
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.

4 participants