平台订单快捷筛选全部补齐 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

@@ -329,7 +329,7 @@
@endphp
<div class="inline-links">
<a href="{!! $allUrl !!}" class="muted">全部</a>
<a data-role="po-quickfilter-all" href="{!! $allUrl !!}" class="muted">全部</a>
<a data-role="po-quickfilter-unpaid" href="{!! $buildQuickFilterUrl(['payment_status' => 'unpaid']) !!}" class="muted">待支付</a>
<a data-role="po-quickfilter-bmpa-processable" href="{!! $buildQuickFilterUrl(['bmpa_processable_only' => '1']) !!}" class="muted">可BMPA处理</a>
<a data-role="po-quickfilter-pending-effective" href="{!! $buildQuickFilterUrl(['payment_status' => 'paid', 'status' => 'pending', 'sync_status' => 'unsynced']) !!}" class="muted">待生效</a>

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);
}
}