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:
25
frontend/tests/component/app-layout.test.ts
Normal file
25
frontend/tests/component/app-layout.test.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
import AppLayout, { getContentOffsetClass } from '../../src/lib/components/layout/AppLayout.svelte';
|
||||
|
||||
describe('AppLayout component', () => {
|
||||
it('exports a component module', () => {
|
||||
expect(AppLayout).toBeDefined();
|
||||
});
|
||||
|
||||
it('renders children via slot', () => {
|
||||
const source = readFileSync(
|
||||
resolve(process.cwd(), 'src/lib/components/layout/AppLayout.svelte'),
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
expect(source).toContain('<slot />');
|
||||
});
|
||||
|
||||
it('maps sidebar states to layout offsets', () => {
|
||||
expect(getContentOffsetClass('expanded')).toBe('md:ml-60');
|
||||
expect(getContentOffsetClass('collapsed')).toBe('md:ml-16');
|
||||
expect(getContentOffsetClass('hidden')).toBe('md:ml-0');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user