import { readFileSync } from 'node:fs';
import { renderToStaticMarkup } from 'react-dom/server';
import { describe, expect, it } from 'vitest';
import { AgentIcon } from '../../src/components/AgentIcon';
describe('AgentIcon', () => {
it('renders a color-baked agent SVG as an pointing at the bundled asset', () => {
// qoder has explicit fill colors (#111113, #2adb5c) so it does NOT
// need theme-aware rendering — `` is fine.
const markup = renderToStaticMarkup();
expect(markup).toContain('src="/agent-icons/qoder.svg"');
expect(markup).toContain('class="agent-icon"');
expect(markup).toContain('aria-hidden="true"');
});
it('renders the Kimi SVG with two-tone branding (blue + gray secondary mark)', () => {
// kimi is a baked two-tone asset: blue accent (#1783ff) for brand identity,
// and gray (#666666) secondary mark for contrast on both light and dark surfaces.
// Validate the bundled asset is valid SVG with the expected fills.
const kimiSvg = readFileSync(
new URL('../../public/agent-icons/kimi.svg', import.meta.url),
'utf8',
);
// Asset must be valid SVG (not corrupted with non-XML text).
expect(kimiSvg).toMatch(/^