Skip exact count for full PChome review page

This commit is contained in:
OoO
2026-05-24 19:00:13 +08:00
parent 82b5616921
commit 0709392d9d
8 changed files with 54 additions and 15 deletions

View File

@@ -50,6 +50,8 @@ def test_competitor_review_queue_page_uses_single_paged_total_query():
assert "total_rows AS" in page_body
assert "paged_rows AS" in page_body
assert "LEFT JOIN paged_rows ON TRUE" in page_body
assert "if count_total:" in page_body
assert "total = int(rows[0].get(\"total_count\") or 0) if count_total and rows else -1" in page_body
assert "SELECT COUNT(*) AS total FROM review_rows" not in page_body
assert "rows[0].get(\"total_count\")" in page_body
assert "if row.get(\"sku\")" in page_body

View File

@@ -138,6 +138,8 @@ def test_dashboard_v2_is_production_default_and_uses_real_dashboard_data():
assert "_build_review_dashboard_items(session, review_queue, today_start_db)" in route_source
assert "_load_cached_competitor_overview_for_review(" in route_source
assert "_load_competitor_decision_overview(session)" not in route_source
assert "count_total = review_status != 'all'" in route_source
assert "count_total=count_total" in route_source
assert "只替 PChome 覆核當頁建立商品列" in route_source
assert "_load_competitor_decision_overview(session, unique_items)" in route_source
assert "item_map = {}" in route_source