From 565e877974eb78f13d45c23636715dde7705e15f Mon Sep 17 00:00:00 2001 From: Alena Krauch Date: Mon, 24 Nov 2025 21:53:30 +0300 Subject: [PATCH] update exercises_ru_similar_phrases_page_test.py, exercises_ru_words_page_test.py, exercises_ru_similar_phrases_page.py, exercises_ru_words_page.py, exercises_ru_pages_data.py, links.py, exercises_ru_words_page_locators.py #478 --- locators/exercises_ru_words_page_locators.py | 4 -- pages/exercises_ru_similar_phrases_page.py | 44 ++++++++-------- pages/exercises_ru_words_page.py | 49 +++++++++--------- test_data/exercises_ru_pages_data.py | 12 ++--- test_data/links.py | 4 +- .../exercises_ru_similar_phrases_page_test.py | 42 ++++++++-------- tests/exercises_ru_words_page_test.py | 50 +++++++++---------- 7 files changed, 100 insertions(+), 105 deletions(-) diff --git a/locators/exercises_ru_words_page_locators.py b/locators/exercises_ru_words_page_locators.py index db1bcc9a62..23a0721329 100644 --- a/locators/exercises_ru_words_page_locators.py +++ b/locators/exercises_ru_words_page_locators.py @@ -24,7 +24,3 @@ class ExercisesRuWordsPageLocators: PAGE_LIST3_4 = (By.XPATH, '(//div[contains(@class, "series-page")]//a)[4]') # PAGE_LIST3 = (By.XPATH, "//main//div/a") CARD_IMAGES_LIST4 = (By.XPATH, '//div[contains(@style, "svg")]') - - -class HeaderLocators: - RU_BUTTON = (By.XPATH, "(//span/button)[1]") diff --git a/pages/exercises_ru_similar_phrases_page.py b/pages/exercises_ru_similar_phrases_page.py index 99ee1e726a..1a769e068d 100644 --- a/pages/exercises_ru_similar_phrases_page.py +++ b/pages/exercises_ru_similar_phrases_page.py @@ -93,12 +93,12 @@ def check_list2_visibility(self): return self.element_is_visible(self.locators.PAGE_LIST2) @allure.step("Check the list3 on the 5th level of nesting is present on the page") - def get_list3_of_subgroup_links(self): + def get_list3_of_series_links(self): return self.elements_are_present(self.locators.PAGE_LIST3) @allure.step("Check the list3 is visible") def check_list3_visibility(self): - return all(element.is_displayed() for element in self.get_list3_of_subgroup_links()) + return all(element.is_displayed() for element in self.get_list3_of_series_links()) @allure.step("Check the list4 on the 6th level of nesting is present on the page") def get_list4_of_links(self): @@ -122,9 +122,9 @@ def get_value_of_breadcrumbs(self): def get_group_links_text(self): return [element.text for element in self.get_list2_of_group_links()] - @allure.step("Get text in subgroup links on the page") - def get_subgroup_links_text(self): - return [element.text for element in self.get_list3_of_subgroup_links()] + @allure.step("Get text in series links on the page") + def get_series_links_text(self): + return [element.text for element in self.get_list3_of_series_links()] # Checking links on the page @allure.step("Check if breadcrumbs are clickable") @@ -154,18 +154,18 @@ def get_group_link_active_links(self): # print(len(group_link_active_links), *group_link_active_links, sep='\n') return [el.get_attribute("data-test-active-link") for el in self.get_list2_of_group_links()] - @allure.step("Check if subgroup links are clickable") - def check_subgroup_links_clickability(self): - return all(link.is_enabled() for link in self.get_list3_of_subgroup_links()) + @allure.step("Check if series links are clickable") + def check_series_links_clickability(self): + return all(link.is_enabled() for link in self.get_list3_of_series_links()) - @allure.step("Get attribute 'href' of subgroup links") - def get_subgroup_links_href(self): - # print(len(subgroup_links_href), *subgroup_links_href, sep='\n') - return [element.get_attribute("href") for element in self.get_list3_of_subgroup_links()] + @allure.step("Get attribute 'href' of series links") + def get_series_links_href(self): + # print(len(series_links_href), *series_links_href, sep='\n') + return [element.get_attribute("href") for element in self.get_list3_of_series_links()] - @allure.step("Get status code of subgroup links") - def get_subgroup_link_status_codes(self): - return [requests.head(link_href).status_code for link_href in self.get_subgroup_links_href()] + @allure.step("Get status code of series links") + def get_series_link_status_codes(self): + return [requests.head(link_href).status_code for link_href in self.get_series_links_href()] @allure.step("Click on breadcrumbs links and thereby open corresponding web pages in the same tab") def click_on_breadcrumbs_links(self): @@ -194,15 +194,15 @@ def click_on_group_links(self): return opened_pages - @allure.step("""Click on subgroup links and thereby open corresponding web pages in the same tab""") - def click_on_subgroup_links(self): - subgroup_locators = [self.locators.PAGE_LIST3_1, self.locators.PAGE_LIST3_2, - self.locators.PAGE_LIST3_3, self.locators.PAGE_LIST3_4, - self.locators.PAGE_LIST3_5, self.locators.PAGE_LIST3_6] + @allure.step("""Click on series links and thereby open corresponding web pages in the same tab""") + def click_on_series_links(self): + series_locators = [self.locators.PAGE_LIST3_1, self.locators.PAGE_LIST3_2, + self.locators.PAGE_LIST3_3, self.locators.PAGE_LIST3_4, + self.locators.PAGE_LIST3_5, self.locators.PAGE_LIST3_6] group_page_url = self.get_current_tab_url() opened_pages = [] - for link_locator in subgroup_locators: + for link_locator in series_locators: self.element_is_clickable(link_locator).click() Wait(self.driver, self.timeout).until(EC.url_changes(group_page_url)) opened_pages.append(self.get_current_tab_url()) @@ -222,7 +222,7 @@ def get_links_style(self): @allure.step("Get the list of sizes of background-images in links") def get_images_sizes(self): images_size = [image.size for image in self.get_list4_of_links()] - print(len(images_size), *images_size, sep='\n') + # print(len(images_size), *images_size, sep='\n') return images_size @allure.step("Check changes of images sizes after resizing") diff --git a/pages/exercises_ru_words_page.py b/pages/exercises_ru_words_page.py index f015f045d4..bd17ac5178 100644 --- a/pages/exercises_ru_words_page.py +++ b/pages/exercises_ru_words_page.py @@ -4,12 +4,11 @@ from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait as Wait from pages.base_page import BasePage -from locators.exercises_ru_words_page_locators import ExercisesRuWordsPageLocators, HeaderLocators +from locators.exercises_ru_words_page_locators import ExercisesRuWordsPageLocators class ExercisesRuWordsPage(BasePage): locators = ExercisesRuWordsPageLocators - locators1 = HeaderLocators # Checking the structure and display of elements on the page @allure.step("Check if some content is present in DOM") @@ -94,12 +93,12 @@ def check_list2_visibility(self): return all(element.is_displayed() for element in self.get_list2_of_group_links()) @allure.step("Check the list3 on the 5th level of nesting is present on the page") - def get_list3_of_subgroup_links(self): + def get_list3_of_series_links(self): return self.elements_are_present(self.locators.PAGE_LIST3) @allure.step("Check the list3 is visible") def check_list3_visibility(self): - return all(element.is_displayed() for element in self.get_list3_of_subgroup_links()) + return all(element.is_displayed() for element in self.get_list3_of_series_links()) @allure.step("Check the list4 on the 6th level of nesting is present on the page") def get_list4_of_links(self): @@ -123,9 +122,9 @@ def get_value_of_breadcrumbs(self): def get_group_links_text(self): return [element.text for element in self.get_list2_of_group_links()] - @allure.step("Get text in subgroup links on the page") - def get_subgroup_links_text(self): - return [element.text for element in self.get_list3_of_subgroup_links()] + @allure.step("Get text in series links on the page") + def get_series_links_text(self): + return [element.text for element in self.get_list3_of_series_links()] # Checking links on the page @allure.step("Check if breadcrumbs are clickable") @@ -152,22 +151,22 @@ def get_group_link_titles(self): def get_group_link_active_links(self): return [el.get_attribute("data-test-active-link") for el in self.get_list2_of_group_links()] - @allure.step("Check if subgroup links are clickable") - def check_subgroup_links_clickability(self): - return all(link.is_enabled() for link in self.get_list3_of_subgroup_links()) + @allure.step("Check if series links are clickable") + def check_series_links_clickability(self): + return all(link.is_enabled() for link in self.get_list3_of_series_links()) - @allure.step("Get attribute 'title' of subgroup links") - def get_subgroup_link_titles(self): - return [element.get_attribute("title") for element in self.get_list3_of_subgroup_links()] + @allure.step("Get attribute 'title' of series links") + def get_series_link_titles(self): + return [element.get_attribute("title") for element in self.get_list3_of_series_links()] - @allure.step("Get attribute 'href' of subgroup links") - def get_subgroup_links_href(self): - # print(len(subgroup_links_href), *subgroup_links_href, sep='\n') - return [element.get_attribute("href") for element in self.get_list3_of_subgroup_links()] + @allure.step("Get attribute 'href' of series links") + def get_series_links_href(self): + # print(len(series_links_href), *series_links_href, sep='\n') + return [element.get_attribute("href") for element in self.get_list3_of_series_links()] - @allure.step("Get status code of subgroup links") - def get_subgroup_link_status_codes(self): - return [requests.head(link_href).status_code for link_href in self.get_subgroup_links_href()] + @allure.step("Get status code of series links") + def get_series_link_status_codes(self): + return [requests.head(link_href).status_code for link_href in self.get_series_links_href()] @allure.step("Click on breadcrumbs links and thereby open corresponding web pages in the same tab") def click_on_breadcrumbs_links(self): @@ -197,14 +196,14 @@ def click_on_group_links(self): return opened_pages - @allure.step("""Click on subgroup links and thereby open corresponding web pages in the same tab""") - def click_on_subgroup_links(self): - subgroup_locators = [self.locators.PAGE_LIST3_1, self.locators.PAGE_LIST3_2, - self.locators.PAGE_LIST3_3, self.locators.PAGE_LIST3_4] + @allure.step("""Click on series links and thereby open corresponding web pages in the same tab""") + def click_on_series_links(self): + series_locators = [self.locators.PAGE_LIST3_1, self.locators.PAGE_LIST3_2, + self.locators.PAGE_LIST3_3, self.locators.PAGE_LIST3_4] group_page_url = self.get_current_tab_url() opened_pages = [] - for link_locator in subgroup_locators: + for link_locator in series_locators: self.element_is_clickable(link_locator).click() Wait(self.driver, self.timeout).until(EC.url_changes(group_page_url)) opened_pages.append(self.get_current_tab_url()) diff --git a/test_data/exercises_ru_pages_data.py b/test_data/exercises_ru_pages_data.py index 27da493bb5..179e658f38 100644 --- a/test_data/exercises_ru_pages_data.py +++ b/test_data/exercises_ru_pages_data.py @@ -26,19 +26,19 @@ class ExercisesRuPagesData: group_link_active_links = ('Слова', 'Слова Королёвой', 'Похожие фразы', 'Группа слов', 'Предложения', 'Слова с частотной группировкой') - # subgroup links data + # series links data s = 'background-image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/' e = '.svg");' - subgroup_links_style_similar_phrases_ru = ( + series_links_style_similar_phrases_ru = ( f"{s}longShortPhrases{e}", f"{s}noPhrases{e}", f"{s}similarPhrases{e}", f"{s}differentEndPhrases{e}", f"{s}shortWords{e}", f"{s}prepositionPhrases{e}") - subgroup_links_text_similar_phrases_ru = ( + series_links_text_similar_phrases_ru = ( 'Разной длительности', 'С частицей Не', 'Похожие', 'С разным окончанием', 'Из коротких слов', 'С разными предлогами') - subgroup_links_style_words_ru = ( + series_links_style_words_ru = ( f"{s}family{e}", f"{s}home{e}", f"{s}food{e}", f"{s}clothes{e}", f"{s}school{e}", f"{s}math{e}", f"{s}pets{e}", f"{s}animals{e}", f"{s}transport{e}", f"{s}colors{e}", f"{s}city{e}", f"{s}country{e}", f"{s}walk{e}", f"{s}weather{e}", f"{s}future{e}", f"{s}body{e}", f"{s}game{e}", f"{s}adventure{e}", f"{s}hospital{e}", @@ -49,7 +49,7 @@ class ExercisesRuPagesData: f"{s}stationery{e}", f"{s}flowers{e}", f"{s}literature{e}", f"{s}physics{e}", f"{s}biology{e}", f"{s}instruments{e}") - subgroup_links_text_words_ru = ( + series_links_text_words_ru = ( 'Семья', 'Любимый дом', 'Что я ем', 'Одежда', 'В школе', 'Математика', 'Домашние питомцы', 'Мир животных', 'Транспорт', 'Цвета и форма', 'В городе', 'В деревне', 'На прогулке', 'Погода', 'Стану кем хочу', 'Тело человека', 'Развлечения', 'Путешествия', 'В больнице', 'Что я чувствую', 'Игрушки', 'Насекомые', @@ -58,7 +58,7 @@ class ExercisesRuPagesData: 'Растения', 'Деревья и кустарники', 'Спорт', 'В магазине', 'Парнокопытные', 'Породы собак', 'Канцелярские принадлежности', 'Цветы', 'Русский язык и литература', 'Физика', 'Биология', 'Инструменты') - subgroup_links_titles_words_ru = ( + series_links_titles_words_ru = ( 'Слова про семью', 'Слова про дом', 'Слова о еде', 'Слова об одежде', 'Слова о школе и учёбе', 'Математика и её термины', 'Слова о домашних питомцах', 'Слова о животных', 'Слова о транспорте', 'Слова о понятиях цета и формы', 'Слова о жизни города', 'Слова из деревенской жизни', 'Слова о прогулке', diff --git a/test_data/links.py b/test_data/links.py index 1b528d6fca..124485b45a 100644 --- a/test_data/links.py +++ b/test_data/links.py @@ -29,7 +29,7 @@ class ExercisesUrls: 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_ru_similar_phrases = (f"{b}60", f"{b}61", f"{b}62", f"{b}63", f"{b}64", f"{b}65") + series_link_urls_ru_similar_phrases = (f"{b}60", f"{b}61", f"{b}62", f"{b}63", f"{b}64", f"{b}65") # Speech Exercises RU > Words URL_EXERCISES_RU_WORDS_PAGE = f"{STARTING_POINT}/2/series/1" @@ -37,7 +37,7 @@ class ExercisesUrls: breadcrumbs_urls_ru_words = breadcrumbs_urls_ru + (URL_EXERCISES_RU_WORDS_PAGE,) c = f"{URL_EXERCISES_RU_WORDS_PAGE}/subgroup/" - subgroup_link_urls_ru_words = ( + series_link_urls_ru_words = ( f"{c}1", f"{c}2", f"{c}3", f"{c}4", f"{c}5", f"{c}6", f"{c}7", f"{c}8", f"{c}9", f"{c}10", f"{c}11", f"{c}12", f"{c}13", f"{c}14", f"{c}15", f"{c}16", f"{c}17", f"{c}18", f"{c}19", f"{c}20", f"{c}21", f"{c}22", f"{c}23", f"{c}24", f"{c}25", f"{c}26", f"{c}27", f"{c}28", f"{c}29", f"{c}30", f"{c}31", f"{c}32", f"{c}33", f"{c}34", diff --git a/tests/exercises_ru_similar_phrases_page_test.py b/tests/exercises_ru_similar_phrases_page_test.py index 4adad82450..8bd5efbf8b 100644 --- a/tests/exercises_ru_similar_phrases_page_test.py +++ b/tests/exercises_ru_similar_phrases_page_test.py @@ -55,7 +55,7 @@ def test_ersp_01_03_verify_page_structural_elements(self, driver, exercises_ru_s list1_visibility = page.check_list1_visibility() list2_on_5th_level = page.get_list2_of_group_links() list2_visibility = page.check_list2_visibility() - list3_on_5th_level = page.get_list3_of_subgroup_links() + list3_on_5th_level = page.get_list3_of_series_links() list3_visibility = page.check_list3_visibility() list4_on_6th_level = page.get_list4_of_links() list4_visibility = page.check_list4_visibility() @@ -93,12 +93,12 @@ def test_ersp_02_03_verify_group_links_text(self, driver, exercises_ru_similar_p "Text in group links mismatches valid values" @allure.title("Verify text in cards on the page") - def test_ersp_02_04_verify_subgroup_links_text(self, driver, exercises_ru_similar_phrases_page_open): + def test_ersp_02_04_verify_series_links_text(self, driver, exercises_ru_similar_phrases_page_open): page = erspPage(driver) - subgroup_links_text = page.get_subgroup_links_text() - assert subgroup_links_text, "Text in cards is absent" - assert all(element in erPD.subgroup_links_text_similar_phrases_ru for element in subgroup_links_text), \ - "Text in subgroup links mismatches valid values" + series_links_text = page.get_series_links_text() + assert series_links_text, "Text in cards is absent" + assert all(element in erPD.series_links_text_similar_phrases_ru for element in series_links_text), \ + "Text in series links mismatches valid values" class TestExRuSimPhrPageLinks: @allure.title("Verify clickability, href of links in breadcrumbs on the page") @@ -127,17 +127,17 @@ def test_ersp_03_02_verify_group_links(self, driver, exercises_ru_similar_phrase assert all(element in erPD.group_link_active_links for element in group_link_active_links), \ "Attributes 'active-link' of links in group links mismatch valid values" - @allure.title("Verify clickability, href, status code of subgroup links on the page") - def test_ersp_03_03_verify_subgroup_links(self, driver, exercises_ru_similar_phrases_page_open): + @allure.title("Verify clickability, href, status code of series links on the page") + def test_ersp_03_03_verify_series_links(self, driver, exercises_ru_similar_phrases_page_open): page = erspPage(driver) - subgroup_links_clickability = page.check_subgroup_links_clickability() - subgroup_links_href = page.get_subgroup_links_href() - subgroup_links_status_codes = page.get_subgroup_link_status_codes() - assert subgroup_links_clickability, "Subgroup links are unclickable" - assert all(element in ExUrls.subgroup_link_urls_ru_similar_phrases for element in subgroup_links_href), \ - "Attributes 'href' of subgroup links mismatch valid values" - assert all(element in erPD.links_status_code for element in subgroup_links_status_codes), \ - "Status codes of subgroup links mismatch valid values" + series_links_clickability = page.check_series_links_clickability() + series_links_href = page.get_series_links_href() + series_links_status_codes = page.get_series_link_status_codes() + assert series_links_clickability, "series links are unclickable" + assert all(element in ExUrls.series_link_urls_ru_similar_phrases for element in series_links_href), \ + "Attributes 'href' of series links mismatch valid values" + assert all(element in erPD.links_status_code for element in series_links_status_codes), \ + "Status codes of series links mismatch valid values" @allure.title("Verify if breadcrumbs links lead to correct pages after clicking") def test_ersp_03_04_verify_breadcrumbs_links_navigation(self, driver, exercises_ru_similar_phrases_page_open): @@ -154,12 +154,12 @@ def test_ersp_03_05_verify_group_links_navigation(self, driver, exercises_ru_sim assert opened_pages, "Transitions to pages have not performed" assert all(element in ExUrls.group_link_urls for element in opened_pages), "Links lead to incorrect pages" - @allure.title("Verify if subgroup links lead to correct pages after clicking") - def test_ersp_03_06_verify_subgroup_links_navigation(self, driver, exercises_ru_similar_phrases_page_open): + @allure.title("Verify if series links lead to correct pages after clicking") + def test_ersp_03_06_verify_series_links_navigation(self, driver, exercises_ru_similar_phrases_page_open): page = erspPage(driver) - opened_pages = page.click_on_subgroup_links() + opened_pages = page.click_on_series_links() assert opened_pages, "Transitions to pages have not performed" - assert all(element in ExUrls.subgroup_link_urls_ru_similar_phrases for element in opened_pages), \ + assert all(element in ExUrls.series_link_urls_ru_similar_phrases for element in opened_pages), \ "Links lead to incorrect pages" class TestExRuSimPhrPageImages: @@ -168,7 +168,7 @@ def test_ersp_04_01_verify_images_attributes(self, driver, exercises_ru_similar_ page = erspPage(driver) links_style = page.get_links_style() assert links_style, "The 'style' attribute value of links is empty" - assert all(element in erPD.subgroup_links_style_similar_phrases_ru for element in links_style), \ + assert all(element in erPD.series_links_style_similar_phrases_ru for element in links_style), \ "The 'style' attribute value of links mismatches valid values" @allure.title("Verify sizes of background-images in links on the page") diff --git a/tests/exercises_ru_words_page_test.py b/tests/exercises_ru_words_page_test.py index f091ee5098..ac63cd40e5 100644 --- a/tests/exercises_ru_words_page_test.py +++ b/tests/exercises_ru_words_page_test.py @@ -55,7 +55,7 @@ def test_erw_01_03_verify_page_structural_elements(self, driver, exercises_ru_wo list1_visibility = page.check_list1_visibility() list2_on_5th_level = page.get_list2_of_group_links() list2_visibility = page.check_list2_visibility() - list3_on_5th_level = page.get_list3_of_subgroup_links() + list3_on_5th_level = page.get_list3_of_series_links() list3_visibility = page.check_list3_visibility() list4_on_6th_level = page.get_list4_of_links() list4_visibility = page.check_list4_visibility() @@ -93,12 +93,12 @@ def test_erw_02_03_verify_group_links_text(self, driver, exercises_ru_words_page "Text in group links mismatches valid values" @allure.title("Verify text in cards on the page") - def test_erw_02_04_verify_subgroup_links_text(self, driver, exercises_ru_words_page_open): + def test_erw_02_04_verify_series_links_text(self, driver, exercises_ru_words_page_open): page = erwPage(driver) - subgroup_links_text = page.get_subgroup_links_text() - assert subgroup_links_text, "Text in cards is absent" - assert all(element in erPD.subgroup_links_text_words_ru for element in subgroup_links_text), \ - "Text in subgroup links mismatches valid values" + series_links_text = page.get_series_links_text() + assert series_links_text, "Text in cards is absent" + assert all(element in erPD.series_links_text_words_ru for element in series_links_text), \ + "Text in series links mismatches valid values" class TestExRuWordsPageLinks: @allure.title("Verify clickability, href, status code of links in breadcrumbs on the page") @@ -127,21 +127,21 @@ def test_erw_03_02_verify_group_links(self, driver, exercises_ru_words_page_open assert all(element in erPD.group_link_active_links for element in group_link_active_links), \ "Attributes 'active-link' of links in group links mismatch valid values" - @allure.title("Verify clickability, titles, href, status code of subgroup links on the page") - def test_erw_03_03_verify_subgroup_links(self, driver, exercises_ru_words_page_open): + @allure.title("Verify clickability, titles, href, status code of series links on the page") + def test_erw_03_03_verify_series_links(self, driver, exercises_ru_words_page_open): page = erwPage(driver) - subgroup_links_clickability = page.check_subgroup_links_clickability() - subgroup_link_titles = page.get_subgroup_link_titles() - subgroup_links_href = page.get_subgroup_links_href() - subgroup_links_status_codes = page.get_subgroup_link_status_codes() - assert subgroup_links_clickability, "Subgroup links are unclickable" - assert subgroup_link_titles, "Subgroup link titles values are empty" - assert all(element in erPD.subgroup_links_titles_words_ru for element in subgroup_link_titles), \ - "Subgroup link titles mismatch valid values" - assert all(element in ExUrls.subgroup_link_urls_ru_words for element in subgroup_links_href), \ - "Attributes 'href' of subgroup links mismatch valid values" - assert all(element in erPD.links_status_code for element in subgroup_links_status_codes), \ - "Status codes of subgroup links mismatch valid values" + series_links_clickability = page.check_series_links_clickability() + series_link_titles = page.get_series_link_titles() + series_links_href = page.get_series_links_href() + series_links_status_codes = page.get_series_link_status_codes() + assert series_links_clickability, "series links are unclickable" + assert series_link_titles, "series link titles values are empty" + assert all(element in erPD.series_links_titles_words_ru for element in series_link_titles), \ + "series link titles mismatch valid values" + assert all(element in ExUrls.series_link_urls_ru_words for element in series_links_href), \ + "Attributes 'href' of series links mismatch valid values" + assert all(element in erPD.links_status_code for element in series_links_status_codes), \ + "Status codes of series links mismatch valid values" @allure.title("Verify if breadcrumbs links lead to correct pages after clicking") def test_erw_03_04_verify_breadcrumbs_links_navigation(self, driver, exercises_ru_words_page_open): @@ -158,12 +158,12 @@ def test_erw_03_05_verify_group_links_navigation(self, driver, exercises_ru_word assert opened_pages, "Transitions to pages have not performed" assert all(element in ExUrls.group_link_urls for element in opened_pages), "Links lead to incorrect pages" - @allure.title("Verify if subgroup links 1-4 lead to correct pages after clicking") - def test_erw_03_06_verify_subgroup_links_navigation(self, driver, exercises_ru_words_page_open): + @allure.title("Verify if series links 1-4 lead to correct pages after clicking") + def test_erw_03_06_verify_series_links_navigation(self, driver, exercises_ru_words_page_open): page = erwPage(driver) - opened_pages = page.click_on_subgroup_links() + opened_pages = page.click_on_series_links() assert opened_pages, "Transitions to pages have not performed" - assert all(element in ExUrls.subgroup_link_urls_ru_words for element in opened_pages), \ + assert all(element in ExUrls.series_link_urls_ru_words for element in opened_pages), \ "Links lead to incorrect pages" class TestExRuWordsPageImages: @@ -172,7 +172,7 @@ def test_erw_04_01_verify_images_attributes(self, driver, exercises_ru_words_pag page = erwPage(driver) links_style = page.get_links_style() assert links_style, "The 'style' attribute value of links is empty" - assert all(element in erPD.subgroup_links_style_words_ru for element in links_style), \ + assert all(element in erPD.series_links_style_words_ru for element in links_style), \ "The 'style' attribute value of links mismatches valid values" @allure.title("Verify sizes of background-images in links on the page")