This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user