平台订单快捷筛选补齐核心治理入口 data-role 与口径护栏
This commit is contained in:
@@ -331,10 +331,10 @@
|
|||||||
<div class="inline-links">
|
<div class="inline-links">
|
||||||
<a href="{!! $allUrl !!}" class="muted">全部</a>
|
<a href="{!! $allUrl !!}" class="muted">全部</a>
|
||||||
<a href="{!! $buildQuickFilterUrl(['payment_status' => 'unpaid']) !!}" class="muted">待支付</a>
|
<a href="{!! $buildQuickFilterUrl(['payment_status' => 'unpaid']) !!}" class="muted">待支付</a>
|
||||||
<a href="{!! $buildQuickFilterUrl(['bmpa_processable_only' => '1']) !!}" class="muted">可BMPA处理</a>
|
<a data-role="po-quickfilter-bmpa-processable" href="{!! $buildQuickFilterUrl(['bmpa_processable_only' => '1']) !!}" class="muted">可BMPA处理</a>
|
||||||
<a href="{!! $buildQuickFilterUrl(['payment_status' => 'paid', 'status' => 'pending', 'sync_status' => 'unsynced']) !!}" class="muted">待生效</a>
|
<a href="{!! $buildQuickFilterUrl(['payment_status' => 'paid', 'status' => 'pending', 'sync_status' => 'unsynced']) !!}" class="muted">待生效</a>
|
||||||
<a href="{!! $buildQuickFilterUrl(['syncable_only' => '1', 'sync_status' => 'unsynced']) !!}" class="muted">可同步订阅</a>
|
<a data-role="po-quickfilter-syncable" href="{!! $buildQuickFilterUrl(['syncable_only' => '1', 'sync_status' => 'unsynced']) !!}" class="muted">可同步订阅</a>
|
||||||
<a href="{!! $buildQuickFilterUrl(['sync_status' => 'failed']) !!}" class="muted">同步失败</a>
|
<a data-role="po-quickfilter-sync-failed" href="{!! $buildQuickFilterUrl(['sync_status' => 'failed']) !!}" class="muted">同步失败</a>
|
||||||
<a href="{!! $buildQuickFilterUrl(['bmpa_failed_only' => '1']) !!}" class="muted">BMPA失败</a>
|
<a href="{!! $buildQuickFilterUrl(['bmpa_failed_only' => '1']) !!}" class="muted">BMPA失败</a>
|
||||||
<a href="{!! $buildQuickFilterUrl(['bmpa_success_only' => '1']) !!}" class="muted">BMPA成功</a>
|
<a href="{!! $buildQuickFilterUrl(['bmpa_success_only' => '1']) !!}" class="muted">BMPA成功</a>
|
||||||
<a href="{!! $buildQuickFilterUrl(['renewal_missing_subscription' => '1']) !!}" class="muted">续费缺订阅</a>
|
<a href="{!! $buildQuickFilterUrl(['renewal_missing_subscription' => '1']) !!}" class="muted">续费缺订阅</a>
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlatformOrderIndexQuickFiltersCoreGovernanceShouldHaveDataRoleTest 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_core_governance_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-bmpa-processable"', $html);
|
||||||
|
$this->assertStringContainsString('data-role="po-quickfilter-syncable"', $html);
|
||||||
|
$this->assertStringContainsString('data-role="po-quickfilter-sync-failed"', $html);
|
||||||
|
|
||||||
|
// 也钉一下关键 query 语义,避免链接口径被误改
|
||||||
|
$this->assertStringContainsString('bmpa_processable_only=1', $html);
|
||||||
|
$this->assertStringContainsString('syncable_only=1', $html);
|
||||||
|
$this->assertStringContainsString('sync_status=failed', $html);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user