cleanup delete_nextcloud_user
This commit is contained in:
parent
c0605a155f
commit
e609394ac1
1 changed files with 4 additions and 12 deletions
|
|
@ -1,18 +1,12 @@
|
|||
import pytest
|
||||
from playwright.sync_api import BrowserContext, expect
|
||||
from playwright.sync_api import Page
|
||||
|
||||
# todo: what is this test for, why is it a fixture? -> ignore for now
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def delete_nextcloud_user(admin_context: BrowserContext):
|
||||
def delete_nextcloud_user(authentik_admin_page: Page):
|
||||
"""Delete Nextcloud User"""
|
||||
yield
|
||||
context = setup_context(browser, f"{STATES}/admin_state.json")
|
||||
page = context.new_page()
|
||||
page.goto(CONFIG["domain"])
|
||||
with page.expect_popup() as nextcloud_info:
|
||||
page.get_by_role("link", name="Nextcloud").click()
|
||||
with authentik_admin_page.expect_popup() as nextcloud_info:
|
||||
authentik_admin_page.get_by_role("link", name="Nextcloud").click()
|
||||
nextcloud = nextcloud_info.value
|
||||
nextcloud.get_by_role("link", name="Open settings menu").click()
|
||||
nextcloud.get_by_role("link", name="Users").click()
|
||||
|
|
@ -21,5 +15,3 @@ def delete_nextcloud_user(admin_context: BrowserContext):
|
|||
).click()
|
||||
nextcloud.get_by_role("button", name="Delete user").click()
|
||||
nextcloud.get_by_role("button", name=f"Delete authentik-{testuser['username']}'s account").click()
|
||||
context.tracing.stop(path=f"{RECORDS}/nextcloud_delete_user.zip")
|
||||
context.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue