补强平台订单回执筛选提示可测试锚点

This commit is contained in:
萝卜
2026-03-19 02:51:07 +08:00
parent cc03b77f65
commit f040c0d4c3
2 changed files with 34 additions and 1 deletions

View File

@@ -421,7 +421,7 @@
<option value="has" @selected(($filters['receipt_status'] ?? '') === 'has')>有回执</option>
<option value="none" @selected(($filters['receipt_status'] ?? '') === 'none')>无回执(广义)</option>
</select>
<div class="muted muted-xs mt-6">无回执(广义)会包含未支付订单;收费闭环治理请优先使用“已付无回执”快捷筛选。</div>
<div class="muted muted-xs mt-6" data-role="po-receipt-status-broad-none-hint">无回执(广义)会包含未支付订单;收费闭环治理请优先使用“已付无回执”快捷筛选。</div>
</div>
<select name="refund_status">
<option value="">全部退款状态</option>

View File

@@ -0,0 +1,33 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderFiltersReceiptStatusHintShouldHaveDataRoleTest 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_receipt_status_hint_should_have_data_role(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-receipt-status-broad-none-hint"', $html);
$this->assertStringContainsString('无回执(广义)会包含未支付订单;收费闭环治理请优先使用“已付无回执”快捷筛选。', $html);
}
}