admin ui: align card border fallback with light theme tokens
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminBaseCssCardBorderShouldUseThemeBorderColorTest 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_base_css_card_border_should_use_theme_border_color(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$css = file_get_contents(public_path('css/admin-base.css'));
|
||||
$this->assertIsString($css);
|
||||
|
||||
// 卡片边框必须使用浅色主题边框变量,避免残留暗色边框 fallback(#334155)。
|
||||
$this->assertStringContainsString('.card{border:1px solid var(--adm-border-color, #e5e7eb)', $css);
|
||||
$this->assertStringNotContainsString('var(--adm-border-color, #334155)', $css);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user