Skip to content

chore: add playwright and screenshot tests for examples#1465

Merged
crutchcorn merged 2 commits intomainfrom
add-playwright
Jan 5, 2026
Merged

chore: add playwright and screenshot tests for examples#1465
crutchcorn merged 2 commits intomainfrom
add-playwright

Conversation

@20jasper
Copy link
Copy Markdown
Member

@20jasper 20jasper commented Jan 4, 2026

Adds playwright and full size snapshot tests in light and dark mode for the example blog. This should enforce baseline styles for most markdown components

I initially went with a text diff of the HTML, but there is so much astro dev info injected that it wouldn't be easy to read

Playwright screenshots are used instead of Vitest's since it avoids a decent bit of manual setup and large screenshots are grainy for vitest

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
playfulprogramming Ready Ready Preview, Comment Jan 5, 2026 1:43am

@crutchcorn crutchcorn merged commit 603d14b into main Jan 5, 2026
6 checks passed
@crutchcorn crutchcorn deleted the add-playwright branch January 5, 2026 17:33
crutchcorn added a commit that referenced this pull request Jan 5, 2026
Merge #1465 first

- adds separate node and browser configs for vitest
- browser tests are called `*.ui.spec.{ts,tsx}` and node tests are
called `*.node.spec.ts`
- adds a helper to run MSW in browser tests as per MSW docs
recommendation
- I made an eslint rule to enforce using the helper in browser unit
tests
- fixes a data race where stale tag counts were displayed
- upgrades to vitest v4
  
Browser unit tests use Firefox for no particular reason over any other
browser. I'm glad to run webkit and chrome in unit tests as well if
anyone feels strongly about it!
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.

2 participants