import assert from 'node:assert/strict';
import test from 'node:test';
import { assertFileExists, readText } from './helpers.ts';

test('setup readiness and verification APIs exist', () => {
  assertFileExists('src/app/api/setup/readiness/route.ts');
  assertFileExists('src/app/api/setup/verify/route.ts');
  assertFileExists('src/features/setup/server/readiness.service.ts');
  assertFileExists('src/features/setup/server/verification.service.ts');
});

test('integration scenarios document operational readiness checks', () => {
  const scenarios = readText('docs/setup/integration-scenarios.md');

  for (const keyword of ['login', 'CRM dashboard', 'quotation approval', 'PDF', 'seed manifest']) {
    assert.match(scenarios, new RegExp(keyword, 'i'));
  }
});
