This commit is contained in:
@@ -25,6 +25,18 @@ def test_login_page_renders_stitch_design(client):
|
||||
assert reverse("password_reset") in body
|
||||
assert 'src="/static/js/login.js?' in body
|
||||
assert "<script>" not in body
|
||||
assert "Persoonlijke intelligence cockpit" in body
|
||||
assert 'alt="ITWorx.tech"' in body
|
||||
assert 'src="/static/img/itworx-wordmark.png"' in body
|
||||
assert 'sizes="512x512"' in body
|
||||
|
||||
|
||||
@override_settings(VACATURERADAR_OWNER_NAME="Eigen merk")
|
||||
def test_login_page_keeps_official_brand_separate_from_owner_setting(client):
|
||||
body = client.get(reverse("login")).content.decode("utf-8")
|
||||
|
||||
assert "Eigen merk" not in body
|
||||
assert 'content="VacatureRadar · ITWorx.tech"' in body
|
||||
|
||||
|
||||
def test_login_with_email(client, user):
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
from django.conf import settings
|
||||
from django.core.cache import cache
|
||||
from django.test import override_settings
|
||||
from django.urls import reverse
|
||||
@@ -17,10 +18,17 @@ def test_today_requires_login(client):
|
||||
|
||||
@pytest.mark.integration
|
||||
@pytest.mark.django_db
|
||||
def test_browser_favicon_fallback_uses_local_svg(client):
|
||||
def test_browser_favicon_and_brand_assets_are_local_pngs(client):
|
||||
response = client.get("/favicon.ico")
|
||||
assert response.status_code == 301
|
||||
assert response.url.endswith("/static/favicon.svg")
|
||||
assert response.url.endswith("/static/img/itworx-app-icon.png")
|
||||
|
||||
favicon = settings.BASE_DIR / "static" / "img" / "itworx-app-icon.png"
|
||||
wordmark = settings.BASE_DIR / "static" / "img" / "itworx-wordmark.png"
|
||||
assert favicon.read_bytes().startswith(b"\x89PNG\r\n\x1a\n")
|
||||
assert wordmark.read_bytes().startswith(b"\x89PNG\r\n\x1a\n")
|
||||
assert favicon.stat().st_size < 150_000
|
||||
assert wordmark.stat().st_size < 100_000
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
@@ -30,6 +38,20 @@ def test_today_loads_for_user(client, user, profile):
|
||||
response = client.get(reverse("dashboard:today"))
|
||||
assert response.status_code == 200
|
||||
assert "Vandaag" in response.content.decode()
|
||||
body = response.content.decode()
|
||||
assert 'alt="ITWorx.tech"' in body
|
||||
assert "VacatureRadar · intelligence cockpit" in body
|
||||
assert "ITWorx.tech" in body
|
||||
assert "VacatureRadar · Dagoverzicht" in body
|
||||
assert "Dagoverzicht" in body
|
||||
assert 'content="VacatureRadar · ITWorx.tech"' in body
|
||||
|
||||
|
||||
def test_premium_layout_uses_one_left_aligned_ultrawide_grid():
|
||||
css = (settings.BASE_DIR / "static" / "css" / "premium.css").read_text(encoding="utf-8")
|
||||
assert "max-width: 2800px; margin-right: auto; margin-left: 0" in css
|
||||
assert "@media (min-width: 1800px)" in css
|
||||
assert "minmax(650px, 880px) minmax(760px, 1fr)" in css
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
|
||||
@@ -74,14 +74,18 @@ def test_deployment_examples_use_per_platform_mailbox_configuration() -> None:
|
||||
for key in required_keys:
|
||||
assert f"{key}=" in content
|
||||
|
||||
env_example = (ROOT / ".env.example").read_text(encoding="utf-8")
|
||||
assert "VACATURERADAR_OWNER_NAME=Jens" in env_example
|
||||
|
||||
|
||||
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 "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 '[[ -e "$tracked_path" ]]' in deploy_script
|
||||
assert "/health/ready/" in deploy_script
|
||||
|
||||
Reference in New Issue
Block a user