Files
at-digitaltwin/tests/api/auth/login-applicant.api.spec.ts

19 lines
562 B
TypeScript

import { test, expect } from '@playwright/test';
import axios from 'axios';
const BASE_URL = 'https://rumc.dev.rdcenter.ru/api';
test('API: успешная авторизация абитуриента', async () => {
const payload = {
login: 'autotestapplicant',
password: '!Test123456',
};
const res = await axios.post(`${BASE_URL}/auth/login`, payload);
expect(res.status).toBe(200);
expect(res.data).toHaveProperty('access_token');
console.log('✅ Авторизация успешна. Access token:', res.data.access_token);
});