admin-components: tune row-warn colors (lighter) with token test

This commit is contained in:
萝卜
2026-03-14 13:28:58 +00:00
parent d9b7e32e32
commit 8bf8c91a04
2 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderIndexRowWarnStyleTokenTest 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_row_warn_style_tokens_exist_in_css(): void
{
$this->loginAsPlatformAdmin();
$css = file_get_contents(public_path('css/admin-components.css'));
$this->assertIsString($css);
// 只做轻量 token 断言:确保 row-warn 仍是“浅底 + 左边框”提示条
$this->assertStringContainsString('.platform-orders-table .row-warn{', $css);
$this->assertStringContainsString('border-left:3px solid', $css);
$this->assertStringContainsString('background:#fff9f9', $css);
}
}