Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
from playwright.sync_api import Page

fake = Faker()

valid_password = "Potter1$"
valid_login = "Garry"

invalid_login = "q-"
invalid_password = "p==="

# with announcement
EMAIL_TUTOR_KM = "tutor_testing@bk.ru"
PASSWORD_TUTOR_KM = "I165TVAzghk8"

# without announcement
EMAIL_TUTOR_WA_KM = "tutor_test_misliplav@mail.ru"
PASSWORD_TUTOR_WA_KM = "iZ52toubKacm"

EMAIL_STUDENT_KM = "student-test-misliplav@mail.ru"
PASSWORD_STUDENT_KM = "JXvNebAMsWb7"

Expand Down
13 changes: 13 additions & 0 deletions obsolete_tests/register.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pytest


@pytest.mark.skip(reason="Функциональность изменена, тест устарел.")
def test_check_placeholders_on_the_register_page(header, register):
header.visit()
header.click_registration_button()
register.check_username_placeholder_visibility()
register.check_username_placeholder_text()
register.check_password1_placeholder_visibility()
register.check_password1_placeholder_text()
register.check_password2_placeholder_visibility()
register.check_password2_placeholder_text()
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[pytest]

addopts = -s -vv -m "not slow" --alluredir=allure-results --video on --screenshot on
--ignore=obsolete_tests

#addopts = -s -vv -m "not slow" --alluredir=allure-results --video on --screenshot on --headed --slowmo=3000
#for headed UI
Expand Down
17 changes: 11 additions & 6 deletions tests/test_announcement.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
import allure
import pytest
from Data.data import EMAIL_TUTOR_KM, PASSWORD_TUTOR_KM, EMAIL_TUTOR_WA_KM, PASSWORD_TUTOR_WA_KM


# TC_12.002.001| [Teacher] Create announcement > Create teacher announcement.
# Verify the announcement is created after filling in all form fields with valid data#163
@pytest.mark.skip(reason="Тест временно отключен после обновления 09.01.2025")
@pytest.mark.skip(
reason="Тест был признан неактуальным из-за обновления процесса регистрации, внедренного 09.01.2025."
)
def test_create_announcement(header, announcement, login):
header.visit()
login.full_login("zayatest55@gmail.com", "RM7tAgSYSh7X")
login.full_login(EMAIL_TUTOR_KM, PASSWORD_TUTOR_KM)
header.click_create_announcement_btn()
announcement.create_announcement()
announcement.verify_announcements_page_endpoint()


# AT_12.002.002 | [Teacher] Create announcement > Create teacher announcement >
# Verify the announcement is not created when the empty form is submitted
@allure.label(
"TC_12.003.002|[Teacher] Verify the announcement is not created when the empty form is submitted"
)
def test_teacher_announcement_blank_form_same_endpoint(
header, login, create_announcement_page, announcement
):
header.visit()
login.full_login("zpak7760@gmail.com", "q4fLncSv9Lgx")
login.full_login(EMAIL_TUTOR_WA_KM, PASSWORD_TUTOR_WA_KM)
header.click_create_announcement_button()
create_announcement_page.click_finalize_announcement_button()
announcement.verify_required_fields_are_not_filled()
Expand All @@ -45,7 +50,7 @@ def test_teacher_announcement_blank_form(
def test_teacher_hiding_announcement(header, login, announcement):
header.visit()
header.click_login_button()
login.full_login("teacher-test@gmail.com", "Auah7bD2hS5Si7H")
login.full_login(EMAIL_TUTOR_KM, PASSWORD_TUTOR_KM)
announcement.click_my_announcement_button()
announcement.click_make_announcement_visible()
announcement.check_button_text_visible()
Expand Down
21 changes: 4 additions & 17 deletions tests/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,24 @@
text = "Вы успешно зарегистрировались, а так же получаете бесплатный премиум на 3 дня!"


@pytest.mark.skip(reason="Тест временно отключен после обновления 09.01.2025")
@pytest.mark.skip(reason="Функциональность изменена, тест устарел. 09.01.2025")
def test_register_as_tutor(header, register):
header.visit()
header.click_registration_button()
register.header_should_contain_text("Регистрация")
register.registration_new_user("tutor")
# header.create_listing_button_should_be_visible()


# @pytest.mark.slow
@pytest.mark.skip(reason="Тест временно отключен после обновления 09.01.2025")
@pytest.mark.skip(reason="Функциональность изменена, тест устарел. 09.01.2025")
def test_register_as_student(header, register):
header.visit()
header.click_registration_button()
register.header_should_contain_text("Регистрация")
register.registration_new_user("student")


@pytest.mark.skip(reason="Тест временно отключен после обновления 09.01.2025")
@pytest.mark.skip(reason="Функциональность изменена, тест устарел. 09.01.2025")
def test_register_as_student_verify_success_message_text(
homepage, register, find_tutor
):
Expand All @@ -52,7 +51,7 @@ def test_become_a_teacher_from_student_page(
register.register_page_contains_register_btn()


@pytest.mark.skip(reason="Тест временно отключен после обновления 09.01.2025")
@pytest.mark.skip(reason="Функциональность изменена, тест устарел. 09.01.2025")
def test_verify_successful_message_after_register_as_tutor(
homepage, register, find_tutor
):
Expand All @@ -62,15 +61,3 @@ def test_verify_successful_message_after_register_as_tutor(
register.header_should_contain_text("Регистрация")
register.registration_new_user("tutor")
find_tutor.check_message_of_registration(text)


@pytest.mark.skip(reason="Тест временно отключен после обновления 09.01.2025")
def test_check_placeholders_on_the_register_page(header, register):
header.visit()
header.click_registration_button()
register.check_username_placeholder_visibility()
register.check_username_placeholder_text()
register.check_password1_placeholder_visibility()
register.check_password1_placeholder_text()
register.check_password2_placeholder_visibility()
register.check_password2_placeholder_text()
Loading