Skip to content

Commit 78de240

Browse files
Merge pull request #646 from Brain-up/issue_623
Issue_623_EXERCISES_WORDS_Family_RU_PAGE_structure
2 parents 38e5e9f + 6c25003 commit 78de240

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

pages/exercises_ru_words_family_page.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def check_elements_invisibility_on_8th_level(self):
8585
def get_structure_of_9th_level(self):
8686
return self.elements_are_present(self.locators.PAGE_NINTH_LEVEL_ELEMENTS)
8787

88+
@allure.step("Check if elements of the 9th level of nesting are visible")
89+
def check_elements_visibility_on_9th_level(self):
90+
return all(element.is_displayed() for element in self.get_structure_of_9th_level())
91+
8892
@allure.step("Get structure of the 10th level of nesting on the page")
8993
def get_structure_of_10th_level(self):
9094
elements = self.elements_are_present(self.locators.PAGE_TENTH_LEVEL_ELEMENTS)

tests/exercises_ru_words_family_page_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises
3434
structure_of_8th_level = page.get_structure_of_8th_level()
3535
visibility_of_elements_on_8th_level = page.check_elements_visibility_on_8th_level()
3636
structure_of_9th_level = page.get_structure_of_9th_level()
37+
visibility_of_elements_on_9th_level = page.check_elements_visibility_on_9th_level()
3738
structure_of_10th_level = page.get_structure_of_10th_level()
3839
visibility_of_elements_on_10th_level = page.check_elements_visibility_on_10th_level()
3940
assert structure_of_1st_level, "The page is empty"
@@ -52,5 +53,6 @@ def test_erwf_01_02_verify_page_structure_and_visibility(self, driver, exercises
5253
assert structure_of_8th_level, "Elements on the 8th level are absent on the page"
5354
assert not visibility_of_elements_on_8th_level, "8th-level elements are visible"
5455
assert structure_of_9th_level, "Elements on the 9th level are absent on the page"
56+
assert not visibility_of_elements_on_9th_level, "9th-level elements are visible"
5557
assert structure_of_10th_level, "Elements on the 10th level are absent on the page"
5658
assert visibility_of_elements_on_10th_level, "10th-level elements are invisible"

0 commit comments

Comments
 (0)