Platform orders index: add lead governance quick links

This commit is contained in:
萝卜
2026-03-15 00:08:20 +00:00
parent 89a7f59b92
commit 4273665e4a
2 changed files with 94 additions and 6 deletions

View File

@@ -0,0 +1,50 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Arr;
use Tests\TestCase;
class AdminPlatformOrderIndexLeadGovernanceQuickLinksTest 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_index_should_render_lead_governance_quick_links_when_lead_locked(): void
{
$this->loginAsPlatformAdmin();
$url = '/admin/platform-orders?' . Arr::query([
'lead_id' => 12,
]);
$res = $this->get($url);
$res->assertOk();
$res->assertSee('线索治理入口:', false);
$unpaidUrl = '/admin/platform-orders?' . Arr::query([
'lead_id' => 12,
'payment_status' => 'unpaid',
]);
$paidPendingUrl = '/admin/platform-orders?' . Arr::query([
'lead_id' => 12,
'payment_status' => 'paid',
'status' => 'pending',
]);
$res->assertSee($unpaidUrl, false);
$res->assertSee($paidPendingUrl, false);
}
}