Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Settle the dark theme before inspecting TrueNAS help

pulse-triage[bot]59a27e2ce4ea
diff --git a/frontend-modern/browser-tests/truenas-connection-help.cjs b/frontend-modern/browser-tests/truenas-connection-help.cjs
index 17a7fcfae9..3a6e38541a 100644
--- a/frontend-modern/browser-tests/truenas-connection-help.cjs
+++ b/frontend-modern/browser-tests/truenas-connection-help.cjs
@@ -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',