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
9 changes: 9 additions & 0 deletions pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,15 @@ def click_on_Telegram_link(self):
print(current_tab_url)
return current_tab_url

@allure.step("Click on the 'GitHub' link for unauthorized user")
def click_on_GitHub_link(self):
self.click_more_button()
self.element_is_present_and_clickable(self.locators.LINK_GITHUB).click()
self.driver.switch_to.window(self.driver.window_handles[1])
current_tab_url = self.get_current_tab_url()
print(current_tab_url)
return current_tab_url

@allure.step("Click on the 'Logo' link for every user")
def click_on_logo_link(self):

Expand Down
9 changes: 8 additions & 1 deletion tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,14 @@ def test_hpu_03_03_verify_unauth_external_links_lead_to_correct_pages(self, driv
def test_hpu_03_03_01_verify_unauth_Telegram_link_navigation(self, driver, main_page_open):
page = hPage(driver)
opened_page = page.click_on_Telegram_link()
assert opened_page in hPD.set_unauth, "The Telegram link leads to incorrect page after clicking"
assert opened_page in hPD.set_unauth, "The Telegram link leads to an incorrect page after clicking"

@allure.title("""Verify if external GitHub link in the Header for an unauthorized user
leads to a correct page after click""")
def test_hpu_03_03_02_verify_unauth_GitHub_link_navigation(self, driver, main_page_open):
page = hPage(driver)
opened_page = page.click_on_GitHub_link()
assert opened_page in hPD.set_unauth, "The GitHub link leads to an incorrect page after clicking"

@allure.title("""Verify that the 'Logo' link on the Start Unauthorized Page
doesn't refresh the current page or lead to other pages after clicking""")
Expand Down
Loading