move all test files into their own folder, as if this were an authentik recipe repo

This commit is contained in:
Daniel 2023-12-05 19:03:28 +01:00
parent 3841658e4e
commit d2f50fb791
22 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,21 @@
from playwright.sync_api import Page, expect
from src.dir_manager import DirManager
from src.utils import BaseUrl
# url dashboard
# https://files.test.dev.local-it.cloud/apps/dashboard/
# url files
# https://files.test.dev.local-it.cloud/apps/files/
def setup_nextcloud_admin_session(authentik_admin_page: Page, DIR: DirManager, URL: BaseUrl):
"""visit nextcloud from authentik with admin_session to create wordpress_admin_session"""
with authentik_admin_page.expect_popup() as event_context:
authentik_admin_page.get_by_role("link", name="Nextcloud").click()
page_nextcloud = event_context.value
context = page_nextcloud.context
page_nextcloud.goto(URL.get("/apps/files"))
expect(page_nextcloud.get_by_role("link", name="Name").first).to_be_visible()
context.storage_state(path=DIR.STATES / "nextcloud_admin_state.json")