From 588635e8a6d8a016e35938f8499b4b3322b832f0 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Wed, 23 Sep 2026 23:04:27 +0300 Subject: [PATCH] ref test_hpu_03.01, test_hpa_03.01 Verify Header's links unauth and auth update header_test.py, header_page.py #268 --- pages/header_page.py | 8 ++++++-- tests/header_test.py | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pages/header_page.py b/pages/header_page.py index a9084e2d11..7c84c2686a 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -372,11 +372,15 @@ def get_links_href_auth(self): @allure.step("Get status codes of links in the Header for an unauthorized user") def get_links_status_codes_unauth(self): - return [requests.head(link_href).status_code for link_href in self.get_links_href_unauth()] + status_codes = [requests.head(link_href).status_code for link_href in self.get_links_href_unauth()] + print(status_codes, len(status_codes), sep='\n') + return status_codes @allure.step("Get status codes of links in the Header for an authorized user") def get_links_status_codes_auth(self): - return [requests.head(link_href).status_code for link_href in self.get_links_href_auth()] + status_codes = [requests.head(link_href).status_code for link_href in self.get_links_href_auth()] + print(status_codes, len(status_codes), sep='\n') + return status_codes # Checks of links navigation @allure.step("""Click on internal links in the Header and thereby open corresponding web pages in the same tab diff --git a/tests/header_test.py b/tests/header_test.py index ca36b98c87..f7d04ee237 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -101,7 +101,8 @@ def test_hpu_02_01_verify_unauth_text_in_links_and_buttons(self, driver, main_pa "Text in 'ru-en' buttons mismatches valid values" class TestUnHdPageLinks: - @allure.title("Verify clickability, href, status code of links in the Header for an unauthorized user") + @allure.title("""test_hpa_03.01 Verify clickability, href, status code of links in the Header + for an unauthorized user""") def test_hpu_03_01_verify_unauth_header_links(self, driver, main_page_open): page = hPage(driver) links_clickability = page.check_links_clickability_unauth() @@ -322,7 +323,8 @@ def test_hpa_02_03_verify_auth_user_name(self, driver, auto_test_user_authorized assert user_name_visibility, "The user name is invisible" class TestAuHdPageLinks: - @allure.title("Verify clickability, href, status code of links in the Header for an authorized user") + @allure.title("""test_hpa_03.01 Verify clickability, href, status code of links in the Header + for an authorized user""") def test_hpa_03_01_verify_auth_header_links(self, driver, auto_test_user_authorized): page = hPage(driver) links_clickability = page.check_links_clickability_auth()