mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user