Synchronous Fields Reset for Set Logging, Tests fixed
Some checks are pending
Copilot Setup Steps / copilot-setup-steps (push) Waiting to run
Some checks are pending
Copilot Setup Steps / copilot-setup-steps (push) Waiting to run
This commit is contained in:
@@ -50,7 +50,7 @@ test.describe('II. Workout Management', () => {
|
||||
|
||||
await page.getByRole('button', { name: 'Plans' }).first().click();
|
||||
await page.getByRole('button', { name: 'Create Plan' }).click();
|
||||
await page.getByRole('button', { name: 'Manually' }).click();
|
||||
await page.getByRole('button', { name: 'Create Plan Manually' }).click();
|
||||
await expect(page.getByLabel(/Name/i)).toBeVisible({ timeout: 10000 });
|
||||
|
||||
await page.getByLabel(`Name`).fill('My New Strength Plan');
|
||||
@@ -502,7 +502,7 @@ test.describe('II. Workout Management', () => {
|
||||
// VERIFY: Should not appear in Plans Add Exercise selector
|
||||
await page.getByRole('button', { name: 'Plans' }).first().click();
|
||||
await page.getByRole('button', { name: 'Create Plan' }).click();
|
||||
await page.getByRole('button', { name: 'Manually' }).click();
|
||||
await page.getByRole('button', { name: 'Create Plan Manually' }).click();
|
||||
await page.getByRole('button', { name: 'Add Exercise' }).click();
|
||||
await expect(page.getByRole('button', { name: 'Archive Me' })).not.toBeVisible();
|
||||
// Close sidesheet - use more robust selector and wait for stability
|
||||
|
||||
@@ -13,20 +13,28 @@ test.describe('Seed', () => {
|
||||
await page.getByLabel('Password').fill(user.password);
|
||||
await page.getByRole('button', { name: 'Login' }).click();
|
||||
|
||||
// 4. Handle First Time Password Change if it appears
|
||||
// Wait for either dashboard or change password screen
|
||||
// 4. Handle transitions (Change Password, Account Setup)
|
||||
const dashboard = page.getByText(/Free Workout|Свободная тренировка/i).first();
|
||||
const changePass = page.getByRole('heading', { name: /Change Password|Смена пароля/i });
|
||||
const initAcc = page.getByRole('heading', { name: /Setup Your Account|Настройка аккаунта/i });
|
||||
|
||||
try {
|
||||
await expect(page.getByRole('heading', { name: /Change Password/i }).or(page.getByText('Free Workout'))).toBeVisible({ timeout: 5000 });
|
||||
|
||||
if (await page.getByRole('heading', { name: /Change Password/i }).isVisible()) {
|
||||
await page.getByLabel('New Password').fill('StrongNewPass123!');
|
||||
await page.getByRole('button', { name: /Save|Change/i }).click();
|
||||
}
|
||||
await expect(dashboard.or(changePass).or(initAcc)).toBeVisible({ timeout: 10000 });
|
||||
|
||||
if (await changePass.isVisible()) {
|
||||
await page.getByLabel(/New Password|Новый пароль/i).fill('StrongNewPass123!');
|
||||
await page.getByRole('button', { name: /Save|Change|Сохранить/i }).click();
|
||||
await expect(dashboard.or(initAcc)).toBeVisible({ timeout: 10000 });
|
||||
}
|
||||
|
||||
if (await initAcc.isVisible()) {
|
||||
await page.getByRole('button', { name: /Get Started|Начать работу/i }).click();
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Timeout waiting for login transition');
|
||||
console.log('Transition handling timeout or already reached dashboard');
|
||||
}
|
||||
|
||||
// 5. Ensure we are at Dashboard
|
||||
await expect(page.getByText('Free Workout')).toBeVisible();
|
||||
await expect(dashboard).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user