Moves the sidebar column out of vault.ts/vault-shell.ts into vault-sidebar.ts: its markup (now incl. an empty #vault-status-slot footer for Phase 6), the category nav rendering, nav-button wiring, and search. The search input gains an 80ms trailing-edge debounce (P2 fix — it re-filtered on every keystroke). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
858 B
TypeScript
30 lines
858 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import * as fs from 'fs';
|
|
import * as path from 'path';
|
|
|
|
describe('vault sidebar glyphs', () => {
|
|
const vaultSrc = fs.readFileSync(
|
|
path.resolve(__dirname, '../vault-sidebar.ts'),
|
|
'utf-8',
|
|
);
|
|
|
|
it('uses GLYPH_TRASH instead of the trash emoji', () => {
|
|
expect(vaultSrc).not.toMatch(/\u{1F5D1}/u);
|
|
expect(vaultSrc).toContain('GLYPH_TRASH');
|
|
});
|
|
|
|
it('uses GLYPH_DEVICES instead of the devices emoji', () => {
|
|
expect(vaultSrc).not.toMatch(/\u{1F4F1}/u);
|
|
expect(vaultSrc).toContain('GLYPH_DEVICES');
|
|
});
|
|
|
|
it('uses GLYPH_LOCK instead of the lock emoji', () => {
|
|
expect(vaultSrc).not.toMatch(/\u{1F512}/u);
|
|
expect(vaultSrc).toContain('GLYPH_LOCK');
|
|
});
|
|
|
|
it('uses GLYPH_SETTINGS for the settings nav', () => {
|
|
expect(vaultSrc).toContain('GLYPH_SETTINGS');
|
|
});
|
|
});
|