platform orders: add quick filter link for bmpa failed

This commit is contained in:
萝卜
2026-03-13 13:19:00 +00:00
parent 5f3057b9ee
commit bd5a37ba9b
2 changed files with 34 additions and 0 deletions

View File

@@ -41,6 +41,8 @@
<a href="/admin/platform-orders?reconcile_mismatch=1" class="muted">对账不一致</a> <a href="/admin/platform-orders?reconcile_mismatch=1" class="muted">对账不一致</a>
<span class="muted"></span> <span class="muted"></span>
<a href="/admin/platform-orders?refund_inconsistent=1" class="muted">退款不一致</a> <a href="/admin/platform-orders?refund_inconsistent=1" class="muted">退款不一致</a>
<span class="muted"></span>
<a href="/admin/platform-orders?bmpa_failed_only=1" class="muted">BMPA失败</a>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderQuickFilterBmpaFailedLinkTest 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_failed_only(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$res->assertSee('BMPA失败');
$res->assertSee('/admin/platform-orders?bmpa_failed_only=1', false);
}
}