beadboard/tests/components/shared/top-bar.test.tsx
zenchantlive fbfe393f6d chore: checkpoint related UI improvements and supporting components
Various supporting changes made during the assign archetypes feature development:

- Added contextual-right-panel.tsx and swarm-command-feed.tsx
- Updated activity-panel.tsx with new features
- UI improvements to left-panel, mobile-nav
- Test updates for url-state-integration, mobile-nav, top-bar
- Package.json updates for dependencies
- Global CSS refinements

These changes support the main assign archetypes feature but are
not directly part of its core functionality.
2026-02-24 16:25:45 -08:00

63 lines
2.1 KiB
TypeScript

import { describe, it } from 'node:test';
import assert from 'node:assert';
describe('TopBar Component Contract', () => {
it('exports TopBar component', async () => {
try {
const mod = await import('../../../src/components/shared/top-bar');
assert.ok(mod.TopBar, 'TopBar should be exported');
assert.equal(typeof mod.TopBar, 'function', 'TopBar should be a function/component');
} catch (err: any) {
assert.fail(`TopBar module should exist: ${err.message}`);
}
});
it('TopBar component can be imported without errors', async () => {
try {
const mod = await import('../../../src/components/shared/top-bar');
assert.ok(mod.TopBar, 'Component should be importable');
} catch (err: any) {
assert.fail(`Component import failed: ${err.message}`);
}
});
});
describe('TopBar View Tabs', () => {
it('renders view tabs: Social, Graph', async () => {
try {
const mod = await import('../../../src/components/shared/top-bar');
assert.ok(mod.TopBar, 'TopBar should exist');
} catch (err: any) {
assert.fail(`TopBar should render view tabs: ${err.message}`);
}
});
it('active tab has bold text and accent underline', async () => {
try {
const mod = await import('../../../src/components/shared/top-bar');
assert.ok(mod.TopBar, 'TopBar should exist');
} catch (err: any) {
assert.fail(`TopBar should have active state styling: ${err.message}`);
}
});
});
describe('TopBar Filter and Controls', () => {
it('renders filter/search input placeholder', async () => {
try {
const mod = await import('../../../src/components/shared/top-bar');
assert.ok(mod.TopBar, 'TopBar should exist');
} catch (err: any) {
assert.fail(`TopBar should have filter input: ${err.message}`);
}
});
it('renders settings placeholder', async () => {
try {
const mod = await import('../../../src/components/shared/top-bar');
assert.ok(mod.TopBar, 'TopBar should exist');
} catch (err: any) {
assert.fail(`TopBar should have settings placeholder: ${err.message}`);
}
});
});