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