53 lines
1.8 KiB
PHP
53 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminPlatformOrderToolsGovernanceHintTest 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_tools_show_governance_hint_when_reconcile_mismatch_filter_present(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$this->get('/admin/platform-orders?reconcile_mismatch=1')
|
|
->assertOk()
|
|
->assertSee('建议先完成金额/状态治理(补回执/核对退款/修正状态)', false)
|
|
->assertSee('对账不一致', false);
|
|
}
|
|
|
|
public function test_platform_orders_tools_show_governance_hint_when_refund_inconsistent_filter_present(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$this->get('/admin/platform-orders?refund_inconsistent=1')
|
|
->assertOk()
|
|
->assertSee('建议先完成金额/状态治理(补回执/核对退款/修正状态)', false)
|
|
->assertSee('退款不一致', false);
|
|
}
|
|
|
|
public function test_platform_orders_tools_show_strong_hint_when_syncable_only_and_governance_filters_present(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$this->get('/admin/platform-orders?syncable_only=1&reconcile_mismatch=1')
|
|
->assertOk()
|
|
->assertSee('注意:当前同时勾选了「只看可同步」', false)
|
|
->assertSee('先去治理(取消只看可同步)', false)
|
|
->assertSee('syncable_only=', false);
|
|
}
|
|
}
|