Fix async assertion for error message in test

Wraps the assertion for the 'Bad credentials' error message in a waitFor to ensure the element is present after asynchronous updates.
This commit is contained in:
kikootwo
2026-01-28 12:07:00 -05:00
parent 07dfce3936
commit 7a9f158320
@@ -122,7 +122,9 @@ describe('DownloadClientStep', () => {
expect(fetchMock).toHaveBeenCalledWith('/api/setup/test-download-client', expect.any(Object));
});
expect(screen.getByText(/Bad credentials/)).toBeInTheDocument();
await waitFor(() => {
expect(screen.getByText(/Bad credentials/)).toBeInTheDocument();
});
});
it('disables test connection when SABnzbd fields are incomplete', async () => {