平台订单快捷筛选待支付/待生效补齐 data-role 与口径护栏
This commit is contained in:
@@ -330,9 +330,9 @@
|
||||
|
||||
<div class="inline-links">
|
||||
<a href="{!! $allUrl !!}" class="muted">全部</a>
|
||||
<a href="{!! $buildQuickFilterUrl(['payment_status' => 'unpaid']) !!}" 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 href="{!! $buildQuickFilterUrl(['payment_status' => 'paid', 'status' => 'pending', 'sync_status' => 'unsynced']) !!}" class="muted">待生效</a>
|
||||
<a data-role="po-quickfilter-pending-effective" href="{!! $buildQuickFilterUrl(['payment_status' => 'paid', 'status' => 'pending', 'sync_status' => 'unsynced']) !!}" class="muted">待生效</a>
|
||||
<a data-role="po-quickfilter-syncable" href="{!! $buildQuickFilterUrl(['syncable_only' => '1', 'sync_status' => 'unsynced']) !!}" class="muted">可同步订阅</a>
|
||||
<a data-role="po-quickfilter-sync-failed" href="{!! $buildQuickFilterUrl(['sync_status' => 'failed']) !!}" class="muted">同步失败</a>
|
||||
<a data-role="po-quickfilter-bmpa-failed" href="{!! $buildQuickFilterUrl(['bmpa_failed_only' => '1']) !!}" class="muted">BMPA失败</a>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderIndexQuickFiltersUnpaidAndPendingEffectiveShouldHaveDataRoleTest 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_unpaid_and_pending_effective_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-unpaid"', $html);
|
||||
$this->assertStringContainsString('data-role="po-quickfilter-pending-effective"', $html);
|
||||
|
||||
// 钉死语义口径
|
||||
$this->assertStringContainsString('payment_status=unpaid', $html);
|
||||
$this->assertStringContainsString('payment_status=paid', $html);
|
||||
$this->assertStringContainsString('status=pending', $html);
|
||||
$this->assertStringContainsString('sync_status=unsynced', $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user