ui(governance): add go-pending shortcut in batch mark activated blocked hint

This commit is contained in:
萝卜
2026-03-17 05:40:58 +08:00
parent f0340af59f
commit 5944211597
2 changed files with 53 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexBatchMarkActivatedBlockedHintShouldIncludeGoPendingLinkTest 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_blocked_hint_should_include_link_to_paid_pending_unsynced_set(): void
{
$this->loginAsPlatformAdmin();
// 构造一个会触发 batch_mark_activated 被阻断的筛选:缺少 sync_status=unsynced。
$res = $this->get('/admin/platform-orders?payment_status=paid&status=pending');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="batch-mark-activated-blocked-hint"', $html);
$this->assertStringContainsString('切到待生效集合', $html);
$this->assertStringContainsString('payment_status=paid', $html);
$this->assertStringContainsString('status=pending', $html);
$this->assertStringContainsString('sync_status=unsynced', $html);
}
}