Skip to content

Commit

Permalink
Change wait for reauthenticate
Browse files Browse the repository at this point in the history
Signed-off-by: John Gomersall <[email protected]>
  • Loading branch information
john-gom committed Dec 2, 2024
1 parent 51daa37 commit 3c29243
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/account.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ test("delete account", async ({ page }) => {
await page.getByRole('button', {name: '^delete^'}).click();

// Not sure when the reauthenticate window appears
if (await page.getByText('^reauthenticate^').isVisible()) {
const reauthenticate = page.getByText('^reauthenticate^');
const confirm = page.getByText('^deleteAccountConfirm^');
await expect(reauthenticate.or(confirm)).toBeVisible();
if (await reauthenticate.isVisible()) {
await page.getByLabel('^password^').fill(password);
await page.getByRole('button', {name: '^doLogin^'}).click();
}

await expect(page.getByText('^deleteAccountConfirm^')).toBeVisible();
await expect(confirm).toBeVisible();
await expect(page.getByText('^irreversibleAction^')).toBeVisible();

await expect(page.getByText('^deletingImplies^')).toBeVisible();
Expand Down

0 comments on commit 3c29243

Please sign in to comment.