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:
giancarlo
2024-04-11 18:25:42 +08:00
parent 311086d0e7
commit 67c8097a31

View File

@@ -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');