feat(layout): finalize p01 and p02 changes
Complete UI foundation and app layout implementation, stabilize container health checks, and archive both OpenSpec changes after verification.
This commit is contained in:
14
frontend/tests/component/sidebar.test.ts
Normal file
14
frontend/tests/component/sidebar.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import Sidebar, { isSectionVisible } from '../../src/lib/components/layout/Sidebar.svelte';
|
||||
|
||||
describe('Sidebar component', () => {
|
||||
it('exports a component module', () => {
|
||||
expect(Sidebar).toBeDefined();
|
||||
});
|
||||
|
||||
it('supports role-based visibility checks', () => {
|
||||
expect(isSectionVisible({ title: 'ADMIN', roles: ['superuser'], items: [] }, 'superuser')).toBe(true);
|
||||
expect(isSectionVisible({ title: 'ADMIN', roles: ['superuser'], items: [] }, 'manager')).toBe(false);
|
||||
expect(isSectionVisible({ title: 'PLANNING', items: [] }, null)).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user