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