feat(project-editor): add field-schema registry + test harness
Milestone 1 of the Configuration Engine sprint. - Add schema/ registry: FieldSchema model, SECTION_FIELD_SCHEMAS covering every editable field per section, and EditorSchemaService (getFields, getField, all, getByPath). Single source of truth for labels, defaults, and validator references; sections stay hand-authored (metadata-augmented). - Stand up Karma + Jasmine (ng test) with a headless, sandbox-free Chrome launcher; add tsconfig.spec.json, karma.conf.js, angular.json test target, and npm "test" script. First spec: editor-schema.service.spec (7 passing). No behavior change. Gate: arch:check, tsc --noEmit, npm test (7/7), build all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
26
karma.conf.js
Normal file
26
karma.conf.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// Karma configuration for `ng test` (@angular/build:karma builder).
|
||||
// A headless, sandbox-free Chrome launcher so the suite runs in CI and in
|
||||
// restricted/dev environments where Chrome isn't on PATH. CHROME_BIN falls
|
||||
// back to the default Windows install path when the env var isn't set.
|
||||
process.env.CHROME_BIN =
|
||||
process.env.CHROME_BIN || 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe';
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
frameworks: ['jasmine'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
],
|
||||
browsers: ['ChromeHeadlessNoSandbox'],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: 'ChromeHeadless',
|
||||
flags: ['--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage'],
|
||||
},
|
||||
},
|
||||
reporters: ['progress'],
|
||||
restartOnFileChange: true,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user