Skip to content

Commit abdfaf8

Browse files
Merge pull request #744 from Brain-up/issue_268
Issue_268_HEADER_links
2 parents d004053 + 588635e commit abdfaf8

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎pages/header_page.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,15 @@ def get_links_href_auth(self):
372372

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

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

381385
# Checks of links navigation
382386
@allure.step("""Click on internal links in the Header and thereby open corresponding web pages in the same tab

‎tests/header_test.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ def test_hpu_02_01_verify_unauth_text_in_links_and_buttons(self, driver, main_pa
101101
"Text in 'ru-en' buttons mismatches valid values"
102102

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

324325
class TestAuHdPageLinks:
325-
@allure.title("Verify clickability, href, status code of links in the Header for an authorized user")
326+
@allure.title("""test_hpa_03.01 Verify clickability, href, status code of links in the Header
327+
for an authorized user""")
326328
def test_hpa_03_01_verify_auth_header_links(self, driver, auto_test_user_authorized):
327329
page = hPage(driver)
328330
links_clickability = page.check_links_clickability_auth()

0 commit comments

Comments
 (0)