diff --git a/pages/exercises_ru_words_page.py b/pages/exercises_ru_words_page.py index fe718e842b..ccb4997211 100644 --- a/pages/exercises_ru_words_page.py +++ b/pages/exercises_ru_words_page.py @@ -264,3 +264,10 @@ def click_on_subgroup_link_beloved_home_food_clothes(self): time.sleep(1) print(*opened_pages, sep='\n') return opened_pages + + # Checking images on the page + @allure.step("Get the list of attribute 'style' values of images in links") + def get_links_style(self): + style = [image.get_attribute('style') for image in self.get_list4_of_links()] + print(len(style), *style, sep='\n') + return style diff --git a/test_data/exercises_ru_words_page_data.py b/test_data/exercises_ru_words_page_data.py index ca816919e5..5e4446be6c 100644 --- a/test_data/exercises_ru_words_page_data.py +++ b/test_data/exercises_ru_words_page_data.py @@ -113,3 +113,20 @@ class ExercisesRuWordsPageData: ] links_status_code = 200 + + subgroup_links_style = [ + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/family.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/home.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/food.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/clothes.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/school.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/math.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/pets.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/animals.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/transport.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/colors.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/city.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/country.svg"");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/walk.svg");', + 'background - image: url("https://brnup.s3.eu-north-1.amazonaws.com/pictures/theme/weather.svg");' + ] diff --git a/tests/exercises_ru_words_page_test.py b/tests/exercises_ru_words_page_test.py index b010144794..042032bd09 100644 --- a/tests/exercises_ru_words_page_test.py +++ b/tests/exercises_ru_words_page_test.py @@ -170,3 +170,10 @@ def test_erw_03_06_verify_subgroup_links_lead_to_correct_pages(self, driver, exe assert opened_pages2_4, "Transitions to pages have not performed" assert all(page in ExRuWoPaData.subgroup_link_urls for page in opened_pages2_4), \ "Some subgroup links lead to incorrect pages after clicking" + + class TestExercisesRuWordsPageImages: + @allure.title("Verify attributes of images in links on the page") + def test_erw_04_01_verify_images_attributes(self, driver, exercises_ru_words_page_open): + page = ExercisesRuWordsPage(driver) + links_style = page.get_links_style() + assert links_style, "The 'style' attribute value of links is empty"