Skip to content

Commit a8d541a

Browse files
Merge pull request #703 from Brain-up/issue_268
Issue_268_HEADER_links
2 parents 2b1c845 + c6e8d5f commit a8d541a

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

pages/header_page.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,15 @@ def click_on_Telegram_link(self):
452452
print(current_tab_url)
453453
return current_tab_url
454454

455+
@allure.step("Click on the 'Donate' link for unauthorized user")
456+
def click_on_Donate_link(self):
457+
self.click_more_button()
458+
self.element_is_present_and_clickable(self.locators.LINK_DONATE).click()
459+
self.driver.switch_to.window(self.driver.window_handles[1])
460+
current_tab_url = self.get_current_tab_url()
461+
print(current_tab_url)
462+
return current_tab_url
463+
455464
@allure.step("Click on the 'GitHub' link for unauthorized user")
456465
def click_on_GitHub_link(self):
457466
self.click_more_button()

tests/header_test.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,16 @@ def test_hpu_03_03_01_verify_unauth_Telegram_link_navigation(self, driver, main_
147147
opened_page = page.click_on_Telegram_link()
148148
assert opened_page in hPD.set_unauth, "The Telegram link leads to an incorrect page after clicking"
149149

150+
@allure.title("""Verify if external Donate link in the Header for an unauthorized user
151+
leads to a correct page after click""")
152+
def test_hpu_03_03_02_verify_unauth_Donate_link_navigation(self, driver, main_page_open):
153+
page = hPage(driver)
154+
opened_page = page.click_on_Donate_link()
155+
assert opened_page in hPD.set_unauth, "The Donate link leads to an incorrect page after clicking"
156+
150157
@allure.title("""Verify if external GitHub link in the Header for an unauthorized user
151158
leads to a correct page after click""")
152-
def test_hpu_03_03_02_verify_unauth_GitHub_link_navigation(self, driver, main_page_open):
159+
def test_hpu_03_03_03_verify_unauth_GitHub_link_navigation(self, driver, main_page_open):
153160
page = hPage(driver)
154161
opened_page = page.click_on_GitHub_link()
155162
assert opened_page in hPD.set_unauth, "The GitHub link leads to an incorrect page after clicking"

0 commit comments

Comments
 (0)