平台订单快捷筛选近24小时批量集合补齐 data-role 与口径护栏

This commit is contained in:
萝卜
2026-03-18 16:13:06 +08:00
parent 548f947c30
commit fa6d709962
2 changed files with 43 additions and 3 deletions

View File

@@ -353,9 +353,9 @@
<div class="inline-links mt-6"> <div class="inline-links mt-6">
<a data-role="po-quickfilter-reconcile-mismatch" href="{!! $buildQuickFilterUrl(['reconcile_mismatch' => '1']) !!}" class="muted">对账不一致</a> <a data-role="po-quickfilter-reconcile-mismatch" href="{!! $buildQuickFilterUrl(['reconcile_mismatch' => '1']) !!}" class="muted">对账不一致</a>
<a data-role="po-quickfilter-refund-inconsistent" href="{!! $buildQuickFilterUrl(['refund_inconsistent' => '1']) !!}" class="muted">退款不一致</a> <a data-role="po-quickfilter-refund-inconsistent" href="{!! $buildQuickFilterUrl(['refund_inconsistent' => '1']) !!}" class="muted">退款不一致</a>
<a href="{!! $buildQuickFilterUrl(['batch_synced_24h' => '1']) !!}" class="muted">近24小时批量同步</a> <a data-role="po-quickfilter-batch-synced-24h" href="{!! $buildQuickFilterUrl(['batch_synced_24h' => '1']) !!}" class="muted">近24小时批量同步</a>
<a href="{!! $buildQuickFilterUrl(['batch_mark_paid_and_activate_24h' => '1']) !!}" class="muted">近24小时批量BMPA</a> <a data-role="po-quickfilter-batch-bmpa-24h" href="{!! $buildQuickFilterUrl(['batch_mark_paid_and_activate_24h' => '1']) !!}" class="muted">近24小时批量BMPA</a>
<a href="{!! $buildQuickFilterUrl(['batch_mark_activated_24h' => '1']) !!}" class="muted">近24小时批量生效</a> <a data-role="po-quickfilter-batch-activated-24h" href="{!! $buildQuickFilterUrl(['batch_mark_activated_24h' => '1']) !!}" class="muted">近24小时批量生效</a>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,40 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexQuickFiltersBatch24hShouldHaveDataRoleTest 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_filters_batch_24h_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-batch-synced-24h"', $html);
$this->assertStringContainsString('data-role="po-quickfilter-batch-bmpa-24h"', $html);
$this->assertStringContainsString('data-role="po-quickfilter-batch-activated-24h"', $html);
// 钉死 query 语义
$this->assertStringContainsString('batch_synced_24h=1', $html);
$this->assertStringContainsString('batch_mark_paid_and_activate_24h=1', $html);
$this->assertStringContainsString('batch_mark_activated_24h=1', $html);
}
}