平台订单列表:治理SOP卡片测试护栏

This commit is contained in:
萝卜
2026-03-11 08:17:04 +00:00
parent 2730d656b1
commit 82dd58a8c5

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderGovernanceSopCardTest 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_shows_governance_sop_card_and_links(): void
{
$this->loginAsPlatformAdmin();
$this->get('/admin/platform-orders?plan_id=123&page=2')
->assertOk()
->assertSee('治理顺序建议SOP')
// 链接需保留筛选上下文 plan_id=123且清空 page
->assertSee('plan_id=123', false)
->assertSee('reconcile_mismatch=1', false)
->assertSee('refund_inconsistent=1', false)
->assertSee('syncable_only=1', false)
->assertDontSee('page=2', false);
}
}