fix: update e2e tests

This commit is contained in:
Mythie
2024-02-29 15:19:38 +11:00
parent 1cc7c95a33
commit aa87a86a5f
6 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,7 @@ export const manualLogin = async ({
}; };
export const manualSignout = async ({ page }: ManualLoginOptions) => { export const manualSignout = async ({ page }: ManualLoginOptions) => {
await page.waitForTimeout(1000);
await page.getByTestId('menu-switcher').click(); await page.getByTestId('menu-switcher').click();
await page.getByRole('menuitem', { name: 'Sign Out' }).click(); await page.getByRole('menuitem', { name: 'Sign Out' }).click();
await page.waitForURL(`${WEBAPP_BASE_URL}/signin`); await page.waitForURL(`${WEBAPP_BASE_URL}/signin`);

View File

@ -29,7 +29,7 @@ test('user can sign up with email and password', async ({ page }: { page: Page }
await page.mouse.up(); await page.mouse.up();
} }
await page.getByRole('button', { name: 'Continue', exact: true }).click(); await page.getByRole('button', { name: 'Next', exact: true }).click();
await page.getByLabel('Public profile username').fill('username-123'); await page.getByLabel('Public profile username').fill('username-123');
await page.getByRole('button', { name: 'Complete', exact: true }).click(); await page.getByRole('button', { name: 'Complete', exact: true }).click();

View File

@ -49,6 +49,7 @@ export const seedDatabase = async () => {
email: u.email, email: u.email,
password: hashSync(u.password), password: hashSync(u.password),
emailVerified: new Date(), emailVerified: new Date(),
url: u.email,
}, },
}), }),
), ),

View File

@ -49,6 +49,7 @@ export const seedDatabase = async () => {
email: u.email, email: u.email,
password: hashSync(u.password), password: hashSync(u.password),
emailVerified: new Date(), emailVerified: new Date(),
url: u.email,
}, },
}), }),
), ),

View File

@ -23,6 +23,7 @@ export const seedDatabase = async () => {
email: TEST_USER.email, email: TEST_USER.email,
password: hashSync(TEST_USER.password), password: hashSync(TEST_USER.password),
emailVerified: new Date(), emailVerified: new Date(),
url: TEST_USER.email,
}, },
}); });
}; };

View File

@ -21,6 +21,7 @@ export const seedUser = async ({
email, email,
password: hashSync(password), password: hashSync(password),
emailVerified: verified ? new Date() : undefined, emailVerified: verified ? new Date() : undefined,
url: name,
}, },
}); });
}; };