This commit is contained in:
@@ -101,6 +101,16 @@ def _run_html_accessibility_probe(client, user, profile, job) -> None:
|
||||
response = client.get(reverse("profiles:list"))
|
||||
assert response.status_code == 200
|
||||
_assert_basic_html_accessibility(response.content, page_name="profiles-list")
|
||||
profile_body = response.content.decode("utf-8")
|
||||
assert 'class="radar-illustration"' in profile_body
|
||||
assert 'aria-hidden="true"' in profile_body
|
||||
assert "data-radar-illustration" in profile_body
|
||||
premium_css = (Path(__file__).resolve().parents[2] / "static/css/premium.css").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
app_js = (Path(__file__).resolve().parents[2] / "static/js/app.js").read_text(encoding="utf-8")
|
||||
assert "prefers-reduced-motion: reduce" in premium_css
|
||||
assert 'matchMedia("(prefers-reduced-motion: reduce)")' in app_js
|
||||
|
||||
response = client.get(reverse("profiles:edit", kwargs={"pk": profile.pk}))
|
||||
assert response.status_code == 200
|
||||
|
||||
@@ -23,6 +23,8 @@ def test_login_page_renders_stitch_design(client):
|
||||
assert "cdn.tailwindcss.com" not in body
|
||||
assert "https://fonts.googleapis.com" not in body
|
||||
assert reverse("password_reset") in body
|
||||
assert 'src="/static/js/login.js?' in body
|
||||
assert "<script>" not in body
|
||||
|
||||
|
||||
def test_login_with_email(client, user):
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import struct
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
@@ -21,8 +22,18 @@ def test_unraid_uses_one_dockerman_container_with_ui_metadata() -> None:
|
||||
assert list(compose["services"]) == ["app"]
|
||||
labels = compose["services"]["app"]["labels"]
|
||||
assert labels["net.unraid.docker.managed"] == "dockerman"
|
||||
assert labels["net.unraid.docker.webui"].endswith(":8080]/")
|
||||
assert labels["net.unraid.docker.icon"].endswith("/static/favicon.svg")
|
||||
assert labels["net.unraid.docker.webui"] == "http://[IP]:[PORT:8080]/"
|
||||
assert (
|
||||
labels["net.unraid.docker.icon"]
|
||||
== "http://127.0.0.1:1226/static/img/vacatureradar-docker.png"
|
||||
)
|
||||
assert "[IP]" not in labels["net.unraid.docker.icon"]
|
||||
assert "[PORT:" not in labels["net.unraid.docker.icon"]
|
||||
|
||||
icon = ROOT / "static" / "img" / "vacatureradar-docker.png"
|
||||
payload = icon.read_bytes()
|
||||
assert payload.startswith(b"\x89PNG\r\n\x1a\n")
|
||||
assert struct.unpack(">II", payload[16:24]) == (256, 256)
|
||||
|
||||
dockerfile = (ROOT / "Dockerfile.unraid").read_text(encoding="utf-8")
|
||||
entrypoint = (ROOT / "scripts" / "unraid_aio_entrypoint.sh").read_text(encoding="utf-8")
|
||||
@@ -62,3 +73,15 @@ def test_deployment_examples_use_per_platform_mailbox_configuration() -> None:
|
||||
assert "IMAP_ENABLED" not in content
|
||||
for key in required_keys:
|
||||
assert f"{key}=" in content
|
||||
|
||||
|
||||
def test_unraid_deploy_requires_dedicated_ssh_alias() -> None:
|
||||
deploy_script = (ROOT / "scripts" / "deploy_unraid.sh").read_text(encoding="utf-8")
|
||||
|
||||
assert 'UNRAID_SSH_HOST:-unraid-itworx' in deploy_script
|
||||
assert "ssh -G" in deploy_script
|
||||
assert '[[ "$ssh_user" != "root" ]]' in deploy_script
|
||||
assert "itworx_unraid_deploy" in deploy_script
|
||||
assert "BatchMode=yes" in deploy_script
|
||||
assert "git ls-files --cached --others --exclude-standard -z" in deploy_script
|
||||
assert "/health/ready/" in deploy_script
|
||||
|
||||
Reference in New Issue
Block a user