feat(admin): 引入 admin.js(总台交互渐进增强基线)

This commit is contained in:
萝卜
2026-03-15 17:17:58 +08:00
parent bb5fbfde4d
commit 77fd8af295
3 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminLayoutShouldLoadAdminJsTest 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_dashboard_should_include_admin_js(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('/js/admin.js', false);
}
}