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 pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ def click_on_GitHub_link_auth(self):
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)
print(current_tab_url)
self.driver.switch_to.window(self.driver.window_handles[0])
# print(self.get_current_tab_url())
print(self.get_current_tab_url())
return current_tab_url

@allure.step("""Click on external links in the Header
Expand Down
86 changes: 63 additions & 23 deletions tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,61 +356,101 @@ def test_hpa_03_02_01_verify_auth_direct_internal_links_navigation(self, driver,
assert all(element in hPD.set_auth for element in opened_pages), \
"Some of direct internal links lead to incorrect pages after clicking"

@allure.title("""test_hpa.03.02.02 Verify if internal 'Groups' link #2 in the Header for an authorized user
leads to the correct page after clicking""")
def test_hpa_03_02_02_verify_auth_groups_link2_navigation(self, driver, auto_test_user_authorized):
@allure.title("""test_hpa.03.02.02 Verify the list of direct external links in the Header
for an authorized user """)
def test_hpa_03_02_02_verify_auth_direct_external_links_list(self, driver, auto_test_user_authorized):
pass

@allure.title("""test_hpa.03.02.03 Verify if direct external links in the Header
for an authorized user lead to correct pages after clicking""")
def test_hpa_03_02_03_verify_auth_direct_external_links_navigation(self, driver, auto_test_user_authorized):
pass

@allure.title("""test_hpa.03.03 Verify the list of links in the Header's dropdown
for an authorized user""")
def test_hpa_03_03_verify_auth_dropdown_links_list(self, driver, auto_test_user_authorized):
page = hPage(driver)
links_in_dropdown = page.get_dropdown_links_auth_list()
assert links_in_dropdown, "Links in the Header's dropdown are not collected in the list"

@allure.title("""test_hpa.03.03.00 Verify the list of internal links in the Header's dropdown
for an authorized user""")
def test_hpa_03_03_00_verify_auth_dropdown_internal_links_list(self, driver, auto_test_user_authorized):
pass

@allure.title("""test_hpa.03.03.01 Verify if internal Groups link #2 in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_01_verify_auth_groups_link2_navigation(self, driver, auto_test_user_authorized):
page = hPage(driver)
opened_page2 = page.click_on_Groups_link_auth2()
assert opened_page2 in hPD.set_auth, "The Groups link #2 leads to an incorrect page after clicking"

@allure.title("""test_hpa.03.02.03 Verify if internal 'Statistics' link #2 in the Header
@allure.title("""test_hpa.03.03.02 Verify if internal Statistics link #2 in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_02_03_verify_auth_statistics_link2_navigation(self, driver, auto_test_user_authorized):
def test_hpa_03_03_02_verify_auth_statistics_link2_navigation(self, driver, auto_test_user_authorized):
page = hPage(driver)
opened_page2 = page.click_on_Statistics_link_auth2()
assert opened_page2 in hPD.set_auth, "The Statistics link #2 leads to an incorrect page after clicking"

@allure.title("""test_hpa.03.02.04 Verify if internal 'About' link #2 in the Header
@allure.title("""test_hpa.03.03.03 Verify if internal About link #2 in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_02_04_verify_auth_about_link2_navigation(self, driver, auto_test_user_authorized):
def test_hpa_03_03_03_verify_auth_about_link2_navigation(self, driver, auto_test_user_authorized):
page = hPage(driver)
opened_page2 = page.click_on_About_link_auth2()
assert opened_page2 in hPD.set_auth, "The About link #2 leads to an incorrect page after clicking"

@allure.title("""test_hpa.03.03 Verify the list of links in the Header's dropdown
for an authorized user""")
def test_hpa_03_03_verify_auth_dropdown_links_list(self, driver, auto_test_user_authorized):
page = hPage(driver)
links_in_dropdown = page.get_dropdown_links_auth_list()
assert links_in_dropdown, "Links in the Header's dropdown are not collected in the list"
@allure.title("""test_hpa.03.03.04 Verify if internal Contacts link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_04_verify_auth_contacts_link_navigation(self, driver, auto_test_user_authorized):
pass

@allure.title("""test_hpa.03.03.05 Verify if internal Specialists link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_05_verify_auth_specialists_link_navigation(self, driver, auto_test_user_authorized):
pass

@allure.title("""test_hpa.03.03.00 Verify the list of external links in the Header's dropdown
@allure.title("""test_hpa.03.03.06 Verify if internal Our Team link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_06_verify_auth_our_team_link_navigation(self, driver, auto_test_user_authorized):
pass

@allure.title("""test_hpa.03.03.07 Verify if internal Used Resources link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_07_verify_auth_used_resources_link_navigation(self, driver, auto_test_user_authorized):
pass

@allure.title("""test_hpa.03.03.08 Verify if internal Audiometry link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_08_verify_auth_audiometry_link_navigation(self, driver, auto_test_user_authorized):
pass

@allure.title("""test_hpa.03.03.09 Verify the list of external links in the Header's dropdown
for an authorized user""")
def test_hpa_03_03_00_verify_auth_external_dropdown_links(self, driver, auto_test_user_authorized):
def test_hpa_03_03_09_verify_auth_dropdown_external_links(self, driver, auto_test_user_authorized):
page = hPage(driver)
external_links_in_dropdown = page.get_list_of_external_links_in_more_auth()
assert external_links_in_dropdown, "External links are not collected in the list"

@allure.title("""test_hpa.03.03.01 Verify if external Telegram links #1,2 in the Header
@allure.title("""test_hpa.03.03.10 Verify if external Telegram links #1,2 in the Header's dropdown
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):
def test_hpa_03_03_10_verify_auth_telegram_links_navigation(self, driver, auto_test_user_authorized):
page = hPage(driver)
opened_page1 = page.click_on_Telegram_link_auth1()
opened_page2 = page.click_on_Telegram_link_auth2()
assert opened_page1 in hPD.set_auth, "The Telegram link #1 leads to an incorrect page after clicking"
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("""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):
@allure.title("""test_hpa.03.03.11 Verify if external Donate link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_11_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):
@allure.title("""test_hpa.03.03.12 Verify if external GitHub link in the Header's dropdown
for an authorized user leads to the correct page after clicking""")
def test_hpa_03_03_12_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"
Expand Down
Loading