Skip to content

test(agent): pin the onboarding steps layout - StepsLayout (Closes #1648) - #1978

Merged
dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1648-steps-layout
Oct 14, 2026
Merged

dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1648-steps-layout

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator

Closes #1648

What

The first suite for apps/agent/entrypoints/onboarding/steps/StepsLayout.tsx (StepsLayout, the only export), under bun test in the agent group.

  • describe block: StepsLayoutTsxContract (appears nowhere else in the tree).
  • The step registry, the step components and the motion wrapper stay real β€” the first step's heading shows up through the real registry handoff. The stubs cover every seam the layout and the registry touch: the router (useParams answers the first step, NavLink renders a plain anchor β€” the real one needs a live router context), the metrics track, the RPC provider, the auth client, and the storage-backed item modules in their live-proxy form (the onboarding, personalization and MCP-server items resolve the storage facade at call time, so later suites keep reading their own seeded values β€” the pattern proven in test(agent): pin the app selector - AppSelector (Closes #1536)Β #1967/test(agent): pin the first onboarding step - StepOne (Closes #1542)Β #1968).
  • Pin: the progress bar with all four step names, the active ring and pulse on the first step, the first step's own heading through the registry handoff, and the back link. The navigation flows live in callbacks and effects needing a live document and a real router β€” named in the suite header per User Story 2.
  • FR-004 shown both ways, quoted: broken subject (the back link relabelled) β†’ 0 pass / 1 fail; restored β†’ 1 pass / 0 fail / 8 expect(). git diff --name-only lists only the new test file.

Local gates

  • Suite: 1 pass / 0 fail (8 expect()); grep -c 'it(' = 1; 1 + 0 blocked = 1.
  • Group (apps/agent): 267 pass / 3 fail / 270 tests β€” the 3 = the pre-existing port-helper noise, unchanged from baseline.
  • Biome: 0. Typecheck: 19 = base, 0 mentions of the new file.

No database, no container, no network.

@tri-claw

tri-claw Bot commented Oct 14, 2026

Copy link
Copy Markdown

Summary by t27-bees

This PR adds a contract test for StepsLayout.tsx that pins the current rendered output (progress bar with four step names, active ring/pulse on step 1, the first step's heading via the real registry, and the back link) so future changes have a baseline to fail against. The test stubs all external seams (router, metrics, RPC, auth, storage) and keeps the step registry and components real.

Worth a look

  • StepsLayout.test.ts:63–68 β€” The react-router mock imports the real module then overrides useParams, useNavigate, and NavLink. If the real router has side effects on import (e.g., context registration), they run before the mocks apply and could leak across tests.
  • StepsLayout.test.ts:89–103 β€” proxyItem re-imports @wxt-dev/storage at call time and calls defineItem again. This relies on the earlier mock.module registration persisting and returning the same mock object; if Bun's module cache or the test runner isolates imports differently, the proxy could hit a different (unmocked) storage instance.
  • StepsLayout.test.ts:158–167 β€” Assertions check for exact Tailwind class strings ('ring-4', 'animate-ping') and copy ('Tell us about yourself', 'Back'). These are implementation details; a styling refactor or copy edit will fail the test without indicating a behavioral regression.
  • StepsLayout.test.ts:155 β€” Only stepId: '1' is tested via useParams. The other three steps, navigation callbacks, and error boundaries are not exercised, so regressions in those paths won't be caught.
  • StepsLayout.test.ts:154 β€” Uses renderToStaticMarkup (SSR) rather than a DOM environment. Client-only logic (effects, event handlers, NavLink active-state classes, motion animations) is not executed, so the "pulse" animation and navigation wiring are only verified as static markup.

Read: 1 files, +180 -0, the whole diff. Head 5404edc. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

@github-actions

Copy link
Copy Markdown

βœ… Tests passed β€” 3642/3712

Suite Passed Failed Skipped
βœ… agent 270/270 0 0
βœ… build 9/9 0 0
βœ… cdp-protocol 5/5 0 0
βœ… eval 93/93 0 0
βœ… server-agent 280/280 0 0
βœ… server-api 2159/2228 0 69
βœ… server-browser 6/6 0 0
βœ… server-integration 10/11 0 1
βœ… server-lib 279/279 0 0
βœ… server-pglive 166/166 0 0
βœ… server-root 68/68 0 0
βœ… server-sim 8/8 0 0
βœ… server-skills 31/31 0 0
βœ… server-tools 244/244 0 0
βœ… shared 14/14 0 0

View workflow run

@dmitrii-f-t27
dmitrii-f-t27 merged commit 308c2d2 into queen Oct 14, 2026
17 of 19 checks passed
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