Initialize GUI has profile attributes

This commit is contained in:
AG
2025-12-18 22:45:50 +02:00
parent abffb52af1
commit 051e1e8a32
11 changed files with 136 additions and 19 deletions

View File

@@ -184,4 +184,40 @@ test.describe('I. Core & Authentication', () => {
await expect(page.getByRole('button', { name: /Записать подход|Log Set/i })).toBeVisible();
});
// 1.10. C. Initialization - Optional Profile Data
test('1.10 Initialization - Optional Profile Data', async ({ page, createUniqueUser }) => {
const user = await createUniqueUser();
await page.getByLabel(/Email/i).fill(user.email);
await page.getByLabel(/Password|Пароль/i).fill(user.password);
await page.getByRole('button', { name: /Login|Войти/i }).click();
// Handle password change
await expect(page.getByRole('heading', { name: /Change Password|Смена пароля/i })).toBeVisible();
await page.getByLabel(/New Password|Новый пароль/i).fill('StrongNewPass123!');
await page.getByRole('button', { name: /Save|Change|Сохранить/i }).click();
// Handle initialization
await expect(page.getByRole('heading', { name: /Setup Your Account|Настройка аккаунта/i })).toBeVisible();
// Fill data
await page.getByLabel(/Birth Date|Дата рожд./i).fill('1990-01-01');
await page.getByLabel(/Height|Рост/i).fill('180');
await page.getByLabel(/Weight|Мой вес/i).fill('80');
await page.getByLabel(/Gender|Пол/i).selectOption('MALE');
await page.getByRole('button', { name: /Get Started|Начать работу/i }).click();
// Expect dashboard
await expect(page.getByText(/Free Workout|Свободная тренировка/i).first()).toBeVisible();
// Navigate to profile to verify
await page.getByRole('button', { name: /Profile|Профиль/i }).first().click();
// Verify values in Profile section
await expect(page.getByLabel(/Height|Рост/i)).toHaveValue('180');
await expect(page.getByLabel(/Birth Date|Дата рожд./i)).toHaveValue('1990-01-01');
await expect(page.getByLabel(/Gender|Пол/i)).toHaveValue('MALE');
});
});