Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def get_text_in_direct_links_unauth(self):
for an authorized user""")
def get_text_in_direct_links_auth(self):
direct_links_text = [link.text for link in self.get_list_of_direct_links_auth()[:4]]
# print(*direct_links_text, len(direct_links_text), sep='\n')
print(*direct_links_text, len(direct_links_text), sep='\n')
return direct_links_text
# return [link.text for link in self.get_list_of_direct_links_auth()[:5]]

Expand All @@ -305,7 +305,7 @@ def get_text_in_direct_links_auth(self):
def get_text_of_links_in_more(self):
self.click_more_button()
more_links_text = [link.text for link in self.get_list_of_links_in_more()]
# print(*more_links_text, len(more_links_text), sep='\n')
print(*more_links_text, len(more_links_text), sep='\n')
return more_links_text
# return [link.text for link in self.get_list_of_links_in_more()]

Expand Down Expand Up @@ -435,7 +435,7 @@ 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)
print(current_tab_url)
return current_tab_url

@allure.step("Click on the 'Statistics' link #2 for authorized user")
Expand Down
17 changes: 11 additions & 6 deletions tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,21 @@ def test_hpa_01_03_verify_auth_header_structural_elements(self, driver, auto_tes
assert logout_button_visibility, "The 'Logout' button is invisible"

class TestAuHdPageText:
@allure.title("Verify values of the text in links, buttons in the Header for an authorized user")
def test_hpa_02_01_verify_auth_text_in_links_and_buttons(self, driver, auto_test_user_authorized):
@allure.title("test_hpa.02.01 Verify text in direct links in the Header for an authorized user")
def test_hpa_02_01_verify_text_in_direct_links_auth(self, driver, auto_test_user_authorized):
page = hPage(driver)
direct_links_text = page.get_text_in_direct_links_auth()
assert direct_links_text, "Text in direct links is absent"
assert all(element in hPD.links_text_auth for element in direct_links_text), \
"Text in direct links mismatches valid value"

@allure.title("test_hpa.02.02 Verify text in links in 'More' button and buttons "
"in the Header for an authorized user")
def test_hpa_02_02_verify_auth_text_in_links_and_buttons(self, driver, auto_test_user_authorized):
page = hPage(driver)
links_in_more_text = page.get_text_of_links_in_more()
buttons_text = page.get_text_in_buttons_auth()
ru_en_buttons_text = page.get_text_in_ru_en_buttons()
assert all(element in hPD.links_text_auth for element in direct_links_text[:4]), \
"Text in links in section 2 mismatches valid values"
assert direct_links_text, "Text in direct links is absent"
assert all(element in hPD.links_text_auth for element in links_in_more_text), \
"Text in links in section 3 mismatches valid values"
assert all(element in hPD.buttons_text for element in buttons_text), \
Expand All @@ -309,7 +314,7 @@ def test_hpa_02_01_verify_auth_text_in_links_and_buttons(self, driver, auto_test
"Text in 'ru-en' buttons mismatches valid values"

@allure.title("Verify presence, visibility of the user name in the Header for an authorized user")
def test_hpa_02_02_verify_auth_user_name(self, driver, auto_test_user_authorized):
def test_hpa_02_03_verify_auth_user_name(self, driver, auto_test_user_authorized):
page = hPage(driver)
user_name_presence = page.check_user_name_presence()
user_name_visibility = page.check_user_name_visibility()
Expand Down
Loading