ui(platform-orders): add bmpa run_id badge with quick links
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderIndexBatchBmpaRunIdBadgeShouldRenderTest 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_should_render_batch_bmpa_run_id_badge_and_quick_links(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$runId = 'BMPA_TEST_BADGE_0001';
|
||||
|
||||
$html = $this->get('/admin/platform-orders?batch_bmpa_run_id=' . $runId)
|
||||
->assertOk()
|
||||
->getContent();
|
||||
|
||||
$this->assertStringContainsString('当前 BMPA run_id:<strong>' . $runId . '</strong>', $html);
|
||||
|
||||
// 快捷入口:本批次失败(应带 batch_bmpa_run_id + bmpa_failed_only=1)
|
||||
$this->assertStringContainsString('batch_bmpa_run_id=' . $runId, $html);
|
||||
$this->assertStringContainsString('bmpa_failed_only=1', $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user