feat: add E2E tests for CDP connections and MV3 service workers #127
+682
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Details
CDP Connection Tests (
e2e_combined_flow_test.go)TestExtensionViewportThenCDPConnection - Reproduces the scenario where profile loading fails to connect to CDP after back-to-back restarts:
Browser.getVersioncommand succeedsTestMultipleCDPConnectionsAfterRestart - Tests connection stability:
MV3 Service Worker Tests (
e2e_mv3_service_worker_test.go)TestMV3ServiceWorkerRegistration - Verifies MV3 extensions work correctly:
/chromium/upload-extensions-and-restartchrome://extensionsand enable developer modeIncludes a test extension (
server/e2e/test-extension/) with:Chromium Launcher Fix
Added
killExistingChromium()function that:Test plan
TestExtensionViewportThenCDPConnectionpassesTestMultipleCDPConnectionsAfterRestartpassesTestMV3ServiceWorkerRegistrationpasses🤖 Generated with Claude Code
Note
Adds robust E2E coverage for browser restarts, CDP connectivity, and MV3 service workers, plus a launcher hardening to ensure clean Chromium restarts.
TestExtensionViewportThenCDPConnectionandTestMultipleCDPConnectionsAfterRestartvalidate CDP stability after extension upload and viewport-change restarts and multiple rapid connectse2e_mv3_service_worker_test.go) with Playwright commandverify-mv3-service-workerto inspectchrome://extensions, confirm active service worker, and verify popup -> SW messagingserver/e2e/test-extension/and expands Playwrightindex.tswith the verification flow; updatestsconfig.jsonlibs to includeDOMserver/cmd/chromium-launcher/main.go) now callskillExistingChromium()topkill -9 -x chromiumand wait up to 2s before relaunch, preventing IPv4/IPv6 bind conflictsWritten by Cursor Bugbot for commit 2babbd1. This will update automatically on new commits. Configure here.