diff --git a/tests/Feature/AdminPlatformOrderQuickFiltersShouldKeepCollectionToReceiptTripletTest.php b/tests/Feature/AdminPlatformOrderQuickFiltersShouldKeepCollectionToReceiptTripletTest.php new file mode 100644 index 0000000..3f108fd --- /dev/null +++ b/tests/Feature/AdminPlatformOrderQuickFiltersShouldKeepCollectionToReceiptTripletTest.php @@ -0,0 +1,37 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_quick_filters_should_keep_collection_to_receipt_triplet(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/platform-orders'); + $res->assertOk(); + + $html = (string) $res->getContent(); + $this->assertStringContainsString('data-role="po-quickfilter-unpaid"', $html); + $this->assertStringContainsString('待支付', $html); + $this->assertStringContainsString('data-role="po-quickfilter-paid-no-receipt"', $html); + $this->assertStringContainsString('已付无回执', $html); + $this->assertStringContainsString('data-role="po-quickfilter-receipt-has"', $html); + $this->assertStringContainsString('有回执', $html); + } +}