From 362d0701583daa1efe01d2b6c48803a5e01f771b Mon Sep 17 00:00:00 2001 From: Danny Cho Date: Mon, 5 Aug 2024 14:08:05 +1200 Subject: [PATCH] fix: rewrite playwright test that causes failure --- .../pages/AuthCallBackPage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/near-fast-auth-signer-e2e-tests/pages/AuthCallBackPage.ts b/packages/near-fast-auth-signer-e2e-tests/pages/AuthCallBackPage.ts index beb70db7..172af4da 100644 --- a/packages/near-fast-auth-signer-e2e-tests/pages/AuthCallBackPage.ts +++ b/packages/near-fast-auth-signer-e2e-tests/pages/AuthCallBackPage.ts @@ -50,9 +50,9 @@ class AuthCallBackPage { await expect(page.locator('[data-testid="username_create"]')).toHaveValue(getEmailId(email)); await page.waitForSelector('button:has-text("Continue"):enabled'); await page.click('button:has-text("Continue")'); - await expect(page.getByText('Loading...')).toBeVisible({ timeout: TIMEOUT }); - await expect(page.getByText('Loading...')).not.toBeVisible({ timeout: TIMEOUT }); - await expect(page.getByText('Redirecting to app...')).toBeVisible({ timeout: TIMEOUT }); + await page.waitForSelector('text=Loading...'); + await page.waitForSelector('text=Loading...', { state: 'detached' }); + await page.waitForSelector('text=Redirecting to app...'); } }