补强已付无回执摘要卡回看链接护栏

This commit is contained in:
萝卜
2026-03-19 11:17:49 +08:00
parent 8c6342e5d3
commit 6cb00c5e47

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderReceiptSummaryCardShouldContainBackLinkToReceiptOrdersTest extends TestCase
{
use RefreshDatabase;
protected function loginAsPlatformAdmin(): void
{
$this->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);
}
}