Settle the dark theme before inspecting TrueNAS help

The first phone setup screenshot caught the light-to-dark transition, while the later polling screenshot was settled. Await the actual theme animations before capture so the browser receipt represents the displayed help rather than an intermediate colour frame.

Contract-Neutral: Browser verification timing only; no product source or runtime contract change.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-10-04 03:47:10 +01:00
parent 1c999113a1
commit 59a27e2ce4
@@ -35,7 +35,13 @@ const { chromium, webkit } = require('playwright');
{ waitUntil: 'domcontentloaded', timeout: 60_000 });
const quickStart = page.getByRole('heading', { name: 'Quick Start', exact: true });
await quickStart.waitFor();
if (engine === 'webkit') await page.evaluate(() => document.documentElement.classList.add('dark'));
if (engine === 'webkit') {
await page.evaluate(async () => {
document.documentElement.classList.add('dark');
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
await Promise.all(document.getAnimations().map((animation) => animation.finished.catch(() => {})));
});
}
const article = await page.locator('article').innerText();
for (const text of ['it does not validate inventory or metric collection',
'an elapsed interval is not proof that a poll completed',