Skip to content

Commit 88ddaf9

Browse files
Add regression guard for dashboard rail collapse detection
1 parent 470e4bd commit 88ddaf9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/dashboard-layout-regression.test.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,14 @@ test('dashboard runtime supports layout classes, accordion guards, and overflow
112112
assert.match(dashboardScript, /scheduleDashboardLayoutApplyForType\('vm'\)/);
113113
});
114114

115+
test('dashboard quick rail collapse detection is row-visibility based and not icon-heuristic based', () => {
116+
assert.match(dashboardScript, /const isDashboardWidgetCollapsedForType = \(type\) =>/);
117+
assert.match(dashboardScript, /const \$updatedRow = getDashboardWidgetUpdatedRowForType\(resolvedType\);/);
118+
assert.match(dashboardScript, /return !isDashboardNodeVisible\(updatedNode\);/);
119+
assert.doesNotMatch(dashboardScript, /iconClass\.includes\('angle-down'\)/);
120+
assert.doesNotMatch(dashboardScript, /iconClass\.includes\('chevron-down'\)/);
121+
});
122+
115123
test('dashboard css includes non-classic controls and overflow rendering modes', () => {
116124
assert.match(dashboardCss, /\.fv-dashboard-layout-inline-host/);
117125
assert.match(dashboardCss, /\.fv-dashboard-layout-quick/);

0 commit comments

Comments
 (0)