Skip to content

Issue_268_HEADER_tests #557

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 9, 2025
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
17 changes: 4 additions & 13 deletions pages/groups_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def check_elements_visibility_on_1st_level(self):

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

@allure.step("Check if elements of the 2nd level of nesting are visible")
Expand All @@ -43,7 +42,6 @@ def check_elements_visibility_on_2nd_level(self):

@allure.step("Get structure of the 3rd level of nesting on the page")
def get_structure_of_3rd_level(self):
# tags = [element.tag_name for element in elements]
return self.elements_are_present(self.locators.PAGE_THIRD_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 3rd level of nesting are visible")
Expand All @@ -52,7 +50,6 @@ def check_elements_visibility_on_3rd_level(self):

@allure.step("Get structure of the 4th level of nesting on the page")
def get_structure_of_4th_level(self):
# tags = [element.tag_name for element in elements]
return self.elements_are_present(self.locators.PAGE_FOURTH_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 4th level of nesting are visible")
Expand All @@ -61,7 +58,6 @@ def check_elements_visibility_on_4th_level(self):

@allure.step("Get structure of the 5th level of nesting on the page")
def get_structure_of_5th_level(self):
# tags = [element.tag_name for element in elements]
return self.elements_are_present(self.locators.PAGE_FIFTH_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 5th level of nesting are visible")
Expand All @@ -70,14 +66,11 @@ def check_elements_visibility_on_5th_level(self):

@allure.step("Get structure of the 6th level of nesting on the page")
def get_structure_of_6th_level(self):
elements = self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS)
# tags = [element.tag_name for element in elements]
return elements
return self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS)

@allure.step("Check if elements of the 6th level of nesting are visible")
def check_elements_visibility_on_6th_level(self):
elements = self.get_structure_of_6th_level()
return all(element.is_displayed() for element in elements)
return all(element.is_displayed() for element in self.get_structure_of_6th_level())

@allure.step("Check the title h3 on the 2nd level of nesting is present on the page")
def check_title_presence(self):
Expand All @@ -97,13 +90,11 @@ def check_visibility_of_tiles(self):

@allure.step("Get the list of images on the 6th level of nesting on the page")
def get_list_of_images(self):
elements = self.elements_are_present(self.locators.PAGE_IMAGES)
return elements
return self.elements_are_present(self.locators.PAGE_IMAGES)

@allure.step("Check if images on the 6th level of nesting are visible")
def check_visibility_of_images(self):
elements = self.get_list_of_images()
return all(element.is_displayed() for element in elements)
return all(element.is_displayed() for element in self.get_list_of_images())

@allure.step("Get the list of subtitles on the 6th level of nesting on the page")
def get_list_of_subtitles(self):
Expand Down
2 changes: 0 additions & 2 deletions pages/header_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ def click_on_internal_links_in_header_unauth(self):
link.click()
Wait(self.driver, 10).until(EC.url_changes(current_url))
opened_pages.append(self.get_current_tab_url())
print(*opened_pages, sep='\n') # Temporarily for debugging
return opened_pages

@allure.step("""Click on internal links in the Header and thereby open corresponding web pages in the same tab
Expand All @@ -362,7 +361,6 @@ def click_on_internal_links_in_header_auth(self):
link.click()
Wait(self.driver, 10).until(EC.url_changes(current_url))
opened_pages.append(self.get_current_tab_url())
print(*opened_pages, sep='\n') # Temporarily for debugging
return opened_pages

@allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs
Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,9 @@ def used_resources_page_open(driver, main_page_open):
def auto_test_user_authorized(driver, main_page_open):
page = BasePage(driver)
page.element_is_present_and_clickable(MainPageLocators.LOGIN_BUTTON).click()
print("Current URL:", driver.current_url) # Temporarily for debugging
page.element_is_visible(LoginPageLocators.INPUT_LOGIN).send_keys(os.environ["LOGIN"])
page.element_is_visible(LoginPageLocators.INPUT_PASSWORD).send_keys(os.environ["PASSWORD"])
page.element_is_present_and_clickable(LoginPageLocators.SIGN_IN_BUTTON).click()
print("Current URL:", driver.current_url) # Temporarily for debugging
page.check_expected_link(MainPageLinks.URL_GROUPS_PAGE)
print("Current URL:", driver.current_url) # Temporarily for debugging
page = ProfilePage(driver)
Expand Down