44 lines
1.4 KiB
PHP
44 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminSupportTicketsIndexShouldUsePageHeaderAndListCardTest 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_support_tickets_index_should_use_page_header_and_list_card(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$response = $this->get('/admin/support-tickets');
|
|
$response->assertOk();
|
|
|
|
// 护栏:占位页也要走统一的 PageHeader + ListCard 骨架,后续加功能不返工。
|
|
$response->assertSee('page-header', false);
|
|
$response->assertSee('page-header-title', false);
|
|
$response->assertSee('page-header-subtitle', false);
|
|
$response->assertSee('page-header-actions', false);
|
|
$response->assertSee('page-header-meta', false);
|
|
|
|
$response->assertSee('list-card', false);
|
|
$response->assertSee('list-card-header', false);
|
|
$response->assertSee('list-card-body', false);
|
|
$response->assertSee('list-card-table', false);
|
|
|
|
$response->assertSee('table-empty', false);
|
|
}
|
|
}
|