Skip to content
Open
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
6 changes: 3 additions & 3 deletions pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def click_on_About_link_auth2(self):
return current_tab_url

@allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs
for authorized user""")
for authorized user -- unusable till changing UI""")
def click_on_auth_external_links_in_header(self):
opened_pages = []
# Click on the 'Telegram' link
Expand All @@ -467,8 +467,8 @@ def click_on_auth_external_links_in_header(self):
new_tabs = [link.click() for link in self.get_list_of_external_links_in_more_auth()]
print(len(new_tabs))
# Get the list of opened tabs urls
for i in range(1, len(new_tabs) + 2):
# for i in range(len(new_tabs)):
# for i in range(1, len(new_tabs) + 2):
for i in range(len(new_tabs)):
self.driver.switch_to.window(self.driver.window_handles[i])
opened_pages.append(self.get_current_tab_url())
print(*opened_pages)
Expand Down
18 changes: 7 additions & 11 deletions tests/header_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,19 +374,15 @@ def test_hpa_03_02_04_verify_auth_about_link2_navigation(self, driver, auto_test
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"

@pytest.mark.skip("Unstable test environment")
@allure.title("""Verify if external links in the Header for an authorized user
lead to correct pages after click""")
def test_hpa_03_03_verify_auth_external_links_lead_to_proper_pages(self, driver, auto_test_user_authorized):
@allure.title("""test_hpa.03.03 Verify the list of external links in the Header's dropdown
for an authorized user""")
def test_hpa_03_03_verify_auth_external_links_in_dropdown(self, driver, auto_test_user_authorized):
page = hPage(driver)
external_links_in_more = page.get_list_of_external_links_in_more_auth()
opened_pages = page.click_on_auth_external_links_in_header()
assert external_links_in_more, "External links are not collected in the list"
assert all(element in hPD.set_auth for element in opened_pages), \
"Some of external links lead to incorrect pages after clicking"
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 for an authorized user
lead to the correct page after clicking""")
@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 Down
Loading