// src/pages/agent-office/constants.test.js
import { describe, it, expect } from 'vitest';
import { AGENT_META, GRID_SLOTS, ACTIVE_AGENT_IDS } from './constants.js';

describe('agent-office constants', () => {
  it('5명의 active 에이전트가 정의됨', () => {
    expect(ACTIVE_AGENT_IDS).toEqual(['stock', 'music', 'insta', 'realestate', 'lotto']);
  });

  it('각 active 에이전트에 displayName/color/image 메타가 있음', () => {
    for (const id of ACTIVE_AGENT_IDS) {
      expect(AGENT_META[id]).toBeDefined();
      expect(AGENT_META[id].displayName).toBeTruthy();
      expect(AGENT_META[id].color).toMatch(/^#/);
      expect(AGENT_META[id].image).toBeTruthy();
    }
  });

  it('blog 메타는 존재하지 않음 (insta로 대체됨)', () => {
    expect(AGENT_META.blog).toBeUndefined();
  });

  it('GRID_SLOTS는 9칸, 처음 5칸은 active 에이전트', () => {
    expect(GRID_SLOTS).toHaveLength(9);
    expect(GRID_SLOTS.slice(0, 5).map(s => s.agentId)).toEqual(
      ['stock', 'music', 'insta', 'realestate', 'lotto']
    );
  });

  it('GRID_SLOTS의 마지막 4칸은 placeholder (agentId=null)', () => {
    for (const slot of GRID_SLOTS.slice(5)) {
      expect(slot.agentId).toBeNull();
    }
  });
});
