Skip to content

Commit 3dfeda3

Browse files
Merge pull request #625 from Brain-up/issue_623
Issue_623_EXERCISES_WORDS_Family_RU_PAGE_structure
2 parents 1799c0b + 2c3bd6b commit 3dfeda3

5 files changed

Lines changed: 28 additions & 6 deletions

File tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
"""Locators of web elements on the 'Exercises "Family"' page in the series "Words" on the 'ru' local"""
1+
"""Locators of web elements on the exercises subgroup "Family" page in the series "Words" on the "ru" local"""
2+
from selenium.webdriver.common.by import By
23

34

45
class ExercisesRuWordsFamilyPageLocators:
5-
pass
6+
PAGE_CONTENT = (By.TAG_NAME, "main")
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
"""Methods for verifying web elements on the 'Exercises "Family"' page in the series "Words" on the 'ru' local"""
1+
"""Methods for verifying web elements on the exercises subgroup "Family" page
2+
in the series "Words" on the "ru" local"""
3+
import allure
24
from pages.base_page import BasePage
35
from locators.exercises_ru_words_family_page_locators import ExercisesRuWordsFamilyPageLocators
46

57

68
class ExercisesRuWordsFamilyPage(BasePage):
79
locators = ExercisesRuWordsFamilyPageLocators
10+
11+
# Checking the structure and display of elements on the page
12+
@allure.step("Check if some content is present in DOM")
13+
def check_presence_of_page_content(self):
14+
return self.element_is_present(self.locators.PAGE_CONTENT)

test_data/links.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ class ExercisesUrls:
4545
f"{c}46")
4646

4747
# Speech Exercises > Words > Family
48+
URL_EXERCISES_RU_WORDS_FAMILY_PAGE = f"{STARTING_POINT}/2/series/1/subgroup/1"
4849
URL_EXERCISE1_MODAL_WINDOW_PAGE = f"{STARTING_POINT}/4/series/9/subgroup/73/exercise/919/task/919"

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ def page_fully_loaded(driver):
119119
Wait(driver, 10).until(EC.presence_of_all_elements_located(erwPL.PAGE_LIST3))
120120

121121

122+
@pytest.fixture()
123+
@allure.step(f'Open page: {ExercisesUrls.URL_EXERCISES_RU_WORDS_FAMILY_PAGE} on the "ru" local')
124+
def exercises_ru_words_family_page_open(driver, groups_ru_page_open):
125+
driver.get(ExercisesUrls.URL_EXERCISES_RU_WORDS_FAMILY_PAGE)
126+
127+
122128
@pytest.fixture()
123129
@allure.step(f'Open page: {MainPageLinks.URL_LOGIN_PAGE}')
124130
def login_page_open(driver, main_page_open):
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
"""Auto tests for verifying web elements on the 'Exercises "Family"' page in the series "Words" on the 'ru' local"""
1+
"""Auto tests for verifying web elements on the exercises subgroup "Family" page
2+
in the series "Words" on the "ru" local"""
23
import allure
4+
from pages.exercises_ru_words_family_page import ExercisesRuWordsFamilyPage as erwfPage
35

46

5-
@allure.epic("The Exercises 'Family' page in the series 'Words' on the 'ru' local")
7+
@allure.epic("The exercises subgroup 'Family' page in the series 'Words' on the 'ru' local")
68
class TestExercisesRuWordsFamilyPage:
7-
pass
9+
class TestExRuWordsFamilyPageStructure:
10+
@allure.title("Verify presence and visibility of content on the page")
11+
def test_erwf_01_01_verify_page_presence(self, driver, exercises_ru_words_family_page_open):
12+
page = erwfPage(driver)
13+
page_content_presence = page.check_presence_of_page_content()
14+
assert page_content_presence, "The page content is absent in DOM"

0 commit comments

Comments
 (0)