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.

Target recovery reporting Help by its accessible link name

pulse-triage[bot]83e1760b369e
diff --git a/frontend-modern/src/utils/__tests__/recoveryHelp.test.ts b/frontend-modern/src/utils/__tests__/recoveryHelp.test.ts
index 52c95f653f..abf427c440 100644
--- a/frontend-modern/src/utils/__tests__/recoveryHelp.test.ts
+++ b/frontend-modern/src/utils/__tests__/recoveryHelp.test.ts
@@ -2,6 +2,7 @@ import { readFileSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
+import { within } from '@solidjs/testing-library';
import { renderDocMarkdown } from '@/features/docs/docMarkdown';
@@ -121,8 +122,10 @@ describe('recovery help', () => {
it('resolves safe issue reporting to the actual troubleshooting heading', () => {
const rendered = document.createElement('article');
rendered.innerHTML = renderDocMarkdown(guide, 'RECOVERY');
- const link = rendered.querySelector<HTMLAnchorElement>('a[href^="/docs/TROUBLESHOOTING#"]');
- expect(link?.textContent).toBe('safe issue reporting');
+ const link = within(rendered).getByRole<HTMLAnchorElement>('link', {
+ name: 'safe issue reporting',
+ exact: true,
+ });
expect(link?.hasAttribute('data-doc-link')).toBe(true);
const destination = new URL(link!.getAttribute('href')!, 'https://pulse.example.invalid');
expect(destination.pathname).toBe('/docs/TROUBLESHOOTING');