From faa39e6c067726780f8849b9efee3170670ede69 Mon Sep 17 00:00:00 2001 From: caoxiaozhu Date: Wed, 3 Jun 2026 09:45:06 +0800 Subject: [PATCH] test(dashboard): cover shared loading overlay --- web/src/assets/styles/views/overview-view.css | 9 +-------- web/tests/risk-observation-dashboard.test.mjs | 2 ++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/web/src/assets/styles/views/overview-view.css b/web/src/assets/styles/views/overview-view.css index 0e23338..b45ed46 100644 --- a/web/src/assets/styles/views/overview-view.css +++ b/web/src/assets/styles/views/overview-view.css @@ -16,20 +16,13 @@ justify-items: center; gap: 10px; min-height: 320px; + padding: 24px; border: 1px solid #e2e8f0; border-radius: 4px; background: rgba(248, 250, 252, .88); - color: #334155; - font-size: 13px; - font-weight: 800; backdrop-filter: blur(2px); } -.dashboard-loading-overlay i { - color: var(--theme-primary); - font-size: 28px; -} - .dashboard.is-loading > :not(.dashboard-loading-overlay) { pointer-events: none; } diff --git a/web/tests/risk-observation-dashboard.test.mjs b/web/tests/risk-observation-dashboard.test.mjs index 3cb858d..3c610bb 100644 --- a/web/tests/risk-observation-dashboard.test.mjs +++ b/web/tests/risk-observation-dashboard.test.mjs @@ -125,8 +125,10 @@ test('risk dashboard wires window filter to trend, ranking, and cards data sourc test('risk dashboard shows loading overlay and realtime refresh status', () => { assert.match(overviewTemplate, /dashboard-loading-overlay/) + assert.match(overviewTemplate, /TableLoadingState/) assert.match(overviewTemplate, /activeDashboardLoadingText/) assert.match(dashboardComponent, /risk-dashboard-loading-overlay/) + assert.match(dashboardComponent, /TableLoadingState/) assert.match(dashboardComponent, /loadingLabel/) assert.match(dashboardComponent, /lastUpdatedLabel/) assert.match(dashboardComponent, /lastUpdatedAt/)