Dark Mode Regression Testing

The dark theme is now verified with DOM-level assertions instead of screenshot comparisons. The Playwright spec at tests/dark-mode.spec.js loads the homepage with the dark theme enabled and inspects computed styles for critical UI regions.

How the Test Works

These assertions target CSS variables so regressions in the palette or class selectors are caught immediately without relying on binary diffs.

Running the Test Suite

  1. Install dependencies (once per environment):
    npm install
    npm run test:browsers
    
  2. Execute the dark-mode check:
    npm test
    
    or run only this spec:
    npm run test:dark
    

Playwright starts the Eleventy dev server automatically. No manual screenshot curation is required, and the repository contains no .png baselines or snapshot folders.