平台订单列表:治理SOP卡片测试护栏
This commit is contained in:
36
tests/Feature/AdminPlatformOrderGovernanceSopCardTest.php
Normal file
36
tests/Feature/AdminPlatformOrderGovernanceSopCardTest.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user