Skip to content

Commit eadc6d8

Browse files
Merge pull request #631 from Brain-up/issue_623
Issue_623_EXERCISES_WORDS_Family_RU_PAGE_structure
2 parents 0a34e89 + fffea47 commit eadc6d8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pages/exercises_ru_words_family_page.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ def check_elements_visibility_on_1st_level(self):
2828
@allure.step("Get structure of the 2nd level of nesting on the page")
2929
def get_structure_of_2nd_level(self):
3030
elements = self.elements_are_present(self.locators.PAGE_SECOND_LEVEL_ELEMENTS)
31-
tags = [element.tag_name for element in elements]
32-
print(*tags, sep='\n')
31+
# tags = [element.tag_name for element in elements]
32+
# print(*tags, sep='\n')
3333
return elements
3434

35+
@allure.step("Check if elements of the 2nd level of nesting are visible")
36+
def check_elements_visibility_on_2nd_level(self):
37+
return all(element.is_displayed() for element in self.get_structure_of_2nd_level())

tests/exercises_ru_words_family_page_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ def test_erwf_01_01_verify_page_presence_and_visibility(self, driver, exercises_
1515
assert page_content_presence, "The page content is absent in DOM"
1616
assert page_content_visibility, "The page content is invisible"
1717

18-
@allure.title("Verify composition, visibility of elements on the 1st level of nesting on the page")
18+
@allure.title("Verify composition, visibility of elements on the 1st-2nd levels of nesting on the page")
1919
def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises_ru_words_family_page_open):
2020
page = erwfPage(driver)
2121
structure_of_1st_level = page.get_structure_of_1st_level()
2222
visibility_of_elements_on_1st_level = page.check_elements_visibility_on_1st_level()
2323
structure_of_2nd_level = page.get_structure_of_2nd_level()
24+
visibility_of_elements_on_2nd_level = page.check_elements_visibility_on_2nd_level()
2425
assert structure_of_1st_level, "The page is empty"
2526
assert visibility_of_elements_on_1st_level, "1th-level elements are invisible"
2627
assert structure_of_2nd_level, "Elements on the 2nd level are absent on the page"
28+
assert visibility_of_elements_on_2nd_level, "2nd-level elements are invisible"

0 commit comments

Comments
 (0)