new-features #5
1 changed files with 10 additions and 1 deletions
|
|
@ -21,7 +21,6 @@ def admin_context(context: BrowserContext, DIR: DirManager) -> BrowserContext:
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def authentik_admin_page(admin_context: BrowserContext, DIR: DirManager) -> Page:
|
def authentik_admin_page(admin_context: BrowserContext, DIR: DirManager) -> Page:
|
||||||
page = admin_context.new_page()
|
page = admin_context.new_page()
|
||||||
page.pause()
|
|
||||||
authentik_env_file = DIR.ENV_FILES / "authentik"
|
authentik_env_file = DIR.ENV_FILES / "authentik"
|
||||||
authentik_config: dict[str, str] = dotenv_values(authentik_env_file) # type: ignore
|
authentik_config: dict[str, str] = dotenv_values(authentik_env_file) # type: ignore
|
||||||
url = "https://" + authentik_config["DOMAIN"]
|
url = "https://" + authentik_config["DOMAIN"]
|
||||||
|
|
@ -36,3 +35,13 @@ def user_context(context: BrowserContext, DIR: DirManager) -> BrowserContext:
|
||||||
context.add_cookies(storage_state["cookies"])
|
context.add_cookies(storage_state["cookies"])
|
||||||
context.set_default_timeout(TIMEOUT)
|
context.set_default_timeout(TIMEOUT)
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def authentik_user_page(user_context: BrowserContext, DIR: DirManager) -> Page:
|
||||||
|
page = user_context.new_page()
|
||||||
|
authentik_env_file = DIR.ENV_FILES / "authentik"
|
||||||
|
authentik_config: dict[str, str] = dotenv_values(authentik_env_file) # type: ignore
|
||||||
|
url = "https://" + authentik_config["DOMAIN"]
|
||||||
|
page.goto(url)
|
||||||
|
return page
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue