From 24511d796dd020669b042d907b38b9f5989464c5 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 18 Dec 2024 17:44:30 +0100 Subject: [PATCH] chore(tests): use new_page fixture in login one So to have the js console relayed in the terminal --- umap/tests/integration/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/umap/tests/integration/conftest.py b/umap/tests/integration/conftest.py index 733cec4d0..4601a7093 100644 --- a/umap/tests/integration/conftest.py +++ b/umap/tests/integration/conftest.py @@ -51,12 +51,12 @@ def page(new_page): @pytest.fixture -def login(context, settings, live_server): - def do_login(user): +def login(new_page, settings, live_server): + def do_login(user, **kwargs): # TODO use storage state to do login only once per session # https://playwright.dev/python/docs/auth settings.ENABLE_ACCOUNT_LOGIN = True - page = context.new_page() + page = new_page(**kwargs) page.goto(f"{live_server.url}/en/") page.locator(".login").click() page.get_by_placeholder("Username").fill(user.username)