Files
cc-1c-skills/tests/skills/cases/form-edit/add-group-with-fields.json
T
Nick Shirokov d1e770c843 test(form-edit): declare Поле1 in preRun form-compile attributes
add-element and add-group-with-fields built their baseline form with an
InputField whose DataPath pointed to "Поле1", but "Поле1" was never
declared as a form attribute. runner.mjs snapshot diffing accepted the
output, but verify-snapshots caught the real XDTO error at load time:
"Неверный путь к данным: Поле1".

Add the missing attribute to both preRun form-compile inputs and
regenerate snapshots (the new attribute takes id=5, so form-edit's added
"Поле2" now lands at id=6).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 22:03:34 +03:00

43 lines
1.6 KiB
JSON

{
"name": "Добавление группы с полями",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": { "type": "DataProcessor", "name": "Группа" },
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "form-add/scripts/form-add",
"args": { "-ObjectPath": "{workDir}/DataProcessors/Группа.xml", "-FormName": "Форма" }
},
{
"script": "form-compile/scripts/form-compile",
"input": {
"title": "Группа",
"attributes": [
{ "name": "Объект", "type": "DataProcessorObject.Группа", "main": true },
{ "name": "Поле1", "type": "string(100)" }
],
"elements": [
{ "input": "Поле1", "path": "Поле1", "title": "Существующее поле" }
]
},
"args": { "-JsonPath": "{inputFile}", "-OutputPath": "{workDir}/DataProcessors/Группа/Forms/Форма/Ext/Form.xml" }
}
],
"params": { "formPath": "DataProcessors/Группа/Forms/Форма/Ext/Form.xml" },
"skipValidation": true,
"input": {
"elements": [
{ "group": "horizontal", "name": "ГруппаНовая", "title": "Новая группа", "showTitle": true, "children": [
{ "input": "Поле2", "path": "Поле2", "title": "Поле 2" },
{ "input": "Поле3", "path": "Поле3", "title": "Поле 3" }
]}
],
"attributes": [
{ "name": "Поле2", "type": "string" },
{ "name": "Поле3", "type": "decimal(10,2)" }
]
}
}