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.

style(alerts): format incident retry coverage

pulse-triage[bot]6c91bedbb74b
diff --git a/frontend-modern/src/features/alerts/__tests__/AlertResourceIncidentsPanel.test.tsx b/frontend-modern/src/features/alerts/__tests__/AlertResourceIncidentsPanel.test.tsx
index c9e6f2b7dd..8c3a539631 100644
--- a/frontend-modern/src/features/alerts/__tests__/AlertResourceIncidentsPanel.test.tsx
+++ b/frontend-modern/src/features/alerts/__tests__/AlertResourceIncidentsPanel.test.tsx
@@ -40,15 +40,27 @@ describe('AlertResourceIncidentsPanel', () => {
expect(screen.queryByText('No incidents recorded for this resource yet.')).toBeNull();
let resolve!: (incidents: Incident[]) => void;
- read.mockImplementationOnce(() => new Promise((done) => { resolve = done; }));
+ read.mockImplementationOnce(
+ () =>
+ new Promise((done) => {
+ resolve = done;
+ }),
+ );
fireEvent.click(screen.getByRole('button', { name: 'Refresh' }));
expect(screen.queryByRole('alert')).toBeNull();
expect(screen.getByRole('button', { name: /Refresh/ })).toBeDisabled();
- resolve([{
- id: 'retained', alertType: 'connectivity', level: 'critical',
- status: 'resolved', acknowledged: false, events: [],
- openedAt: '2026-09-08T00:00:00Z', message: 'Retained connection incident',
- } as Incident]);
+ resolve([
+ {
+ id: 'retained',
+ alertType: 'connectivity',
+ level: 'critical',
+ status: 'resolved',
+ acknowledged: false,
+ events: [],
+ openedAt: '2026-09-08T00:00:00Z',
+ message: 'Retained connection incident',
+ } as Incident,
+ ]);
await waitFor(() => expect(screen.getByText('Retained connection incident')).toBeVisible());
expect(read).toHaveBeenLastCalledWith('resource-1', 10);
@@ -60,7 +72,9 @@ describe('AlertResourceIncidentsPanel', () => {
read.mockResolvedValueOnce([]);
fireEvent.click(screen.getByRole('button', { name: 'Refresh' }));
- await waitFor(() => expect(screen.getByText('No incidents recorded for this resource yet.')).toBeVisible());
+ await waitFor(() =>
+ expect(screen.getByText('No incidents recorded for this resource yet.')).toBeVisible(),
+ );
expect(screen.queryByRole('alert')).toBeNull();
expect(screen.queryByText('Retained connection incident')).toBeNull();
});