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
13 changes: 9 additions & 4 deletions pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,7 @@ def click_on_Telegram_link_auth1(self):
self.element_is_present_and_clickable(self.locators1.LINK_TELEGRAM_AUTH).click()
self.driver.switch_to.window(self.driver.window_handles[1])
current_tab_url = self.get_current_tab_url()
print(current_tab_url)
self.driver.switch_to.window(self.driver.window_handles[0])
print(self.get_current_tab_url())
return current_tab_url

@allure.step("Click on the 'Telegram' link #2 for authorized user")
Expand All @@ -477,9 +475,7 @@ def click_on_Telegram_link_auth2(self):
self.element_is_present_and_clickable(self.locators1.LINK_TELEGRAM_AUTH2).click()
self.driver.switch_to.window(self.driver.window_handles[1])
current_tab_url = self.get_current_tab_url()
print(current_tab_url)
self.driver.switch_to.window(self.driver.window_handles[0])
print(self.get_current_tab_url())
return current_tab_url

@allure.step("Click on the 'Donate' link for authorized user")
Expand All @@ -488,6 +484,15 @@ def click_on_Donate_link_auth(self):
self.element_is_present_and_clickable(self.locators1.LINK_DONATE_AUTH).click()
self.driver.switch_to.window(self.driver.window_handles[1])
current_tab_url = self.get_current_tab_url()
self.driver.switch_to.window(self.driver.window_handles[0])
return current_tab_url

@allure.step("Click on the 'GitHub' link for authorized user")
def click_on_GitHub_link_auth(self):
self.click_more_button()
self.element_is_present_and_clickable(self.locators1.LINK_GITHUB_AUTH).click()
self.driver.switch_to.window(self.driver.window_handles[1])
current_tab_url = self.get_current_tab_url()
print(current_tab_url)
self.driver.switch_to.window(self.driver.window_handles[0])
print(self.get_current_tab_url())
Expand Down
15 changes: 11 additions & 4 deletions tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ def test_hpa_03_03_verify_auth_external_links_lead_to_proper_pages(self, driver,
assert all(element in hPD.set_auth for element in opened_pages), \
"Some of external links lead to incorrect pages after clicking"

@allure.title("""Verify if external Telegram links #1,2 in the Header for an authorized user
lead to the correct page after click""")
@allure.title("""test_hpa.03.03.01 Verify if external Telegram links #1,2 in the Header for an authorized user
lead to the correct page after clicking""")
def test_hpa_03_03_01_verify_auth_telegram_links_navigation(self, driver, auto_test_user_authorized):
page = hPage(driver)
opened_page1 = page.click_on_Telegram_link_auth1()
Expand All @@ -392,13 +392,20 @@ def test_hpa_03_03_01_verify_auth_telegram_links_navigation(self, driver, auto_t
assert opened_page2 in hPD.set_auth, "The Telegram link #2 leads to an incorrect page after clicking"
assert opened_page1 == opened_page2, "The Telegram links #1,2 are the same"

@allure.title("""Verify if external Donate link in the Header for an authorized user
leads to the correct page after click""")
@allure.title("""test_hpa.03.03.02 Verify if external Donate link in the Header for an authorized user
leads to the correct page after clicking""")
def test_hpa_03_03_02_verify_auth_donate_link_navigation(self, driver, auto_test_user_authorized):
page = hPage(driver)
opened_page = page.click_on_Donate_link_auth()
assert opened_page in hPD.set_auth, "The Donate link leads to an incorrect page after clicking"

@allure.title("""test_hpa.03.03.03 Verify if external GitHub link in the Header for an authorized user
leads to the correct page after clicking""")
def test_hpa_03_03_03_verify_auth_github_link_navigation(self, driver, auto_test_user_authorized):
page = hPage(driver)
opened_page = page.click_on_GitHub_link_auth()
assert opened_page in hPD.set_auth, "The GitHub link leads to an incorrect page after clicking"

@allure.title("""Verify that the Logo link on the Start Authorized Page
refreshes the current page and doesn't lead to other pages after clicking""")
def test_hpa_03_04_verify_click_auth_logo_link(self, driver, auto_test_user_authorized):
Expand Down
Loading