diff --git a/resources/views/admin/plans/index.blade.php b/resources/views/admin/plans/index.blade.php index a43902f..2981966 100644 --- a/resources/views/admin/plans/index.blade.php +++ b/resources/views/admin/plans/index.blade.php @@ -139,18 +139,27 @@
{{ $summaryStats['active_plans'] ?? 0 }}
+
+ 查看停用套餐 +

月付套餐

{{ $summaryStats['monthly_plans'] ?? 0 }}
+
+ 查看年付套餐 +

年付套餐

{{ $summaryStats['yearly_plans'] ?? 0 }}
+
+ 查看月付套餐 +

关联订阅总量

diff --git a/tests/Feature/AdminPlanIndexSummaryCardsCrossLinksTest.php b/tests/Feature/AdminPlanIndexSummaryCardsCrossLinksTest.php new file mode 100644 index 0000000..9b42af0 --- /dev/null +++ b/tests/Feature/AdminPlanIndexSummaryCardsCrossLinksTest.php @@ -0,0 +1,35 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_summary_cards_should_have_cross_links_for_quick_navigation(): void + { + $this->loginAsPlatformAdmin(); + + $this->get('/admin/plans') + ->assertOk() + ->assertSee('查看停用套餐') + ->assertSee('查看年付套餐') + ->assertSee('查看月付套餐') + ->assertSee('status=inactive', false) + ->assertSee('billing_cycle=monthly', false) + ->assertSee('billing_cycle=yearly', false); + } +}