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
4 changes: 2 additions & 2 deletions locators/header_page_locators.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class HeaderAuthorizedLocators:
HEADER_ICONS = (By.XPATH, "//nav//*[name()='svg']")
HEADPHONE_ICON = (By.XPATH, "(//nav//*[name()='svg'])[2]")
LINK_ABOUT_AUTH = (By.XPATH, "(//nav//a)[4]")
LINK_DONATE_AUTH = (By.XPATH, "(//nav//a)[11]")
LINK_GITHUB_AUTH = (By.XPATH, "(//nav//a)[10]")
LINK_DONATE_AUTH = (By.XPATH, "(//nav//a)[10]")
LINK_GITHUB_AUTH = (By.XPATH, "(//nav//a)[11]")
LINK_GROUPS_AUTH = (By.XPATH, "(//nav//a)[2]")
LINK_STATISTICS_AUTH = (By.XPATH, "(//nav//a)[3]")
LINK_PROFILE = (By.XPATH, "(//nav//a)[12]")
Expand Down
11 changes: 10 additions & 1 deletion pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,16 @@ def click_on_Telegram_link_auth2(self):
print(self.get_current_tab_url())
return current_tab_url


@allure.step("Click on the 'Donate' link for authorized user")
def click_on_Donate_link_auth(self):
self.click_more_button()
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()
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 external links in the Header and thereby open corresponding web pages on new tabs
for unauthorized user""")
Expand Down
7 changes: 7 additions & 0 deletions tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,13 @@ 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""")
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("""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