mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
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:
@@ -122,7 +122,9 @@ describe('DownloadClientStep', () => {
|
|||||||
expect(fetchMock).toHaveBeenCalledWith('/api/setup/test-download-client', expect.any(Object));
|
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 () => {
|
it('disables test connection when SABnzbd fields are incomplete', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user