From 647deee3d42467f44218e1b95c8ef90b4f809bf3 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Fri, 12 Jun 2026 15:29:14 +0300 Subject: [PATCH 1/3] ref test_hpu_03_03_verify_unauth_header_links update header_page.py, header_test.py #268 --- pages/header_page.py | 22 +++++++++++++++++++++- tests/header_test.py | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/pages/header_page.py b/pages/header_page.py index 3c1a1b3f36..1dee5fdfe7 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -416,7 +416,7 @@ def click_on_direct_internal_links_in_header_auth(self): @allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs for every user""") - def click_on_external_links_in_header(self): + def click_on_auth_external_links_in_header(self): opened_pages = [] # Click on the 'Telegram' link self.element_is_present_and_clickable(self.locators.LINK_TELEGRAM).click() @@ -434,6 +434,26 @@ def click_on_external_links_in_header(self): print(*opened_pages) return opened_pages + @allure.step("Click on the 'More' button for every user") + def click_more_button(self): + return self.element_is_present_and_clickable(self.locators.MORE_BUTTON).click() + + @allure.step("Click on the 'Telegram' link for unauthorizec user") + def click_on_Telegram_link(self): + self.element_is_present_and_clickable(self.locators.LINK_TELEGRAM).click() + self.driver.switch_to.window(self.driver.window_handles[1]) + return self.get_current_tab_url() + + @allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs + for every user""") + def click_on_unauth_external_links_in_header(self): + opened_pages = [] + # Click on the 'Telegram' link + opened_pages.append(self.click_on_Telegram_link()) # to be continued + + print(*opened_pages) + return opened_pages + @allure.step("Click on the 'Logo' link for every user") def click_on_logo_link(self): diff --git a/tests/header_test.py b/tests/header_test.py index 7468de4473..63002ce559 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -134,7 +134,7 @@ def test_hpu_03_02_verify_unauth_internal_links_lead_to_correct_pages(self, driv def test_hpu_03_03_verify_unauth_external_links_lead_to_correct_pages(self, driver, main_page_open): page = hPage(driver) external_links_in_more = page.get_list_of_external_links_in_more() - opened_pages = page.click_on_external_links_in_header() + opened_pages = page.click_on_unauth_external_links_in_header() assert external_links_in_more, "External links are not collected in the list" assert all(element in hPD.set_unauth for element in opened_pages), \ "Some of external links lead to incorrect pages after clicking" @@ -333,7 +333,7 @@ def test_hpa_03_02_1_verify_auth_direct_internal_links_navigation(self, driver, def test_hpa_03_03_verify_auth_external_links_lead_to_proper_pages(self, driver, auto_test_user_authorized): page = hPage(driver) external_links_in_more = page.get_list_of_external_links_in_more_auth() - opened_pages = page.click_on_external_links_in_header() + opened_pages = page.click_on_auth_external_links_in_header() assert external_links_in_more, "External links are not collected in the list" assert all(element in hPD.set_auth for element in opened_pages), \ "Some of external links lead to incorrect pages after clicking" From df09eb061b75379a3cc7ee789ebaeb71cf789b05 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Fri, 12 Jun 2026 15:31:34 +0300 Subject: [PATCH 2/3] ref test_hpu_03_03_verify_unauth_header_links update header_test.py #268 --- pages/header_page.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/header_page.py b/pages/header_page.py index 1dee5fdfe7..a0743c05a6 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -438,14 +438,14 @@ def click_on_auth_external_links_in_header(self): def click_more_button(self): return self.element_is_present_and_clickable(self.locators.MORE_BUTTON).click() - @allure.step("Click on the 'Telegram' link for unauthorizec user") + @allure.step("Click on the 'Telegram' link for unauthorized user") def click_on_Telegram_link(self): self.element_is_present_and_clickable(self.locators.LINK_TELEGRAM).click() self.driver.switch_to.window(self.driver.window_handles[1]) return self.get_current_tab_url() @allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs - for every user""") + for unauthorized user""") def click_on_unauth_external_links_in_header(self): opened_pages = [] # Click on the 'Telegram' link From 846c6f1990bc7e5ba73ad3adb8a5d2efdb2397ba Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Fri, 12 Jun 2026 15:33:33 +0300 Subject: [PATCH 3/3] ref test_hpu_03_03_verify_unauth_header_links update header_page.py #268 --- pages/header_page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/header_page.py b/pages/header_page.py index a0743c05a6..7fdf47a42e 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -415,7 +415,7 @@ def click_on_direct_internal_links_in_header_auth(self): return opened_pages @allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs - for every user""") + for authorized user""") def click_on_auth_external_links_in_header(self): opened_pages = [] # Click on the 'Telegram' link