test: 锁定导出表单透传近24小时批量BMPA筛选口径

This commit is contained in:
萝卜
2026-03-13 14:35:13 +00:00
parent d19a80c352
commit 195170c350

View File

@@ -0,0 +1,33 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderExportKeepsBatchBmpa24hFilterTest 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_export_form_keeps_batch_mark_paid_and_activate_24h_filter_value(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders?batch_mark_paid_and_activate_24h=1');
$res->assertOk();
// 导出表单应透传当前筛选口径,避免“列表筛选已生效但导出漏口径”
$res->assertSee('<form method="get" action="/admin/platform-orders/export"', false);
$res->assertSee('<input type="hidden" name="batch_mark_paid_and_activate_24h" value="1">', false);
}
}