Adds `buildAlertsTreeNodes` to sidebar-utils and renders an Alerts section between Applications and Starred in LayoutShell. The section uses an accordion pattern — entering `/alerts/*` collapses apps/admin/starred and restores their state on leave. gitnexus_impact(LayoutContent, upstream) = LOW (0 direct callers; rendered only by LayoutShell's provider wrapper). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
18 lines
508 B
TypeScript
18 lines
508 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { buildAlertsTreeNodes } from './sidebar-utils';
|
|
|
|
describe('buildAlertsTreeNodes', () => {
|
|
it('returns 5 entries with inbox/all/rules/silences/history paths', () => {
|
|
const nodes = buildAlertsTreeNodes();
|
|
expect(nodes).toHaveLength(5);
|
|
const paths = nodes.map((n) => n.path);
|
|
expect(paths).toEqual([
|
|
'/alerts/inbox',
|
|
'/alerts/all',
|
|
'/alerts/rules',
|
|
'/alerts/silences',
|
|
'/alerts/history',
|
|
]);
|
|
});
|
|
});
|