Run all integ tests against different configs

This commit is contained in:
Max Berger
2026-03-26 21:03:20 +01:00
parent d56b87196a
commit 78cf5f7fe3
12 changed files with 500 additions and 424 deletions

View File

@@ -23,18 +23,33 @@ import re
from typing import Any, Generator
import pytest
from playwright.sync_api import Page, expect
from playwright.sync_api import BrowserContext, Page, expect
from integ_tests.common import login, start_radicale_server
from integ_tests.common import (
SHARING_HTPASSWD,
SHARING_XREMOTE,
Config,
login,
start_radicale_server,
)
@pytest.fixture(params=[SHARING_HTPASSWD, SHARING_XREMOTE], ids=lambda c: c.name)
def config(request: pytest.FixtureRequest) -> Config:
return request.param
@pytest.fixture
def radicale_server(tmp_path: pathlib.Path) -> Generator[str, Any, None]:
yield from start_radicale_server(tmp_path)
def radicale_server(
tmp_path: pathlib.Path, config: Config
) -> Generator[str, Any, None]:
yield from start_radicale_server(tmp_path, config)
def test_upload_zero_files(page: Page, radicale_server: str) -> None:
login(page, radicale_server)
def test_upload_zero_files(
context: BrowserContext, page: Page, radicale_server: str, config: Config
) -> None:
login(page, radicale_server, config, context=context)
page.click('.fabcontainer a[data-name="upload"]')
# Click upload without selecting files
@@ -47,9 +62,13 @@ def test_upload_zero_files(page: Page, radicale_server: str) -> None:
def test_upload_one_file_custom_href(
page: Page, radicale_server: str, tmp_path: pathlib.Path
context: BrowserContext,
page: Page,
radicale_server: str,
config: Config,
tmp_path: pathlib.Path,
) -> None:
login(page, radicale_server)
login(page, radicale_server, config, context=context)
# Create a fake file to upload
test_file = tmp_path / "test.ics"
@@ -80,9 +99,13 @@ def test_upload_one_file_custom_href(
def test_upload_two_files(
page: Page, radicale_server: str, tmp_path: pathlib.Path
context: BrowserContext,
page: Page,
radicale_server: str,
config: Config,
tmp_path: pathlib.Path,
) -> None:
login(page, radicale_server)
login(page, radicale_server, config, context=context)
# Create two fake files
file1 = tmp_path / "test1.ics"