Skip to content

Commit

Permalink
Wait for sign up form to render instead
Browse files Browse the repository at this point in the history
  • Loading branch information
apedroferreira committed Mar 13, 2024
1 parent 1910476 commit 22fd1c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/integration/auth/domain.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test.use({
},
});

test('Must be authenticated with valid domain to access app', async ({ page, request }) => {
test.only('Must be authenticated with valid domain to access app', async ({ page, request }) => {
// Is redirected when unauthenticated
await page.goto('/prod/pages/mypage');
await page.waitForURL(/\/prod\/signin/);
Expand Down Expand Up @@ -58,8 +58,8 @@ test('Must be authenticated with valid domain to access app', async ({ page, req

await page.waitForURL(/\/prod\/signin/);

// Must wait for network to be idle or next CSRF request fails with "Failed to fetch", somehow due to the ongoing requests
await page.waitForLoadState('networkidle');
// Wait for page content to render so that next CSRF request does not collide with ongoing auth requests
await expect(page.getByRole('button', { name: 'Sign in' })).toBeVisible();

// Is redirected when unauthenticated
await page.goto('/prod/pages/mypage');
Expand Down

0 comments on commit 22fd1c0

Please sign in to comment.