Skip to content

Issue_209_START_PAGE_FOR_UNAUTHORIZED_USER_tests #560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025
Merged
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
26 changes: 7 additions & 19 deletions pages/start_unauthorized_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def check_visibility_of_page_content(self):

@allure.step("Get amount of sections with content on the page")
def get_amount_of_sections_on_page(self):
sections = self.elements_are_present(self.locators.PAGE_SECTIONS)
return len(sections)
return len(self.elements_are_present(self.locators.PAGE_SECTIONS))

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

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

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

@allure.step("Get structure of the 2nd level of nesting in the section 1")
def get_structure_of_2nd_level_in_section1(self):
elements = self.elements_are_present(self.locators.SECTION_1_SECOND_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_1_SECOND_LEVEL_ELEMENTS)

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

@allure.step("Get structure of the 3rd level of nesting in the section 1")
def get_structure_of_3rd_level_in_section1(self):
elements = self.elements_are_present(self.locators.SECTION_1_THIRD_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_1_THIRD_LEVEL_ELEMENTS)

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

@allure.step("Get structure of the 1st level of nesting in the section 2")
def get_structure_of_1st_level_in_section2(self):
elements = self.elements_are_present(self.locators.SECTION_2_FIRST_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_2_FIRST_LEVEL_ELEMENTS)

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

@allure.step("Get structure of the 2nd level of nesting in the section 2")
def get_structure_of_2nd_level_in_section2(self):
elements = self.elements_are_present(self.locators.SECTION_2_SECOND_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_2_SECOND_LEVEL_ELEMENTS)

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

@allure.step("Get structure of the 3rd level of nesting in the section 2")
def get_structure_of_3rd_level_in_section2(self):
elements = self.elements_are_present(self.locators.SECTION_2_THIRD_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.SECTION_2_THIRD_LEVEL_ELEMENTS)

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