From 4e973b7337ac9d3c53cba0d46c97226c7e7055c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Tue, 17 Mar 2026 19:28:59 +0800 Subject: [PATCH] =?UTF-8?q?docs(dashboard):=20=E6=B2=BB=E7=90=86=E9=A3=8E?= =?UTF-8?q?=E9=99=A9mini=20bars=E5=A2=9E=E5=8A=A0=E5=8F=A3=E5=BE=84?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=E5=B9=B6=E5=8A=A0=E6=8A=A4=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/admin/dashboard.blade.php | 1 + ...GovernanceBarsShouldExplainMetricsTest.php | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 tests/Feature/AdminDashboardPlatformOrderGovernanceBarsShouldExplainMetricsTest.php diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index e46b547..dca5a50 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -390,6 +390,7 @@
治理风险占比(相对平台订单总量 {{ $poTotal }})
+
口径说明:同步失败=meta.subscription_activation_error.message 存在;BMPA失败=meta.batch_mark_paid_and_activate_error.message 存在;无回执=已支付但缺 payment_receipts;对账不一致=回执汇总金额与 paid_amount 不一致;退款不一致=退款汇总与退款状态不一致;续费缺订阅=renewal 但 site_subscription_id 为空。
@include('admin.components.mini_bar_row', [ 'class' => 'mt-6', diff --git a/tests/Feature/AdminDashboardPlatformOrderGovernanceBarsShouldExplainMetricsTest.php b/tests/Feature/AdminDashboardPlatformOrderGovernanceBarsShouldExplainMetricsTest.php new file mode 100644 index 0000000..76db0f5 --- /dev/null +++ b/tests/Feature/AdminDashboardPlatformOrderGovernanceBarsShouldExplainMetricsTest.php @@ -0,0 +1,38 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_dashboard_should_render_platform_order_governance_explanation_text(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + + $res->assertOk(); + $res->assertSee('治理风险占比'); + $res->assertSee('口径说明'); + $res->assertSee('同步失败=meta.subscription_activation_error.message'); + $res->assertSee('BMPA失败=meta.batch_mark_paid_and_activate_error.message'); + $res->assertSee('无回执=已支付但缺 payment_receipts'); + $res->assertSee('对账不一致=回执汇总金额与 paid_amount 不一致'); + $res->assertSee('退款不一致=退款汇总与退款状态不一致'); + $res->assertSee('续费缺订阅=renewal 但 site_subscription_id 为空'); + } +}