new-features (#5)
* refactoring and rework: runner now has setups / tests / cleanups as lists * add nextcloud runner * add email testing prototype with imap fixture * add dependency resolution (sort env files in input so that test order is correct) Reviewed-on: local-it-infrastructure/e2e_tests#5 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
parent
2e33f8f014
commit
d3dc0f942a
32 changed files with 573 additions and 247 deletions
25
src/tests_nextcloud/cleanup_nextcloud.py
Normal file
25
src/tests_nextcloud/cleanup_nextcloud.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import pytest
|
||||
from playwright.sync_api import BrowserContext, expect
|
||||
|
||||
# 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):
|
||||
"""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()
|
||||
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(
|
||||
"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()
|
||||
context.tracing.stop(path=f"{RECORDS}/nextcloud_delete_user.zip")
|
||||
context.close()
|
||||
Loading…
Add table
Add a link
Reference in a new issue