-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from ola-9/login
Login bug
- Loading branch information
Showing
7 changed files
with
31 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,10 @@ | |
"email": "[email protected]", | ||
"password": "NotFound404" | ||
}, | ||
"loginUpperCase" : { | ||
"email": "[email protected]", | ||
"password": "Deleted410" | ||
}, | ||
"profile": { | ||
"currentUser": { | ||
"id": 1, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
/* TODO: Тесты каждый раз создают пользователя в приложении, | ||
все должно происходит в тестовом окружении */ | ||
test('work', async ({ page }) => { | ||
await page.goto('http://localhost:5001'); | ||
const randomNum = Math.round(Math.random() * 1000 + Math.random() * 100); | ||
await page.goto('http://localhost:3000'); | ||
await page.getByRole('button', { name: 'Регистрация' }).click(); | ||
await page.getByLabel('Электронная почта').fill('[email protected]'); | ||
await page.getByLabel('Логин').fill('test'); | ||
await page.getByLabel('Пароль', { exact: true }).fill('password'); | ||
await page.getByLabel('Подтвердить пароль').fill('password'); | ||
await page.getByLabel('Электронная почта').fill(`test${randomNum}@test.test`); | ||
await page.getByLabel('Логин').fill(`test${randomNum}`); | ||
await page.getByLabel('Пароль', { exact: true }).fill('12345678'); | ||
await page.getByLabel('Подтвердить пароль').fill('12345678'); | ||
await page.getByRole('button', { name: 'Зарегистрироваться' }).click(); | ||
|
||
await page.getByRole('button', { name: 'Новый сниппет' }).click(); | ||
await page.getByRole('button', { name: 'Сохранить' }).click(); | ||
|
||
await page.getByRole('textbox', { name: 'Editor content;Press Alt+F1 for Accessibility Options.' }).fill('console.log(\'hello\');'); | ||
await page.getByRole('textbox', { name: 'Editor content;Press Alt+F1 for Accessibility Options.' }).fill('// Write your code in JS\nconsole.log(\'Hello\');'); | ||
await page.getByRole('button', { name: 'Запустить' }).click(); | ||
|
||
await expect(page.locator(':text("hello")')).toBeVisible(); | ||
|