补强平台订单快捷筛选分组语义标签

This commit is contained in:
萝卜
2026-03-19 04:03:23 +08:00
parent a0eb9bdfb5
commit 0a94f00064
2 changed files with 37 additions and 3 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderQuickFiltersGroupsShouldHaveAriaLabelTest 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_quick_filter_groups_should_have_aria_label(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-quickfilter-primary-group" aria-label="平台订单主链快捷筛选组"', $html);
$this->assertStringContainsString('data-role="po-quickfilter-receipt-refund-group" aria-label="平台订单收付治理快捷筛选组"', $html);
$this->assertStringContainsString('data-role="po-quickfilter-governance-batch-group" aria-label="平台订单异常与批量治理快捷筛选组"', $html);
}
}