From 0da7be44b70d8bd6ce71de74787a3714937f58b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Thu, 19 Mar 2026 11:21:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=BC=BA=E5=B7=B2=E4=BB=98=E6=97=A0?= =?UTF-8?q?=E5=9B=9E=E6=89=A7=E6=91=98=E8=A6=81=E5=8D=A1=E5=8F=8C=E5=90=91?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=8A=A4=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ouldContainBothForwardAndBackLinksTest.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/Feature/AdminPlatformOrderReceiptSummaryCardShouldContainBothForwardAndBackLinksTest.php diff --git a/tests/Feature/AdminPlatformOrderReceiptSummaryCardShouldContainBothForwardAndBackLinksTest.php b/tests/Feature/AdminPlatformOrderReceiptSummaryCardShouldContainBothForwardAndBackLinksTest.php new file mode 100644 index 0000000..7dd6fae --- /dev/null +++ b/tests/Feature/AdminPlatformOrderReceiptSummaryCardShouldContainBothForwardAndBackLinksTest.php @@ -0,0 +1,32 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_paid_no_receipt_summary_card_should_contain_both_forward_and_back_links(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/platform-orders'); + $res->assertOk(); + + $html = (string) $res->getContent(); + $this->assertMatchesRegularExpression('/data-role="po-summary-card-paid-no-receipt"[\s\S]*?po-summary-link-no-receipt-orders[\s\S]*?po-summary-link-view-receipt-orders/u', $html); + } +}