admin-components: tune row-warn colors (lighter) with token test
This commit is contained in:
@@ -90,7 +90,7 @@
|
|||||||
.platform-orders-table.is-compact td{padding-top:8px;padding-bottom:8px;}
|
.platform-orders-table.is-compact td{padding-top:8px;padding-bottom:8px;}
|
||||||
.platform-orders-table.is-compact .muted-xs{font-size:12px;}
|
.platform-orders-table.is-compact .muted-xs{font-size:12px;}
|
||||||
.platform-orders-table .row-meta{margin-top:2px;}
|
.platform-orders-table .row-meta{margin-top:2px;}
|
||||||
.platform-orders-table .row-warn{margin-top:4px;padding:4px 6px;border-left:3px solid #d9534f;background:#fff6f6;border-radius:4px;}
|
.platform-orders-table .row-warn{margin-top:4px;padding:4px 6px;border-left:3px solid #e06b67;background:#fff9f9;border-radius:4px;}
|
||||||
.platform-orders-table .row-warn a.link{color:#b52b27;text-decoration:underline;}
|
.platform-orders-table .row-warn a.link{color:#b52b27;text-decoration:underline;}
|
||||||
.platform-orders-table .row-warn a.link:hover{text-decoration:none;}
|
.platform-orders-table .row-warn a.link:hover{text-decoration:none;}
|
||||||
.platform-orders-table .row-warn-prefix{font-weight:600;display:inline-block;padding:1px 6px;border-radius:10px;background:#ffecec;color:#b52b27;margin-right:4px;}
|
.platform-orders-table .row-warn-prefix{font-weight:600;display:inline-block;padding:1px 6px;border-radius:10px;background:#ffecec;color:#b52b27;margin-right:4px;}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user