import { describe, expect, it } from 'vitest';
import {
  buildCreateExitPlanUrl,
  buildPlanDrillInUrl,
  getLegacySimpleRoute,
  getPlansRoute,
} from './tradePlansRoutes';

describe('tradePlansRoutes', () => {
  it('builds the canonical plans routes consistently', () => {
    expect(getPlansRoute()).toBe('/plans');
    expect(getLegacySimpleRoute()).toBe('/simple');
    expect(buildPlanDrillInUrl('setup-1')).toBe('/plans?setupId=setup-1');
    expect(buildCreateExitPlanUrl('MSFT', 'TRD-MSFT')).toBe('/plans?mode=sell&symbol=MSFT&tradeId=TRD-MSFT');
    expect(buildCreateExitPlanUrl('AAPL')).toBe('/plans?mode=sell&symbol=AAPL');
  });
});
