diff --git a/tests/test_h5_hosting.py b/tests/test_h5_hosting.py index 1acd149..bfd68ad 100644 --- a/tests/test_h5_hosting.py +++ b/tests/test_h5_hosting.py @@ -30,3 +30,20 @@ def test_h5_records_served_and_migrated(client) -> None: assert "NativeBridge" not in body # 旧桥名清零 assert "getApiBase" not in body # 同源:绝对地址拼接已移除 assert "../shared/bridge.js" in body + + +def test_h5_home_served(client) -> None: + resp = client.get("/h5/home/index.html") + assert resp.status_code == 200 + assert resp.headers.get("cache-control") == "no-cache" + body = resp.text + assert 'id="home"' in body + assert "data-cc-id" not in body # 原型编辑器留痕已剥 + assert "../../assets/" not in body # 素材路径已本地化 + assert "/api/v1/platform/stats" in body # 已接同源数据 + assert body.count('class="screen') == 1 # 只剩首页一屏 + + +def test_h5_home_asset_served(client) -> None: + resp = client.get("/h5/home/assets/shared/logos/sb-brand.png") + assert resp.status_code == 200