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.

Assert the complete existing SSO clipboard feedback

pulse-triage[bot]c4c24f40dba1
diff --git a/frontend-modern/src/components/Settings/__tests__/SSOProvidersPanel.test.tsx b/frontend-modern/src/components/Settings/__tests__/SSOProvidersPanel.test.tsx
index bc8d53acde..788e858ee6 100644
--- a/frontend-modern/src/components/Settings/__tests__/SSOProvidersPanel.test.tsx
+++ b/frontend-modern/src/components/Settings/__tests__/SSOProvidersPanel.test.tsx
@@ -234,7 +234,9 @@ describe('SSOProvidersPanel IdP endpoint URLs', () => {
expect(screen.getByText('Callback / Redirect URL:').tagName).toBe('DT');
fireEvent.click(copy);
await waitFor(() => expect(writeText).toHaveBeenCalledExactlyOnceWith(callback));
- expect(notificationSuccessMock).toHaveBeenCalledWith('Callback URL has been copied');
+ expect(notificationSuccessMock).toHaveBeenCalledWith(
+ 'Callback URL has been copied to the clipboard.',
+ );
expect(screen.getByRole('button', { name: 'Edit provider' })).toBeDisabled();
expect(screen.getByRole('button', { name: 'Delete provider' })).toBeDisabled();
expect(fetchMock.mock.calls.every(([, options]) => !options?.method)).toBe(true);
@@ -283,7 +285,11 @@ describe('SSOProvidersPanel IdP endpoint URLs', () => {
const copy = await screen.findByRole('button', { name: 'Copy callback / redirect URL' });
fireEvent.click(copy);
- await waitFor(() => expect(notificationErrorMock).toHaveBeenCalledWith('Unable to copy callback url'));
+ await waitFor(() =>
+ expect(notificationErrorMock).toHaveBeenCalledWith(
+ 'Unable to copy callback url. Select and copy the URL manually.',
+ ),
+ );
expect(copy).toHaveTextContent(callback);
expect(copy).toBeEnabled();
expect(writeText).toHaveBeenCalledExactlyOnceWith(callback);