Archived exercises hidden from selects. Password fields Show Password toggle

This commit is contained in:
AG
2025-12-18 21:11:40 +02:00
parent b6cb3059af
commit b32f47c2b5
9 changed files with 103 additions and 32 deletions

View File

@@ -485,6 +485,26 @@ test.describe('II. Workout Management', () => {
await expect(page.getByText('Archive Me')).not.toBeVisible();
// 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: 'Add Exercise' }).click();
await expect(page.getByRole('button', { name: 'Archive Me' })).not.toBeVisible();
// Close sidesheet - use more robust selector and wait for stability
const closeBtn = page.getByLabel('Close');
await expect(closeBtn).toBeVisible();
await closeBtn.click();
// VERIFY: Should not appear in Tracker/Quick Log suggestions
await page.getByRole('button', { name: 'Tracker' }).first().click();
await page.getByRole('button', { name: 'Quick Log' }).click();
await page.getByRole('textbox', { name: 'Select Exercise' }).fill('Archive');
await expect(page.getByRole('button', { name: 'Archive Me' })).not.toBeVisible();
// Go back to Profile and unarchive
await page.getByRole('button', { name: 'Profile' }).first().click();
await page.locator('button:has-text("Manage Exercises")').click();
await page.locator('div').filter({ hasText: /Show Archived/i }).last().locator('input[type="checkbox"]').check();
await expect(page.getByText('Archive Me')).toBeVisible();
@@ -496,6 +516,12 @@ test.describe('II. Workout Management', () => {
await page.locator('div').filter({ hasText: /Show Archived/i }).last().locator('input[type="checkbox"]').uncheck();
await expect(page.getByText('Archive Me')).toBeVisible();
// VERIFY: Should appear again in Tracker/Quick Log suggestions
await page.getByRole('button', { name: 'Tracker' }).first().click();
await page.getByRole('button', { name: 'Quick Log' }).click();
await page.getByRole('textbox', { name: 'Select Exercise' }).fill('Archive');
await expect(page.getByRole('button', { name: 'Archive Me' })).toBeVisible();
});
test('2.10 B. Exercise Library - Filter by Name', async ({ page, createUniqueUser, request }) => {