implement env manager #6

Merged
dan merged 28 commits from dependency-improvement into dev 2023-12-04 17:09:03 +01:00
2 changed files with 14 additions and 4 deletions
Showing only changes of commit 7d7b871b17 - Show all commits

View file

@ -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):
@ -10,8 +10,8 @@ def delete_nextcloud_user(authentik_admin_page: Page):
nextcloud = nextcloud_info.value
nextcloud.get_by_role("link", name="Open settings menu").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"
).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()

View file

@ -1 +1,11 @@
import os
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