All Tests Fixed with Initialize feature
This commit is contained in:
@@ -12,11 +12,18 @@ async function loginAndSetup(page: any, createUniqueUser: any) {
|
||||
|
||||
try {
|
||||
const heading = page.getByRole('heading', { name: /Change Password/i });
|
||||
const initAcc = page.getByRole('heading', { name: /Setup Your Account/i });
|
||||
const dashboard = page.getByText('Free Workout');
|
||||
await expect(heading.or(dashboard)).toBeVisible({ timeout: 5000 });
|
||||
await expect(heading.or(initAcc).or(dashboard)).toBeVisible({ timeout: 5000 });
|
||||
|
||||
if (await heading.isVisible()) {
|
||||
await page.getByLabel('New Password').fill('StrongNewPass123!');
|
||||
await page.getByRole('button', { name: /Save|Change/i }).click();
|
||||
await expect(initAcc.or(dashboard)).toBeVisible();
|
||||
}
|
||||
|
||||
if (await initAcc.isVisible()) {
|
||||
await page.getByRole('button', { name: /Get Started/i }).click();
|
||||
await expect(dashboard).toBeVisible();
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user