36 lines
1019 B
PHP
36 lines
1019 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminComponentsCssShouldUsePopoverShadowAndSurfaceTintTokensTest 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_should_use_popover_shadow_and_surface_tint_tokens(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$css = file_get_contents(public_path('css/admin-components.css'));
|
|
$this->assertIsString($css);
|
|
|
|
// popover/toast/dropdown 的阴影应走 token。
|
|
$this->assertStringContainsString('var(--adm-shadow-popover', $css);
|
|
|
|
// 列表空态背景应走 surface token。
|
|
$this->assertStringContainsString('var(--adm-surface-tint', $css);
|
|
}
|
|
}
|