补强已付无回执提示组件层级护栏

This commit is contained in:
萝卜
2026-03-19 03:13:09 +08:00
parent cd3c54c62d
commit 6822e1cf0a

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderToolsPaidNoReceiptHintShouldUseGovernanceBlockTest 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_platform_orders_tools_paid_no_receipt_hint_should_use_governance_block(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertMatchesRegularExpression('/<div class="card governance-block mb-10" data-role="po-tools-paid-no-receipt-hint">/u', $html);
}
}