use demo credentials from nextcloud conftest
This commit is contained in:
parent
e609394ac1
commit
7d7b871b17
2 changed files with 14 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
from playwright.sync_api import Page
|
import os
|
||||||
|
|
||||||
# todo: what is this test for, why is it a fixture? -> ignore for now
|
from playwright.sync_api import Page
|
||||||
|
|
||||||
|
|
||||||
def delete_nextcloud_user(authentik_admin_page: Page):
|
def delete_nextcloud_user(authentik_admin_page: Page):
|
||||||
|
|
@ -10,8 +10,8 @@ def delete_nextcloud_user(authentik_admin_page: Page):
|
||||||
nextcloud = nextcloud_info.value
|
nextcloud = nextcloud_info.value
|
||||||
nextcloud.get_by_role("link", name="Open settings menu").click()
|
nextcloud.get_by_role("link", name="Open settings menu").click()
|
||||||
nextcloud.get_by_role("link", name="Users").click()
|
nextcloud.get_by_role("link", name="Users").click()
|
||||||
nextcloud.locator("#app-content div").filter(has_text=testuser["username"]).get_by_role(
|
nextcloud.locator("#app-content div").filter(has_text=os.environ["NEXTCLOUD_USER"]).get_by_role(
|
||||||
"button", name="Toggle user actions menu"
|
"button", name="Toggle user actions menu"
|
||||||
).click()
|
).click()
|
||||||
nextcloud.get_by_role("button", name="Delete user").click()
|
nextcloud.get_by_role("button", name="Delete user").click()
|
||||||
nextcloud.get_by_role("button", name=f"Delete authentik-{testuser['username']}'s account").click()
|
nextcloud.get_by_role("button", name=f"Delete authentik-{os.environ["NEXTCLOUD_USER"]}'s account").click()
|
||||||
|
|
|
||||||
|
|
@ -1 +1,11 @@
|
||||||
|
import os
|
||||||
|
|
||||||
from src.tests_authentik.fixtures_authentik import admin_context, authentik_admin_page, user_context
|
from src.tests_authentik.fixtures_authentik import admin_context, authentik_admin_page, user_context
|
||||||
|
|
||||||
|
NEXTCLOUD_DEMO_USER = {
|
||||||
|
"NEXTCLOUD_USER": "next_demo_user",
|
||||||
|
"NEXTCLOUD_PASS": "P@ss.123",
|
||||||
|
}
|
||||||
|
|
||||||
|
for key, value in NEXTCLOUD_DEMO_USER.items():
|
||||||
|
os.environ[key] = value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue