From fc723d50eca6988044d4da950540737af8f367fb Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Fri, 2 May 2025 16:42:34 -0600 Subject: [PATCH] Update expection for auth sign in --- web/playwright-tests/auth-utils/auth-utils.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/web/playwright-tests/auth-utils/auth-utils.ts b/web/playwright-tests/auth-utils/auth-utils.ts index 0e01e3390..f21825ab2 100644 --- a/web/playwright-tests/auth-utils/auth-utils.ts +++ b/web/playwright-tests/auth-utils/auth-utils.ts @@ -71,24 +71,14 @@ export async function login(page: Page) { await page.getByRole('textbox', { name: 'Password' }).fill('password'); expect(page.getByRole('textbox', { name: 'Confirm passowrd' })).not.toBeVisible(); await page.getByRole('button', { name: 'Sign in' }).click(); - console.log('Waiting for response to /auth/login'); - // Check that call to /auth/login was fired - await page.waitForResponse( - (response) => response.url().includes('/auth/login') && response.status() === 200 - ); - console.log('Response to /auth/login received'); + //expect "Invalid email or password" to not be visible expect(page.getByText('Invalid email or password')).not.toBeVisible(); - console.log('Invalid email or password not visible'); - await page.waitForLoadState('networkidle'); await page.waitForLoadState('domcontentloaded'); await page.waitForTimeout(250); - - console.log('Waiting for home page after login', page.url()); - await page.waitForURL('http://localhost:3000/app/home'); - await page.waitForTimeout(350); + await page.waitForTimeout(250); await page.goto('http://localhost:3000/app/new-user'); await page.getByRole('button', { name: 'Get Started' }).click(); await page.getByRole('textbox', { name: 'What is your full name' }).dblclick(); @@ -100,7 +90,6 @@ export async function login(page: Page) { await page.waitForLoadState('networkidle'); await page.waitForLoadState('domcontentloaded'); - console.log('Waiting for home page', page.url()); await page.waitForURL('http://localhost:3000/app/home'); // Wait for the page to be fully loaded before accessing storage