admin-components: organize platform orders compact components (row-meta/row-warn)

This commit is contained in:
萝卜
2026-03-14 13:31:22 +00:00
parent 8bf8c91a04
commit 5850b5176e
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminComponentsCssPlatformOrdersSectionCommentTest 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_contains_platform_orders_row_meta_and_row_warn_section_comments(): void
{
$this->loginAsPlatformAdmin();
$css = file_get_contents(public_path('css/admin-components.css'));
$this->assertIsString($css);
// 用注释守住“组织结构”,便于后续持续美化时快速定位
$this->assertStringContainsString('/* 平台订单列表:二行辅助信息(例如 线索/订阅ID */', $css);
$this->assertStringContainsString('/* 平台订单列表:行内治理提示(精简视图主要入口) */', $css);
// 同时确保核心 selector 仍在(防止误删导致样式断裂)
$this->assertStringContainsString('.platform-orders-table .row-meta{', $css);
$this->assertStringContainsString('.platform-orders-table .row-warn{', $css);
}
}