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.

Pin non-stealing focus independently of the dismissal target

pulse-triage[bot]bcf56085fbb3
diff --git a/frontend-modern/src/components/Settings/__tests__/ClusterAgentDeployDialog.test.tsx b/frontend-modern/src/components/Settings/__tests__/ClusterAgentDeployDialog.test.tsx
index e7bc398ace..f526623c81 100644
--- a/frontend-modern/src/components/Settings/__tests__/ClusterAgentDeployDialog.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/ClusterAgentDeployDialog.test.tsx
@@ -181,11 +181,11 @@ describe('ClusterAgentDeployDialog', () => {
api.createPreflight.mockRejectedValue(new Error('Source agent is not connected'));
renderDialog({ preselectNodeName: 'delly2' });
const install = await screen.findByRole('button', { name: 'Install on 1 node' });
- const dismiss = screen.getByRole('button', { name: 'Cancel' });
- dismiss.focus();
+ const dialog = screen.getByRole('dialog');
+ dialog.focus();
fireEvent.click(install);
await screen.findByRole('alert');
- expect(dismiss).toHaveFocus();
+ expect(dialog).toHaveFocus();
expect(api.createJob).not.toHaveBeenCalled();
});