From ce3a66b2c6163ca228855bd51d659c7672adf5b5 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Sun, 16 Aug 2026 13:48:15 +0300 Subject: [PATCH] ref the method with expectation of the proper page after authorization --- pages/base_page.py | 2 +- tests/header_test.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/base_page.py b/pages/base_page.py index 735ce84f43..1e8699a567 100644 --- a/pages/base_page.py +++ b/pages/base_page.py @@ -84,7 +84,7 @@ def check_expected_link(self, url): # return Wait(self.driver, self.timeout).until( # EC.url_to_be(url), message=f"Can't find element by locator {url}") return Wait(self.driver, self.timeout).until( - lambda d: "brainup.site" in d.current_url and "/groups" in d.current_url + lambda driver: driver.current_url.startswith(url), message=f"Can't find element by locator {url}" ) except Exception as ex: print(ex) diff --git a/tests/header_test.py b/tests/header_test.py index 314b9b5ef8..116b4134fa 100644 --- a/tests/header_test.py +++ b/tests/header_test.py @@ -140,21 +140,21 @@ def test_hpu_03_03_verify_unauth_external_links_lead_to_correct_pages(self, driv @allure.title("""Verify if external Telegram link in the Header for an unauthorized user leads to a correct page after click""") - def test_hpu_03_03_01_verify_unauth_Telegram_link_navigation(self, driver, main_page_open): + def test_hpu_03_03_01_verify_unauth_telegram_link_navigation(self, driver, main_page_open): page = hPage(driver) opened_page = page.click_on_Telegram_link() assert opened_page in hPD.set_unauth, "The Telegram link leads to an incorrect page after clicking" @allure.title("""Verify if external Donate link in the Header for an unauthorized user leads to a correct page after click""") - def test_hpu_03_03_02_verify_unauth_Donate_link_navigation(self, driver, main_page_open): + def test_hpu_03_03_02_verify_unauth_donate_link_navigation(self, driver, main_page_open): page = hPage(driver) opened_page = page.click_on_Donate_link() assert opened_page in hPD.set_unauth, "The Donate link leads to an incorrect page after clicking" @allure.title("""Verify if external GitHub link in the Header for an unauthorized user leads to a correct page after click""") - def test_hpu_03_03_03_verify_unauth_GitHub_link_navigation(self, driver, main_page_open): + def test_hpu_03_03_03_verify_unauth_github_link_navigation(self, driver, main_page_open): page = hPage(driver) opened_page = page.click_on_GitHub_link() assert opened_page in hPD.set_unauth, "The GitHub link leads to an incorrect page after clicking"