From ace5868571b84fce34f49d619817403823dca3c7 Mon Sep 17 00:00:00 2001 From: Simon Pirkelmann Date: Thu, 27 Jan 2022 23:48:31 +0100 Subject: [PATCH] added test configuration fixtures --- tests/conftest.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..411fa2c --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,21 @@ +import pytest + +from selenium.webdriver import Chrome +from imaginaerraum_door_admin import create_app + + +@pytest.fixture(scope='session') +def app(): + """Fixture to launch the webapp""" + app = create_app() + + return app + + +@pytest.fixture +def browser(): + """Fixture for a selenium browser to access the webapp.""" + driver = Chrome() + driver.implicitly_wait(10) + yield driver + driver.quit() \ No newline at end of file