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
1 change: 1 addition & 0 deletions test_data/exercises_ru_words_page_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

class ExercisesRuWordsPageData:
tab_title = ["Речевые упражнения (готовы для занятий) | BrainUp", "Speech exercises | BrainUp"]
tab_title_ru = "Речевые упражнения (готовы для занятий) | BrainUp"
14 changes: 13 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,24 @@ def description_page_open(driver):

@pytest.fixture()
@allure.step(f'Open page: {ExercisesUrls.URL_EXERCISES_RU_WORDS_PAGE}')
def exercises_ru_words_page_open(driver, auto_test_user_authorized):
def exercises_ru_words_page_open1(driver, auto_test_user_authorized):
page = BasePage(driver)
page.element_is_present_and_clickable(HeaderUnauthorizedLocators.RU_BUTTON).click()
page.element_is_present_and_clickable(GroupsPageLocators.PAGE_LINK2).click()
time.sleep(3)

@pytest.fixture()
@allure.step(f'Open page: {ExercisesUrls.URL_EXERCISES_RU_WORDS_PAGE}')
def exercises_ru_words_page_open(driver, main_page_open):
page = BasePage(driver)
page.element_is_present_and_clickable(MainPageLocators.LOGIN_BUTTON).click()
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()
page.element_is_present_and_clickable(HeaderUnauthorizedLocators.RU_BUTTON).click()
page.element_is_present_and_clickable(GroupsPageLocators.PAGE_LINK2).click()
time.sleep(3)


@pytest.fixture()
@allure.step(f'Open page: {MainPageLinks.URL_LOGIN_PAGE}')
Expand Down
2 changes: 1 addition & 1 deletion tests/exercises_ru_words_page_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ def test_erw_02_01_verify_tab_title(self, driver, exercises_ru_words_page_open):
page = ExercisesRuWordsPage(driver)
tab_title_value = page.get_value_of_tab_title()
assert tab_title_value, "The title value of the tab is empty"
assert tab_title_value in ExercisesRuWordsPageData.tab_title, \
assert tab_title_value == ExercisesRuWordsPageData.tab_title_ru, \
"The title on the tab doesn't match the valid value"
Loading