Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pages/exercises_ru_words_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions test_data/exercises_ru_words_page_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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");'
]
7 changes: 7 additions & 0 deletions tests/exercises_ru_words_page_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Loading