platform orders: add quick filter for bmpa processable set

This commit is contained in:
萝卜
2026-03-13 13:21:43 +00:00
parent bd5a37ba9b
commit 50a210ecd8
2 changed files with 34 additions and 0 deletions

View File

@@ -22,6 +22,8 @@
<span class="muted"></span>
<a href="/admin/platform-orders?payment_status=unpaid" class="muted">待支付</a>
<span class="muted"></span>
<a href="/admin/platform-orders?status=pending&payment_status=unpaid" class="muted">可BMPA处理</a>
<span class="muted"></span>
<a href="/admin/platform-orders?payment_status=paid&status=pending" class="muted">待生效</a>
<span class="muted"></span>
<a href="/admin/platform-orders?syncable_only=1" class="muted">可同步订阅</a>

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderQuickFilterBmpaProcessableLinkTest 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_page_has_quick_filter_for_bmpa_processable_set(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$res->assertSee('可BMPA处理');
$res->assertSee('/admin/platform-orders?status=pending&payment_status=unpaid', false);
}
}