From fb6232dd7d7741295ead597fc050fbee6c637316 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Sun, 28 Jun 2026 20:06:19 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=A2=D1=80=D0=B8=D0=B3=D0=B3=D0=B5=D1=80?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA?= =?UTF-8?q?=D0=B0=20CI/CD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From c4aca531e6ed4e682905321aa4d2f3d53d23f84c Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Fri, 3 Jul 2026 12:36:43 +0300 Subject: [PATCH 2/2] add test_hpa_03.02.03_verify_auth_Statistics_link_navigation 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 | 23 +++++++++++++++-------- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/locators/header_page_locators.py b/locators/header_page_locators.py index 4ec11c721f..b4b6dca3a7 100644 --- a/locators/header_page_locators.py +++ b/locators/header_page_locators.py @@ -55,6 +55,7 @@ class HeaderAuthorizedLocators: 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_STATISTICS_AUTH2 = (By.XPATH, "(//nav//a)[7]") LINK_PROFILE = (By.XPATH, "(//nav//a)[12]") LINK_TELEGRAM_AUTH = (By.XPATH, "(//nav//a)[5]") LINK_TELEGRAM_AUTH2 = (By.XPATH, "(//nav//a)[9]") diff --git a/pages/header_page.py b/pages/header_page.py index e1f47d5813..4f7caaf453 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -341,7 +341,7 @@ def get_links_href_unauth(self): @allure.step("Get attribute 'href' of links in the Header for an authorized user") def get_links_href_auth(self): att = [element.get_attribute("href") for element in self.get_list_of_links_auth()] - # print(*att, len(att), sep='\n') + print(*att, len(att), sep='\n') return att # return [element.get_attribute("href") for element in self.get_list_of_links_auth()] @@ -422,6 +422,14 @@ 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 the 'Statistics' link #2 for authorized user") + def click_on_Statistics_link_auth2(self): + self.click_more_button() + self.element_is_present_and_clickable(self.locators1.LINK_STATISTICS_AUTH2).click() + current_tab_url = self.get_current_tab_url() print(current_tab_url) return current_tab_url diff --git a/tests/header_test.py b/tests/header_test.py index 27818a1443..e73d9d1c64 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -331,9 +331,9 @@ 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 - @allure.title("""Verify if internal links in the Header for an authorized user - lead to correct pages after click""") + @pytest.mark.skip + @allure.title("""test_hpa.03.02 Verify if internal links in the Header for an authorized user + lead to correct pages after clicking""") def test_hpa_03_02_verify_auth_internal_links_lead_to_proper_pages(self, driver, auto_test_user_authorized): page = hPage(driver) internal_links_in_more = page.get_list_of_internal_links_in_more() @@ -342,20 +342,27 @@ def test_hpa_03_02_verify_auth_internal_links_lead_to_proper_pages(self, driver, assert all(element in hPD.set_auth for element in opened_pages), \ "Some of internal links lead to incorrect pages after clicking" - @allure.title("""Verify if direct internal links in the Header for an authorized user - lead to correct pages after click""") + @allure.title("""test_hpa.03.02.01 Verify if direct internal links in the Header for an authorized user + lead to correct pages after clicking""") 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""") + @allure.title("""test_hpa.03.02.02 Verify if internal 'Groups' link #2 in the Header for an authorized user + leads to the correct page after clicking""") 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" + assert opened_page2 in hPD.set_auth, "The Groups link #2 leads to an incorrect page after clicking" + + @allure.title("""test_hpa.03.02.03 Verify if internal 'Statistics' link #2 in the Header + for an authorized user leads to the correct page after clicking""") + def test_hpa_03_02_03_verify_auth_statistics_link2_navigation(self, driver, auto_test_user_authorized): + page = hPage(driver) + opened_page2 = page.click_on_Statistics_link_auth2() + assert opened_page2 in hPD.set_auth, "The Statistics 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