From d4b2eae02e92da8dcd9c00cd774ec065d6153772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sun, 15 Mar 2026 19:36:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(admin):=20=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E8=A1=A5=E9=BD=90=E8=AE=A2=E9=98=85=E5=88=B0=E6=9C=9F=E6=B2=BB?= =?UTF-8?q?=E7=90=86=E5=85=A5=E5=8F=A3=EF=BC=887=E5=A4=A9=E5=86=85?= =?UTF-8?q?=E5=88=B0=E6=9C=9F/=E5=B7=B2=E8=BF=87=E6=9C=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ncludeSubscriptionExpiryQuickLinksTest.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/Feature/AdminDashboardBillingWorkbenchShouldIncludeSubscriptionExpiryQuickLinksTest.php 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); + } +}