ui(governance): add go-scope shortcuts for clear-error blocked hints

This commit is contained in:
萝卜
2026-03-17 05:49:14 +08:00
parent 3e2e0ad046
commit 537c1e093c
3 changed files with 96 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexClearBmpaBlockedHintShouldIncludeGoBmpaFailedLinkTest 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_bmpa_failed_set(): void
{
$this->loginAsPlatformAdmin();
// 构造一个会触发 clear_bmpa_errors 被阻断的筛选:不在 BMPA 失败集合。
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="clear-bmpa-errors-blocked-hint"', $html);
$this->assertStringContainsString('切到 BMPA 失败集合', $html);
$this->assertStringContainsString('bmpa_failed_only=1', $html);
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexClearSyncBlockedHintShouldIncludeGoFailedLinkTest 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_sync_failed_set(): void
{
$this->loginAsPlatformAdmin();
// 构造一个会触发 clear_sync_errors 被阻断的筛选:不在失败集合。
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="clear-sync-errors-blocked-hint"', $html);
$this->assertStringContainsString('切到同步失败集合', $html);
$this->assertStringContainsString('sync_status=failed', $html);
}
}