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();
});
});