import { describe, expect, it } from 'vitest';

import agentDesignRoutes from '../routes/external/agent-design';
import agentRoutes from '../routes/modules/agent';

describe('agent design route', () => {
  it('keeps the standalone designer outside dynamic menu routes', () => {
    const designRoute = agentDesignRoutes.find(
      (route) => route.name === 'AgentDesigner',
    );

    expect(agentRoutes.some((route) => route.name === 'AgentDesigner')).toBe(
      false,
    );
    expect(designRoute).toBeDefined();
    expect(designRoute?.path).toBe('/ai/agents/designer/:id');
    expect(designRoute?.meta).toMatchObject({
      activePath: '/ai/agents',
      hideInBreadcrumb: true,
      hideInMenu: true,
      hideInTab: true,
      noBasicLayout: true,
      openInNewWindow: true,
    });
    expect(designRoute?.meta?.ignoreAccess).not.toBe(true);
    expect(designRoute?.component).toBeTypeOf('function');
  });
});
