Skip to content

Commit 8eb5571

Browse files
add test_hpa_03.03.06 Verify Contributors link in the Header's dropdown for an authorized user
update header_test.py, header_page.py, header_page_locators.py #268
1 parent b37a3d4 commit 8eb5571

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

locators/header_page_locators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class HeaderAuthorizedLocators:
5757
LINK_GITHUB_AUTH = (By.XPATH, "(//nav//a)[11]")
5858
LINK_GROUPS_AUTH = (By.XPATH, "(//nav//a)[2]")
5959
LINK_GROUPS_AUTH2 = (By.XPATH, "(//nav//a)[6]")
60+
LINK_CONTRIBUTORS_AUTH = (By.XPATH, "(//nav//a)[14]")
6061
LINK_SPECIALISTS_AUTH = (By.XPATH, "(//nav//a)[13]")
6162
LINK_STATISTICS_AUTH1 = (By.XPATH, "(//nav//a)[3]")
6263
LINK_STATISTICS_AUTH2 = (By.XPATH, "(//nav//a)[7]")

pages/header_page.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,16 @@ def click_on_Specialists_link_auth(self):
512512
print(current_url)
513513
return current_url
514514

515+
@allure.step("Click on the 'Contributors' link for AUTHORIZED user -- ACTUAL")
516+
def click_on_Contributors_link_auth(self):
517+
current_url = self.get_current_tab_url()
518+
self.click_more_button()
519+
self.element_is_present_and_clickable(self.locators1.LINK_CONTRIBUTORS_AUTH).click()
520+
Wait(self.driver, 10).until(EC.url_changes(current_url))
521+
current_url = self.get_current_tab_url()
522+
print(current_url)
523+
return current_url
524+
515525
@allure.step("""Click on external links in the Header
516526
and thereby open corresponding web pages on new tabs for AUTHORIZED user -- unusable till changing UI""")
517527
def click_on_auth_external_links_in_header(self):

tests/header_test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,12 @@ def test_hpa_03_03_05_verify_auth_specialists_link_navigation(self, driver, auto
418418
opened_page = page.click_on_Specialists_link_auth()
419419
assert opened_page in hPD.set_auth, "The Specialists link leads to an incorrect page after clicking"
420420

421-
@allure.title("""test_hpa.03.03.06 Verify if internal Our Team link in the Header's dropdown
421+
@allure.title("""test_hpa.03.03.06 Verify if internal Contributors link in the Header's dropdown
422422
for an authorized user leads to the correct page after clicking""")
423-
def test_hpa_03_03_06_verify_auth_our_team_link_navigation(self, driver, auto_test_user_authorized):
424-
pass
423+
def test_hpa_03_03_06_verify_auth_contributors_link_navigation(self, driver, auto_test_user_authorized):
424+
page = hPage(driver)
425+
opened_page = page.click_on_Contributors_link_auth()
426+
assert opened_page in hPD.set_auth, "The Contributors link leads to an incorrect page after clicking"
425427

426428
@allure.title("""test_hpa.03.03.07 Verify if internal Used Resources link in the Header's dropdown
427429
for an authorized user leads to the correct page after clicking""")

0 commit comments

Comments
 (0)