Skip to content

Commit 1a568e5

Browse files
Merge pull request #626 from Brain-up/issue_623
Issue_623_EXERCISES_WORDS_Family_RU_PAGE_data
2 parents 3dfeda3 + c7e9740 commit 1a568e5

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

tests/conftest.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def description_page_open(driver):
5757

5858
@pytest.fixture()
5959
@allure.step(f'Open page: {ExercisesUrls.STARTING_POINT} on the "ru" local')
60-
def groups_ru_page_open(driver, auto_test_user_authorized):
60+
def groups_ru_page_open1(driver, auto_test_user_authorized):
6161
page = GroupsPage(driver)
6262
ru_button = page.element_is_present_and_clickable(huLocators.RU_BUTTON)
6363
subtitles_before = [el.text for el in page.elements_are_located(GroupsPageLocators.PAGE_SUBTITLES)]
@@ -71,6 +71,22 @@ def subtitles_changed(driver):
7171
page.elements_are_visible(GroupsPageLocators.PAGE_SUBTITLES)
7272

7373

74+
@pytest.fixture()
75+
@allure.step(f'Open page: {ExercisesUrls.STARTING_POINT} on the "ru" local')
76+
def groups_ru_page_open(driver, auto_test_user_authorized):
77+
page = GroupsPage(driver)
78+
current_url_before = driver.current_url
79+
ru_button = page.element_is_present_and_clickable(huLocators.RU_BUTTON)
80+
ru_button.click()
81+
82+
def url_locale_changed(driver):
83+
current_url = driver.current_url
84+
return current_url != current_url_before and "locale=ru-ru" in current_url
85+
86+
Wait(driver, 20).until(url_locale_changed)
87+
page.elements_are_visible(GroupsPageLocators.PAGE_SUBTITLES)
88+
89+
7490
@pytest.fixture()
7591
@allure.step(f'Open page: {ExercisesUrls.STARTING_POINT}')
7692
def groups_en_page_open(driver, auto_test_user_authorized):

0 commit comments

Comments
 (0)