Playwright tests for isomorphic SSR

4 tests verifying server-client rendering parity:
1. SSR renders visible content without JavaScript (headings, islands, logo)
2. JS-rendered content matches SSR structure (same article text)
3. CSSX styling works without JS (violet class, rules in <head>)
4. SPA navigation preserves island state (colour + copyright path)

Run: cd tests/playwright && npx playwright test

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 20:10:35 +00:00
parent a823e59376
commit 33a02c8fe1
2 changed files with 192 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
// @ts-check
const { defineConfig } = require('playwright/test');
module.exports = defineConfig({
testDir: '.',
timeout: 60000,
retries: 0,
use: {
baseURL: process.env.SX_TEST_URL || 'http://localhost:8013',
headless: true,
},
projects: [
{ name: 'chromium', use: { browserName: 'chromium' } },
],
});