import { describe, it, expect, beforeEach } from 'vitest' import { openDb, type DB } from '../src/db' import { seedIfEmpty } from '../src/seed' import { milestoneTemplate } from '../src/repos-milestones' describe('seed per-module onboarding templates', () => { let db: DB beforeEach(async () => { db = openDb(':memory:'); await seedIfEmpty(db) }) it('seeds the SMS 9-step list', async () => { const keys = (await milestoneTemplate(db, 'SMS')).map((e) => e.key) expect(keys).toEqual([ 'document_collection', 'dlt_registration', 'account_creation', 'installation', 'testing', 'training', 'go_live', 'advance_payment', 'balance_payment', ]) }) it('seeds the RTGS list ending in payment steps', async () => { const keys = (await milestoneTemplate(db, 'RTGS')).map((e) => e.key) expect(keys).toEqual([ 'document_collection', 'server_checkup', 'setup_configuration', 'installation', 'testing', 'training', 'go_live', 'advance_payment', 'balance_payment', ]) }) })