fix: refresh public dashboard and BI telemetry

This commit is contained in:
Wyndham ARR
2026-08-03 16:08:14 +08:00
parent 2107f00e32
commit 5294edab89
20 changed files with 584 additions and 75 deletions

View File

@@ -371,8 +371,8 @@ class PortalApplicationTests(unittest.TestCase):
self.assertIn(".company-fixed-companies", styles)
self.assertIn(".company-source-action", styles)
self.assertIn(".company-source-current", styles)
self.assertIn(".company-job-source", styles)
self.assertIn(".company-history-source", styles)
self.assertNotIn(".company-job-source", styles)
self.assertNotIn(".company-history-source", styles)
self.assertIn(".company-review-file", styles)
self.assertIn("overflow-wrap: anywhere", styles)
self.assertIn(".company-review-row.is-pending", styles)
@@ -398,6 +398,13 @@ class PortalApplicationTests(unittest.TestCase):
self.assertIn("BOOKING_EXCEL_SOURCE_ALREADY_ACTIVATED", script)
self.assertIn("requestError.code", script)
self.assertIn("state.companyReportConfirmRequest", script)
self.assertIn("company.publish_failed_detail", script)
self.assertIn("company.publish_failed_summary_all", script)
i18n = (STATIC_ROOT / "i18n.js").read_text(encoding="utf-8")
self.assertIn("数据已处理,但正式 Excel 保存失败。请重启报表服务后再生成。", i18n)
self.assertNotIn("重复后跳过", i18n)
self.assertNotIn("重复后跳过", script)
self.assertNotIn("历史任务未记录来源", script)
self.assertNotIn("company-review-guidance", script)
self.assertNotIn("company-review-description", script)
self.assertNotIn("还有 ${formatInteger(pending)} 条待人工记录", script)
@@ -410,12 +417,12 @@ class PortalApplicationTests(unittest.TestCase):
'id="company-source-current-filename"',
'id="company-source-current-meta"',
'id="company-source-status"',
'id="company-report-job-source"',
'id="company-report-job-source-file"',
'id="company-report-job-source-meta"',
"来源 Excel",
):
self.assertIn(required, desktop_text)
self.assertNotIn('id="company-report-job-source"', desktop_text)
self.assertNotIn("本次任务使用的 Excel", desktop_text)
self.assertNotIn("任务使用的 Excel", desktop_text)
self.assertNotIn("历史任务未记录来源", desktop_text)
self.assertIn('String(summary.filename || "").trim()', script)
self.assertIn('$("#company-review-filename").textContent = filename || "未记录文件名"', script)
self.assertLess(