Skip to content

Commit ce3a66b

Browse files
ref the method with expectation of the proper page after authorization
1 parent e76c3d2 commit ce3a66b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

pages/base_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def check_expected_link(self, url):
8484
# return Wait(self.driver, self.timeout).until(
8585
# EC.url_to_be(url), message=f"Can't find element by locator {url}")
8686
return Wait(self.driver, self.timeout).until(
87-
lambda d: "brainup.site" in d.current_url and "/groups" in d.current_url
87+
lambda driver: driver.current_url.startswith(url), message=f"Can't find element by locator {url}"
8888
)
8989
except Exception as ex:
9090
print(ex)

tests/header_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,21 @@ def test_hpu_03_03_verify_unauth_external_links_lead_to_correct_pages(self, driv
140140

141141
@allure.title("""Verify if external Telegram link in the Header for an unauthorized user
142142
leads to a correct page after click""")
143-
def test_hpu_03_03_01_verify_unauth_Telegram_link_navigation(self, driver, main_page_open):
143+
def test_hpu_03_03_01_verify_unauth_telegram_link_navigation(self, driver, main_page_open):
144144
page = hPage(driver)
145145
opened_page = page.click_on_Telegram_link()
146146
assert opened_page in hPD.set_unauth, "The Telegram link leads to an incorrect page after clicking"
147147

148148
@allure.title("""Verify if external Donate link in the Header for an unauthorized user
149149
leads to a correct page after click""")
150-
def test_hpu_03_03_02_verify_unauth_Donate_link_navigation(self, driver, main_page_open):
150+
def test_hpu_03_03_02_verify_unauth_donate_link_navigation(self, driver, main_page_open):
151151
page = hPage(driver)
152152
opened_page = page.click_on_Donate_link()
153153
assert opened_page in hPD.set_unauth, "The Donate link leads to an incorrect page after clicking"
154154

155155
@allure.title("""Verify if external GitHub link in the Header for an unauthorized user
156156
leads to a correct page after click""")
157-
def test_hpu_03_03_03_verify_unauth_GitHub_link_navigation(self, driver, main_page_open):
157+
def test_hpu_03_03_03_verify_unauth_github_link_navigation(self, driver, main_page_open):
158158
page = hPage(driver)
159159
opened_page = page.click_on_GitHub_link()
160160
assert opened_page in hPD.set_unauth, "The GitHub link leads to an incorrect page after clicking"

0 commit comments

Comments
 (0)