Files
playwright-tests-ssas/allure-report/data/attachments/b8cd5c9b73ae48f9.md

137 lines
5.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Test info
- Name: Позитивные сценарии регистрации >> Успешная регистрация нового пользователя
- Location: /Users/vladsmykov/Desktop/Work/AUTOTESTS/CCPC_playwright/tests/ui/registration/register.spec.ts:6:7
# Error details
```
Error: Timed out 5000ms waiting for expect(locator).toHaveURL(expected)
Locator: locator(':root')
Expected pattern: /\/login\/confirmLogin/
Received string: "https://ssas.dev.rdcenter.ru/login/registration"
Call log:
- expect.toHaveURL with timeout 5000ms
- waiting for locator(':root')
9 × locator resolved to <html lang="en">…</html>
- unexpected value "https://ssas.dev.rdcenter.ru/login/registration"
at /Users/vladsmykov/Desktop/Work/AUTOTESTS/CCPC_playwright/tests/ui/registration/register.spec.ts:30:24
```
# Page snapshot
```yaml
- main:
- main:
- button
- button "Скрыть Close":
- text: Скрыть
- img "Close"
- list:
- listitem:
- text: Главная
- img "Arrow"
- listitem:
- text: Автору
- img "Arrow"
- listitem:
- text: Новости
- img "Arrow"
- listitem:
- text: Участники
- img "Arrow"
- listitem:
- text: Оргкомитет
- img "Arrow"
- img "Logo"
- paragraph: Добро пожаловать
- paragraph: Зарегистрируйтесь, чтобы начать работу.
- textbox "Имя*": Иван
- text: Имя*
- textbox "Фамилия*": Тестов
- text: Фамилия*
- textbox "Отчество": Александрович
- text: Отчество
- textbox "Учёное звание*": Доцент
- img "img"
- text: Учёное звание*
- textbox "Учёная степень*": Кандидат наук
- img "img"
- text: Учёная степень*
- textbox "Должность": Преподаватель
- text: Должность
- textbox "Организация*": ЮФУ
- text: Организация*
- textbox "Email (логин)*": autotest29704@example.com
- text: Email (логин)*
- textbox "Номер телефона*": +7 (987) 029-70-4
- text: Некорректный номер
- img "!"
- img "показать пароль"
- textbox "Придумайте пароль*": "!Test123"
- text: Придумайте пароль*
- img "показать пароль"
- textbox "Повторите пароль*": "!Test123"
- text: Повторите пароль*
- paragraph: ИЛИ
- button "Sfedu Logo Войти через аккаунт @sfedu":
- img "Sfedu Logo"
- text: Войти через аккаунт @sfedu
- button "Зарегистрироваться"
- paragraph: Уже есть аккаунт?
- paragraph: Авторизируйтесь
- paragraph: Всероссийская научная конференция "Системный синтез и прикладная синергетика"
- paragraph
- paragraph: "Напишите нам:"
- paragraph:
- text: "e-mail:"
- link "ssas@ictis.sfedu.ru":
- /url: mailto:ssas@ictis.sfedu.ru
- text: Сайт разработан Центром исследований и разработки ИКТИБ
- link "Ознакомиться с руководством пользователя":
- /url: /static/media/user_manual.f1df94e2c5143919fb0d.pdf
```
# Test source
```ts
1 | import { test, expect } from '@playwright/test';
2 | import { RegisterPage } from '../../../page-objects/RegisterPage';
3 |
4 | test.describe('Позитивные сценарии регистрации', () => {
5 |
6 | test('Успешная регистрация нового пользователя', async ({ page }) => {
7 | const registerPage = new RegisterPage(page);
8 | await registerPage.goto();
9 |
10 | // Генерация уникального email и телефона
11 | const randomSuffix = Math.floor(Math.random() * 100000);
12 | const uniqueEmail = `autotest${randomSuffix}@example.com`;
13 | const uniquePhone = `+7987${randomSuffix.toString().padStart(6, '0')}`;
14 |
15 | await registerPage.register({
16 | name: 'Иван',
17 | surname: 'Тестов',
18 | patronymic: 'Александрович',
19 | academicTitle: 'Доцент',
20 | degree: 'Кандидат наук',
21 | position: 'Преподаватель',
22 | organization: 'ЮФУ',
23 | email: uniqueEmail,
24 | phone: uniquePhone,
25 | password: '!Test123',
26 | confirmPassword: '!Test123'
27 | });
28 |
29 | // Проверяем редирект на страницу подтверждения кода
> 30 | await expect(page).toHaveURL(/\/login\/confirmLogin/);
| ^ Error: Timed out 5000ms waiting for expect(locator).toHaveURL(expected)
31 | await expect(page.locator('text=Подтвердите адрес электронной почты')).toBeVisible();
32 |
33 | });
34 |
35 | });
36 |
```