test: isolate session expiration e2e users - #41166
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
WalkthroughThis PR refactors an e2e test spec for session expiration redirects to use two dynamically created users instead of a single fixture user with static storage state. A new MongoDB helper clears login tokens per user, and both tests now create individual page contexts with cleanup tracking. ChangesMulti-user session expiration test refactor
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #41166 +/- ##
===========================================
+ Coverage 69.31% 69.33% +0.01%
===========================================
Files 3545 3545
Lines 139290 139290
Branches 24813 24801 -12
===========================================
+ Hits 96552 96577 +25
+ Misses 38712 38699 -13
+ Partials 4026 4014 -12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts (1)
13-22: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winConnection leak if
updateOnethrows.If the
updateOnecall fails,connection.close()on Line 21 is skipped, leaking the MongoDB connection. Wrap in try/finally.🛠️ Proposed fix
const removeTokensFromdb = async (username: string): Promise<void> => { const connection = await MongoClient.connect(URL_MONGODB); - await connection - .db() - .collection('users') - .updateOne({ username }, { $set: { 'services.resume.loginTokens': [] } }); - - await connection.close(); + try { + await connection + .db() + .collection('users') + .updateOne({ username }, { $set: { 'services.resume.loginTokens': [] } }); + } finally { + await connection.close(); + } };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/meteor/tests/e2e/session-expiration-redirect.spec.ts` around lines 13 - 22, The removeTokensFromdb helper can leak the MongoDB connection if MongoClient.connect succeeds but updateOne throws. Update this helper to use try/finally around the db().collection('users').updateOne call so connection.close() always runs, and keep the fix localized to removeTokensFromdb in session-expiration-redirect.spec.ts.
🧹 Nitpick comments (1)
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts (1)
49-55: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDuplicated per-test session setup.
Both tests repeat the same
createAuxContext+new HomeChannel(page)+sessions.push(...)sequence. Could be extracted into a small local helper (e.g.,openExpiringUserSession(browser, userState)), but low priority given the file is small.Also applies to: 87-91
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/meteor/tests/e2e/session-expiration-redirect.spec.ts` around lines 49 - 55, Both session-expiration redirect tests duplicate the same setup sequence, so extract that shared `createAuxContext` + `new HomeChannel(page)` + `sessions.push(...)` logic into a small local helper such as `openExpiringUserSession(browser, userState)` and reuse it from the affected test cases. Keep the helper close to `session-expiration-redirect.spec.ts` so the existing tests still read clearly while avoiding repeated setup around `createAuxContext` and `HomeChannel`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@apps/meteor/tests/e2e/session-expiration-redirect.spec.ts`:
- Around line 13-22: The removeTokensFromdb helper can leak the MongoDB
connection if MongoClient.connect succeeds but updateOne throws. Update this
helper to use try/finally around the db().collection('users').updateOne call so
connection.close() always runs, and keep the fix localized to removeTokensFromdb
in session-expiration-redirect.spec.ts.
---
Nitpick comments:
In `@apps/meteor/tests/e2e/session-expiration-redirect.spec.ts`:
- Around line 49-55: Both session-expiration redirect tests duplicate the same
setup sequence, so extract that shared `createAuxContext` + `new
HomeChannel(page)` + `sessions.push(...)` logic into a small local helper such
as `openExpiringUserSession(browser, userState)` and reuse it from the affected
test cases. Keep the helper close to `session-expiration-redirect.spec.ts` so
the existing tests still read clearly while avoiding repeated setup around
`createAuxContext` and `HomeChannel`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 029355b3-b0ac-47d4-bcf6-096555675a55
📒 Files selected for processing (1)
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: Hacktron Security Check
⚠️ CI failures not shown inline (4)
GitHub Actions: CI / 📦 Track Image Sizes: test: isolate session expiration e2e users
Conclusion: failure
##[group]Run current_total=$(jq -r '.total' current-sizes.json)
�[36;1mcurrent_total=$(jq -r '.total' current-sizes.json)�[0m
�[36;1m�[0m
�[36;1mif [[ ! -f baseline-sizes.json ]]; then�[0m
�[36;1m echo "No baseline available"�[0m
�[36;1m echo "size-diff=0" >> $GITHUB_OUTPUT�[0m
�[36;1m echo "size-diff-percent=0" >> $GITHUB_OUTPUT�[0m
�[36;1m echo "comment-triggered=false" >> $GITHUB_OUTPUT�[0m
�[36;1m�[0m
�[36;1m cat > report.md << 'EOF'�[0m
�[36;1m# 📦 Docker Image Size Report�[0m
�[36;1m�[0m
�[36;1m**Status:** First measurement - no baseline for comparison�[0m
�[36;1m�[0m
�[36;1m**Total Size:** $(numfmt --to=iec-i --suffix=B $current_total)�[0m
�[36;1mEOF�[0m
�[36;1m exit 0�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1mbaseline_total=$(jq -r '.total' baseline-sizes.json)�[0m
�[36;1mdiff=$((current_total - baseline_total))�[0m
�[36;1m�[0m
�[36;1mif [[ $baseline_total -gt 0 ]]; then�[0m
�[36;1m percent=$(awk "BEGIN {printf \"%.2f\", ($diff / $baseline_total) * 100}")�[0m
�[36;1melse�[0m
�[36;1m percent=0�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1mecho "size-diff=$diff" >> $GITHUB_OUTPUT�[0m
�[36;1mecho "size-diff-percent=$percent" >> $GITHUB_OUTPUT�[0m
�[36;1m�[0m
�[36;1m# Only comment when size is bigger than baseline; optionally require per-image thresholds�[0m
�[36;1mTHRESHOLDS="$SIZE_THRESHOLDS"�[0m
�[36;1mFAIL_THRESHOLDS="$FAIL_THRESHOLDS"�[0m
�[36;1mcomment_triggered=false�[0m
�[36;1mfail_triggered=false�[0m
�[36;1mif [[ $diff -gt 0 ]]; then�[0m
�[36;1m if [[ -z "$THRESHOLDS" ]] || [[ "$THRESHOLDS" == "{}" ]]; then�[0m
�[36;1m comment_triggered=true�[0m
�[36;1m fi�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1mcolor="gray"�[0m
�[36;1mif (( $(awk "BEGIN {print ($percent > 0.01)}") )); then�[0m
�[36;1m color="red"�[0m
�[36;1melif (( $(awk "BEGIN {print ($percent < -0.01)}") )); then�[0m
�[36;1m color="green"�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1m# Generate report�[0m
�[36;1mif [[ $diff -gt 0 ]]; then�[0m
�[36;1m emoji=...
GitHub Actions: CI / 14_📦 Track Image Sizes.txt: test: isolate session expiration e2e users
Conclusion: failure
##[group]Run current_total=$(jq -r '.total' current-sizes.json)
�[36;1mcurrent_total=$(jq -r '.total' current-sizes.json)�[0m
�[36;1m�[0m
�[36;1mif [[ ! -f baseline-sizes.json ]]; then�[0m
�[36;1m echo "No baseline available"�[0m
�[36;1m echo "size-diff=0" >> $GITHUB_OUTPUT�[0m
�[36;1m echo "size-diff-percent=0" >> $GITHUB_OUTPUT�[0m
�[36;1m echo "comment-triggered=false" >> $GITHUB_OUTPUT�[0m
�[36;1m�[0m
�[36;1m cat > report.md << 'EOF'�[0m
�[36;1m# 📦 Docker Image Size Report�[0m
�[36;1m�[0m
�[36;1m**Status:** First measurement - no baseline for comparison�[0m
�[36;1m�[0m
�[36;1m**Total Size:** $(numfmt --to=iec-i --suffix=B $current_total)�[0m
�[36;1mEOF�[0m
�[36;1m exit 0�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1mbaseline_total=$(jq -r '.total' baseline-sizes.json)�[0m
�[36;1mdiff=$((current_total - baseline_total))�[0m
�[36;1m�[0m
�[36;1mif [[ $baseline_total -gt 0 ]]; then�[0m
�[36;1m percent=$(awk "BEGIN {printf \"%.2f\", ($diff / $baseline_total) * 100}")�[0m
�[36;1melse�[0m
�[36;1m percent=0�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1mecho "size-diff=$diff" >> $GITHUB_OUTPUT�[0m
�[36;1mecho "size-diff-percent=$percent" >> $GITHUB_OUTPUT�[0m
�[36;1m�[0m
�[36;1m# Only comment when size is bigger than baseline; optionally require per-image thresholds�[0m
�[36;1mTHRESHOLDS="$SIZE_THRESHOLDS"�[0m
�[36;1mFAIL_THRESHOLDS="$FAIL_THRESHOLDS"�[0m
�[36;1mcomment_triggered=false�[0m
�[36;1mfail_triggered=false�[0m
�[36;1mif [[ $diff -gt 0 ]]; then�[0m
�[36;1m if [[ -z "$THRESHOLDS" ]] || [[ "$THRESHOLDS" == "{}" ]]; then�[0m
�[36;1m comment_triggered=true�[0m
�[36;1m fi�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1mcolor="gray"�[0m
�[36;1mif (( $(awk "BEGIN {print ($percent > 0.01)}") )); then�[0m
�[36;1m color="red"�[0m
�[36;1melif (( $(awk "BEGIN {print ($percent < -0.01)}") )); then�[0m
�[36;1m color="green"�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1m# Generate report�[0m
�[36;1mif [[ $diff -gt 0 ]]; then�[0m
�[36;1m emoji=...
GitHub Actions: CI / 31_🔨 Test Unit _ Unit Tests.txt: test: isolate session expiration e2e users
Conclusion: failure
ectConnection=true
TOOL_NODE_FLAGS: --max_old_space_size=4096
ENTERPRISE_LICENSE: MK+bpK5NveUuNlWGaQXGoy+8b74Luet82M3ZGcBB8b5P9Y+m67NEtpW64dc1d5lEWi6d0nFjCjtCMneVD7bKxodz/Cml8URKEo5P7cQb/9wmeT0MzAhYNaRFZlIGkZ3ITF59pDV2u4HZuosEDJikVRwnaJ5ZoU/pOsHSPUPhTyGNIqLeKynODtUpfwDdIKEmHxpf2yVkKjgRiIJmbWjM6A4k+MNNYXWVXHzye7GggqWVg/ZcT7nKU1CCadpLhTJiIrgrrPzil1G5DQ4xnLs3Q2tu2dILSDiW5OYw/ywu2yCMicTjMq4MLL5SXDQJj6WoJzZ54HosbvsDzOXvsdC9gI1CjhPL2uRuvC8XLrzn3vL2UgXnifzD1VrLTtdZ+aSADveqtlzYlRWtqoUFBbNw8o+YVHdhbZGR0beMoAyRbHi5EMpxpad3L+NyztUIT/Uh/IjQ/C2SQZ6jB0GKPBOPxFLN56FNhTGrffLFR++TVoBu0Iquc7kajWkNit3bVbZvbx+oFcVW2PcjQ/+i2jpJjbgtUFUKrTKxGMAXTWoDzIQQ35zNzGAy268IM4Ymp5JmsVEnBOEUkbF9yx6fzkO6xZhpsHf0muklnW0kA+Tlore/TUrBWh1/RwWlQeZlxM5NyWoRM5onQmr/k/4BmObtL1Hpmbk8oMG29z89xtE9y/4=
NODE_VERSION: 22.22.3
DENO_VERSION: 2.3.1
MONGOMS_DOWNLOAD_DIR: /home/runner/work/_temp/mongodb-memory-server
MONGOMS_PREFER_GLOBAL_PATH: false
TURBOGHA_PORT: 41230
TURBO_API: http://localhost:41230
TURBO_***REDACTED***
TURBO_TEAM: turbogha
##[endgroup]
##[group]Run missing_deps=""
�[36;1mmissing_deps=""�[0m
�[36;1m�[0m
�[36;1m# Check for always-required commands�[0m
�[36;1mfor cmd in bash git curl; do�[0m
�[36;1m if ! command -v "$cmd" >/dev/null 2>&1; then�[0m
�[36;1m missing_deps="$missing_deps $cmd"�[0m
�[36;1m fi�[0m
�[36;1mdone�[0m
�[36;1m�[0m
�[36;1m# Check for gpg only if validation is not being skipped�[0m
�[36;1mif [ "$INPUT_SKIP_VALIDATION" != "true" ]; then�[0m
�[36;1m if ! command -v gpg >/dev/null 2>&1; then�[0m
�[36;1m missing_deps="$missing_deps gpg"�[0m
�[36;1m fi�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1m# Report missing required dependencies�[0m
�[36;1mif [ -n "$missing_deps" ]; then�[0m
�[36;1m echo "Error: The following required dependencies are missing:$missing_deps"�[0m
�[36;1m echo "Please install these dependencies before using this action."�[0m
�[36;1m exit 1�[0m
�[36;1mfi�[0m
�[36;1m�[0m
�[36;1mecho "All required system d...
GitHub Actions: CI / 🔨 Test Unit _ Unit Tests: test: isolate session expiration e2e users
Conclusion: failure
AbacService/4574): �[36mUser has no entity key for Virtru PDP evaluation, treating as non-compliant�[39m
�[35msection�[39m: "VirtruPDP"
�[35muserId�[39m: "u1"
[17:22:21.369] �[33mWARN�[39m (AbacService/4574): �[36mInconclusive PDP decision, eviction skipped�[39m
�[35msection�[39m: "VirtruPDP"
�[35mrid�[39m: "r1"
�[35muserId�[39m: "u1"
[17:22:21.370] �[33mWARN�[39m (AbacService/4574): �[36mInconclusive PDP decision, eviction skipped�[39m
�[35msection�[39m: "VirtruPDP"
�[35mrid�[39m: "r1"
�[35muserId�[39m: "u1"
[17:22:21.371] �[33mWARN�[39m (AbacService/4574): �[36mUser has no entity key for Virtru PDP evaluation, treating as non-compliant�[39m
�[35msection�[39m: "VirtruPDP"
�[35muserId�[39m: "u0"
[17:22:21.371] �[33mWARN�[39m (AbacService/4574): �[36mInconclusive PDP decision, eviction skipped�[39m
�[35msection�[39m: "VirtruPDP"
�[35mrid�[39m: "r1"
�[35muserId�[39m: "u3"
[17:22:21.375] �[33mWARN�[39m (AbacService/4574): �[36mUser has no entity key for Virtru PDP evaluation, treating as non-compliant�[39m
�[35msection�[39m: "VirtruPDP"
�[35muserId�[39m: "u1"
[17:22:21.381] �[33mWARN�[39m (AbacService/4574): �[36mUser has no entity key for Virtru PDP evaluation, treating as non-compliant for all ABAC rooms�[39m
�[35msection�[39m: "VirtruPDP"
�[35muserId�[39m: "u1"
[17:22:21.387] �[33mWARN�[39m (AbacService/4574): �[36mUser has no entity key for Virtru PDP evaluation, treating as non-compliant�[39m
�[35msection�[39m: "VirtruPDP"
�[35muserId�[39m: "u1"
[17:22:21.389] �[33mWARN�[39m (AbacService/4574): �[36mInconclusive PDP decision, eviction skipped�[39m
�[35msection�[39m: "VirtruPDP"
�[35mrid�[39m: "r1"
�[35muserId�[39m: "u1"
[17:22:21.390] �[33mWARN�[39m (AbacService/4574): �[36mInconclusive PDP decision, eviction skipped�[39m
�[35msection�[39m: "VirtruPDP"
�[35mrid�[39m: "r1"
�[35muserId�[39m: "u1"
[17:22:21.391] �[33mWARN�[39m (Aba...
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
**/*.spec.ts
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use.spec.tsextension for test files (e.g.,login.spec.ts)
Files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
apps/meteor/tests/e2e/**/*.spec.ts
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
apps/meteor/tests/e2e/**/*.spec.ts: All test files must be created inapps/meteor/tests/e2e/directory
Avoid usingpage.locator()in Playwright tests - always prefer semantic locators such aspage.getByRole(),page.getByLabel(),page.getByText(), orpage.getByTitle()
Usetest.beforeAll()andtest.afterAll()for setup/teardown in Playwright tests
Usetest.step()for complex test scenarios to improve organization in Playwright tests
Group related tests in the same file
Utilize Playwright fixtures (test,page,expect) for consistency in test files
Prefer web-first assertions (toBeVisible,toHaveText, etc.) in Playwright tests
Useexpectmatchers for assertions (toEqual,toContain,toBeTruthy,toHaveLength, etc.) instead ofassertstatements in Playwright tests
Usepage.waitFor()with specific conditions instead of hardcoded timeouts in Playwright tests
Implement proper wait strategies for dynamic content in Playwright tests
Maintain test isolation between test cases in Playwright tests
Ensure clean state for each test execution in Playwright tests
Ensure tests run reliably in parallel without shared state conflicts
Files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
apps/meteor/tests/e2e/**/*.{ts,spec.ts}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
apps/meteor/tests/e2e/**/*.{ts,spec.ts}: Store commonly used locators in variables/constants for reuse
Follow Page Object Model pattern consistently in Playwright tests
Files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
🧠 Learnings (6)
📚 Learning: 2026-02-24T19:22:48.358Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/omnichannel/omnichannel-send-pdf-transcript.spec.ts:66-67
Timestamp: 2026-02-24T19:22:48.358Z
Learning: In Playwright end-to-end tests (e.g., under apps/meteor/tests/e2e/...), prefer locating elements by translated text (getByText) and ARIA roles (getByRole) over data-qa attributes. If translation values change, update the corresponding test locators accordingly. Never use data-qa locators. This guideline applies to all Playwright e2e test specs in the repository and helps keep tests robust to UI text changes and accessible semantics.
Applied to files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
📚 Learning: 2026-02-24T19:39:42.247Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/message.ts:7-7
Timestamp: 2026-02-24T19:39:42.247Z
Learning: In RocketChat e2e tests, avoid using data-qa attributes to locate elements. Prefer semantic locators such as getByRole, getByLabel, getByText, getByTitle and ARIA-based selectors. Apply this rule to all TypeScript files under apps/meteor/tests/e2e to improve test reliability, accessibility, and maintainability.
Applied to files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
📚 Learning: 2026-03-06T18:10:15.268Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:15.268Z
Learning: In tests (especially those using testing-library/dom/jsdom) for Rocket.Chat components, the HTML <code> element has an implicit ARIA role of 'code'. Therefore, screen.getByRole('code') or screen.findByRole('code') will locate <code> elements even without a role attribute. Do not flag findByRole('code') as invalid in reviews; prefer using the implicit role instead of adding role="code" unless necessary for accessibility.
Applied to files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.
Applied to files:
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts
🔇 Additional comments (4)
apps/meteor/tests/e2e/session-expiration-redirect.spec.ts (4)
1-11: LGTM!
44-55: LGTM!Per-test page cleanup via
sessions/afterEachand creating the aux context viacreateAuxContext(browser, expiringUser1State, ...)correctly replaces the old fixture-based single-user page setup.
65-65: LGTM!Token deletion correctly targets the dynamically created user (
expiringUser1/expiringUser2) instead of the previous shared fixture users, matching the PR's isolation goal.Also applies to: 87-98
32-42: 🎯 Functional CorrectnessDouble-check the
apifixture scope here.test.beforeAll()/test.afterAll()can only use worker-scoped fixtures, and this suite already uses the same{ api }pattern elsewhere, so the fixture definition needs to be treated as the source of truth before assuming this will fail.
Proposed changes
Isolates
session-expiration-redirect.spec.tsfrom shared fixture users by creating disposable users for the expired-session scenarios.The tests now invalidate only users created for this spec, which avoids leaking stale
Users.user1/Users.user2auth state into later E2E tests.Issue(s)
FLAKY-1910
Steps to test or reproduce
Further comments
Summary by CodeRabbit