test(dashboard): cover shared loading overlay

This commit is contained in:
caoxiaozhu
2026-06-03 09:45:06 +08:00
parent d060f89d30
commit faa39e6c06
2 changed files with 3 additions and 8 deletions

View File

@@ -16,20 +16,13 @@
justify-items: center; justify-items: center;
gap: 10px; gap: 10px;
min-height: 320px; min-height: 320px;
padding: 24px;
border: 1px solid #e2e8f0; border: 1px solid #e2e8f0;
border-radius: 4px; border-radius: 4px;
background: rgba(248, 250, 252, .88); background: rgba(248, 250, 252, .88);
color: #334155;
font-size: 13px;
font-weight: 800;
backdrop-filter: blur(2px); backdrop-filter: blur(2px);
} }
.dashboard-loading-overlay i {
color: var(--theme-primary);
font-size: 28px;
}
.dashboard.is-loading > :not(.dashboard-loading-overlay) { .dashboard.is-loading > :not(.dashboard-loading-overlay) {
pointer-events: none; pointer-events: none;
} }

View File

@@ -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', () => { test('risk dashboard shows loading overlay and realtime refresh status', () => {
assert.match(overviewTemplate, /dashboard-loading-overlay/) assert.match(overviewTemplate, /dashboard-loading-overlay/)
assert.match(overviewTemplate, /TableLoadingState/)
assert.match(overviewTemplate, /activeDashboardLoadingText/) assert.match(overviewTemplate, /activeDashboardLoadingText/)
assert.match(dashboardComponent, /risk-dashboard-loading-overlay/) assert.match(dashboardComponent, /risk-dashboard-loading-overlay/)
assert.match(dashboardComponent, /TableLoadingState/)
assert.match(dashboardComponent, /loadingLabel/) assert.match(dashboardComponent, /loadingLabel/)
assert.match(dashboardComponent, /lastUpdatedLabel/) assert.match(dashboardComponent, /lastUpdatedLabel/)
assert.match(dashboardComponent, /lastUpdatedAt/) assert.match(dashboardComponent, /lastUpdatedAt/)