Skip to content

Commit 249a301

Browse files
Merge pull request #560 from Brain-up/issue_209
Issue_209_START_PAGE_FOR_UNAUTHORIZED_USER_tests
2 parents 4dcecbf + 5d10b83 commit 249a301

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

pages/start_unauthorized_page.py

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ def check_visibility_of_page_content(self):
2121

2222
@allure.step("Get amount of sections with content on the page")
2323
def get_amount_of_sections_on_page(self):
24-
sections = self.elements_are_present(self.locators.PAGE_SECTIONS)
25-
return len(sections)
24+
return len(self.elements_are_present(self.locators.PAGE_SECTIONS))
2625

2726
@allure.step("Check sections are visible")
2827
def check_visibility_of_sections(self):
@@ -31,59 +30,48 @@ def check_visibility_of_sections(self):
3130

3231
@allure.step("Get structure of the 1st level of nesting in the section 1")
3332
def get_structure_of_1st_level_in_section1(self):
34-
elements = self.elements_are_present(self.locators.SECTION_1_FIRST_LEVEL_ELEMENTS)
3533
# tags = [element.tag_name for element in elements]
36-
return elements
34+
return self.elements_are_present(self.locators.SECTION_1_FIRST_LEVEL_ELEMENTS)
3735

3836
@allure.step("Check if elements of the 1st level of nesting are visible in the section 1")
3937
def check_elements_visibility_on_1st_level_in_section1(self):
4038
return all(element.is_displayed() for element in self.get_structure_of_1st_level_in_section1())
4139

4240
@allure.step("Get structure of the 2nd level of nesting in the section 1")
4341
def get_structure_of_2nd_level_in_section1(self):
44-
elements = self.elements_are_present(self.locators.SECTION_1_SECOND_LEVEL_ELEMENTS)
45-
# tags = [element.tag_name for element in elements]
46-
return elements
42+
return self.elements_are_present(self.locators.SECTION_1_SECOND_LEVEL_ELEMENTS)
4743

4844
@allure.step("Check if elements of the 2nd level of nesting are visible in the section 1")
4945
def check_elements_visibility_on_2nd_level_in_section1(self):
5046
return all(element.is_displayed() for element in self.get_structure_of_2nd_level_in_section1())
5147

5248
@allure.step("Get structure of the 3rd level of nesting in the section 1")
5349
def get_structure_of_3rd_level_in_section1(self):
54-
elements = self.elements_are_present(self.locators.SECTION_1_THIRD_LEVEL_ELEMENTS)
55-
# tags = [element.tag_name for element in elements]
56-
return elements
50+
return self.elements_are_present(self.locators.SECTION_1_THIRD_LEVEL_ELEMENTS)
5751

5852
@allure.step("Check if elements of the 3rd level of nesting are visible in the section 1")
5953
def check_visibility_of_elements_on_3rd_level_in_section1(self):
6054
return all(element.is_displayed() for element in self.get_structure_of_3rd_level_in_section1())
6155

6256
@allure.step("Get structure of the 1st level of nesting in the section 2")
6357
def get_structure_of_1st_level_in_section2(self):
64-
elements = self.elements_are_present(self.locators.SECTION_2_FIRST_LEVEL_ELEMENTS)
65-
# tags = [element.tag_name for element in elements]
66-
return elements
58+
return self.elements_are_present(self.locators.SECTION_2_FIRST_LEVEL_ELEMENTS)
6759

6860
@allure.step("Check if elements of the 1st level of nesting are visible in the section 2")
6961
def check_elements_visibility_on_1st_level_in_section2(self):
7062
return all(element.is_displayed() for element in self.get_structure_of_1st_level_in_section2())
7163

7264
@allure.step("Get structure of the 2nd level of nesting in the section 2")
7365
def get_structure_of_2nd_level_in_section2(self):
74-
elements = self.elements_are_present(self.locators.SECTION_2_SECOND_LEVEL_ELEMENTS)
75-
# tags = [element.tag_name for element in elements]
76-
return elements
66+
return self.elements_are_present(self.locators.SECTION_2_SECOND_LEVEL_ELEMENTS)
7767

7868
@allure.step("Check if elements of the 2nd level of nesting are visible in the section 2")
7969
def check_elements_visibility_on_2nd_level_in_section2(self):
8070
return all(element.is_displayed() for element in self.get_structure_of_2nd_level_in_section2())
8171

8272
@allure.step("Get structure of the 3rd level of nesting in the section 2")
8373
def get_structure_of_3rd_level_in_section2(self):
84-
elements = self.elements_are_present(self.locators.SECTION_2_THIRD_LEVEL_ELEMENTS)
85-
# tags = [element.tag_name for element in elements]
86-
return elements
74+
return self.elements_are_present(self.locators.SECTION_2_THIRD_LEVEL_ELEMENTS)
8775

8876
@allure.step("Check if elements of the 3rd level of nesting are visible in the section 2")
8977
def check_visibility_of_elements_on_3rd_level_in_section2(self):

0 commit comments

Comments
 (0)