diff --git a/e2e/mesocycle.spec.ts b/e2e/mesocycle.spec.ts index 264a698..1491d63 100644 --- a/e2e/mesocycle.spec.ts +++ b/e2e/mesocycle.spec.ts @@ -366,16 +366,20 @@ test.describe('Mesocycle Management', () => { await addExerciseBtn.click(); await page.waitForTimeout(500); - // Select first exercise + // Select first existing exercise (exclude "Create New Exercise" action) const exerciseOptions = page - .locator('.exercise-option, .exercise-item') - .first(); - if (await exerciseOptions.isVisible()) { - await exerciseOptions.click(); + .locator('.exercise-list .exercise-item') + .filter({ hasNotText: 'Create New Exercise' }); + if ((await exerciseOptions.count()) > 0) { + await exerciseOptions.first().click(); await page.waitForTimeout(500); // Should see configuration inputs for sets, reps, rest - const setsInput = page.locator('input[type="number"]').first(); + const setsInput = page + .locator('.split-day-editor .config-group') + .filter({ hasText: 'Sets' }) + .locator('input[type="number"]') + .first(); await expect(setsInput).toBeVisible(); // Modify sets value