refactoring (#13)
* general project refactoring * various small improvements * improve imap fixture with helper functions and typing * add wordpress send email setup * add wordpress receive email test * add various documentation Reviewed-on: local-it-infrastructure/e2e_tests#13 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
parent
41a042f07d
commit
d1ff1183a5
29 changed files with 323 additions and 175 deletions
|
|
@ -1,8 +1,4 @@
|
|||
from pytest_abra.runner import Runner, Test
|
||||
|
||||
|
||||
def condition_always_false(dotenv_config: dict[str, str]) -> bool:
|
||||
return False
|
||||
from pytest_abra import Runner, Test
|
||||
|
||||
|
||||
class RunnerNextcloud(Runner):
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import pytest
|
|||
from playwright.sync_api import Page, expect
|
||||
|
||||
|
||||
def test_nextcloud_quota(nextcloud_admin_page: Page, dotenv_config: dict[str, str]):
|
||||
"""Test Nextcloud"""
|
||||
if dotenv_config.get("DEFAULT_QUOTA"):
|
||||
def test_nextcloud_quota(nextcloud_admin_page: Page, env_config: dict[str, str]):
|
||||
"""Tests if the quota set in .env file matches the actual quota shown on the page within 10%"""
|
||||
if env_config.get("DEFAULT_QUOTA"):
|
||||
# get quota from website
|
||||
quota_string = nextcloud_admin_page.get_by_text(
|
||||
re.compile(r"\d*,\d .* \d*,\d")
|
||||
|
|
@ -17,7 +17,7 @@ def test_nextcloud_quota(nextcloud_admin_page: Page, dotenv_config: dict[str, st
|
|||
quota_website = float(out_number)
|
||||
|
||||
# get quota from env
|
||||
quota_config_string = dotenv_config["DEFAULT_QUOTA"] # "100 MB"
|
||||
quota_config_string = env_config["DEFAULT_QUOTA"] # "100 MB"
|
||||
assert "MB" in quota_config_string
|
||||
quota_config = float(quota_config_string.strip("MB"))
|
||||
|
||||
|
|
@ -27,6 +27,6 @@ def test_nextcloud_quota(nextcloud_admin_page: Page, dotenv_config: dict[str, st
|
|||
|
||||
|
||||
@pytest.mark.skip
|
||||
def test_nextcloud_apps(nextcloud_admin_page: Page, dotenv_config: dict[str, str]):
|
||||
for app in dotenv_config["nc_apps"]:
|
||||
def test_nextcloud_apps(nextcloud_admin_page: Page, env_config: dict[str, str]):
|
||||
for app in env_config["nc_apps"]:
|
||||
expect(nextcloud_admin_page.get_by_role("link", name=app)).to_be_visible()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue