forked from niyazm524/arch_client_web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
76 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Selector } from 'testcafe'; | ||
|
||
fixture`file-uploader` | ||
.page`https://sadmadsoul.dev/auth`; | ||
|
||
//Тестирование загрузки файлов | ||
test('file-uploader-test', async t => { | ||
await t | ||
.click('#login-input') // клик на форму | ||
.typeText('#login-input', 'vijis67165@threepp.com') //вводим логин | ||
.typeText('#password-input', 'Qwerty12345-') // вводим пароль | ||
.click('#auth-button') // клик на кнопку авторизации | ||
.click('#file-input') // клик на загрузку файла | ||
.setFilesToUpload('#file-input', ['./_uploads_/file.txt']) // выбираем какой файл загрузить | ||
.click(Selector('#write-form div').nth(1).find('input').nth(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Selector } from 'testcafe'; | ||
|
||
fixture`logout-test` | ||
.page`https://sadmadsoul.dev/auth`; | ||
|
||
//Тестирование лог-аута | ||
test('logout-test', async t => { | ||
await t | ||
.click('#login-input') // клик на форму | ||
.typeText('#login-input', 'vijis67165@threepp.com') // вводим логин | ||
.typeText('#password-input', 'Qwerty12345-') // вводим пароль | ||
.click('#auth-button') // клик на кнопку | ||
.click(Selector('button').withText('Выйти')); // клик на кнопку выхода | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Selector } from 'testcafe'; | ||
|
||
fixture`sign-in-test` | ||
.page`https://sadmadsoul.dev/auth`; | ||
|
||
//Тестирование логина | ||
test('sign-in-test', async t => { | ||
await t | ||
.click('#login-input') // клик на инпут логина | ||
.typeText('#login-input', 'vijis67165@threepp.com') // вводим логин | ||
.click('#password-input') // клик на инпут пароля | ||
.typeText('#password-input', 'Qwerty12345-') // ввод пароя | ||
.click('#auth-button') // клик на кнопку авторизации | ||
.click(Selector('button').withText('Выйти')); // клик на кнопку выход | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
fixture`sign-up-test` | ||
.page`https://sadmadsoul.dev/sign_up`; | ||
|
||
// Тестирование регистрации | ||
test('sign-up-test', async t => { | ||
await t | ||
.typeText('#first-name-input', 'aaa') // ввод имени | ||
.typeText('#last-name-input', 'aaa') // ввод фамилии | ||
.click('#login-input') // клик на поле логина | ||
.typeText('#login-input', 'srvu6ig7is@greencafe24.com') // ввод логина | ||
.click('#password-input') // клик на инпут пароля | ||
.typeText('#password-input', 'Qwerty12345-') // ввод пароля | ||
.click('#auth-button\ '); // клик на кнопку авторизации | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Selector } from 'testcafe'; | ||
|
||
fixture`text-upload-test` | ||
.page`https://sadmadsoul.dev/auth`; | ||
|
||
// Тестирование загрузки строки | ||
test('text-upload-test', async t => { | ||
await t | ||
.click('#login-input') // клик на инпут логина | ||
.typeText('#login-input', 'vijis67165@threepp.com') // ввод логина | ||
.click('#password-input') // клик на инпут пароля | ||
.typeText('#password-input', 'Qwerty12345-') // ввод пароля | ||
.click('#auth-button') // клик на кнопку авторизации | ||
.typeText('#text-input', '123') // вводим текст | ||
.click(Selector('#write-form div').nth(1).find('input').nth(1)) // отправляем | ||
.click(Selector('button').withText('Выйти')); // клик на кнопку выйти | ||
}); |