import { chromium } from 'playwright'; const b = await chromium.launch(); for (const mode of ['light','dark']) { const p = await b.newPage({ colorScheme: mode }); const r = await p.goto('http://localhost:3100/', { waitUntil: 'domcontentloaded' }); await p.waitForTimeout(2500); const bg = await p.evaluate(() => getComputedStyle(document.body).backgroundColor); const htmlBg = await p.evaluate(() => getComputedStyle(document.documentElement).backgroundColor); const token = await p.evaluate(() => getComputedStyle(document.documentElement).getPropertyValue('--color-bg-primary').trim()); console.log(mode, 'status=', r.status(), 'body=', bg, 'html=', htmlBg, 'token=', token); await p.close(); } await b.close();