补强已付无回执提示语义标签

This commit is contained in:
萝卜
2026-03-19 04:21:12 +08:00
parent aeb0e26976
commit 59488d8232
2 changed files with 33 additions and 1 deletions

View File

@@ -1086,7 +1086,7 @@
@endif
@if((($filters['receipt_status'] ?? '') === 'none') && $hasSyncableOnlyFilter)
<div class="card governance-block mb-10" data-role="po-tools-paid-no-receipt-hint">
<div class="card governance-block mb-10" data-role="po-tools-paid-no-receipt-hint" aria-label="已付无回执治理提示">
<div class="muted text-danger governance-block-title"><strong>已付无回执提示</strong></div>
<div class="muted governance-block-body">
当前集合为「已付无回执」且已勾选「只看可同步」。为保证收费闭环可治理,建议先补齐支付回执留痕,再执行批量同步订阅。

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderToolsPaidNoReceiptHintShouldHaveAriaLabelTest 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_have_aria_label(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-tools-paid-no-receipt-hint" aria-label="已付无回执治理提示"', $html);
}
}