Skip to content

test(agent): pin the first onboarding step - StepOne (Closes #1542) - #1968

Merged
dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1542-step-one
Oct 14, 2026
Merged

dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1542-step-one

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator

Closes #1542

What

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

  • describe block: StepOneTsxContract (appears nowhere else in the tree).
  • The form machinery (react-hook-form + zod resolver, shadcn form/command/button/input kits) stays real β€” it survives a static render untouched. Stubbed: the metrics track, the storage fake, and a portal-free popover stand-in carrying every value export of the real kit (PopoverAnchor included).
  • The onboarding and personalization item modules are mocked with live proxies resolving the storage facade at call time (the lesson of test(agent): pin the app selector - AppSelector (Closes #1536)Β #1967): mock.module registrations persist for every later-linking file, and downstream suites (StepTwo, the suggestions suite, the llm-providers suite) read these items through their own storage fakes β€” a closed-over stand-in would starve them.
  • Pin (closed mount β€” the role picker's open state is internal, no controlled prop): the heading with its intro, the four labelled fields with their placeholders, the role picker's closed trigger, the continue button; none of the picker content leaking. The submit flow and the open picker are named in the suite header per the issue's User Story 2.
  • FR-004 shown both ways, quoted: broken subject (heading string) β†’ 0 pass / 1 fail; restored β†’ 1 pass / 0 fail / 12 expect(). git diff --name-only lists only the new test file.

Local gates

  • Suite: 1 pass / 0 fail (12 expect()); grep -c 'it(' = 1; 1 + 0 blocked = 1.
  • Group (apps/agent): 259 pass / 3 fail / 262 tests β€” the 3 failures are the pre-existing port-helper noise, unchanged from the baseline without this file.
  • 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

The change adds a pinning test for StepOne.tsx (the first onboarding step) that verifies the static render output: heading, intro, four labeled fields with placeholders, closed role picker trigger, and continue button β€” with no picker content leaking. It stubs metrics, storage, and the popover kit (portal-free, keeping all value exports), and uses live-proxy storage items so downstream suites' own fakes remain effective.

Worth a look

  • trios/agent-server/apps/agent/entrypoints/onboarding/steps/StepOne.test.ts:27 β€” Module-level values Map shared across all fakeItem calls; if more tests are added to this file (or the file is reloaded in watch mode), stale values could leak between tests.
  • trios/agent-server/apps/agent/entrypoints/onboarding/steps/StepOne.test.ts:75 β€” Module-level let popoverOpen = false mutated by the Popover mock; same leakage risk if the suite grows or runs repeatedly without a full reload.
  • trios/agent-server/apps/agent/entrypoints/onboarding/steps/StepOne.test.ts:17 β€” process.env.VITE_BROWSEROS_SERVER_PORT ??= '43210' mutates global process env before imports; acceptable for the port-helper seam but couples the test file to the env module's one-time snapshot behavior.
  • trios/agent-server/apps/agent/entrypoints/onboarding/steps/StepOne.test.ts:112 β€” Query-qualified import ./StepOne?step-one-suite-real forces a fresh module instance; relies on Vite/Bun-specific behavior that could change or differ in other runners.
  • trios/agent-server/apps/agent/entrypoints/onboarding/steps/StepOne.test.ts:127 β€” Single test with 12 expect calls on exact strings; any copy change (e.g., "Tell us about yourself") fails the suite, which is the intent of a pin test but makes it brittle by design.

Read: 1 files, +174 -0, the whole diff. Head aa08eb6. 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 β€” 3634/3704

Suite Passed Failed Skipped
βœ… agent 262/262 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

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