test(h5): 首页托管 + 素材冒烟(6 passed)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
guke
2026-06-29 16:23:07 +08:00
parent 9484768321
commit 9ab4dfc6a4
+17
View File
@@ -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