mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore(tests): use new_page fixture in login one
So to have the js console relayed in the terminal
This commit is contained in:
parent
0eedc47079
commit
24511d796d
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue