fix(admin): include batch run_id filters in hidden inputs partial
This commit is contained in:
@@ -25,6 +25,8 @@
|
|||||||
'syncable_only',
|
'syncable_only',
|
||||||
'renewal_missing_subscription',
|
'renewal_missing_subscription',
|
||||||
'batch_synced_24h',
|
'batch_synced_24h',
|
||||||
|
'batch_activation_run_id',
|
||||||
|
'batch_bmpa_run_id',
|
||||||
'batch_mark_paid_and_activate_24h',
|
'batch_mark_paid_and_activate_24h',
|
||||||
'batch_mark_activated_24h',
|
'batch_mark_activated_24h',
|
||||||
'keyword',
|
'keyword',
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlatformOrderIndexToolFormsHiddenInputsShouldIncludeBatchRunIdsTest 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_tool_forms_hidden_inputs_should_include_batch_run_ids_when_present(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$html = $this->get('/admin/platform-orders?batch_activation_run_id=BAS_TEST_0001&batch_bmpa_run_id=BMPA_TEST_0001')
|
||||||
|
->assertOk()
|
||||||
|
->getContent();
|
||||||
|
|
||||||
|
// 过滤器 hidden inputs 组件应能透传新加的两个 run_id 字段
|
||||||
|
$this->assertStringContainsString('name="batch_activation_run_id" value="BAS_TEST_0001"', $html);
|
||||||
|
$this->assertStringContainsString('name="batch_bmpa_run_id" value="BMPA_TEST_0001"', $html);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user