fix: allow closing terminal chart slots

This commit is contained in:
2569718930@qq.com
2026-06-02 08:45:25 +08:00
parent 9d136a337c
commit 35a93cbd9e
2 changed files with 65 additions and 17 deletions
@@ -57,6 +57,16 @@ export function runTests() {
dashboardSource.includes("disableClose={true}"),
"mobile terminal should render one selected chart and suggest landscape for the full grid",
);
assert(
!dashboardSource.includes("disableClose={visibleSlots.filter(Boolean).length <= 1}"),
"desktop chart slots must allow clearing the last visible city so users can close a 1x1 chart",
);
assert(
dashboardSource.includes("readStoredTerminalSlots") &&
dashboardSource.includes("hasPersistedSlots") &&
dashboardSource.includes("shouldAutofillInitialSlots"),
"terminal slots must distinguish first-load default fill from a user-cleared all-empty layout",
);
assert(
selectorSource.includes("[1, 2, 3].map") &&
selectorSource.includes("grid grid-cols-3"),