test(e2e): implement all 6 phases of explorer-e2e-test-plan (38 tests)#13
Open
Rubentxu wants to merge 5 commits into
Open
test(e2e): implement all 6 phases of explorer-e2e-test-plan (38 tests)#13Rubentxu wants to merge 5 commits into
Rubentxu wants to merge 5 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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/):
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