agenthub/tests/boardV2-styles.test.ts

22 lines
843 B
TypeScript

import { describe, it, expect } from 'vitest';
import { boardV2Css } from '../src/server/board/styles.js';
describe('boardV2Css', () => {
it('contains the glass surface tokens and keyframes', () => {
const css = boardV2Css();
expect(css).toContain('--b2-bg');
expect(css).toContain('rgba(255,255,255,.045)'); // glass surface
expect(css).toContain('@keyframes b2-rise');
expect(css).toContain('@keyframes b2-fill');
expect(css).toContain('@keyframes b2-ping');
});
it('respects prefers-reduced-motion', () => {
expect(boardV2Css()).toContain('@media (prefers-reduced-motion: reduce)');
});
it('keeps kpi chips on a single line', () => {
const css = boardV2Css();
expect(css).toMatch(/\.b2-chips \{[^}]*flex-wrap: nowrap/);
expect(css).toMatch(/\.b2-chips \{[^}]*overflow: hidden/);
});
});