Skip to content

Commit

Permalink
chore(tests): use new_page fixture in login one
Browse files Browse the repository at this point in the history
So to have the js console relayed in the terminal
  • Loading branch information
yohanboniface committed Dec 18, 2024
1 parent 0eedc47 commit 24511d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions umap/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 24511d7

Please sign in to comment.