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
8 changes: 6 additions & 2 deletions pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,15 @@ def get_links_href_auth(self):

@allure.step("Get status codes of links in the Header for an unauthorized user")
def get_links_status_codes_unauth(self):
return [requests.head(link_href).status_code for link_href in self.get_links_href_unauth()]
status_codes = [requests.head(link_href).status_code for link_href in self.get_links_href_unauth()]
print(status_codes, len(status_codes), sep='\n')
return status_codes

@allure.step("Get status codes of links in the Header for an authorized user")
def get_links_status_codes_auth(self):
return [requests.head(link_href).status_code for link_href in self.get_links_href_auth()]
status_codes = [requests.head(link_href).status_code for link_href in self.get_links_href_auth()]
print(status_codes, len(status_codes), sep='\n')
return status_codes

# Checks of links navigation
@allure.step("""Click on internal links in the Header and thereby open corresponding web pages in the same tab
Expand Down
6 changes: 4 additions & 2 deletions tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def test_hpu_02_01_verify_unauth_text_in_links_and_buttons(self, driver, main_pa
"Text in 'ru-en' buttons mismatches valid values"

class TestUnHdPageLinks:
@allure.title("Verify clickability, href, status code of links in the Header for an unauthorized user")
@allure.title("""test_hpa_03.01 Verify clickability, href, status code of links in the Header
for an unauthorized user""")
def test_hpu_03_01_verify_unauth_header_links(self, driver, main_page_open):
page = hPage(driver)
links_clickability = page.check_links_clickability_unauth()
Expand Down Expand Up @@ -322,7 +323,8 @@ def test_hpa_02_03_verify_auth_user_name(self, driver, auto_test_user_authorized
assert user_name_visibility, "The user name is invisible"

class TestAuHdPageLinks:
@allure.title("Verify clickability, href, status code of links in the Header for an authorized user")
@allure.title("""test_hpa_03.01 Verify clickability, href, status code of links in the Header
for an authorized user""")
def test_hpa_03_01_verify_auth_header_links(self, driver, auto_test_user_authorized):
page = hPage(driver)
links_clickability = page.check_links_clickability_auth()
Expand Down
Loading