diff --git a/tests/Feature/AdminPlatformOrderReceiptSummaryCardShouldContainBackLinkToReceiptOrdersTest.php b/tests/Feature/AdminPlatformOrderReceiptSummaryCardShouldContainBackLinkToReceiptOrdersTest.php new file mode 100644 index 0000000..38bfe1d --- /dev/null +++ b/tests/Feature/AdminPlatformOrderReceiptSummaryCardShouldContainBackLinkToReceiptOrdersTest.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_back_link_to_receipt_orders(): 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-view-receipt-orders[\s\S]*?查看有回执订单/u', $html); + } +}