34 lines
1.2 KiB
TypeScript
34 lines
1.2 KiB
TypeScript
import assert from 'node:assert/strict';
|
|
import test from 'node:test';
|
|
import { assertFileExists, readText } from './helpers.ts';
|
|
|
|
test('setup plugin registry files exist', () => {
|
|
for (const file of [
|
|
'src/features/setup/plugins/plugin-types.ts',
|
|
'src/features/setup/plugins/plugin-registry.ts',
|
|
'src/features/setup/plugins/installation-profile.ts',
|
|
'src/features/setup/plugins/foundation/foundation-plugin.ts',
|
|
'src/features/setup/plugins/crm/crm-setup-plugin.ts',
|
|
'src/features/setup/plugins/crm/crm-installation-profile.ts'
|
|
]) {
|
|
assertFileExists(file);
|
|
}
|
|
});
|
|
|
|
test('installation profile API and wizard profile loading exist', () => {
|
|
assertFileExists('src/app/api/setup/profiles/route.ts');
|
|
|
|
const wizard = readText('src/features/setup/components/setup-wizard.tsx');
|
|
assert.match(wizard, /setupProfilesQueryOptions/);
|
|
assert.match(wizard, /Installation profile/);
|
|
});
|
|
|
|
test('template API exposes plugin-aware metadata without removing legacy fields', () => {
|
|
const route = readText('src/app/api/setup/templates/route.ts');
|
|
|
|
assert.match(route, /plugin/);
|
|
assert.match(route, /profiles/);
|
|
assert.match(route, /requiredColumns/);
|
|
assert.match(route, /importOrder/);
|
|
});
|