import { describe, expect, it } from 'vitest'
import {
  kbxTestScenarioCatalog,
  kbxTestFixtureSetCatalog,
  kbxTestFixtureRefs,
  kbxTestReferenceClock,
} from '@kbx/contracts'

describe('KBX canonical test scenario contract', () => {
  it('covers the three golden screens', () => {
    const screens = new Set(Object.values(kbxTestScenarioCatalog).map(x => x.screenId))
    expect(screens.has('OMS-ORD-001')).toBe(true)
    expect(screens.has('OMS-ORD-002')).toBe(true)
    expect(screens.has('WMS-PICK-001')).toBe(true)
  })

  it('keeps deterministic synthetic references', () => {
    expect(kbxTestReferenceClock).toBe('2026-08-08T09:00:00Z')
    expect(Object.keys(kbxTestFixtureSetCatalog).length).toBeGreaterThan(0)
    expect(kbxTestFixtureRefs['order.ship.ready.1'].orderNo).toMatch(/^TEST-/)
  })
})
