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.

Follow the production table wrapper in the guide regression test

pulse-triage[bot]f8e877c43c2f
diff --git a/frontend-modern/src/features/docs/__tests__/kubernetesSetupDocs.test.ts b/frontend-modern/src/features/docs/__tests__/kubernetesSetupDocs.test.ts
index e2d90e8c89..eef8be9e93 100644
--- a/frontend-modern/src/features/docs/__tests__/kubernetesSetupDocs.test.ts
+++ b/frontend-modern/src/features/docs/__tests__/kubernetesSetupDocs.test.ts
@@ -40,8 +40,14 @@ describe('Kubernetes credential setup and diagnosis', () => {
const article = articleFor('KUBERNETES');
const heading = article.querySelector('[id="4-troubleshooting"]')!;
expect(heading).not.toBeNull();
- let table = heading.nextElementSibling;
- while (table && table.tagName !== 'TABLE') table = table.nextElementSibling;
+ // The production renderer wraps tables in a horizontal scroll container.
+ let container = heading.nextElementSibling;
+ let table: Element | null = null;
+ while (container && !table) {
+ table = container.matches('table') ? container : container.querySelector('table');
+ container = container.nextElementSibling;
+ }
+ expect(table).not.toBeNull();
const rows = [...table!.querySelectorAll('tbody tr')];
expect(rows).toHaveLength(4);
expect(rows.map((row) => row.firstElementChild!.textContent)).toEqual([