Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>할 일 올리기</title>
<link rel="stylesheet" href="/static/style.css">
<script src="/static/app.js" defer></script>
<link rel="stylesheet" href="/static/style.css?v=cf3fbd25f560">
<script src="/static/app.js?v=013873d8e411" defer></script>
</head>
<body>
<main id="login-screen" class="center-card" hidden>
Expand Down
9 changes: 9 additions & 0 deletions tests/test_ui_contract.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import hashlib
from pathlib import Path


Expand Down Expand Up @@ -50,3 +51,11 @@ def test_receipts_are_not_persisted_in_browser_storage():
assert "JSON.stringify(receipts)" not in script
assert "const receipts = []" in script
assert "cowork_pending_request" in script


def test_static_asset_urls_include_current_content_hash():
html = Path("app/static/index.html").read_text(encoding="utf-8")
for asset in ("app.js", "style.css"):
content = Path(f"app/static/{asset}").read_bytes()
version = hashlib.sha256(content).hexdigest()[:12]
assert f"/static/{asset}?v={version}" in html