Skip to content

Scenario 3: trigger un-fixtured request warning#5

Open
RisingOrange wants to merge 1 commit intovisual-difffrom
visual-diff-scenario-3
Open

Scenario 3: trigger un-fixtured request warning#5
RisingOrange wants to merge 1 commit intovisual-difffrom
visual-diff-scenario-3

Conversation

@RisingOrange
Copy link
Copy Markdown
Owner

Tests that the MSW request:unhandled log feeds into the scope comment's ⚠️ un-fixtured requests section. Adds a deliberately un-mocked fetch() to /api/about/+server.ts.

@RisingOrange RisingOrange force-pushed the visual-diff-scenario-3 branch from 54dbb13 to 1e9a58e Compare April 24, 2026 11:31
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

Visual diff coverage
commit c1b06c7 · run #24897359750

Review snapshots in Chromatic

  • Pages: 15/18 covered. Included by default.
  • Posts: 6/103 covered. Excluded by default (posts share a layout).
Route breakdown
  • Pages excluded:
    • /quotes: ~28M-pixel desktop snapshot is over Chromatic's 25M cap
    • /submitted: post-form state
    • /verify: token-dependent
  • Posts covered:
    • /action
    • /funding
    • /if-anyone-builds-it-campaign
    • /join
    • /learn
    • /values
⚠️ 2 external requests not covered by fixtures
  • Endpoints:
    • GET https://api.example.test/scenario-3-marker (no handler; allowed through)
  • Fix: add an explicit handler + fixture in tests/visual/msw-handlers.ts (so the page renders its populated layout against stable data), or exclude the page with @visualDiffEnabled: false.
  • Why it matters: without a fixture, CI gets either a 401 (endpoint needs auth) or drifting live data, so the snapshot won't match production.
Not exercised
  • Pages that fetch from external APIs render against pinned fixtures, not live data.
  • Cross-origin iframes and API calls (Tally, Luma, Mapbox, analytics, newly added widgets) are aborted at the browser boundary. Containers render as empty. Check the Netlify preview deploy to verify their real rendering.
  • Only en locale is built.

tests/visual/README.md explains the annotation syntax and the coverage model.

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