Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (4)
WalkthroughPlaywright now records worker timelines and failure predecessors, provides a contaminator-bisection CLI, improves Electron fixture timing and isolation, and hardens proxy behavior and asynchronous UI tests. ChangesPlaywright diagnostics
Electron and test reliability
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Playwright/Electron test fixture (isolatedPage) that launches Bruno with a fresh userData directory per test, and updates a broad set of E2E specs to opt into this isolation to reduce flaky cross-test state leakage.
Changes:
- Added
isolatedPagefixture toplaywright/index.tsto launch/trace/close a per-test Electron app with a fresh temp profile. - Updated many existing E2E specs to use
{ isolatedPage: page }instead of the worker-sharedpage. - Updated internal testing guidance docs to document the new fixture and when to use it.
Reviewed changes
Copilot reviewed 96 out of 96 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/websockets/ws-header.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/websockets/message-header.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/websockets/message-body-default.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/websockets/expanded-persistence.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/variable-tooltip/variable-tooltip.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/variable-datatypes/import.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/variable-datatypes/create-via-ui.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/transient-requests/transient-file-mode-save.spec.ts | Switched suite to use isolatedPage for per-test profile isolation. |
| tests/start/app-open.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/sidebar/section-auto-expand.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/sidebar/rename-collection-item.spec.ts | Switched suite to use isolatedPage for per-test profile isolation. |
| tests/response/response-clearing.spec.ts | Switched suite to use isolatedPage for per-test profile isolation. |
| tests/response/response-actions.spec.ts | Switched tests to use isolatedPage (and added an afterAll cleanup using it). |
| tests/response/large-response-crash-prevention.spec.ts | Switched tests to use isolatedPage (and added an afterAll cleanup using it). |
| tests/request/timeline/timeline-url-update.spec.ts | Switched tests to use isolatedPage (and added an afterAll cleanup using it). |
| tests/request/timeline/timeline-scoped-request-attribution.spec.ts | Switched suite to use isolatedPage for per-test profile isolation. |
| tests/request/timeline/timeline-runrequest-skip.spec.ts | Switched suite to use isolatedPage for per-test profile isolation. |
| tests/request/timeline/timeline-runrequest-network-error.spec.ts | Switched suite to use isolatedPage for per-test profile isolation. |
| tests/request/timeline/timeline-nested-runrequest.spec.ts | Switched suite to use isolatedPage for per-test profile isolation. |
| tests/request/save/save.spec.ts | Switched test to use isolatedPage (and changed a beforeAll to use it). |
| tests/request/headers/auto-append-empty-header-row.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/request/delete-request/delete-request-sequence-updation.spec.ts | Switched test to use isolatedPage (and added an afterAll cleanup using it). |
| tests/request/body-scroll/body-scroll-restoration.spec.ts | Switched suite to use isolatedPage for per-test profile isolation. |
| tests/request/binary-file/binary-file-selection-switch.spec.ts | Changed suite cleanup hook to use isolatedPage (test still uses shared page). |
| tests/preferences/tab-switch-persistence/tab-switch-persistence.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/preferences/system-proxy-timestamp.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/preferences/autosave/autosave.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/import/wsdl/import-wsdl.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/import/url-import/postman-url-import.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/url-import/openapi-url-import.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/import/url-import/insomnia-url-import.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/url-import/github-repository-import.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/malformed-structure.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/invalid-schema.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/invalid-missing-info.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/invalid-json.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/import-postman-v21.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/import-postman-v21-wrapped.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/import-postman-v20.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/import-partial-collection.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/import/postman/import-many-issues-collection.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/postman/import-file-format-options.spec.ts | Switched test to use isolatedPage (and added an afterAll cleanup using it). |
| tests/import/openapi/security-schemes-import.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/import/openapi/path-based-grouping.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/openapi/operation-name-with-newlines-fix.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/openapi/missing-info.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/openapi/malformed-yaml.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/openapi/import-openapi-yaml.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/openapi/import-openapi-json.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/openapi/duplicate-operation-names-fix.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/insomnia/malformed-structure.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/insomnia/invalid-missing-collection.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/insomnia/import-insomnia-v5.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/insomnia/import-insomnia-v5-environments.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/insomnia/import-insomnia-v5-date-types.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/insomnia/import-insomnia-v4.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/insomnia/import-insomnia-v4-environments.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/file-types/invalid-file-handling.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/file-types/file-input-acceptance.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/bulk-import/yml-as-default-file-format.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/bulk-import/004-select-all.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/bulk-import/003-selection-list-viewport.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/bulk-import/002-all-collection-types.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/bulk-import/001-multiple-files-upload.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/bruno/import-bruno-with-examples.spec.ts | Switched test to use isolatedPage (and added an afterAll cleanup using it). |
| tests/import/bruno/import-bruno-testbench.spec.ts | Switched test to use isolatedPage (and added an afterAll cleanup using it). |
| tests/import/bruno/import-bruno-request-missing-url.spec.ts | Switched tests to use isolatedPage (and added an afterAll cleanup using it). |
| tests/import/bruno/import-bruno-missing-required-schema.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/bruno/import-bruno-JSON-v2.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/import/bruno/import-bruno-descriptions.spec.ts | Switched suites to use isolatedPage for per-test profile isolation. |
| tests/import/bruno/import-bruno-corrupted-fails.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/grpc/multi-message-yml/multi-message.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/graphql/docs-explorer/docs-explorer.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/environments/save-shortcut/save-shortcut.spec.ts | Switched suites to use isolatedPage for per-test profile isolation. |
| tests/environments/focus-retention/environment-focus.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/environments/create-environment/global-env-create.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/environments/create-environment/collection-env-create.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/editable-table/editable-table.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/dotenv/special-chars-collection-path/dotenv-special-chars.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/devtools/performance/performance-tab.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/collection/presets-indicator.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/collection/moving-tabs/move-tabs.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/collection/moving-requests/tag-persistence.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/collection/moving-requests/cross-collection-drag-drop-request.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/collection/moving-requests/cross-collection-drag-drop-folder.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/collection/folder-docs-sticky/folder-docs-sticky.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/collection/draft/draft-values-in-requests.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/collection/delete/delete-collection.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/collection/default-sandbox-mode/default-sandbox-mode.spec.ts | Switched test to use isolatedPage for per-test profile isolation. |
| tests/collection/create/create-collection.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| tests/codeeditor-state/fold-persistence.spec.ts | Switched suites to use isolatedPage for per-test profile isolation. |
| tests/apps/apps-ui.spec.ts | Switched tests to use isolatedPage for per-test profile isolation. |
| playwright/index.ts | Added isolatedPage fixture (fresh temp userData per test) and updated fixture typings/docs. |
| .claude/skills/write-e2e-test/SKILL.md | Documented isolatedPage in E2E authoring guidance. |
| .claude/rules/testing.md | Added isolatedPage to the fixtures reference table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 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.
Inline comments:
In @.claude/skills/write-e2e-test/SKILL.md:
- Around line 34-41: Clarify the `page` fixture description in the fixture list:
state that the default `page` uses the worker-shared Electron app/profile, while
distinguishing it from the test-scoped page object. Replace the claim that
existing `page` fixtures are worker-shared, and retain the guidance to use
`isolatedPage` when tests must avoid shared worker state.
In `@playwright/index.ts`:
- Around line 351-360: Wrap the isolatedPage fixture’s app setup and use flow in
a try/finally block so closeElectronApp(app) always runs after launchElectronApp
succeeds, including when app.context(), waitForReadyPage(app), or
usePageWithTracing throws.
In `@tests/environments/import-environment/collection-env-import.spec.ts`:
- Line 6: Remove the test-scoped isolatedPage parameter and associated afterAll
cleanup hooks in
tests/environments/import-environment/collection-env-import.spec.ts (lines 6-6),
tests/import/bruno/import-bruno-request-missing-url.spec.ts (lines 6-6),
tests/import/bruno/import-bruno-testbench.spec.ts (lines 6-6), and
tests/import/bruno/import-bruno-with-examples.spec.ts (lines 6-6); if cleanup is
still required, move it to afterEach using the appropriate test-scoped fixture.
In `@tests/import/postman/import-file-format-options.spec.ts`:
- Around line 7-9: Update the teardown around closeAllCollections so
test.afterAll no longer requests the test-scoped isolatedPage fixture. Move this
cleanup to test.afterEach if it is still required, or remove it when
isolatedPage teardown already provides the necessary cleanup.
In `@tests/request/binary-file/binary-file-selection-switch.spec.ts`:
- Line 36: Update the suite cleanup hook around test.afterAll to stop requesting
the test-scoped isolatedPage fixture; move the cleanup to test.afterEach so each
test can receive isolatedPage, or use a worker-scoped fixture only if the
cleanup must remain suite-level.
In `@tests/request/delete-request/delete-request-sequence-updation.spec.ts`:
- Around line 5-7: Replace the afterAll hook using the per-test isolatedPage
fixture with afterEach, or remove the cleanup if it is unnecessary, in
closeAllCollections cleanup for delete-request sequence updation. In
tests/request/save/save.spec.ts lines 26-28, replace the beforeAll hook using
isolatedPage with beforeEach, or inline the setup in the test; both sites must
use isolatedPage only within test-scoped hooks.
In `@tests/request/timeline/timeline-url-update.spec.ts`:
- Around line 33-35: Replace the worker-level afterAll cleanup that destructures
isolatedPage with afterEach cleanup or remove it if fixture teardown already
closes the app. Apply this to
tests/request/timeline/timeline-url-update.spec.ts:33-35,
tests/response/large-response-crash-prevention.spec.ts:9-12, and
tests/response/response-actions.spec.ts:13-15, preserving closeAllCollections
cleanup without resolving the test-scoped fixture from afterAll.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c14af63e-8904-4836-92c2-d4c0be8d59f2
📒 Files selected for processing (96)
.claude/rules/testing.md.claude/skills/write-e2e-test/SKILL.mdplaywright/index.tstests/apps/apps-ui.spec.tstests/codeeditor-state/fold-persistence.spec.tstests/collection/create/create-collection.spec.tstests/collection/default-sandbox-mode/default-sandbox-mode.spec.tstests/collection/delete/delete-collection.spec.tstests/collection/draft/draft-values-in-requests.spec.tstests/collection/folder-docs-sticky/folder-docs-sticky.spec.tstests/collection/moving-requests/cross-collection-drag-drop-folder.spec.tstests/collection/moving-requests/cross-collection-drag-drop-request.spec.tstests/collection/moving-requests/tag-persistence.spec.tstests/collection/moving-tabs/move-tabs.spec.tstests/collection/presets-indicator.spec.tstests/devtools/performance/performance-tab.spec.tstests/dotenv/special-chars-collection-path/dotenv-special-chars.spec.tstests/editable-table/editable-table.spec.tstests/environments/create-environment/collection-env-create.spec.tstests/environments/create-environment/global-env-create.spec.tstests/environments/focus-retention/environment-focus.spec.tstests/environments/import-environment/collection-env-import.spec.tstests/environments/save-shortcut/save-shortcut.spec.tstests/graphql/docs-explorer/docs-explorer.spec.tstests/grpc/multi-message-yml/multi-message.spec.tstests/import/bruno/import-bruno-JSON-v2.spec.tstests/import/bruno/import-bruno-corrupted-fails.spec.tstests/import/bruno/import-bruno-descriptions.spec.tstests/import/bruno/import-bruno-missing-required-schema.spec.tstests/import/bruno/import-bruno-request-missing-url.spec.tstests/import/bruno/import-bruno-testbench.spec.tstests/import/bruno/import-bruno-with-examples.spec.tstests/import/bulk-import/001-multiple-files-upload.spec.tstests/import/bulk-import/002-all-collection-types.spec.tstests/import/bulk-import/003-selection-list-viewport.spec.tstests/import/bulk-import/004-select-all.spec.tstests/import/bulk-import/yml-as-default-file-format.spec.tstests/import/file-types/file-input-acceptance.spec.tstests/import/file-types/invalid-file-handling.spec.tstests/import/insomnia/import-insomnia-v4-environments.spec.tstests/import/insomnia/import-insomnia-v4.spec.tstests/import/insomnia/import-insomnia-v5-date-types.spec.tstests/import/insomnia/import-insomnia-v5-environments.spec.tstests/import/insomnia/import-insomnia-v5.spec.tstests/import/insomnia/invalid-missing-collection.spec.tstests/import/insomnia/malformed-structure.spec.tstests/import/openapi/duplicate-operation-names-fix.spec.tstests/import/openapi/import-openapi-json.spec.tstests/import/openapi/import-openapi-yaml.spec.tstests/import/openapi/malformed-yaml.spec.tstests/import/openapi/missing-info.spec.tstests/import/openapi/operation-name-with-newlines-fix.spec.tstests/import/openapi/path-based-grouping.spec.tstests/import/openapi/security-schemes-import.spec.tstests/import/postman/import-file-format-options.spec.tstests/import/postman/import-many-issues-collection.spec.tstests/import/postman/import-partial-collection.spec.tstests/import/postman/import-postman-v20.spec.tstests/import/postman/import-postman-v21-wrapped.spec.tstests/import/postman/import-postman-v21.spec.tstests/import/postman/invalid-json.spec.tstests/import/postman/invalid-missing-info.spec.tstests/import/postman/invalid-schema.spec.tstests/import/postman/malformed-structure.spec.tstests/import/url-import/github-repository-import.spec.tstests/import/url-import/insomnia-url-import.spec.tstests/import/url-import/openapi-url-import.spec.tstests/import/url-import/postman-url-import.spec.tstests/import/wsdl/import-wsdl.spec.tstests/preferences/autosave/autosave.spec.tstests/preferences/system-proxy-timestamp.spec.tstests/preferences/tab-switch-persistence/tab-switch-persistence.spec.tstests/request/binary-file/binary-file-selection-switch.spec.tstests/request/body-scroll/body-scroll-restoration.spec.tstests/request/delete-request/delete-request-sequence-updation.spec.tstests/request/headers/auto-append-empty-header-row.spec.tstests/request/save/save.spec.tstests/request/timeline/timeline-nested-runrequest.spec.tstests/request/timeline/timeline-runrequest-network-error.spec.tstests/request/timeline/timeline-runrequest-skip.spec.tstests/request/timeline/timeline-scoped-request-attribution.spec.tstests/request/timeline/timeline-url-update.spec.tstests/response/large-response-crash-prevention.spec.tstests/response/response-actions.spec.tstests/response/response-clearing.spec.tstests/sidebar/rename-collection-item.spec.tstests/sidebar/section-auto-expand.spec.tstests/start/app-open.spec.tstests/transient-requests/transient-file-mode-save.spec.tstests/variable-datatypes/create-via-ui.spec.tstests/variable-datatypes/import.spec.tstests/variable-tooltip/variable-tooltip.spec.tstests/websockets/expanded-persistence.spec.tstests/websockets/message-body-default.spec.tstests/websockets/message-header.spec.tstests/websockets/ws-header.spec.ts
78f4aa4 to
1d8d063
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@scripts/find-e2e-contaminator.js`:
- Around line 100-113: Update runPlaywright so spawnSync never invokes a shell,
including on Windows; remove the platform-dependent shell option while
preserving the existing argument-array invocation and grep handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ccc0f18f-c444-48e2-a714-2893aeee4868
📒 Files selected for processing (4)
.claude/rules/testing.mdplaywright.config.tsplaywright/reporters/worker-timeline.jsscripts/find-e2e-contaminator.js
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
playwright/index.ts (2)
1-1: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winFixture timeouts for
newPageandpageWithUserDatadon't scale for their dual-phase launch+wait operations.Both fixtures perform a bounded launch (up to
ELECTRON_BOOT_TIMEOUT_MS) followed by a boundedwaitForReadyPage(up toELECTRON_BOOT_TIMEOUT_MS+ internal sequential waits), yet each is capped by a singleELECTRON_BOOT_TIMEOUT_MSfixture timeout — unlikerestartApp, which explicitly usesELECTRON_BOOT_TIMEOUT_MS * 2for its comparable close+relaunch dual-phase work (Line 428). The mismatch risks the outer Playwright fixture timeout firing before the more specific inner timeouts resolve, producing less diagnosable failures under slow boot.
playwright/index.ts#L341-357: bumpnewPage's fixturetimeouttoELECTRON_BOOT_TIMEOUT_MS * 2to match its launch+ready-wait budget.playwright/index.ts#L431-461: bumppageWithUserData's fixturetimeouttoELECTRON_BOOT_TIMEOUT_MS * 2for the same reason.🤖 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 `@playwright/index.ts` at line 1, Update the fixture timeout configurations for newPage and pageWithUserData to use ELECTRON_BOOT_TIMEOUT_MS * 2, matching their launch and readiness-wait phases and the existing restartApp configuration; leave the fixture behavior otherwise unchanged.
431-461: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winSame tight timeout-budget issue as
newPage.
pageWithUserDataalso chainsreuseOrLaunchElectronApp(up to 18s) andwaitForReadyPage(up to 18s+) under a singleELECTRON_BOOT_TIMEOUT_MSfixture timeout, unlikerestartApp's 2x budget for its comparable dual-phase operation.🔧 Proposed fix
const app = await reuseOrLaunchElectronApp({ initUserDataPath: tmpAppDataDir, testFile: testInfo.file, templateVars }); const context = await app.context(); const page = await waitForReadyPage(app); await usePageWithTracing(context, page, testInfo, use, { initTracing: true }); }, - { timeout: ELECTRON_BOOT_TIMEOUT_MS } + { timeout: ELECTRON_BOOT_TIMEOUT_MS * 2 } ]🤖 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 `@playwright/index.ts` around lines 431 - 461, Increase the fixture timeout for pageWithUserData to cover both reuseOrLaunchElectronApp and waitForReadyPage, matching the doubled timeout budget used by restartApp. Keep the existing initialization, context setup, tracing, and page usage flow unchanged.
🧹 Nitpick comments (5)
tests/cookies/corrupted-passkey.spec.ts (1)
18-19: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCentralize the Cookies modal locator. Both launches duplicate a raw modal selector instead of using the shared page-locator layer.
tests/cookies/corrupted-passkey.spec.ts#L18-L19: obtain the first-run Cookies modal through a shared locator.tests/cookies/corrupted-passkey.spec.ts#L62-L65: use that same shared locator for the second-run modal.🤖 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 `@tests/cookies/corrupted-passkey.spec.ts` around lines 18 - 19, The Cookies modal locator is duplicated with a raw selector in both launches. In tests/cookies/corrupted-passkey.spec.ts lines 18-19 and 62-65, update the first-run and second-run modal lookups to use the shared page-locator layer, reusing the same locator for both sites.Source: Path instructions
tests/environments/global-env-draft-merge-with-script/global-env-draft-merge-with-script.spec.ts (1)
19-28: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid mutating CodeMirror internals from the spec.
This bypasses the user input path, so the test can pass if editing through the UI regresses. Move the edit into a shared page action that drives the supported editor interaction. As per path instructions, E2E tests must verify behavior through real user actions and centralize actions under
tests/utils/page/*.🤖 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 `@tests/environments/global-env-draft-merge-with-script/global-env-draft-merge-with-script.spec.ts` around lines 19 - 28, Replace the direct CodeMirror access in the test with a shared page action under tests/utils/page/* that edits the environment variable through supported user interactions. Update the spec to call that action for existingVar, preserving the expected draft-edited-global-value assertion and avoiding CodeMirror internals.Source: Path instructions
tests/grpc/method-search/grpc-method-search.spec.ts (1)
3-12: 📐 Maintainability & Code Quality | 🔵 TrivialMove the shared gRPC refresh flow into the page-action layer.
This is reusable UI synchronization logic; placing it in
tests/utils/page/*keeps specs declarative and prevents future selector duplication. As per path instructions, centralize locators and actions in page modules.[low_effort_and-high_reward]
🤖 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 `@tests/grpc/method-search/grpc-method-search.spec.ts` around lines 3 - 12, Move the refresh-and-open workflow from the test spec’s refreshAndOpenMethods helper into the appropriate page-action module under tests/utils/page. Centralize the refresh icon, reflection-loaded status, methods dropdown, and methods list locators and interactions there, then update the spec to call the page-layer action while preserving the existing wait and visibility behavior.Source: Path instructions
tests/protobuf/manage-protofile.spec.ts (1)
62-63: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCentralize the new backdrop locator.
The added
page.locator('.bruno-modal-backdrop')calls embed a raw selector in the spec. Add a page helper or locator undertests/utils/page/*and use it here to prevent selector drift.As per path instructions, locators and actions must be centralized in
tests/utils/page/*.Also applies to: 72-72
🤖 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 `@tests/protobuf/manage-protofile.spec.ts` around lines 62 - 63, Centralize the .bruno-modal-backdrop selector in a page helper or locator under tests/utils/page, then update the backdrop assertions around the affected lines in manage-protofile.spec.ts to use that shared symbol instead of page.locator('.bruno-modal-backdrop').Source: Path instructions
tests/request/description/write-request-body-file-description.spec.ts (1)
35-35: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the save-result assertion in the spec.
saveRequest(page)currently performs theexpect(...)assertion insidetests/utils/page/actions.ts. Split the action and wait, or return the save signal so this spec explicitly asserts the required save outcome.As per path instructions, action helpers should synchronize or wait while
expect(...)assertions remain in specs.🤖 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 `@tests/request/description/write-request-body-file-description.spec.ts` at line 35, Update saveRequest in the page action helpers to perform only the save action and synchronization, or return a save completion signal, without containing the expect assertion; then update the spec around saveRequest to explicitly assert the required save outcome.Source: Path instructions
🤖 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.
Inline comments:
In `@playwright/index.ts`:
- Around line 349-357: Update the newPage fixture’s launchElectronApp flow to
guarantee closeElectronApp is invoked when app.context(), waitForReadyPage(), or
usePageWithTracing() fails, while preserving normal page usage and existing
timeout behavior. Use the existing app and closeElectronApp lifecycle symbols
rather than relying solely on worker-level teardown.
- Around line 341-357: Update the newPage fixture timeout to budget for both
sequential bounded operations, launchElectronApp() and waitForReadyPage(app), by
using the same doubled timeout strategy as the analogous restartApp fixture.
Leave the fixture body and tracing options unchanged.
In `@scripts/find-e2e-contaminator.js`:
- Around line 202-205: Fix the manual --victim file:line path so it does not
fail the title validation in materializeOrderedSequence. Update parseLocator and
the related ordered-sequence matching flow to derive the locator’s title or
match the specified file and line directly, while preserving title-based
matching for titled locators; keep the documented file:line usage functional.
- Around line 224-231: Update the import-rewriting logic in the contaminator
step-processing flow before fs.writeFileSync to handle all relative specifiers,
including ../pac/server, ./server, and ./helpers, rather than only Playwright
and utils paths. Normalize supported relative imports to valid materialized-spec
paths, or reject unsupported copied specs before writing them; keep stepFiles
and grepParts updates after successful validation.
In `@tests/cookies/cookie-persistence.spec.ts`:
- Around line 30-32: Replace the fixed page1.waitForTimeout(500) delay in the
cookie persistence test with an expect.poll check that reads
userDataPath/cookies.json and verifies example.com is persisted. Ensure this
persistence assertion completes before closeElectronApp(app1) is called, while
retaining the existing visibility assertion.
In `@tests/preferences/system-proxy-timestamp.spec.ts`:
- Around line 53-63: Update the polling assertion around
systemProxyLastRefreshedLabel to require the data-refreshed-at attribute to be
present and parse to a finite number before comparing it with firstRefreshedAt.
Ensure null, invalid, and non-finite values keep polling, while a valid
timestamp must differ from the initial value.
In `@tests/preferences/tab-switch-persistence/tab-switch-persistence.spec.ts`:
- Around line 123-124: Replace the fixed 600ms delay in the tab-switch
persistence test with an observable wait for the preference store’s
persisted-state signal or a helper that resolves after the preference write
completes. Use an auto-retrying locator expectation where applicable, and ensure
the tab is closed only after persistence is confirmed.
In `@tests/request/generate-code/send-vs-snippet.spec.ts`:
- Around line 55-67: Update expectEchoResponded to accept an
expectedUrlSubstring for the current send and require the preview URL assertion
to include it, preventing stale response text from satisfying later polls. Pass
the path expected by each send to expectEchoResponded(page,
expectedUrlSubstring), or alternatively wait for the response loading/completion
transition before asserting.
---
Outside diff comments:
In `@playwright/index.ts`:
- Line 1: Update the fixture timeout configurations for newPage and
pageWithUserData to use ELECTRON_BOOT_TIMEOUT_MS * 2, matching their launch and
readiness-wait phases and the existing restartApp configuration; leave the
fixture behavior otherwise unchanged.
- Around line 431-461: Increase the fixture timeout for pageWithUserData to
cover both reuseOrLaunchElectronApp and waitForReadyPage, matching the doubled
timeout budget used by restartApp. Keep the existing initialization, context
setup, tracing, and page usage flow unchanged.
---
Nitpick comments:
In `@tests/cookies/corrupted-passkey.spec.ts`:
- Around line 18-19: The Cookies modal locator is duplicated with a raw selector
in both launches. In tests/cookies/corrupted-passkey.spec.ts lines 18-19 and
62-65, update the first-run and second-run modal lookups to use the shared
page-locator layer, reusing the same locator for both sites.
In
`@tests/environments/global-env-draft-merge-with-script/global-env-draft-merge-with-script.spec.ts`:
- Around line 19-28: Replace the direct CodeMirror access in the test with a
shared page action under tests/utils/page/* that edits the environment variable
through supported user interactions. Update the spec to call that action for
existingVar, preserving the expected draft-edited-global-value assertion and
avoiding CodeMirror internals.
In `@tests/grpc/method-search/grpc-method-search.spec.ts`:
- Around line 3-12: Move the refresh-and-open workflow from the test spec’s
refreshAndOpenMethods helper into the appropriate page-action module under
tests/utils/page. Centralize the refresh icon, reflection-loaded status, methods
dropdown, and methods list locators and interactions there, then update the spec
to call the page-layer action while preserving the existing wait and visibility
behavior.
In `@tests/protobuf/manage-protofile.spec.ts`:
- Around line 62-63: Centralize the .bruno-modal-backdrop selector in a page
helper or locator under tests/utils/page, then update the backdrop assertions
around the affected lines in manage-protofile.spec.ts to use that shared symbol
instead of page.locator('.bruno-modal-backdrop').
In `@tests/request/description/write-request-body-file-description.spec.ts`:
- Line 35: Update saveRequest in the page action helpers to perform only the
save action and synchronization, or return a save completion signal, without
containing the expect assertion; then update the spec around saveRequest to
explicitly assert the required save outcome.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5669f6d2-bc26-4aff-9d4d-f2caa2ba1d4c
📒 Files selected for processing (36)
.claude/rules/testing.md.gitignorepackages/bruno-electron/src/store/system-proxy.jspackages/bruno-electron/src/store/tests/system-proxy.spec.jspackages/bruno-tests/src/echo/index.jsplaywright.config.tsplaywright/index.tsplaywright/reporters/worker-timeline.jsscripts/find-e2e-contaminator.jstests/apps/apps-ui.spec.tstests/collection/description-yml/read-collection-description.spec.tstests/collection/description/read-collection-description.spec.tstests/collection/moving-requests/cross-collection-drag-drop-request.spec.tstests/collection/moving-requests/tag-persistence.spec.tstests/collection/open/open-multiple-collections.spec.tstests/cookies/cookie-persistence.spec.tstests/cookies/corrupted-passkey.spec.tstests/environments/api-setEnvVar/api-setEnvVar-with-persist.spec.tstests/environments/export-environment/collection-env-export/collection-env-export.spec.tstests/environments/focus-retention/environment-focus.spec.tstests/environments/global-env-draft-merge-with-script/global-env-draft-merge-with-script.spec.tstests/environments/save-shortcut/save-shortcut.spec.tstests/graphql/query-builder/query-builder.spec.tstests/grpc/method-search/grpc-method-search.spec.tstests/import/insomnia/import-insomnia-v4-environments.spec.tstests/preferences/system-proxy-timestamp.spec.tstests/preferences/tab-switch-persistence/tab-switch-persistence.spec.tstests/protobuf/manage-protofile.spec.tstests/request/binary-file/binary-file-upload.spec.tstests/request/description/write-request-body-file-description.spec.tstests/request/description/write-request-body-form-urlencoded-description.spec.tstests/request/description/write-request-body-multipart-description.spec.tstests/request/generate-code/send-vs-snippet.spec.tstests/shortcuts/search-actions.spec.tstests/utils/page/actions.tstests/utils/page/sidebar/index.ts
💤 Files with no reviewable changes (2)
- tests/collection/description-yml/read-collection-description.spec.ts
- tests/collection/description/read-collection-description.spec.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- playwright.config.ts
- .claude/rules/testing.md
- playwright/reporters/worker-timeline.js
Description
A simple reporter to add the history of tests that were run by a worker in a clean format so that we can find which test contaminates the failing tests.
Additionally fixes a lot of the e2e tests to have better locators and more defined checks for parallel runs
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit
Summary by CodeRabbit
Testing & Diagnostics
Bug Fixes
New Features
/many-headerstest endpoint that returns 80 custom headers.