feat(admin): 客服中心工单骨架(模型/迁移/路由/菜单/页面)

This commit is contained in:
萝卜
2026-03-15 08:44:02 +00:00
parent 0bd21f8715
commit 62d7a81df3
8 changed files with 203 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminSupportTicketIndexPageShouldRenderTest 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_support_ticket_index_page_should_render(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/support-tickets');
$res->assertOk();
$res->assertSee('客服中心', false);
$res->assertSee('工单列表', false);
}
}

View File

@@ -0,0 +1,33 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminTopNavShouldContainSupportCenterLinkTest 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_topnav_should_contain_support_tickets_link(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('客服中心', false);
$res->assertSee('/admin/support-tickets', false);
$res->assertSee('工单', false);
}
}