From 4757945acbee5e448f3d13639265bad94fba5397 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Fri, 25 Sep 2026 23:00:10 +0300 Subject: [PATCH] add test_hpa_03.03.00 Verify list of internal links in the Header's dropdown update header_test.py, header_page.py #268 --- pages/header_page.py | 11 +++++++++++ tests/header_test.py | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pages/header_page.py b/pages/header_page.py index 7c84c2686a..01f1ba283e 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -131,6 +131,17 @@ def get_dropdown_links_auth_list(self): # print(*att1, len(att1), sep='\n') return dropdown_auth_links + @allure.step("""Get the list of the 'Groups', 'Statistics', 'About', 'Contacts', 'Specialists', 'Contributors', + 'Used Resources', 'Audiometry' links (internal links) in the 'More' dropdown in the Header for AUTHORIZED user + -- ACTUAL""") + def get_dropdown_internal_links_auth_list(self): + links1 = self.get_dropdown_links_auth_list()[:3] + links2 = self.get_dropdown_links_auth_list()[6:] + links = links1 + links2 + att = [element.get_attribute("href") for element in links] + print(*att, len(att), sep='\n') + return links + @allure.step("""Get the list of the 'Telegram', 'Donate', 'GitHub' links (external links) in the 'More' dropdown in the Header for AUTHORIZED user -- ACTUAL""") def get_dropdown_external_links_auth_list(self): diff --git a/tests/header_test.py b/tests/header_test.py index f7d04ee237..8b5a7c2bc2 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -383,7 +383,9 @@ def test_hpa_03_03_verify_auth_dropdown_links_list(self, driver, auto_test_user_ @allure.title("""test_hpa.03.03.00 Verify the list of internal links in the Header's dropdown for an authorized user""") def test_hpa_03_03_00_verify_auth_dropdown_internal_links_list(self, driver, auto_test_user_authorized): - pass + page = hPage(driver) + internal_links_in_dropdown = page.get_dropdown_internal_links_auth_list() + assert internal_links_in_dropdown, "Internal links are not collected in the list" @allure.title("""test_hpa.03.03.01 Verify if internal Groups link #2 in the Header's dropdown for an authorized user leads to the correct page after clicking""")