Skip to content

Commit 4176694

Browse files
committed
fixed fixtures, updated tests
1 parent 3e19220 commit 4176694

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from homeless_test_python.utils import attach
77

88

9-
@pytest.fixture(scope='function', autouse=True)
9+
@pytest.fixture(scope='function')
1010
def browser_management():
1111
browser.config.window_width = 2560
1212
browser.config.window_height = 1440
@@ -38,5 +38,5 @@ def browser_management():
3838

3939

4040
@pytest.fixture(scope='function')
41-
def how_to_help():
41+
def how_to_help(browser_management):
4242
browser.open('https://homeless.ru/how_to_help/')

tests/test_main_page.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@allure.feature("Основная функциональность")
1010
@allure.story("Главная страница")
1111
@allure.description("Тест открывает главную страницу сайта и проверяет, что страница загружена")
12-
def test_open_main_page():
12+
def test_open_main_page(browser_management):
1313
mainpage.open_main_page()
1414
mainpage.check_main_page_is_opened()
1515

@@ -20,7 +20,7 @@ def test_open_main_page():
2020
@allure.story("Главная страница")
2121
@allure.description("Тест открывает на главной странице ссылку на страницу пожертвований и"
2222
" проверяет, что страница пожертвований открылась в новой владке браузера")
23-
def test_switch_on_help_page():
23+
def test_switch_on_help_page(browser_management):
2424
mainpage.open_main_page()
2525
mainpage.click_help_button()
2626
helppage.check_help_page_is_opened()

0 commit comments

Comments
 (0)