From fa6d709962609255688c53a2b64a283609d775e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 16:13:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=AE=A2=E5=8D=95=E5=BF=AB?= =?UTF-8?q?=E6=8D=B7=E7=AD=9B=E9=80=89=E8=BF=9124=E5=B0=8F=E6=97=B6?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E9=9B=86=E5=90=88=E8=A1=A5=E9=BD=90=20data-r?= =?UTF-8?q?ole=20=E4=B8=8E=E5=8F=A3=E5=BE=84=E6=8A=A4=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/platform_orders/index.blade.php | 6 +-- ...kFiltersBatch24hShouldHaveDataRoleTest.php | 40 +++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 tests/Feature/AdminPlatformOrderIndexQuickFiltersBatch24hShouldHaveDataRoleTest.php diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 1ddb675..1ec73ce 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -353,9 +353,9 @@ diff --git a/tests/Feature/AdminPlatformOrderIndexQuickFiltersBatch24hShouldHaveDataRoleTest.php b/tests/Feature/AdminPlatformOrderIndexQuickFiltersBatch24hShouldHaveDataRoleTest.php new file mode 100644 index 0000000..5d4b2af --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexQuickFiltersBatch24hShouldHaveDataRoleTest.php @@ -0,0 +1,40 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_index_quick_filters_batch_24h_should_have_data_role(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/platform-orders'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="po-quickfilter-batch-synced-24h"', $html); + $this->assertStringContainsString('data-role="po-quickfilter-batch-bmpa-24h"', $html); + $this->assertStringContainsString('data-role="po-quickfilter-batch-activated-24h"', $html); + + // 钉死 query 语义 + $this->assertStringContainsString('batch_synced_24h=1', $html); + $this->assertStringContainsString('batch_mark_paid_and_activate_24h=1', $html); + $this->assertStringContainsString('batch_mark_activated_24h=1', $html); + } +}