New exercise name autofill. Log Set button animation.

This commit is contained in:
AG
2025-12-12 21:48:46 +02:00
parent c7f5c4048c
commit f169c7c4d3
8 changed files with 67 additions and 19 deletions

View File

@@ -414,6 +414,10 @@ test.describe('V. User & System Management', () => {
await expect(blockButton).toBeVisible();
await blockButton.click();
// Handle Block Confirmation Modal
await expect(page.getByText('Block User?').or(page.getByText('Заблокировать?'))).toBeVisible();
await page.getByRole('button', { name: /Confirm|Подтвердить/i }).click();
await expect(userRow.getByText(/Blocked|Block/i)).toBeVisible();
// 5. Verify Blocked User Cannot Login
@@ -458,6 +462,10 @@ test.describe('V. User & System Management', () => {
const userRowAfter = listContainer.locator('.bg-surface-container-high').filter({ hasText: regularUser.email }).first();
await expect(userRowAfter).toBeVisible();
await userRowAfter.getByRole('button', { name: 'Unblock', exact: true }).click();
// Handle Unblock Modal
await expect(page.getByText('Unblock User?').or(page.getByText('Разблокировать?'))).toBeVisible();
await page.getByRole('button', { name: /Confirm|Подтвердить/i }).click();
// Wait for UI to update (block icon/text should disappear or change style)
// Ideally we check API response or UI change. Assuming "Blocked" text goes away or button changes.
// The original code checked for not.toBeVisible of blocked text, let's stick to that or button state
@@ -594,9 +602,12 @@ test.describe('V. User & System Management', () => {
const userRow = listContainer.locator('.bg-surface-container-high').filter({ hasText: userToDelete.email }).first();
await expect(userRow).toBeVisible();
page.once('dialog', dialog => dialog.accept());
await userRow.getByRole('button', { name: /Delete/i }).click();
// Handle Delete Confirmation Modal
await expect(page.getByText('Delete User?').or(page.getByText('Удалить пользователя?'))).toBeVisible();
await page.getByRole('button', { name: /Confirm|Подтвердить/i }).click();
await expect(page.getByText(userToDelete.email)).not.toBeVisible();
});
});

View File

@@ -400,7 +400,7 @@ test.describe('III. Workout Tracking', () => {
// Helper to log a set
const logSet = async (side: 'L' | 'R' | 'A') => {
// Find the logger container (has 'Log Set' button)
const logger = page.locator('div').filter({ has: page.getByRole('button', { name: /Log Set/i }) }).last();
const logger = page.locator('div').filter({ has: page.getByRole('button', { name: /Log Set|Saved/i }) }).last();
await expect(logger).toBeVisible();
// Select side
@@ -416,7 +416,7 @@ test.describe('III. Workout Tracking', () => {
// Reps - handle potential multiples if strict, but scoped should be unique
await logger.getByLabel('Reps').fill('10');
await logger.getByRole('button', { name: /Log Set/i }).click();
await logger.getByRole('button', { name: /Log Set|Saved/i }).click();
};
// Log Left (L)