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 为空'); + } +}