diff --git a/public/css/admin-components.css b/public/css/admin-components.css index a3ef392..ef4d94b 100644 --- a/public/css/admin-components.css +++ b/public/css/admin-components.css @@ -91,6 +91,8 @@ .platform-orders-table.is-compact .muted-xs{font-size:12px;} .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 a.link{color:#b52b27;text-decoration:underline;} +.platform-orders-table .row-warn a.link:hover{text-decoration:none;} /* 平台订单列表:精简视图也要可达的治理提示(对账/退款不一致) */ .platform-orders-table .governance-hints{margin-bottom:6px;} diff --git a/tests/Feature/AdminPlatformOrderIndexRowWarnLinkStyleScopedTest.php b/tests/Feature/AdminPlatformOrderIndexRowWarnLinkStyleScopedTest.php new file mode 100644 index 0000000..0c3b666 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexRowWarnLinkStyleScopedTest.php @@ -0,0 +1,36 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_row_warn_link_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 a.link{', $css); + $this->assertStringContainsString('.platform-orders-table .row-warn a.link:hover{', $css); + + // 防止写成全局 a.link{...} 或 .row-warn a.link{...} + $this->assertStringNotContainsString("\na.link{", $css); + $this->assertStringNotContainsString("\n.row-warn a.link{", $css); + } +}