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 'Donate' link for unauthorized user")
def click_on_Donate_link(self):
self.click_more_button()
self.element_is_present_and_clickable(self.locators.LINK_DONATE).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 'GitHub' link for unauthorized user")
def click_on_GitHub_link(self):
self.click_more_button()
Expand Down
9 changes: 8 additions & 1 deletion tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,16 @@ def test_hpu_03_03_01_verify_unauth_Telegram_link_navigation(self, driver, main_
opened_page = page.click_on_Telegram_link()
assert opened_page in hPD.set_unauth, "The Telegram link leads to an incorrect page after clicking"

@allure.title("""Verify if external Donate link in the Header for an unauthorized user
leads to a correct page after click""")
def test_hpu_03_03_02_verify_unauth_Donate_link_navigation(self, driver, main_page_open):
page = hPage(driver)
opened_page = page.click_on_Donate_link()
assert opened_page in hPD.set_unauth, "The Donate 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):
def test_hpu_03_03_03_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"
Expand Down
Loading