From c6e8d5fdea369233c188e70f63a37d1dc414a503 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Fri, 19 Jun 2026 15:31:38 +0300 Subject: [PATCH] add test_hpu_03.03.02_verify_unauth_header_Donate_link ref test_hpu_03.03.03_verify_unauth_header_GitHub_link update header_test.py, header_page.py #268 --- pages/header_page.py | 9 +++++++++ tests/header_test.py | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pages/header_page.py b/pages/header_page.py index 292c0966fa..e8e6c67e9d 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -452,6 +452,15 @@ def click_on_Telegram_link(self): print(current_tab_url) return current_tab_url + @allure.step("Click on the 'Donate' link for unauthorized user") + def click_on_Donate_link(self): + self.click_more_button() + self.element_is_present_and_clickable(self.locators.LINK_DONATE).click() + self.driver.switch_to.window(self.driver.window_handles[1]) + current_tab_url = self.get_current_tab_url() + print(current_tab_url) + return current_tab_url + @allure.step("Click on the 'GitHub' link for unauthorized user") def click_on_GitHub_link(self): self.click_more_button() diff --git a/tests/header_test.py b/tests/header_test.py index 84f91ea9bd..44330db691 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -147,9 +147,16 @@ def test_hpu_03_03_01_verify_unauth_Telegram_link_navigation(self, driver, main_ opened_page = page.click_on_Telegram_link() assert opened_page in hPD.set_unauth, "The Telegram link leads to an incorrect page after clicking" + @allure.title("""Verify if external Donate link in the Header for an unauthorized user + leads to a correct page after click""") + def test_hpu_03_03_02_verify_unauth_Donate_link_navigation(self, driver, main_page_open): + page = hPage(driver) + opened_page = page.click_on_Donate_link() + assert opened_page in hPD.set_unauth, "The Donate link leads to an incorrect page after clicking" + @allure.title("""Verify if external GitHub link in the Header for an unauthorized user leads to a correct page after click""") - def test_hpu_03_03_02_verify_unauth_GitHub_link_navigation(self, driver, main_page_open): + def test_hpu_03_03_03_verify_unauth_GitHub_link_navigation(self, driver, main_page_open): page = hPage(driver) opened_page = page.click_on_GitHub_link() assert opened_page in hPD.set_unauth, "The GitHub link leads to an incorrect page after clicking"