From fae70d5eba6ae55c1214be5d44b7a756b0fafb24 Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Thu, 20 Nov 2025 15:47:38 +0300 Subject: [PATCH] ref test_ersp_03.01, _ersp_03.04 Verify breadcrumbs links update exercises_ru_similar_phrases_page_test.py, links.py, #478 --- test_data/links.py | 3 +++ tests/exercises_ru_similar_phrases_page_test.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test_data/links.py b/test_data/links.py index a13b08bf9a..f59a92692d 100644 --- a/test_data/links.py +++ b/test_data/links.py @@ -25,6 +25,9 @@ class ExercisesUrls: # Speech Exercises RU > Similar Phrases URL_EXERCISES_RU_SIMILAR_PHRASES_PAGE = f"{STARTING_POINT}/2/series/2" + + breadcrumbs_urls_ru_similar_phrases = breadcrumbs_urls_ru + (URL_EXERCISES_RU_SIMILAR_PHRASES_PAGE,) + b = f"{URL_EXERCISES_RU_SIMILAR_PHRASES_PAGE}/subgroup/" subgroup_link_urls = (f"{b}60", f"{b}61", f"{b}62", f"{b}63", f"{b}64", f"{b}65") diff --git a/tests/exercises_ru_similar_phrases_page_test.py b/tests/exercises_ru_similar_phrases_page_test.py index 6cb95f8beb..c21b20f6b6 100644 --- a/tests/exercises_ru_similar_phrases_page_test.py +++ b/tests/exercises_ru_similar_phrases_page_test.py @@ -1,7 +1,6 @@ """Auto tests for verifying web elements on the 'Exercises "Similar phrases"' page on the 'ru' local""" import allure from pages.exercises_ru_similar_phrases_page import ExercisesRuSimilarPhrasesPage as erspPage -from test_data.exercises_ru_similar_phrases_page_data import ExercisesRuSimilarPhrasesPageData as erspPD from test_data.exercises_ru_pages_data import ExercisesRuPagesData as erPD from test_data.links import ExercisesUrls as ExUrls @@ -109,7 +108,7 @@ def test_ersp_03_01_verify_breadcrumbs_links(self, driver, exercises_ru_similar_ breadcrumbs_links_href = page.get_breadcrumbs_links_href() breadcrumbs_link_status_codes = page.get_link_status_codes_in_breadcrumbs() assert breadcrumbs_clickability, "Breadcrumbs are unclickable" - assert all(element in erspPD.breadcrumbs_urls for element in breadcrumbs_links_href), \ + assert all(element in ExUrls.breadcrumbs_urls_ru_similar_phrases for element in breadcrumbs_links_href), \ "Attributes 'href' of links in breadcrumbs mismatch valid values" assert all(element in erPD.links_status_code for element in breadcrumbs_link_status_codes), \ "Status codes of links in breadcrumbs mismatch valid values" @@ -145,7 +144,8 @@ def test_ersp_03_04_verify_breadcrumbs_links_navigation(self, driver, exercises_ page = erspPage(driver) opened_pages = page.click_on_breadcrumbs_links() assert opened_pages, "Transitions to pages have not performed" - assert all(element in erspPD.breadcrumbs_urls for element in opened_pages), "Links lead to incorrect pages" + assert all(element in ExUrls.breadcrumbs_urls_ru_similar_phrases for element in opened_pages), \ + "Links lead to incorrect pages" @allure.title("Verify if group links lead to correct pages after clicking") def test_ersp_03_05_verify_group_links_navigation(self, driver, exercises_ru_similar_phrases_page_open):