From 0ac05ffbe35fe709fcf72d512d19dd94431e4efc Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Sun, 28 Jun 2026 17:42:33 +0300 Subject: [PATCH 1/2] add test_hpa_03.02.02_verify_auth_Groups_link_navigation update header_test.py, header_page.py, header_page_locators.py, header_data.py #268 --- locators/header_page_locators.py | 1 + pages/header_page.py | 8 ++++++++ test_data/header_data.py | 3 ++- tests/header_test.py | 11 +++++++++-- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/locators/header_page_locators.py b/locators/header_page_locators.py index a3b3ed91b1..4ec11c721f 100644 --- a/locators/header_page_locators.py +++ b/locators/header_page_locators.py @@ -53,6 +53,7 @@ class HeaderAuthorizedLocators: LINK_DONATE_AUTH = (By.XPATH, "(//nav//a)[10]") LINK_GITHUB_AUTH = (By.XPATH, "(//nav//a)[11]") LINK_GROUPS_AUTH = (By.XPATH, "(//nav//a)[2]") + LINK_GROUPS_AUTH2 = (By.XPATH, "(//nav//a)[6]") LINK_STATISTICS_AUTH = (By.XPATH, "(//nav//a)[3]") LINK_PROFILE = (By.XPATH, "(//nav//a)[12]") LINK_TELEGRAM_AUTH = (By.XPATH, "(//nav//a)[5]") diff --git a/pages/header_page.py b/pages/header_page.py index 0259f0fbf6..e1f47d5813 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -417,6 +417,14 @@ def click_on_direct_internal_links_in_header_auth(self): return opened_pages + @allure.step("Click on the 'Groups' link #2 for authorized user") + def click_on_Groups_link_auth2(self): + self.click_more_button() + self.element_is_present_and_clickable(self.locators1.LINK_GROUPS_AUTH2).click() + current_tab_url = self.get_current_tab_url() + print(current_tab_url) + return current_tab_url + @allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs for authorized user""") def click_on_auth_external_links_in_header(self): diff --git a/test_data/header_data.py b/test_data/header_data.py index 158e7c33ea..6afcc5e0a0 100644 --- a/test_data/header_data.py +++ b/test_data/header_data.py @@ -53,8 +53,9 @@ class HeaderData: s11 = "https://github.com/Brain-up/brn" # dropdown s12 = "https://opencollective.com/brainup" # dropdown s13 = "https://t.me/BrainUpUsers" #, # dropdown + s14 = f"{s}groups" - set_auth = (s, s0, s1, s2, s3, s4, s5, s6, s7, s9, s10, s11, s12, s13) + set_auth = (s, s0, s1, s2, s3, s4, s5, s6, s7, s9, s10, s11, s12, s13, s14) set_unauth = (s, s1, s2, s3, s8, s9, s10, s11, s12, s13) link_status_codes = (200,) diff --git a/tests/header_test.py b/tests/header_test.py index 3d532abb87..da969a9939 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -331,7 +331,7 @@ def test_hpa_03_01_verify_auth_header_links(self, driver, auto_test_user_authori assert all(element in hPD.link_status_codes for element in link_status_codes), \ "Status codes of links mismatch valid values" - @pytest.mark.xfail + # @pytest.mark.xfail @allure.title("""Verify if internal links in the Header for an authorized user lead to correct pages after click""") def test_hpa_03_02_verify_auth_internal_links_lead_to_proper_pages(self, driver, auto_test_user_authorized): @@ -344,12 +344,19 @@ def test_hpa_03_02_verify_auth_internal_links_lead_to_proper_pages(self, driver, @allure.title("""Verify if direct internal links in the Header for an authorized user lead to correct pages after click""") - def test_hpa_03_02_1_verify_auth_direct_internal_links_navigation(self, driver, auto_test_user_authorized): + def test_hpa_03_02_01_verify_auth_direct_internal_links_navigation(self, driver, auto_test_user_authorized): page = hPage(driver) opened_pages = page.click_on_direct_internal_links_in_header_auth() assert all(element in hPD.set_auth for element in opened_pages), \ "Some of direct internal links lead to incorrect pages after clicking" + @allure.title("""Verify if internal 'Group' link #2 in the Header for an authorized user + leads to the correct page after click""") + def test_hpa_03_02_02_verify_auth_groups_link2_navigation(self, driver, auto_test_user_authorized): + page = hPage(driver) + opened_page2 = page.click_on_Groups_link_auth2() + assert opened_page2 in hPD.set_auth, "The Group link #2 leads to an incorrect page after clicking" + @pytest.mark.skip("Unstable test environment") @allure.title("""Verify if external links in the Header for an authorized user lead to correct pages after click""") From baf842289f93c560935b7c80c16ff55d2778cce4 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Sun, 28 Jun 2026 17:44:32 +0300 Subject: [PATCH 2/2] add test_hpa_03.02.02_verify_auth_Groups_link_navigation update header_test.py, header_page.py, header_page_locators.py, header_data.py #268 --- tests/header_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/header_test.py b/tests/header_test.py index da969a9939..27818a1443 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -331,7 +331,7 @@ def test_hpa_03_01_verify_auth_header_links(self, driver, auto_test_user_authori assert all(element in hPD.link_status_codes for element in link_status_codes), \ "Status codes of links mismatch valid values" - # @pytest.mark.xfail + @pytest.mark.xfail @allure.title("""Verify if internal links in the Header for an authorized user lead to correct pages after click""") def test_hpa_03_02_verify_auth_internal_links_lead_to_proper_pages(self, driver, auto_test_user_authorized):