平台订单快捷筛选全部补齐 data-role 护栏

This commit is contained in:
萝卜
2026-03-18 16:14:58 +08:00
parent fa6d709962
commit 6705875a4c
2 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexQuickFilterAllShouldHaveDataRoleTest 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_index_quick_filter_all_should_have_data_role(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$res->assertSee('data-role="po-quickfilter-all"', false);
$res->assertSee('>全部</a>', false);
}
}