Tighten chart guards and EA envelopes
All checks were successful
CD Pipeline / deploy (push) Successful in 1m4s

This commit is contained in:
OoO
2026-05-24 23:56:17 +08:00
parent 916ddc010b
commit 0f7ad3e036
12 changed files with 348 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ def test_daily_sales_canvas_is_primary_and_fallback_is_opt_in():
assert ".chart-container:not(.chart-fallback-active) .chart-fallback-list" in css
assert "node.content && node.content.textContent" in script
assert "chart-empty-active" in script
assert "Math.abs(Number(value)) > 1e-9" in script
render_body = script.split("function renderAllCharts()", 1)[1].split("function bootCharts()", 1)[0]
assert "renderHtmlChartFallbacks();" not in render_body
assert "catch(error =>" in script
@@ -30,6 +31,7 @@ def test_growth_analysis_canvas_is_primary_and_fallback_is_opt_in():
assert ".ga-chart-card__body:not(.chart-fallback-active) .ga-chart-snapshot" in css
assert "node.content && node.content.textContent" in script
assert "chart-empty-active" in script
assert "Math.abs(Number(value)) > 1e-9" in script
render_body = script.split("function renderCharts()", 1)[1].split("function bootCharts()", 1)[0]
assert "renderHtmlChartFallbacks();" not in render_body
assert "catch(error =>" in script