Skip to content

chore(core): stop writing failure screenshots next to tests - #3068

Open
Lisa18289 wants to merge 1 commit into
mainfrom
chore/no-stray-failure-screenshots
Open

chore(core): stop writing failure screenshots next to tests#3068
Lisa18289 wants to merge 1 commit into
mainfrom
chore/no-stray-failure-screenshots

Conversation

@Lisa18289

Copy link
Copy Markdown
Member

Vitest's screenshotFailures defaults to on, and no __screenshots__ directory is gitignored — they hold the committed visual baselines — so a red browser test drops a PNG that git add -A sweeps into the commit. Two such strays are on main already, in List and MarkdownEditor, referenced by no test.

Turning it off in the shared browser config covers every package that inherits it, including future browser projects, so the local overrides in remote-react-components become redundant. A failing visual test still writes reference, actual and diff to the gitignored .vitest-attachments, and --browser.screenshotFailures brings a screenshot back on demand.

PATTERNS.md listed screenshot baselines as a pattern of the components package — the two strays were its only evidence. It points at the visual suite now.

Verified in both directions with a deliberately failing browser test in components: no screenshot and no __screenshots__ directory by default, the PNG back with the flag. Alert.browser.test.tsx --project=visual stays green, so toMatchScreenshot baselines resolve unchanged.

Test config, docs and deleted artifacts only — nothing to release.

🤖 Generated with Claude Code

@Lisa18289 Lisa18289 self-assigned this Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./packages/components/

Status Category Percentage Covered / Total
🔵 Lines 78.69% 746 / 948
🔵 Statements 78.57% 763 / 971
🔵 Functions 80.09% 165 / 206
🔵 Branches 70.33% 377 / 536
File CoverageNo changed files found.
Generated in workflow #6653 for commit 9b74958 by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

Preview environments are ready:

Type URL
docs pr-3068.docs.review.flow-components.de
storybook pr-3068.storybook.review.flow-components.de

Images:

  • docs: ghcr.io/mittwald/flow/docs:pr-3068
  • storybook: ghcr.io/mittwald/flow/storybook:pr-3068

@Lisa18289
Lisa18289 marked this pull request as ready for review September 2, 2026 10:43
@Lisa18289
Lisa18289 requested a review from a team September 2, 2026 10:43
@Lisa18289
Lisa18289 force-pushed the chore/no-stray-failure-screenshots branch from 3d8c952 to 993b385 Compare September 3, 2026 11:12
@Lisa18289
Lisa18289 enabled auto-merge (squash) September 3, 2026 11:13
Vitest's `screenshotFailures` defaults to on, and no `__screenshots__`
directory is gitignored — they hold the committed visual baselines — so a
red browser test drops a PNG that `git add -A` sweeps into the commit. Two
such strays are on main already, in List and MarkdownEditor, referenced by
no test.

Turning it off in the shared browser config covers every package that
inherits it, including future browser projects; the local overrides in
remote-react-components become redundant. A failing visual test still
writes reference, actual and diff to the gitignored .vitest-attachments,
and `--browser.screenshotFailures` brings a screenshot back on demand.

PATTERNS.md listed screenshot baselines as a pattern of the components
package — the two strays were its only evidence. It points at the visual
suite now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Lisa18289
Lisa18289 force-pushed the chore/no-stray-failure-screenshots branch from 993b385 to 9b74958 Compare September 3, 2026 11:15
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