admin-components: make row-warn-prefix a subtle pill badge (scoped)

This commit is contained in:
萝卜
2026-03-14 13:26:45 +00:00
parent 646f1b972d
commit d9b7e32e32
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 AdminPlatformOrderIndexRowWarnPrefixStyleScopedTest 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_prefix_style_is_scoped_under_platform_orders_table_only(): void
{
$this->loginAsPlatformAdmin();
$css = file_get_contents(public_path('css/admin-components.css'));
$this->assertIsString($css);
$this->assertStringContainsString('.platform-orders-table .row-warn-prefix{', $css);
// 避免全局污染
$this->assertStringNotContainsString("\n.row-warn-prefix{", $css);
}
}