补充平台订单快捷筛选分组锚点

This commit is contained in:
萝卜
2026-03-19 03:39:10 +08:00
parent 85540ea4a0
commit 2365afd741
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 AdminPlatformOrderQuickFiltersGroupsShouldHaveDataRoleTest 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_data_role(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-quickfilter-primary-group"', $html);
$this->assertStringContainsString('data-role="po-quickfilter-receipt-refund-group"', $html);
$this->assertStringContainsString('data-role="po-quickfilter-governance-batch-group"', $html);
}
}