Skip to content

Commit 9357c14

Browse files
ref test_gp_01.02, test_gp_01.03
update header_page.py, groups_page.py, conftest.py
1 parent 7f8f129 commit 9357c14

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

pages/groups_page.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def check_elements_visibility_on_1st_level(self):
3434

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

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

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

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

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

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

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

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

7167
@allure.step("Get structure of the 6th level of nesting on the page")
7268
def get_structure_of_6th_level(self):
73-
elements = self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS)
74-
# tags = [element.tag_name for element in elements]
75-
return elements
69+
return self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS)
7670

7771
@allure.step("Check if elements of the 6th level of nesting are visible")
7872
def check_elements_visibility_on_6th_level(self):
79-
elements = self.get_structure_of_6th_level()
80-
return all(element.is_displayed() for element in elements)
73+
return all(element.is_displayed() for element in self.get_structure_of_6th_level())
8174

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

9891
@allure.step("Get the list of images on the 6th level of nesting on the page")
9992
def get_list_of_images(self):
100-
elements = self.elements_are_present(self.locators.PAGE_IMAGES)
101-
return elements
93+
return self.elements_are_present(self.locators.PAGE_IMAGES)
10294

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

10899
@allure.step("Get the list of subtitles on the 6th level of nesting on the page")
109100
def get_list_of_subtitles(self):

pages/header_page.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ def click_on_internal_links_in_header_unauth(self):
342342
link.click()
343343
Wait(self.driver, 10).until(EC.url_changes(current_url))
344344
opened_pages.append(self.get_current_tab_url())
345-
print(*opened_pages, sep='\n') # Temporarily for debugging
346345
return opened_pages
347346

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

368366
@allure.step("""Click on external links in the Header and thereby open corresponding web pages on new tabs

tests/conftest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,9 @@ def used_resources_page_open(driver, main_page_open):
150150
def auto_test_user_authorized(driver, main_page_open):
151151
page = BasePage(driver)
152152
page.element_is_present_and_clickable(MainPageLocators.LOGIN_BUTTON).click()
153-
print("Current URL:", driver.current_url) # Temporarily for debugging
154153
page.element_is_visible(LoginPageLocators.INPUT_LOGIN).send_keys(os.environ["LOGIN"])
155154
page.element_is_visible(LoginPageLocators.INPUT_PASSWORD).send_keys(os.environ["PASSWORD"])
156155
page.element_is_present_and_clickable(LoginPageLocators.SIGN_IN_BUTTON).click()
157-
print("Current URL:", driver.current_url) # Temporarily for debugging
158156
page.check_expected_link(MainPageLinks.URL_GROUPS_PAGE)
159157
print("Current URL:", driver.current_url) # Temporarily for debugging
160158
page = ProfilePage(driver)

0 commit comments

Comments
 (0)