Skip to content

test(agent): pin the onboarding features page - FeaturesPage (Closes #1507) - #1962

Merged
dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1507-features
Oct 14, 2026
Merged

dmitrii-f-t27 merged 1 commit into
queenfrom
zcode-mbp/tests-1507-features

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Collaborator

Closes #1507

What changed

One new file: trios/agent-server/apps/agent/entrypoints/onboarding/features/Features.test.ts (the path the issue's Success Criteria names). The subject Features.tsx is untouched.

The 1 exported symbol is exercised (1 it( block; 0 blocked). The page is a hook-bearing component whose start button reaches for chrome APIs in its handler, so the pins read a static render of it (measured, the render goes through the pill, video frame, bento and community pieces with the mounted-gated grid hidden - the effect that flips it never runs in a static render, exactly the pre-mount frame a server would paint). The pins read that frame: the welcome pill, the hero copy, the scroll hint, the features heading, the community cards with their join labels, and the start button.

Not pinned, and why (issue User Story 2): the start flow - it swaps the tab through chrome.tabs - and the mounted reveal - they live in effects and handlers that need a live document and window. The port env seam is seeded before any import can reach the env module (its one-time snapshot - the trap the agent-outputs suite documented), with the subject imported dynamically for that reason.

How it was verified (FR-004)

  • Passing run against the unmodified subject: 1 pass / 0 fail / 10 expect() calls, Ran 1 test across 1 file.
  • Deliberately broken copy (the scroll-hint line changed, valid syntax): 0 pass / 1 fail / 4 expect() calls. The subject was restored byte-identical (git checkout; git diff --name-only prints nothing) and the suite passes again.
  • No network, database or container; no existing test modified or weakened. The file is biome-check clean. The local typecheck reports 19 errors - the pre-existing base of this tree - and 0 mentions of the new file. Verified in-process: the full agent group passes this file next to every suite of this wave (253 pass / 3 fail, the 3 pre-existing local-only env failures, green in CI).
  • Local reproducibility note (issue bun test cannot resolve @/ aliases once .wxt/tsconfig.json exists (wxt prepare output breaks the bun 1.3.6 runtime resolver)Β #1909): bun run typecheck runs wxt prepare, whose generated .wxt/tsconfig.json makes bun 1.3.6 stop resolving @/ aliases for test runs until that generated directory is removed. CI's Tests jobs never run wxt prepare; every run quoted above is from a checkout without .wxt/.

Not verified

  • Nothing beyond the quoted local runs; the CI Tests / agent job re-runs the suite on this SHA.

Dmitrii Fedorov (@dmitrii-f-t27)

@tri-claw

tri-claw Bot commented Oct 14, 2026

Copy link
Copy Markdown

Summary by t27-bees

This PR adds a snapshot-style test that renders FeaturesPage to static markup and asserts on ten text fragments (welcome pill, hero copy, scroll hint, features heading, community cards, start button). The test seeds VITE_BROWSEROS_SERVER_PORT before importing the subject to work around a one-time env-module snapshot.

Worth a look

  • Features.test.ts:16 β€” process.env.VITE_BROWSEROS_SERVER_PORT ??= '43210' mutates the global environment before the dynamic import. If other tests in the same Bun process run after this one, they will see the seeded value unless they explicitly override it, which could mask missing env configuration in those tests.
  • Features.test.ts:18 β€” The dynamic await import('./Features') is used to ensure the env var is set before the subject's module evaluates. This works but makes the test order-dependent; a test runner that parallelizes files or caches modules could import Features before this line runs, causing the env seam to freeze with an undefined port.
  • Features.test.ts:24 β€” renderToStaticMarkup produces a string and the assertions use toContain for plain text. This does not verify element structure, attributes (e.g., href on the community links), ARIA roles, or that the start button is actually a <button> with the correct handler wiring. A refactor that wraps the same text in different tags or removes links would not fail.
  • Features.test.ts:24-34 β€” The test explicitly covers only the "pre-mount frame". Effects that reveal the mounted grid and the start-button handler that calls chrome.tabs are untested. If those behaviors regress (e.g., the grid never shows, or the start button throws), this test will still pass.
  • Features.test.ts:24 β€” No cleanup of the process.env mutation. In a test suite that runs many files in one process, the seeded port persists for the remainder of the run.

Read: 1 files, +52 -0, the whole diff. Head 1094a7b. 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 β€” 3628/3698

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

Copy link
Copy Markdown
Collaborator Author

CI gates on this SHA:

  • Tests / agent: pass β€” the features-page pin runs in the agent group.
  • All other Tests/ matrix jobs pass*, including server-pglive (no flake rerun needed).
  • Typecheck job: 19 errors = the known base count; 0 mentions of Features.test.ts in the job log.
  • Biome job: red from base findings; 0 mentions of Features.test.ts in the job log.

Dmitrii Fedorov (@dmitrii-f-t27)

@dmitrii-f-t27
dmitrii-f-t27 merged commit d4ea327 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