chore(admin): 导航增加开通线索入口 + 护栏测试
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
<a href="/admin/orders">订单监控</a>
|
<a href="/admin/orders">订单监控</a>
|
||||||
<a href="/admin/platform-orders">平台订单</a>
|
<a href="/admin/platform-orders">平台订单</a>
|
||||||
<a href="/admin/site-subscriptions">订阅管理</a>
|
<a href="/admin/site-subscriptions">订阅管理</a>
|
||||||
|
<a href="/admin/platform-leads">开通线索</a>
|
||||||
<a href="/admin/products">商品巡检</a>
|
<a href="/admin/products">商品巡检</a>
|
||||||
<a href="/admin/product-categories">商品分类</a>
|
<a href="/admin/product-categories">商品分类</a>
|
||||||
|
|
||||||
|
|||||||
32
tests/Feature/AdminNavPlatformLeadsLinkTest.php
Normal file
32
tests/Feature/AdminNavPlatformLeadsLinkTest.php
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminNavPlatformLeadsLinkTest 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_admin_layout_should_contain_platform_leads_nav_link(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$res = $this->get('/admin');
|
||||||
|
$res->assertOk();
|
||||||
|
|
||||||
|
$res->assertSee('href="/admin/platform-leads"', false);
|
||||||
|
$res->assertSee('开通线索');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user