Skip to content

Commit 56f66fd

Browse files
Merge pull request #543 from Brain-up/issue_402
Issue_402_GROUPS_PAGE_tests
2 parents 2a7d635 + 1d47912 commit 56f66fd

File tree

3 files changed

+0
-29
lines changed

3 files changed

+0
-29
lines changed

pages/groups_page.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,11 @@
66
from locators.groups_page_locators import GroupsPageLocators, HeaderLocators
77
from test_data.links import MainPageLinks as Links
88

9-
from selenium.webdriver.support.ui import WebDriverWait
10-
from selenium.webdriver.support import expected_conditions as ec
11-
129

1310
class GroupsPage(BasePage):
1411
locators = GroupsPageLocators
1512
locators1 = HeaderLocators
1613

17-
@allure.step("Loader checking")
18-
def loader_checking(self):
19-
self.timeout = 50
20-
return WebDriverWait(self.driver, self.timeout).until(
21-
ec.visibility_of_element_located(self.locators.PAGE_SUBTITLES))
22-
2314
# Checking the structure and display of elements on the page
2415
@allure.step("Check if some content is present in DOM")
2516
def check_presence_of_page_content(self):
@@ -76,17 +67,13 @@ def check_elements_visibility_on_5th_level(self):
7667

7768
@allure.step("Get structure of the 6th level of nesting on the page")
7869
def get_structure_of_6th_level(self):
79-
WebDriverWait(self.driver, 30).until(
80-
ec.presence_of_all_elements_located(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS))
8170
elements = self.elements_are_present(self.locators.PAGE_SIXTH_LEVEL_ELEMENTS)
8271
# tags = [element.tag_name for element in elements]
8372
return elements
8473

8574
@allure.step("Check if elements of the 6th level of nesting are visible")
8675
def check_elements_visibility_on_6th_level(self):
8776
elements = self.get_structure_of_6th_level()
88-
for element in elements:
89-
WebDriverWait(self.driver, 10).until(ec.visibility_of(element))
9077
return all(element.is_displayed() for element in elements)
9178

9279
@allure.step("Check the title h3 on the 2nd level of nesting is present on the page")
@@ -107,16 +94,12 @@ def check_visibility_of_tiles(self):
10794

10895
@allure.step("Get the list of images on the 6th level of nesting on the page")
10996
def get_list_of_images(self):
110-
WebDriverWait(self.driver, 30).until(
111-
ec.presence_of_all_elements_located(self.locators.PAGE_IMAGES))
11297
elements = self.elements_are_present(self.locators.PAGE_IMAGES)
11398
return elements
11499

115100
@allure.step("Check if images on the 6th level of nesting are visible")
116101
def check_visibility_of_images(self):
117102
elements = self.get_list_of_images()
118-
for element in elements:
119-
WebDriverWait(self.driver, 10).until(ec.visibility_of(element))
120103
return all(element.is_displayed() for element in elements)
121104

122105
@allure.step("Get the list of subtitles on the 6th level of nesting on the page")
@@ -168,7 +151,6 @@ def check_links_clickability(self):
168151
@allure.step("Get attribute 'title' of links on the 'ru' local")
169152
def get_links_titles_ru(self):
170153
elements = self.get_list_of_links()
171-
# WebDriverWait(self.driver, 10).until(ec.visibility_of_all_elements_located(self.locators.PAGE_IMAGES))
172154
return [element.get_attribute('title') for element in elements]
173155

174156
@allure.step("Get attribute 'title' of links on the 'en' local")
@@ -228,7 +210,6 @@ def get_images_src(self):
228210
@allure.step("Get the list of attribute 'alt' values of images in links on the 'ru' local")
229211
def get_images_alt_ru(self):
230212
elements = self.get_list_of_images()
231-
WebDriverWait(self.driver, 10).until(ec.visibility_of_all_elements_located(self.locators.PAGE_IMAGES))
232213
return [element.get_attribute('alt') for element in elements]
233214

234215
@allure.step("Get the list of attribute 'alt' values of images in links on the 'en' local")
@@ -238,8 +219,6 @@ def get_images_alt_en(self):
238219
@allure.step("Get the list of sizes of images in links")
239220
def get_images_sizes(self):
240221
elements = self.get_list_of_images()
241-
for element in elements:
242-
WebDriverWait(self.driver, 10).until(ec.visibility_of(element))
243222
return [element.size for element in elements]
244223

245224
@allure.step("Check changes of images sizes after resizing")

tests/exercises_ru_similar_phrases_page_test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ class TestExRuSimPhrPageText:
7272
def test_ersp_02_01_verify_tab_title(self, driver, exercises_ru_similar_phrases_page_open):
7373
page = erspPage(driver)
7474
tab_title_value = page.get_value_of_tab_title()
75-
print("Found tab title value:", tab_title_value) # temporarily for debugging
76-
print("Expected tab title value:", erspPD.tab_title_ru)
7775
assert tab_title_value, "The title value of the tab is empty"
7876
assert tab_title_value in erspPD.tab_title_ru, "The tab title mismatches the valid value"
7977

@@ -97,8 +95,6 @@ def test_ersp_02_03_verify_group_links_text(self, driver, exercises_ru_similar_p
9795
def test_ersp_02_04_verify_subgroup_links_text(self, driver, exercises_ru_similar_phrases_page_open):
9896
page = erspPage(driver)
9997
subgroup_links_text = page.get_subgroup_links_text()
100-
print("Found tab title value:", subgroup_links_text) # temporarily for debugging
101-
print("Expected tab title value:", erspPD.subgroup_links_text)
10298
assert subgroup_links_text, "Text in cards is absent"
10399
assert all(element in erspPD.subgroup_links_text for element in subgroup_links_text), \
104100
"Text in subgroup links mismatches valid values"

tests/groups_page_test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ def test_gp_03_01_verify_links(self, driver, groups_ru_page_open):
126126
def test_gp_03_02_01_verify_links_ru_title(self, driver, groups_ru_page_open):
127127
page = gPage(driver)
128128
link_titles_ru = page.get_links_titles_ru()
129-
print("Found alt attributes:", link_titles_ru) # temporarily for debugging
130-
print("Expected alt attributes:", gPD.link_titles_ru)
131129
assert link_titles_ru, "Link titles values are empty on the 'ru' local"
132130
assert all(element in gPD.link_titles_ru for element in link_titles_ru), \
133131
"Link titles mismatch any valid values on the 'ru' local"
@@ -181,8 +179,6 @@ def test_gp_04_01_verify_images_src(self, driver, groups_ru_page_open):
181179
def test_gp_04_02_verify_images_alt_ru(self, driver, groups_ru_page_open):
182180
page = gPage(driver)
183181
images_alt_ru = page.get_images_alt_ru()
184-
print("Found alt attributes:", images_alt_ru) # temporarily for debugging
185-
print("Expected alt attributes:", gPD.images_alt_ru)
186182
assert images_alt_ru, "The 'alt' attribute value of some images is empty on the 'ru' local"
187183
assert all(element in gPD.images_alt_ru for element in images_alt_ru), \
188184
"The 'alt' attribute value of some images is empty or mismatches valid values on the 'ru' local"

0 commit comments

Comments
 (0)