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

import agentListSource from './AgentList.vue?raw';
import apiSource from './api.ts?raw';

describe('AgentList 可见范围入口', () => {
  it('exposes the three scope choices and uses the dedicated partial-update API', () => {
    expect(agentListSource).toContain("label: '个人'");
    expect(agentListSource).toContain("label: '部门'");
    expect(agentListSource).toContain("label: '公开'");
    expect(agentListSource).toContain('updateAgentVisibilityScope');
    expect(agentListSource).toContain('agent-publish-chip');
    expect(agentListSource).toContain('agent-publish-chip__dot');
    expect(agentListSource).toContain('<template #details="{ item }">');
    expect(agentListSource).not.toContain('<template #corner="{ item }">');
    expect(apiSource).toContain('/api/v1/agent/visibilityScope/update');
  });
});
