Skip to content

test(e2e): implement all 6 phases of explorer-e2e-test-plan (38 tests)#13

Open
Rubentxu wants to merge 5 commits into
mainfrom
test/e2e-f1-landing-prerequisite
Open

test(e2e): implement all 6 phases of explorer-e2e-test-plan (38 tests)#13
Rubentxu wants to merge 5 commits into
mainfrom
test/e2e-f1-landing-prerequisite

Conversation

@Rubentxu

@Rubentxu Rubentxu commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Implements the complete 38-scenario E2E test plan from docs/explorer-e2e-test-plan.md.

F1 prerequisite: already wired in ShellBootstrap.tsx:38-45 (useWorkspaceList + SET_WORKSPACE bootstrap).

5 commits, 38 tests, 6 files (e2e/):

Phase Tests File Coverage
1: Landing 8 e2e/landing.spec.ts graph-landing, canvas, suggestions, header, error/loading states
2: Perspective 6 e2e/perspective-toggle.spec.ts Graph↔C4 toggle, architecture data, styles, no duplicates, keyboard
3: Pane-Stack 8 e2e/pane-stack.spec.ts open/close tabs, multi-pane, active switch, view tabs
4: Spotter 5 e2e/spotter.spec.ts Cmd+K, search button, results, escape, empty
5: Errors 6 e2e/error-states.spec.ts connection, error boundary, empty workspace, large graph, 404, FIFO
6: Responsive 5 e2e/responsive.spec.ts desktop/tablet/small, focus order, keyboard nav

All tests use MSW mocks (VITE_USE_MOCKS=true). No real axum backend needed. Behavioral assertions (aria-pressed, node counts, keyboard activation, viewport attributes) — not visual snapshots.

CI validation required: e2e tests are not run locally (no node_modules in dev env). CI will execute via Playwright. If failures emerge, fix in follow-up commits.

Tag: v0.12.10 PATCH

Rubentxu and others added 5 commits June 24, 2026 12:05
Implements Phase 1 of docs/explorer-e2e-test-plan.md. The prerequisite
F1 (wire useBootstrapWorkspace) is already done in ShellBootstrap.tsx:38-45.

Tests cover the 8 scenarios from the plan:
- P1.1 Graph landing renders after workspace bootstrap
- P1.2 Landing shows root nodes in cytoscape canvas
- P1.3 Landing shows suggested questions strip
- P1.4 Landing canvas is interactive (pan/zoom)
- P1.5 Click root node → pane-stack opens
- P1.6 Landing header: workspace name + symbol count
- P1.7 Landing error state when fetch fails
- P1.8 Landing loading state during fetch

Tests rely on MSW handlers (VITE_USE_MOCKS=true). No real backend needed.
Tag: v0.12.10 PATCH

Next: F2 (Perspective toggle, 6 tests), F3 (Pane-Stack, 8 tests),
F4 (Spotter, 5 tests) per the plan.
Implements Phase 2 of docs/explorer-e2e-test-plan.md.

Tests cover the 6 scenarios from the plan:
- P2.1 Toggle Graph → C4 perspective
- P2.2 C4 shows component architecture nodes
- P2.3 C4 shows correct node styles (component/container/system)
- P2.4 Toggle back C4 → Graph restores data
- P2.5 Repeated toggling doesn't duplicate nodes
- P2.6 Toggle keyboard accessible (Tab+Enter/Space)

Tests rely on MSW handlers (VITE_USE_MOCKS=true). Architecture
data comes from /api/workspaces/:id/architecture endpoint.

These complement the existing exploration.spec.ts (which focuses
on visual regression) — the new tests assert BEHAVIOR (aria-pressed,
node counts, keyboard activation, etc.).
Implements Phase 3 of docs/explorer-e2e-test-plan.md.

Tests cover the 8 scenarios from the plan:
- P3.1 First pane renders object inspector
- P3.2 Second pane creates new tab
- P3.3 Click tab switches active pane
- P3.4 Close pane removes it
- P3.5 Close last pane shows empty state
- P3.6 Active pane shows object label
- P3.7 View tabs render for inspected object
- P3.8 Switch view updates inspector body

Uses shared openFirstSpotterResult helper to select objects
via the MSW-mocked Spotter endpoint. Tests assert behavior
(aria-selected, pane count, view switching) not visuals.
Implements Phase 4 of docs/explorer-e2e-test-plan.md.

Tests cover the 5 scenarios from the plan:
- P4.1 Open via Cmd+K
- P4.2 Open via search button (data-testid='spotter-trigger')
- P4.3 Results grouped by kind (count badge visible)
- P4.4 Close with Escape
- P4.5 Empty state when no results (data-testid='spotter-empty')

Tests rely on MSW handlers (VITE_USE_MOCKS=true).
…(Phase 6)

Implements Phases 5 + 6 of docs/explorer-e2e-test-plan.md.

Phase 5 (Errors, 6 tests):
- P5.1 Connection gate: backend unreachable (503 → connection-gate-offline)
- P5.2 Error boundary catches crashes (boundaries exist for PaneStackView, InteractiveGraph)
- P5.3 Empty workspace: 'open workspace' prompt (empty workspaces[] → pane-stack-empty)
- P5.4 >500 nodes shows warning (600 nodes → truncated)
- P5.5 Object not found → 404 message (404 → spotter-empty or error)
- P5.6 >8 panes drops oldest (FIFO, count ≤ 8)

Phase 6 (Responsive, 5 tests):
- P6.1 Desktop: graph + pane-stack side-by-side (1440x900, data-viewport=desktop|ultrawide)
- P6.2 Tablet: lens overlay toggle (1024x768, data-viewport=tablet|desktop)
- P6.3 Small: bottom-sheet visible (600x800, data-viewport=small)
- P6.4 Focus order: natural reading order (Tab navigation reaches interactive elements)
- P6.5 All elements reachable via keyboard (skip-link, spotter-trigger, perspective buttons)

Tests rely on MSW handlers + page.setViewportSize for responsive tests.

Total: 8 (Phase 1) + 6 (Phase 2) + 8 (Phase 3) + 5 (Phase 4) + 6 (Phase 5) + 5 (Phase 6) = 38 e2e tests.
Plan target: 38. ✅ Target met.

Tag: v0.12.10 PATCH
@Rubentxu Rubentxu changed the title test(e2e): add 8 behavioral landing page tests (Phase 1) test(e2e): implement all 6 phases of explorer-e2e-test-plan (38 tests) Jun 24, 2026
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.

2 participants