ui(platform-orders): add run_id badge quick governance links
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderIndexBatchActivationRunIdBadgeQuickLinksShouldRenderTest 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_run_id_badge_quick_links(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$runId = 'BAS_TEST_BADGE_0001';
|
||||
$html = $this->get('/admin/platform-orders?batch_activation_run_id=' . $runId)
|
||||
->assertOk()
|
||||
->getContent();
|
||||
|
||||
$this->assertStringContainsString('当前 run_id:<strong>' . $runId . '</strong>', $html);
|
||||
|
||||
// 本批次失败
|
||||
$this->assertStringContainsString('batch_activation_run_id=' . $runId, $html);
|
||||
$this->assertStringContainsString('sync_status=failed', $html);
|
||||
|
||||
// 本批次可同步重试(unsynced + syncable_only=1)
|
||||
$this->assertStringContainsString('syncable_only=1', $html);
|
||||
$this->assertStringContainsString('sync_status=unsynced', $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user