From 0b9f1dd4e5b6ff1d288db0d17ed24676a860d9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sun, 15 Mar 2026 18:01:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(admin-ui):=20=E8=AE=A2=E9=98=85/=E5=A5=97?= =?UTF-8?q?=E9=A4=90=E7=AD=9B=E9=80=89=E5=8C=BA=E5=8F=AF=E6=8A=98=E5=8F=A0?= =?UTF-8?q?=E5=B9=B6=E8=AE=B0=E5=BF=86=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/admin/plans/index.blade.php | 18 +++++++--- .../admin/site_subscriptions/index.blade.php | 18 +++++++--- ...ndexFilterPanelShouldBeCollapsibleTest.php | 36 +++++++++++++++++++ ...ndexFilterPanelShouldBeCollapsibleTest.php | 36 +++++++++++++++++++ 4 files changed, 98 insertions(+), 10 deletions(-) create mode 100644 tests/Feature/AdminPlanIndexFilterPanelShouldBeCollapsibleTest.php create mode 100644 tests/Feature/AdminSiteSubscriptionIndexFilterPanelShouldBeCollapsibleTest.php diff --git a/resources/views/admin/plans/index.blade.php b/resources/views/admin/plans/index.blade.php index 5597cf1..c275658 100644 --- a/resources/views/admin/plans/index.blade.php +++ b/resources/views/admin/plans/index.blade.php @@ -97,9 +97,16 @@ -
-

筛选条件

-
+
+ +
+

筛选条件

+ 点击收起/展开 +
+
+
+ + @if($safeBackForLinks !== '') @endif @@ -124,8 +131,9 @@
- -
+ +
+
diff --git a/resources/views/admin/site_subscriptions/index.blade.php b/resources/views/admin/site_subscriptions/index.blade.php index 0576276..b0250cd 100644 --- a/resources/views/admin/site_subscriptions/index.blade.php +++ b/resources/views/admin/site_subscriptions/index.blade.php @@ -133,9 +133,16 @@
建议:先处理“7天内到期”续费触达,再处理“已过期”补单或关闭。
-
-

筛选条件

-
+
+ +
+

筛选条件

+ 点击收起/展开 +
+
+
+ + @if($safeBackForLinks !== '') @endif @@ -166,8 +173,9 @@
- -
+ +
+
diff --git a/tests/Feature/AdminPlanIndexFilterPanelShouldBeCollapsibleTest.php b/tests/Feature/AdminPlanIndexFilterPanelShouldBeCollapsibleTest.php new file mode 100644 index 0000000..a6f9c51 --- /dev/null +++ b/tests/Feature/AdminPlanIndexFilterPanelShouldBeCollapsibleTest.php @@ -0,0 +1,36 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_plan_index_filter_panel_should_be_collapsible(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/plans'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="collapsible"', $html); + $this->assertStringContainsString('data-storage-key="admin.plans.filters"', $html); + $this->assertStringContainsString('assertStringContainsString('筛选条件', $html); + } +} diff --git a/tests/Feature/AdminSiteSubscriptionIndexFilterPanelShouldBeCollapsibleTest.php b/tests/Feature/AdminSiteSubscriptionIndexFilterPanelShouldBeCollapsibleTest.php new file mode 100644 index 0000000..9ac9576 --- /dev/null +++ b/tests/Feature/AdminSiteSubscriptionIndexFilterPanelShouldBeCollapsibleTest.php @@ -0,0 +1,36 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_site_subscription_index_filter_panel_should_be_collapsible(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/site-subscriptions'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="collapsible"', $html); + $this->assertStringContainsString('data-storage-key="admin.site_subscriptions.filters"', $html); + $this->assertStringContainsString('assertStringContainsString('筛选条件', $html); + } +}