mirror of https://github.com/buster-so/buster.git
Update expection for auth sign in
This commit is contained in:
parent
e322b6cff9
commit
fc723d50ec
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue