Files
playwright-tests-ssas/allure-results/a5bf16cc-5814-4c51-b07f-3a97c47cf0bf-attachment.md

66 lines
4.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: browserContext._wrapApiCall: Test ended.
Browser logs:
<launching> /Users/vladsmykov/Library/Caches/ms-playwright/chromium-1169/chrome-mac/Chromium.app/Contents/MacOS/Chromium --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DeferRendererTasksAfterInput,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-use-zoom-for-dsf=false --no-sandbox --user-data-dir=/var/folders/lg/h2gsyjw52lg9sl4rjvlxq91w0000gn/T/playwright_chromiumdev_profile-TxrrIk --remote-debugging-pipe --no-startup-window
<launched> pid=53322
[pid=53322][err] 2025-06-17 19:07:46.501 Chromium[53322:11903656] +[IMKClient subclass]: chose IMKClient_Modern
[pid=53322][err] 2025-06-17 19:08:28.659 Chromium[53322:11903656] +[IMKInputSession subclass]: chose IMKInputSession_Modern
[pid=53322] <gracefully close start>
```
# 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 }) => {
| ^ Error: browserContext._wrapApiCall: Test ended.
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 | // Заполнение формы
16 | await registerPage.register({
17 | name: 'Иван',
18 | surname: 'Тестов',
19 | patronymic: 'Александрович',
20 | academicTitle: 'Доцент',
21 | degree: 'Кандидат наук',
22 | position: 'Преподаватель',
23 | organization: 'ЮФУ',
24 | email: uniqueEmail,
25 | phone: uniquePhone,
26 | password: '!Test123456', // более надёжный
27 | confirmPassword: '!Test123456'
28 | });
29 |
30 | // --- ВСТАВКА ДЛЯ ОТЛАДКИ ---
31 | const errorModal = page.locator('p.ErrorModal_title__heTm5');
32 | if (await errorModal.isVisible()) {
33 | const msg = await errorModal.textContent();
34 | throw new Error(`Регистрация не удалась. Модалка: "${msg}"`);
35 | }
36 |
37 | // Ждём, что будет редирект
38 | await expect(page).toHaveURL(/\/login\/confirmLogin/);
39 | await expect(page.locator('text=Подтвердите адрес электронной почты')).toBeVisible();
40 | });
41 |
42 | });
43 |
```