docs: e2e performance migration rollout plan#40257
Conversation
|
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughIntroduces a new documentation file defining an end-to-end rollout plan for migrating the Playwright E2E test suite to performance patterns established in PR Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Proposal for rolling out the two performance patterns landed in #39691 across the remaining E2E suite. Patterns themselves live in the e2e README; this doc focuses only on how we migrate 150+ files in batches without regressing coverage or review throughput.
82f5f7e to
8a05976
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (3)
docs/proposals/e2e-performance-migration.md (3)
94-94: Clarify the "Tests" column in the impact table.The per-file impact table includes a "Tests" column, but it's unclear what this represents. Is it:
- Total number of test cases in the file?
- Number of tests that were modified?
- Number of tests that were consolidated?
Adding a brief note in the template (e.g., "Tests = number of test cases") would improve clarity.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/proposals/e2e-performance-migration.md` at line 94, Clarify the meaning of the "Tests" column in the per-file impact table by updating the table header or adding a brief note in the template: change the header to e.g. "Tests (number of test cases)" or append a short footnote like "Tests = number of test cases in the file" near the table in e2e-performance-migration.md so readers know it represents the total number of test cases per file; update the table header text or the surrounding explanatory text accordingly to reflect this definition.
61-61: Define "setup-only test.step" criteria.The term "setup-only
test.steps" is used to filter UI setup hits but isn't clearly defined. What distinguishes a setup-only step from a behavior-testing step? Consider adding explicit criteria, such as:
- Steps that only create state without assertions
- Steps labeled with "setup" or "arrange" in their description
- Steps that appear before the first
expect()callThis will ensure consistent triage across contributors and AI agents.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/proposals/e2e-performance-migration.md` at line 61, The term "setup-only test.step"s used in the ui_setup_hits metric is ambiguous; update the proposal to define deterministic criteria for identifying setup-only steps: steps inside beforeAll/beforeEach or test.step whose body contains only state-mutating calls (e.g. content.sendMessage, openLastMessageMenu, btnCreateDiscussionModal, btnCreateChannel, btnCreateDirectMessage) with no assertions, or whose description includes canonical flags like "setup" or "arrange", or that occur entirely before the first expect() in the test; include these three rules (no assertions, descriptive label, pre-expect position) and an explicit precedence rule for conflicting cases so contributors and automation can consistently classify test.step entries.
43-43: Clarify the function signature notation.The signature
sendMessage(api, roomId, msg, { threadId?, asUser? })is ambiguous. Is the entire options object optional, or just the properties within it? Consider using TypeScript-like notation for clarity:sendMessage(api, roomId, msg, options?: { threadId?: string, asUser?: User })This makes it clear that the fourth parameter is optional and contains optional properties.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/proposals/e2e-performance-migration.md` at line 43, Update the proposal's function signature to remove ambiguity by using TypeScript-style optional notation: replace `sendMessage(api, roomId, msg, { threadId?, asUser? })` with `sendMessage(api, roomId, msg, options?: { threadId?: string, asUser?: User })`, and mention that this unifies `sendMessage` and `sendMessageFromUser` into a single function where the entire options object is optional and its properties are individually optional.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/proposals/e2e-performance-migration.md`:
- Line 94: Clarify the meaning of the "Tests" column in the per-file impact
table by updating the table header or adding a brief note in the template:
change the header to e.g. "Tests (number of test cases)" or append a short
footnote like "Tests = number of test cases in the file" near the table in
e2e-performance-migration.md so readers know it represents the total number of
test cases per file; update the table header text or the surrounding explanatory
text accordingly to reflect this definition.
- Line 61: The term "setup-only test.step"s used in the ui_setup_hits metric is
ambiguous; update the proposal to define deterministic criteria for identifying
setup-only steps: steps inside beforeAll/beforeEach or test.step whose body
contains only state-mutating calls (e.g. content.sendMessage,
openLastMessageMenu, btnCreateDiscussionModal, btnCreateChannel,
btnCreateDirectMessage) with no assertions, or whose description includes
canonical flags like "setup" or "arrange", or that occur entirely before the
first expect() in the test; include these three rules (no assertions,
descriptive label, pre-expect position) and an explicit precedence rule for
conflicting cases so contributors and automation can consistently classify
test.step entries.
- Line 43: Update the proposal's function signature to remove ambiguity by using
TypeScript-style optional notation: replace `sendMessage(api, roomId, msg, {
threadId?, asUser? })` with `sendMessage(api, roomId, msg, options?: {
threadId?: string, asUser?: User })`, and mention that this unifies
`sendMessage` and `sendMessageFromUser` into a single function where the entire
options object is optional and its properties are individually optional.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2edcc46e-f943-47c6-bce7-40d9c2ab0b91
📒 Files selected for processing (1)
docs/proposals/e2e-performance-migration.md
📜 Review details
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: smirk-dev
Repo: RocketChat/Rocket.Chat PR: 39625
File: apps/meteor/app/api/server/v1/push.ts:85-97
Timestamp: 2026-03-14T14:58:58.834Z
Learning: In RocketChat/Rocket.Chat, the `push.token` POST/DELETE endpoints in `apps/meteor/app/api/server/v1/push.ts` were already migrated to the chained router API pattern on `develop` prior to PR `#39625`. `cleanTokenResult` (which strips `authToken` and returns `PushTokenResult`) and `isPushTokenPOSTProps`/`isPushTokenDELETEProps` validators already exist on `develop`. PR `#39625` only migrates `push.get` and `push.info` to the chained pattern. Do not flag `cleanTokenResult` or `PushTokenResult` as newly introduced behavior-breaking changes when reviewing this PR.
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} : Follow Page Object Model pattern consistently in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.step()` for complex test scenarios to improve organization in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Implement proper wait strategies for dynamic content 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 **/*.spec.ts : Use descriptive test names that clearly communicate expected behavior in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Ensure clean state for each test execution in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.beforeAll()` and `test.afterAll()` for setup/teardown in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `page.waitFor()` with specific conditions instead of hardcoded timeouts in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Maintain test isolation between test cases in Playwright tests
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `expect` matchers for assertions (`toEqual`, `toContain`, `toBeTruthy`, `toHaveLength`, etc.) instead of `assert` statements in Playwright tests
📚 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:
docs/proposals/e2e-performance-migration.md
📚 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:
docs/proposals/e2e-performance-migration.md
📚 Learning: 2025-11-24T17:08:17.065Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat PR: 0
File: .cursor/rules/playwright.mdc:0-0
Timestamp: 2025-11-24T17:08:17.065Z
Learning: Applies to apps/meteor/tests/e2e/**/*.spec.ts : Use `test.step()` for complex test scenarios to improve organization in Playwright tests
Applied to files:
docs/proposals/e2e-performance-migration.md
📚 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:
docs/proposals/e2e-performance-migration.md
📚 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:
docs/proposals/e2e-performance-migration.md
📚 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:
docs/proposals/e2e-performance-migration.md
📚 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:
docs/proposals/e2e-performance-migration.md
📚 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:
docs/proposals/e2e-performance-migration.md
📚 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:
docs/proposals/e2e-performance-migration.md
📚 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:
docs/proposals/e2e-performance-migration.md
📚 Learning: 2026-03-16T11:50:18.066Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 39657
File: apps/meteor/tests/end-to-end/apps/app-resolve-visitor.ts:18-21
Timestamp: 2026-03-16T11:50:18.066Z
Learning: In `apps/meteor/tests/end-to-end/apps/` (and Livechat E2E tests broadly), calling `createAgent()` and `makeAgentAvailable()` immediately after `updateSetting('Livechat_enabled', true)` — without any intermediate sleep — is an established, non-flaky pattern used across 10+ tests in the codebase. Do not flag this sequence as a potential race condition or suggest adding a delay between them.
Applied to files:
docs/proposals/e2e-performance-migration.md
📚 Learning: 2026-02-04T12:09:05.769Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 38374
File: apps/meteor/tests/end-to-end/apps/app-logs-nested-requests.ts:26-37
Timestamp: 2026-02-04T12:09:05.769Z
Learning: In E2E tests at apps/meteor/tests/end-to-end/apps/, prefer sleeping for a fixed duration (e.g., 1 second) over implementing polling/retry logic when waiting for asynchronous operations to complete. Tests should fail deterministically if the expected result isn't available after the sleep.
Applied to files:
docs/proposals/e2e-performance-migration.md
🪛 LanguageTool
docs/proposals/e2e-performance-migration.md
[uncategorized] ~57-~57: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...hase 2. Deliverable: a spreadsheet (or markdown table, committed under `docs/proposals/...
(MARKDOWN_NNP)
[uncategorized] ~115-~115: The official name of this software platform is spelled with a capital “H”.
Context: ...rns to flag in review". Link to it from .github/pull_request_template.md under the E2E...
(GITHUB)
🔇 Additional comments (1)
docs/proposals/e2e-performance-migration.md (1)
3-3: All referenced files and anchors exist and are correctly accessible:
apps/meteor/tests/e2e/README.mdwith## Performance patternssection ✓apps/meteor/tests/e2e/federation/README.md✓.github/PULL_REQUEST_TEMPLATE.md✓No issues found.
Phase 0 of the rollout plan in docs/proposals/e2e-performance-migration.md.
- Split utils/create-target-channel.ts by concern into channels.ts,
groups.ts, teams.ts, direct-messages.ts, discussions.ts, messages.ts
and rooms.ts so specs import by topic instead of a catch-all file.
- Unify sendMessage and sendMessageFromUser into a single
sendMessage(api, roomId, msg, { threadId?, asUser? }) using
/chat.sendMessage uniformly.
- Add createThreadReply, inviteUsersToRoom and setRoomTopic helpers
identified as missing for Phase 2 migrations.
- Re-export the new surface from utils/index.ts so specs stay on the
'./utils' import path.
- Update README helper table to match.
Phase 1 of the rollout plan: the generated triage table is the input for Phase 2 batches. - apps/meteor/tests/e2e/scripts/e2e-triage.mts walks the spec tree, flags serial suites, and counts UI-setup calls inside beforeAll / beforeEach and assertion-free test.step bodies. - docs/proposals/e2e-migration-triage.md: generated worklist (152 specs, 144 migration candidates, 8 opt-outs from the do-not-migrate list). ci_median_ms left blank for a human to fill in from the latest Playwright report; rows are sorted by a stand-in score until that number is populated. - Plan doc now points at both the triage file and the generator.
Phase 2 batch 1. Per-file impact pending a Playwright-report rerun;
structural changes only.
Files in this batch:
- report-message.spec.ts — replace 5 "send message as user1" test.steps
with sendMessage(api, channelId, msg, { asUser: Users.user1 }) and
reuse the admin HomeChannel created in beforeAll. Drops the user1
page.goto('/home') on 4 of 5 tests (only the own-message menu test
still needs it).
- messaging.spec.ts — seed msg1 / msg2 via API (as user1, so the
edit-by-ArrowUp assertion still passes) in the outer beforeAll
instead of the first Navigation test.
- threads.spec.ts — parent messages for the two outer tests and the
"thread message actions" beforeEach now come from sendMessage(api,
...). UI openReplyInThread / sendMessageInThread stays because the
tests are about the reply-in-thread flow itself.
- image-gallery.spec.ts — image-link seed in the "When sending an
image as a link" describe moved to sendMessage(api, ...,
{ asUser: Users.user1 }) so the unfurling still happens server-side
but the client-side type-and-send step is gone.
Pattern 2 (shared browser context): not applied. None of these suites
meet every precondition: report-message uses two pages, messaging
spans multiple serial describes that don't leave the page at a
shared home position, threads and image-gallery tests end in
different URL/gallery states. Captured for follow-up PRs.
Timings: not measured — this environment cannot run Playwright. The
triage doc still has ci_median_ms blank; the PR body should be
updated with before/after numbers before merge per the Phase 2
template in docs/proposals/e2e-performance-migration.md.
Fixes surfaced while running the Phase 2 batch against a live server.
- utils/messages.ts: Playwright's APIRequestContext resolves a path with
a leading slash against the origin, not the baseURL. Calling
userContext.post('/chat.sendMessage') was hitting /chat.sendMessage
(404) instead of /api/v1/chat.sendMessage. Drop the baseURL and use
the BASE_API_URL-prefixed absolute URL, matching the old
sendMessageFromUser call.
- utils/rooms.ts: add joinChannelAsUser(roomId, user) which performs
/channels.join as the given user. Unlike inviteUsersToRoom (admin
adds someone, emits "added" system message), this produces the
single "joined" system message that UI-driven joins produce.
- messaging.spec.ts: after navbar.openChat, click the composer to move
keyboard focus there so the Navigation/Edition keyboard shortcuts
have the right starting point the UI sendMessage used to provide.
Seed user1's membership via joinChannelAsUser so the Navigation
test's "first system message" assertion still resolves to exactly
one system message.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #40257 +/- ##
===========================================
- Coverage 69.84% 69.39% -0.46%
===========================================
Files 3296 3274 -22
Lines 119173 118446 -727
Branches 21514 21288 -226
===========================================
- Hits 83233 82192 -1041
- Misses 32635 33082 +447
+ Partials 3305 3172 -133
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Phase 2, pattern 2. account-security is a 6-test serial suite that all hit /account/security under the admin user — the precondition for a shared browser context is met. Moves context/page creation to beforeAll, keeps the per-test page.goto + the Accounts_Password_Policy toggle, tears the page down in afterAll. Verified against a live server: 6 passed (14.6s). account-profile.spec.ts attempted the same migration but Personal Access Tokens failed in a way (page.waitForResponse → "Target page has been closed") I could not reproduce without a running server; leaving the file at HEAD until it can be debugged live.
Finishes the non-lint guardrails from the rollout plan; the optional ESLint rule is still open. - .github/PULL_REQUEST_TEMPLATE.md: point E2E reviewers at the "Anti-patterns to flag in review" section of the e2e README and the performance-migration plan. - apps/meteor/playwright.config.ts: enable Playwright's JSON reporter (tests/e2e/.playwright/results.json). The file rides along in the existing `playwright-test-trace-*` artifact uploads, so no workflow change is needed to expose it. - apps/meteor/tests/e2e/scripts/e2e-timing-report.mts: turns a results.json into a markdown table of specs whose p50 exceeds the 3s/test target (`ci_median_ms` baseline from the plan). Default threshold is configurable via CLI arg. - .github/workflows/e2e-timing-guardrail.yml: Mondays 09:00 UTC + manual dispatch; downloads the latest successful ci.yml artifact from develop and posts the report to the run summary, so recurring offenders surface without digging through Playwright HTML. - docs/proposals/e2e-performance-migration.md: Phase 3 section now reflects what landed and what is still open. - docs/proposals/e2e-migration-triage.md: regenerated after the Phase 2 batch — down from 9 to 5 files with UI setup hits.
Phase 2 batch 3 — pattern 2 on 4 serial suites that met the shared-user
precondition, validated against the live dev server.
- account-profile.spec.ts — 8 of 9 tests (1 is test.skip by a
pre-existing FIXME). The Personal Access Tokens test needs the
'create-personal-access-tokens' permission on the 'user' role; in CI
this is seeded, locally it may not be.
- admin-room.spec.ts — 6 tests, admin, beforeEach goto('/admin/rooms').
- emojis.spec.ts — 4 tests, admin, beforeEach goto('/home').
- file-upload.spec.ts — 14 tests across three nested describes. The
video-message test now grants camera/microphone on the shared
context (not the default test fixture) so the Video message button
actually enables.
Three more serial, single-user suites that meet the shared-context precondition. - jump-to-thread-message.spec.ts — 3 tests, admin, each test goto to a different message link. - email-inboxes.spec.ts — 2 tests, admin, beforeEach goto /admin/email-inboxes. (The delete test assumes an empty inboxes table — leftover inboxes from older runs break it; not a migration regression.) - messaging-scroll-to-bottom.spec.ts — 4 tests, admin. Moves the shared 1023x700 viewport into browser.newContext so each test doesn't have to reset it.
6 admin tests against /admin/import and /admin/rooms — each was re-creating the AdminImports / AdminRooms page-objects per test. Move context, page and page-objects into beforeAll so the suite pays the hydration cost once.
Three more serial admin suites share a browser context. - system-messages.spec.ts — 4 tests, page-object + page moved to beforeAll. Each test still does its own /home goto + openChat in beforeEach. - settings-assets.spec.ts — 4 tests, same shape. - sidebar.spec.ts — 14 tests, the trickier one. Tests shrink the viewport to 1023x767 / 767x510 for mobile/tablet checks; beforeEach now resets to 1280x720 so a previous test's mobile size doesn't leak in.
12-test serial suite under user1. One test shrinks to 768x600 for the compact toolbar check — beforeEach resets to 1280x720 so the next test starts at the expected viewport. Also add user1 to targetChannel members (the channel is now shared across tests and user1 needs to post without the UI join step).
Shard 1/4 of the UI CI job hit a flaky "Target page has been closed"
on the Avatar > "should show inline error if url does not point to
an image" test after 60s timeout. Reproduces locally when the dev
meteor server has any hiccup. The account-profile form state does
not fully reset across the shared page the way page.goto('/account/
profile') suggests — leaving the shared-context migration for a
follow-up that understands the interaction with the avatar save
pipeline.
The rest of the Phase 2 shared-context batches (report-message,
messaging, threads, image-gallery, account-security, admin-room,
emojis, file-upload, jump-to-thread-message, email-inboxes,
messaging-scroll-to-bottom, imports, system-messages, settings-
assets, sidebar, message-composer) remain migrated.
🔴 Layne — 2 finding(s)Found 2 issue(s): 2 high. |
Pulling it out of the PR on request. JSON reporter stays in playwright.config.ts and e2e-timing-report.mts / the local compare helper still let a human inspect any downloaded CI artifact — enough for this PR. The scheduled half can ship separately when the pattern 2 rollout is further along.
Summary
docs/proposals/e2e-performance-migration.mdlaying out how we roll out the two performance patterns landed in test: optimize quote messages suite #39691 across the remaining ~150 Playwright specs.apps/meteor/tests/e2e/README.md— this doc intentionally only covers the rollout (phasing, triage, batch rules, guardrails, handoff to contributors and AI agents).What's inside
utils/helpers before any migration starts.Test plan
#performance-patterns,#migrating-an-existing-suite, path to e2e README).Summary by CodeRabbit