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
1 change: 1 addition & 0 deletions locators/header_page_locators.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class HeaderAuthorizedLocators:
LINK_PROFILE_AUTH = (By.XPATH, "(//nav//a)[18]")
LINK_TELEGRAM_AUTH1 = (By.XPATH, "(//nav//a)[5]")
LINK_TELEGRAM_AUTH2 = (By.XPATH, "(//nav//a)[9]")
LINK_USED_RESOURCES_AUTH = (By.XPATH, "(//nav//a)[15]")
LOGO_IMAGE_AUTH = (By.XPATH, "(//nav//*[name()='svg'])[1]")
LOGOUT_BUTTON = (By.XPATH, "//button[@data-test-logout-button]")
LOGOUT_ICON = (By.XPATH, "(//nav//*[name()='svg'])[3]")
Expand Down
10 changes: 10 additions & 0 deletions pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,16 @@ def click_on_Contributors_link_auth(self):
print(current_url)
return current_url

@allure.step("Click on the 'Used Resources' link for AUTHORIZED user -- ACTUAL")
def click_on_Used_Resources_link_auth(self):
current_url = self.get_current_tab_url()
self.click_more_button()
self.element_is_present_and_clickable(self.locators1.LINK_USED_RESOURCES_AUTH).click()
Wait(self.driver, 10).until(EC.url_changes(current_url))
current_url = self.get_current_tab_url()
print(current_url)
return current_url

@allure.step("""Click on external links in the Header
and thereby open corresponding web pages on new tabs for AUTHORIZED user -- unusable till changing UI""")
def click_on_auth_external_links_in_header(self):
Expand Down
2 changes: 1 addition & 1 deletion pages/used_resources_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_links_status_codes_detail(self):

for link_href in links_href:
link_status_code = requests.head(link_href).status_code
print(f'For the link: {link_href}, \nstatus code: {link_status_code}')
# print(f'For the link: {link_href}, \nstatus code: {link_status_code}')
status_codes.append(link_status_code)
return status_codes

Expand Down
4 changes: 3 additions & 1 deletion tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ def test_hpa_03_03_06_verify_auth_contributors_link_navigation(self, driver, aut
@allure.title("""test_hpa.03.03.07 Verify if internal Used Resources link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_07_verify_auth_used_resources_link_navigation(self, driver, auto_test_user_authorized):
pass
page = hPage(driver)
opened_page = page.click_on_Used_Resources_link_auth()
assert opened_page in hPD.set_auth, "The Used Resources link leads to an incorrect page after clicking"

@allure.title("""test_hpa.03.03.08 Verify if internal Audiometry link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
Expand Down
1 change: 0 additions & 1 deletion tests/used_resources_page_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def test_ur_03_01_verify_links_in_sections(self, driver, used_resources_page_ope
links_visibility = page.check_links_visibility()
links_clickability = page.check_links_clickability()
links_href = page.get_links_href()
# link_status_codes1 = page.get_links_status_codes()
link_status_codes = page.get_links_status_codes_detail()
assert links_presence, "Links are absent on the page"
assert links_visibility, "Links are invisible"
Expand Down
Loading