Keep external BI links inside momo pro
Some checks failed
CD Pipeline / deploy (push) Failing after 10m17s

This commit is contained in:
OoO
2026-05-24 17:43:25 +08:00
parent bfc5dac624
commit c5db3eb0da
9 changed files with 32 additions and 9 deletions

View File

@@ -9,14 +9,19 @@ def test_metabase_and_grist_navigation_stays_inside_momo_pro():
shell = (ROOT / "templates/components/_ewoooc_shell.html").read_text(encoding="utf-8")
tabs = (ROOT / "templates/components/_analysis_report_tabs.html").read_text(encoding="utf-8")
legacy_nav = (ROOT / "templates/components/_navbar.html").read_text(encoding="utf-8")
env_example = (ROOT / ".env.example").read_text(encoding="utf-8")
compose = (ROOT / "docker-compose.yml").read_text(encoding="utf-8")
assert "'metabase_url': '/metabase'" in app_source
assert "'grist_url': '/grist'" in app_source
assert "['sales', 'daily_sales', 'monthly', 'growth', 'metabase', 'grist']" in shell
assert "GRIST_URL=https://mo.wooo.work/grist" in env_example
assert "APP_HOME_URL=${GRIST_APP_HOME_URL:-https://mo.wooo.work/grist}" in compose
combined = "\n".join([app_source, shell, tabs, legacy_nav])
navigation_sources = "\n".join([app_source, shell, tabs, legacy_nav])
combined = "\n".join([navigation_sources, env_example, compose])
assert "grist.wooo.work" not in combined
assert "awoooi" not in combined.lower()
assert "awoooi" not in navigation_sources.lower()
def test_external_tool_bridge_pages_are_diagnostic_not_blank():
@@ -26,6 +31,7 @@ def test_external_tool_bridge_pages_are_diagnostic_not_blank():
assert "def _external_tool_payload(kind)" in route_source
assert "parsed.path.rstrip('/') == bridge_path.rstrip('/')" in route_source
assert "def _is_blocked_external_url(configured_url)" in route_source
assert "external-tool-checks" in template
assert "external-tool-diagnostics" in template
assert "external-tool-action-grid" in template