Skip to content

test(e2e): comprehensive e2e coverage for all UI features#17

Merged
ryanbas21 merged 2 commits into
mainfrom
feat/e2e-test-coverage
May 12, 2026
Merged

test(e2e): comprehensive e2e coverage for all UI features#17
ryanbas21 merged 2 commits into
mainfrom
feat/e2e-test-coverage

Conversation

@ryanbas21
Copy link
Copy Markdown
Owner

Summary

  • Adds 27 new e2e tests across 17 test files, bringing total from 8 → 35 (4.4x increase)
  • Adds shared inject-events.ts helper to DRY up event injection patterns
  • Covers every user-facing feature that previously had zero e2e coverage

What's covered

Area Tests What it catches
OIDC flow annotation 1 Discovery → token → userinfo phase badges
Event persistence 1 IndexedDB rehydration across panel close/reopen
CORS detection 1 Missing CORS headers → badge rendering
Error events 2 4xx/5xx warning styling
Content script relay 1 Bridge marker + postMessage protocol
Multi-flow isolation 1 Events from different flowIds
Export JSON 1 FlowExport schema + redaction
Import/export round-trip 2 Export → import → events restored + banner; Markdown export
Event selection + inspector 4 Headers tab, OIDC tab, CORS tab, tab switching
Flow health panel 3 Diagnosis issues, collapse/expand, issue → event navigation
Per-event diagnosis 1 Diagnosis tab with issue details
Recording toggle 1 Record/pause button state
View mode switching 1 Timeline ↔ Flow ↔ Learn
Snapshots 1 Save → load → delete lifecycle
Connection status 4 OIDC detected, SDK connected, event count, flow chip
Flow view + playback 2 Rail rendering, play/pause/reset controls
Decode error resilience 1 Extension stability after malformed events

Key implementation details

  • Tests needing diagnosis data inject events live (not via reload) since diagnosis is only delivered via PANEL_EVENT broadcasts, not GET_STATE rehydration
  • Uses semantic locators (.tag-oidc, .tag-cors badges → ancestor .tl-row) instead of positional nth() to avoid flakiness from shared browser context state
  • Content script relay test documents a known Playwright limitation where content script injection can be delayed on first navigation in persistent contexts

Test plan

  • All 35 Chrome e2e tests pass (xvfb-run pnpm exec playwright test --project=chrome)
  • All 319 unit tests pass (pnpm test)
  • No changes to source code — tests only

🤖 Generated with Claude Code

Add 27 new e2e tests across 17 test files, bringing e2e coverage from
8 tests to 35 tests. This ensures CI catches regressions in all major
user-facing features.

New test coverage areas:
- OIDC flow annotation (discovery/token/userinfo phase badges)
- Event persistence and rehydration (IndexedDB round-trip)
- CORS flag detection and inspector CORS tab
- Error event rendering (4xx/5xx warning styling)
- Content script bridge relay protocol
- Multiple flow isolation
- Export JSON/Markdown to clipboard
- Import/export round-trip with import banner
- Event selection → inspector headers/OIDC/CORS tabs
- Inspector tab switching
- Flow health panel (diagnosis issues, collapse/expand, issue→event nav)
- Per-event diagnosis tab
- Recording toggle (record/pause state)
- View mode switching (Timeline/Flow/Learn)
- Snapshot save/load/delete lifecycle
- Connection status indicators (OIDC detected, SDK connected)
- Flow view rail rendering and playback controls
- Event count badge and flow chip
- Decode error resilience (malformed SDK events)

Also adds shared inject-events.ts helper to DRY up event injection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ryanbas21 ryanbas21 force-pushed the feat/e2e-test-coverage branch from af64644 to 510aab0 Compare May 12, 2026 01:22
Content script injection timing in Playwright persistent contexts is
non-deterministic on cold starts. The bridge protocol is already
unit-tested in content-script.test.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ryanbas21 ryanbas21 merged commit 668e660 into main May 12, 2026
1 check passed
@ryanbas21 ryanbas21 deleted the feat/e2e-test-coverage branch May 12, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant