From 8eb557107cb5ef6949661b3f7c120607f6f47194 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Fri, 14 Aug 2026 14:20:04 +0300 Subject: [PATCH] add test_hpa_03.03.06 Verify Contributors link in the Header's dropdown for an authorized user update header_test.py, header_page.py, header_page_locators.py #268 --- locators/header_page_locators.py | 1 + pages/header_page.py | 10 ++++++++++ tests/header_test.py | 8 +++++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/locators/header_page_locators.py b/locators/header_page_locators.py index 0346275fcf..e42586814b 100644 --- a/locators/header_page_locators.py +++ b/locators/header_page_locators.py @@ -57,6 +57,7 @@ class HeaderAuthorizedLocators: 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_CONTRIBUTORS_AUTH = (By.XPATH, "(//nav//a)[14]") LINK_SPECIALISTS_AUTH = (By.XPATH, "(//nav//a)[13]") LINK_STATISTICS_AUTH1 = (By.XPATH, "(//nav//a)[3]") LINK_STATISTICS_AUTH2 = (By.XPATH, "(//nav//a)[7]") diff --git a/pages/header_page.py b/pages/header_page.py index 034f313fa3..c926a7f33b 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -512,6 +512,16 @@ def click_on_Specialists_link_auth(self): print(current_url) return current_url + @allure.step("Click on the 'Contributors' link for AUTHORIZED user -- ACTUAL") + def click_on_Contributors_link_auth(self): + current_url = self.get_current_tab_url() + self.click_more_button() + self.element_is_present_and_clickable(self.locators1.LINK_CONTRIBUTORS_AUTH).click() + Wait(self.driver, 10).until(EC.url_changes(current_url)) + current_url = self.get_current_tab_url() + print(current_url) + return current_url + @allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs for AUTHORIZED user -- unusable till changing UI""") def click_on_auth_external_links_in_header(self): diff --git a/tests/header_test.py b/tests/header_test.py index f963550681..314b9b5ef8 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -418,10 +418,12 @@ def test_hpa_03_03_05_verify_auth_specialists_link_navigation(self, driver, auto opened_page = page.click_on_Specialists_link_auth() assert opened_page in hPD.set_auth, "The Specialists link leads to an incorrect page after clicking" - @allure.title("""test_hpa.03.03.06 Verify if internal Our Team link in the Header's dropdown + @allure.title("""test_hpa.03.03.06 Verify if internal Contributors link in the Header's dropdown for an authorized user leads to the correct page after clicking""") - def test_hpa_03_03_06_verify_auth_our_team_link_navigation(self, driver, auto_test_user_authorized): - pass + def test_hpa_03_03_06_verify_auth_contributors_link_navigation(self, driver, auto_test_user_authorized): + page = hPage(driver) + opened_page = page.click_on_Contributors_link_auth() + assert opened_page in hPD.set_auth, "The Contributors link leads to an incorrect page after clicking" @allure.title("""test_hpa.03.03.07 Verify if internal Used Resources link in the Header's dropdown for an authorized user leads to the correct page after clicking""")