From f79b571b165a29545da36d9ce6427bb02557faff Mon Sep 17 00:00:00 2001 From: KatyaMy <20FamGam20@gmail.com> Date: Tue, 21 Jan 2025 16:38:12 -0500 Subject: [PATCH 1/2] RF AT_12.002.002|[Teacher] Verify the announcement is not created when the empty form is submitted --- Data/data.py | 6 ++++++ obsolete_tests/register.py | 13 +++++++++++++ pytest.ini | 1 + tests/test_announcement.py | 17 +++++++++++------ tests/test_register.py | 21 ++++----------------- 5 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 obsolete_tests/register.py diff --git a/Data/data.py b/Data/data.py index 1607f451..e26787e4 100644 --- a/Data/data.py +++ b/Data/data.py @@ -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" diff --git a/obsolete_tests/register.py b/obsolete_tests/register.py new file mode 100644 index 00000000..b7fd4025 --- /dev/null +++ b/obsolete_tests/register.py @@ -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() diff --git a/pytest.ini b/pytest.ini index a3e4fa95..66e12dce 100644 --- a/pytest.ini +++ b/pytest.ini @@ -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 diff --git a/tests/test_announcement.py b/tests/test_announcement.py index 9fa7dc4b..38e15cb3 100644 --- a/tests/test_announcement.py +++ b/tests/test_announcement.py @@ -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( + "AT_12.002.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() @@ -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() diff --git a/tests/test_register.py b/tests/test_register.py index 1adaf926..6fdbefce 100644 --- a/tests/test_register.py +++ b/tests/test_register.py @@ -8,17 +8,16 @@ 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() @@ -26,7 +25,7 @@ def test_register_as_student(header, register): 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 ): @@ -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 ): @@ -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() From 930225ac12b6283a1c837e4d0c0226680ed5068e Mon Sep 17 00:00:00 2001 From: KatyaMy <20FamGam20@gmail.com> Date: Tue, 21 Jan 2025 16:52:17 -0500 Subject: [PATCH 2/2] RF AT_12.002.002|[Teacher] Verify the announcement is not created when the empty form is submitted --- tests/test_announcement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_announcement.py b/tests/test_announcement.py index 38e15cb3..05c27402 100644 --- a/tests/test_announcement.py +++ b/tests/test_announcement.py @@ -17,7 +17,7 @@ def test_create_announcement(header, announcement, login): @allure.label( - "AT_12.002.002|[Teacher] Verify the announcement is not created when the empty form is submitted" + "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