diff --git a/pages/header_page.py b/pages/header_page.py index ae07662271..e86213bf5a 100644 --- a/pages/header_page.py +++ b/pages/header_page.py @@ -78,11 +78,7 @@ def get_list_of_links_unauth(self): @allure.step("Get the list of links on different levels of nesting in the Header for an authorized user") def get_list_of_links_auth(self): - links = self.elements_are_present(self.locators1.HEADER_LINKS_AUTH) - att = [element.get_attribute("href") for element in links] - print(*att, len(att), sep='\n') - return links - # return self.elements_are_present(self.locators1.HEADER_LINKS_AUTH) + return self.elements_are_present(self.locators1.HEADER_LINKS_AUTH) @allure.step("""Get the list of the 'About', 'Telegram', 'Registration', 'Logo' links (direct links) in the Header for an unauthorized user""") @@ -236,7 +232,13 @@ def check_buttons_unauth_visibility(self): @allure.step("Get the list of buttons in the Header for an authorized user") def get_list_of_buttons_auth(self): - return self.elements_are_present(self.locators.HEADER_BUTTONS)[:4] + all_buttons = self.elements_are_present(self.locators.HEADER_BUTTONS) + header_buttons = all_buttons[:3] + header_buttons.append(all_buttons[-1]) + att = [element.get_attribute("type") for element in header_buttons] + print(*att, len(att), sep='\n') + return header_buttons + # return self.elements_are_present(self.locators.HEADER_BUTTONS)[:4] @allure.step("Check buttons are visible are visible for an authorized user") diff --git a/test_data/header_data.py b/test_data/header_data.py index b253d0466f..d5f27dbe31 100644 --- a/test_data/header_data.py +++ b/test_data/header_data.py @@ -13,9 +13,9 @@ class HeaderData: "Используемые ресурсы", "Used Resources", "Регистрация", "Registration") - links_text_auth = ("УПРАЖНЕНИЯ", "Упражнения", "GROUPS", - "СТАТИСТИКА", "Статистика", "STATISTICS", - "ОПИСАНИЕ", "Описание", "ABOUT", + links_text_auth = ("УПРАЖНЕНИЯ", "Упражнения", "GROUPS", "Groups", + "СТАТИСТИКА", "Статистика", "STATISTICS", "Statistics", + "ОПИСАНИЕ", "Описание", "ABOUT", "About", "TELEGRAM", "Telegram", "Пожертвовать", "Donate", "GitHub", diff --git a/tests/header_test.py b/tests/header_test.py index 83e4e4cda8..e3766ee993 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -249,7 +249,7 @@ def test_hpa_01_03_verify_auth_header_structural_elements(self, driver, auto_tes logout_button_visibility = page.check_logout_button_visibility() assert header_links, "Links are absent in the Header" assert header_direct_links, "Direct links are absent in the Header" - # assert header_direct_links_visibility, "Direct links are invisible" + assert header_direct_links_visibility, "Direct links are invisible" assert links_in_more_presence, "Links in the dropdown 'More' are absent in the Header" assert links_in_more_invisibility, "Links in the dropdown 'More' are visible" assert links_in_more_visibility, "Links in the dropdown 'More' are invisible" @@ -258,7 +258,7 @@ def test_hpa_01_03_verify_auth_header_structural_elements(self, driver, auto_tes assert profile_link_presence, "The 'Profile' link is absent in the Header" assert profile_link_visibility, "The 'Profile' link is invisible" assert buttons_presence, "Buttons are absent in the Header" - # assert buttons_visibility, "Buttons are invisible" + assert buttons_visibility, "Buttons are invisible" assert ru_en_buttons_presence, "The 'ru' and 'en' buttons are absent in the Header" assert ru_en_buttons_visibility, "The 'ru' and 'en' buttons are invisible" assert more_button_presence, "The 'More' button is absent in the Header"