Skip to content

Commit

Permalink
try promiso all to avoid loading errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregor Vostrak authored and Gregor Vostrak committed Jan 23, 2024
1 parent 148b15b commit face1a6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions e2e/auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ test('can register, logout and log back in', async ({ page }) => {
page.getByRole('button', { name: "John's Organization" })
).toBeVisible();
await page.locator('#currentUserButton').click();
await page.getByRole('button', { name: 'Log Out' }).click();

await Promise.all([
page.getByRole('button', { name: 'Log Out' }).click(),
page.waitForURL(PLAYWRIGHT_BASE_URL + '/'),
]);
await page.goto(PLAYWRIGHT_BASE_URL + '/login');
await page.getByLabel('Email').fill(email);
await page.getByLabel('Password').fill(password);
Expand All @@ -40,7 +44,10 @@ test('can register and delete account', async ({ page }) => {
await page.goto(PLAYWRIGHT_BASE_URL + '/user/profile');
await page.getByRole('button', { name: 'Delete Account' }).click();
await page.getByPlaceholder('Password').fill(password);
await page.getByRole('button', { name: 'Delete Account' }).nth(1).click();
await Promise.all([
page.getByRole('button', { name: 'Delete Account' }).nth(1).click(),
page.waitForURL(PLAYWRIGHT_BASE_URL + '/'),
]);
await page.goto(PLAYWRIGHT_BASE_URL + '/login');
await page.getByLabel('Email').fill(email);
await page.getByLabel('Password').fill(password);
Expand Down

0 comments on commit face1a6

Please sign in to comment.