Add waitForResponse for auth in e2e tests
Introduced a waitForResponse function in the authentication end-to-end test file. This helps to ensure that the test doesn't proceed until a response from the auth URL is received, adding robustness to the test flow.
This commit is contained in:
@@ -20,6 +20,10 @@ test.describe('Auth flow', () => {
|
||||
repeatPassword: 'password',
|
||||
});
|
||||
|
||||
await page.waitForResponse(resp => {
|
||||
return resp.url().includes('auth');
|
||||
});
|
||||
|
||||
await auth.visitConfirmEmailLink(email);
|
||||
|
||||
expect(page.url()).toContain('http://localhost:3000/home');
|
||||
|
||||
Reference in New Issue
Block a user