Compare commits
1 Commits
main
...
claude/iss
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d31468fe2b |
@@ -12,6 +12,7 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&family=Orbitron:wght@400;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="manifest" href="./manifest.json">
|
||||
<style>
|
||||
:root {
|
||||
--color-bg: #050510;
|
||||
|
||||
39
tests/test_manifest.py
Normal file
39
tests/test_manifest.py
Normal file
@@ -0,0 +1,39 @@
|
||||
"""Tests for manifest.json PWA support. Fixes #832 (Missing manifest.json)."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_manifest_exists() -> None:
|
||||
assert Path("manifest.json").exists(), "manifest.json must exist for PWA support"
|
||||
|
||||
|
||||
def test_manifest_is_valid_json() -> None:
|
||||
content = Path("manifest.json").read_text()
|
||||
data = json.loads(content)
|
||||
assert isinstance(data, dict)
|
||||
|
||||
|
||||
def test_manifest_has_required_pwa_fields() -> None:
|
||||
data = json.loads(Path("manifest.json").read_text())
|
||||
assert "name" in data, "manifest.json must have 'name'"
|
||||
assert "short_name" in data, "manifest.json must have 'short_name'"
|
||||
assert "start_url" in data, "manifest.json must have 'start_url'"
|
||||
assert "display" in data, "manifest.json must have 'display'"
|
||||
assert "icons" in data, "manifest.json must have 'icons'"
|
||||
|
||||
|
||||
def test_manifest_icons_non_empty() -> None:
|
||||
data = json.loads(Path("manifest.json").read_text())
|
||||
assert len(data["icons"]) > 0, "manifest.json must define at least one icon"
|
||||
|
||||
|
||||
def test_index_html_references_manifest() -> None:
|
||||
content = Path("index.html").read_text()
|
||||
assert 'rel="manifest"' in content, "index.html must have <link rel=\"manifest\">"
|
||||
assert "manifest.json" in content, "index.html must reference manifest.json"
|
||||
|
||||
|
||||
def test_help_html_references_manifest() -> None:
|
||||
content = Path("help.html").read_text()
|
||||
assert 'rel="manifest"' in content, "help.html must have <link rel=\"manifest\">"
|
||||
assert "manifest.json" in content, "help.html must reference manifest.json"
|
||||
Reference in New Issue
Block a user