Skip to content
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
5 changes: 3 additions & 2 deletions locators/exercises_ru_words_family_page_locators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Locators of web elements on the 'Exercises "Family"' page in the series "Words" on the 'ru' local"""
"""Locators of web elements on the exercises subgroup "Family" page in the series "Words" on the "ru" local"""
from selenium.webdriver.common.by import By


class ExercisesRuWordsFamilyPageLocators:
pass
PAGE_CONTENT = (By.TAG_NAME, "main")
9 changes: 8 additions & 1 deletion pages/exercises_ru_words_family_page.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
"""Methods for verifying web elements on the 'Exercises "Family"' page in the series "Words" on the 'ru' local"""
"""Methods for verifying web elements on the exercises subgroup "Family" page
in the series "Words" on the "ru" local"""
import allure
from pages.base_page import BasePage
from locators.exercises_ru_words_family_page_locators import ExercisesRuWordsFamilyPageLocators


class ExercisesRuWordsFamilyPage(BasePage):
locators = ExercisesRuWordsFamilyPageLocators

# Checking the structure and display of elements on the page
@allure.step("Check if some content is present in DOM")
def check_presence_of_page_content(self):
return self.element_is_present(self.locators.PAGE_CONTENT)
1 change: 1 addition & 0 deletions test_data/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ class ExercisesUrls:
f"{c}46")

# Speech Exercises > Words > Family
URL_EXERCISES_RU_WORDS_FAMILY_PAGE = f"{STARTING_POINT}/2/series/1/subgroup/1"
URL_EXERCISE1_MODAL_WINDOW_PAGE = f"{STARTING_POINT}/4/series/9/subgroup/73/exercise/919/task/919"
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ def page_fully_loaded(driver):
Wait(driver, 10).until(EC.presence_of_all_elements_located(erwPL.PAGE_LIST3))


@pytest.fixture()
@allure.step(f'Open page: {ExercisesUrls.URL_EXERCISES_RU_WORDS_FAMILY_PAGE} on the "ru" local')
def exercises_ru_words_family_page_open(driver, groups_ru_page_open):
driver.get(ExercisesUrls.URL_EXERCISES_RU_WORDS_FAMILY_PAGE)


@pytest.fixture()
@allure.step(f'Open page: {MainPageLinks.URL_LOGIN_PAGE}')
def login_page_open(driver, main_page_open):
Expand Down
13 changes: 10 additions & 3 deletions tests/exercises_ru_words_family_page_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
"""Auto tests for verifying web elements on the 'Exercises "Family"' page in the series "Words" on the 'ru' local"""
"""Auto tests for verifying web elements on the exercises subgroup "Family" page
in the series "Words" on the "ru" local"""
import allure
from pages.exercises_ru_words_family_page import ExercisesRuWordsFamilyPage as erwfPage


@allure.epic("The Exercises 'Family' page in the series 'Words' on the 'ru' local")
@allure.epic("The exercises subgroup 'Family' page in the series 'Words' on the 'ru' local")
class TestExercisesRuWordsFamilyPage:
pass
class TestExRuWordsFamilyPageStructure:
@allure.title("Verify presence and visibility of content on the page")
def test_erwf_01_01_verify_page_presence(self, driver, exercises_ru_words_family_page_open):
page = erwfPage(driver)
page_content_presence = page.check_presence_of_page_content()
assert page_content_presence, "The page content is absent in DOM"
Loading