// tests/ui/auth/login-applicant.spec.ts

import { test, expect } from '@playwright/test';
import { LoginPage } from '../../../page-objects/LoginPage';
import { testUsers } from '../../../fixtures/users';

test('UI: успешная авторизация абитуриента', async ({ page }) => {
  const loginPage = new LoginPage(page);
  const user = testUsers.applicant;

  await loginPage.goto();
  await loginPage.fillLogin(user.login);
  await loginPage.fillPassword(user.password);
  await loginPage.submit();
  await loginPage.assertSuccessfulLogin();

  await expect(page).toHaveURL(/\/account\/profile$/);
});
