35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminComponentsCssToolGroupFormattingTest 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_components_css_contains_tool_group_blocks_with_braced_formatting(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$css = file_get_contents(public_path('css/admin-components.css'));
|
|
$this->assertIsString($css);
|
|
|
|
// 只做轻量“存在性/格式”断言:避免回到单行写法(不利于长期维护)
|
|
$this->assertStringContainsString(".tool-grid{\n", $css);
|
|
$this->assertStringContainsString(".tool-group{\n", $css);
|
|
$this->assertStringContainsString(".tool-group-subtitle{\n", $css);
|
|
}
|
|
}
|