diff --git a/tests/Feature/AdminDashboardBillingWorkbenchShouldIncludeSubscriptionExpiryQuickLinksTest.php b/tests/Feature/AdminDashboardBillingWorkbenchShouldIncludeSubscriptionExpiryQuickLinksTest.php new file mode 100644 index 0000000..20b4e90 --- /dev/null +++ b/tests/Feature/AdminDashboardBillingWorkbenchShouldIncludeSubscriptionExpiryQuickLinksTest.php @@ -0,0 +1,39 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_dashboard_should_include_subscription_expiry_governance_quick_links(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + $res->assertOk(); + + $res->assertSee('订阅到期治理'); + + $res->assertSee('href="/admin/site-subscriptions?expiry=expiring_7d&back=%2Fadmin"', false); + $res->assertSee('7天内到期', false); + + $res->assertSee('href="/admin/site-subscriptions?expiry=expired&back=%2Fadmin"', false); + $res->assertSee('已过期', false); + + $res->assertDontSee('&back=', false); + } +}