Skip to content

test(site/src/pages/AgentsPage): remove assertion-only story play functions - #29017

Merged
DanielleMaywood merged 1 commit into
mainfrom
remove-assertion-only-play-functions
Sep 9, 2026
Merged

test(site/src/pages/AgentsPage): remove assertion-only story play functions#29017
DanielleMaywood merged 1 commit into
mainfrom
remove-assertion-only-play-functions

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Storybook is visual regression only in this repository: the storybook CI job runs pixel-storybook, which loads each story, runs its play function, waits for the DOM to settle, and screenshots it. A play function that only asserts visible state duplicates what the screenshot already captures, and Pixel fails the capture only when a play throws.

This removes the play functions whose bodies are purely queries and assertions on visible state across the AgentsPage scope: 320 stories in 44 files.

What is intentionally kept:

  • Every play that drives state the screenshot needs: menu opens, expand clicks, hovers, typing, and forced-visibility setup.
  • The plays of pixel-excluded stories, so their behavior coverage is not lost.
  • Stories whose play was their only property now render as plain visual states.

Coverage impact of the removal was checked one by one. The removed plays contained three assertions with no visual counterpart:

  • ProviderRequiresUserApiKey's Settings link href is asserted identically in ModelSelectorHelp.test.tsx.
  • AdvisorTool.Running's aria-expanded="true" is asserted by the surviving SuccessfulAdvice and LongAdviceLongQuestion stories.
  • HiddenAssistantPlaceholderDoesNotRender's row-suppression behavior is covered by messageHelpers.test.ts "hides assistant messages whose execute tool renders nothing".

None of these removed plays asserted callbacks, storage, or real browser behavior that Pixel cannot see; nothing non-visual was lost, so no conversion was needed. Per the FE1 contract in #29016, what the DOM renders belongs to the screenshot, and tests assert the non-visual outcome of an interaction.

Generated by Coder Agents on behalf of @DanielleMaywood.

@DanielleMaywood
DanielleMaywood force-pushed the remove-assertion-only-play-functions branch from 722b91b to d1f5fe3 Compare September 7, 2026 08:11
@DanielleMaywood
DanielleMaywood force-pushed the remove-assertion-only-play-functions branch from d1f5fe3 to 264314b Compare September 7, 2026 09:52
@DanielleMaywood
DanielleMaywood force-pushed the remove-assertion-only-play-functions branch from 264314b to 2555ae6 Compare September 8, 2026 15:27
Base automatically changed from fix-storybook-fe1-guidance to main September 9, 2026 08:19
…ctions

Storybook is visual regression only in this repository: the storybook CI
job runs pixel-storybook, which loads each story, runs its play function,
waits for the DOM to settle, and screenshots it. A play function that
only asserts visible state duplicates what the screenshot already
captures, and Pixel fails the capture only when a play throws.

Remove the play functions whose bodies are purely queries and assertions
on visible state across the AgentsPage scope (320 stories in 44 files).
Keep every play that drives state the screenshot needs: menu opens,
expand clicks, hovers, typing, and forced-visibility setup all survive,
and the plays for pixel-excluded stories are untouched so their behavior
coverage is not lost. Stories whose play was their only property now
render as plain visual states.

Behavior assertions that Pixel cannot see (callbacks, attributes,
storage, focus) are intentionally not converted here; follow-up PRs move
them into Vitest.
@DanielleMaywood
DanielleMaywood force-pushed the remove-assertion-only-play-functions branch from 2555ae6 to 18db5c2 Compare September 9, 2026 08:19
@DanielleMaywood
DanielleMaywood marked this pull request as ready for review September 9, 2026 09:01
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-09-09T09:01:11.298490Z 18db5c2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DanielleMaywood
DanielleMaywood merged commit f041296 into main Sep 9, 2026
35 checks passed
@DanielleMaywood
DanielleMaywood deleted the remove-assertion-only-play-functions branch September 9, 2026 09:05
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants