diff --git a/qa/frontend/test_match_live_admin_static.py b/qa/frontend/test_match_live_admin_static.py new file mode 100644 index 0000000..10c3d61 --- /dev/null +++ b/qa/frontend/test_match_live_admin_static.py @@ -0,0 +1,38 @@ +from pathlib import Path + + +ROOT = Path(r"D:\www\sport-era\admin") +MATCH_API = ROOT / "src" / "api" / "match.ts" +MATCH_INDEX = ROOT / "src" / "views" / "match" / "lists" / "index.vue" +MATCH_LIVE_TABLE = ROOT / "src" / "views" / "match" / "lists" / "components" / "MatchLiveTable.vue" + + +def assert_contains(path: Path, needle: str) -> None: + content = path.read_text(encoding="utf-8") + assert needle in content, f"{path} missing: {needle}" + + +def main() -> None: + assert_contains(MATCH_INDEX, 'type="expand"') + assert_contains(MATCH_INDEX, "MatchLiveTable") + + for needle in ( + "matchLiveLists", + "matchLiveAdd", + "matchLiveEdit", + "matchLiveDelete", + ): + assert_contains(MATCH_API, needle) + + for needle in ( + "play_url_m3u8", + "fetch_status", + "source_url", + ): + assert_contains(MATCH_LIVE_TABLE, needle) + + print("match live admin static checks passed") + + +if __name__ == "__main__": + main()