Parent: #588 — step 6 of 8.
Problem
The visual report has a Storybook status page, and it is currently unmounted and unmountable.
It is mounted by three hand edits to a library's Storybook host config: a story glob, a static-directory entry, and a filesystem-allow addition. specs storybook init now scaffolds that file and --force rewrites it, so those three edits are edits waiting to be destroyed — and in practice the page has been unmounted ever since the host became generated. Reading results means opening a markdown file on disk.
Potential solution(s)
- Publish the report as a generated page through the existing concern mechanism: a
visualtesting concern registered alongside the others, detecting on whether the library has a report on disk and building the page when it does.
- Separate sections for components and compositions, because their pass criteria differ — compositions are advisory, and one combined table hides that.
- The page reads the report JSON over HTTP, so a re-diff updates it on reload with no republish.
- The scaffolded host already reserves the mount point, serving a visual-testing baselines directory when one exists. That line is currently the only mention of visual testing anywhere in the CLI; this is what makes it mean something. It points at the previously reserved path and needs repointing at where the rest of this work writes.
Acceptance criteria
Case data
Notes
Depends on step 5. Replaces the hand-wired page that lived in the test repo.
Parent: #588 — step 6 of 8.
Problem
The visual report has a Storybook status page, and it is currently unmounted and unmountable.
It is mounted by three hand edits to a library's Storybook host config: a story glob, a static-directory entry, and a filesystem-allow addition.
specs storybook initnow scaffolds that file and--forcerewrites it, so those three edits are edits waiting to be destroyed — and in practice the page has been unmounted ever since the host became generated. Reading results means opening a markdown file on disk.Potential solution(s)
visualtestingconcern registered alongside the others, detecting on whether the library has a report on disk and building the page when it does.Acceptance criteria
specs storybook init --forcefollowed by a publish leaves the page working — the regression this step exists to prevent.Case data
Notes
Depends on step 5. Replaces the hand-wired page that lived in the test repo.