fixup
This commit is contained in:
parent
f38763d912
commit
2ec7c6fd30
1 changed files with 1 additions and 2 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import json
|
import json
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from playwright.sync_api import BrowserContext
|
from playwright.sync_api import BrowserContext
|
||||||
|
|
@ -16,7 +15,7 @@ def admin_session(context: BrowserContext, DIR: DirManager) -> BrowserContext:
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def user_session(context: BrowserContext, DIR: Path) -> BrowserContext:
|
def user_session(context: BrowserContext, DIR: DirManager) -> BrowserContext:
|
||||||
state_file = DIR.STATES / "user_state.json"
|
state_file = DIR.STATES / "user_state.json"
|
||||||
storage_state = json.loads(state_file.read_bytes())
|
storage_state = json.loads(state_file.read_bytes())
|
||||||
context.add_cookies(storage_state["cookies"])
|
context.add_cookies(storage_state["cookies"])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue