feat(admin): 平台订单筛选增加线索ID(lead_id)与上下文提示
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderIndexLeadIdFilterFormFieldTest 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_id_filter_field(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin/platform-orders');
|
||||
$res->assertOk();
|
||||
|
||||
$res->assertSee('name="lead_id"', false);
|
||||
$res->assertSee('线索ID', false);
|
||||
}
|
||||
|
||||
public function test_index_should_render_lead_context_badge_when_filtered(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin/platform-orders?lead_id=12');
|
||||
$res->assertOk();
|
||||
|
||||
$res->assertSee('当前线索:#12', false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user