Files
cc-1c-skills/tests/skills/cases/meta-compile/document-journal.json
T
Nick Shirokov 9cbda1989a test(meta-compile/document-journal): preRun creates documents with referenced attributes
Journal column references require the referenced document attribute to
actually exist at load time. Previously the test DSL relied on the
verify-snapshots stub mechanism, which creates minimal Document stubs
without the specific attributes the column refs point to → load failed
with "Неизвестный объект метаданных - Document.ПриходнаяНакладная.Attribute.Склад".
This was listed as D5 in the 2026-04-05 FINDINGS log ("low priority,
complex to implement").

Now the test case declares preRun steps that create both documents
with the exact attributes its journal columns reference (Склад on one,
Контрагент on both). Column "Контрагент" gained explicit references
(was a shorthand string before) because the platform rejects journal
columns without at least one reference at load time.

Regenerated the snapshot (gained Documents/ subtree from preRun output).
verify-snapshots --skill meta-compile is now 30/30 green with -StrictLog.

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

30 lines
1.5 KiB
JSON

{
"name": "Журнал документов с графами",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": { "type": "Document", "name": "ПриходнаяНакладная", "attributes": ["Склад: String(50)", "Контрагент: String(100)"] },
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
},
{
"script": "meta-compile/scripts/meta-compile",
"input": { "type": "Document", "name": "РасходнаяНакладная", "attributes": ["Контрагент: String(100)"] },
"args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" }
}
],
"input": {
"type": "DocumentJournal",
"name": "ЖурналСкладскихДокументов",
"registeredDocuments": ["Document.ПриходнаяНакладная", "Document.РасходнаяНакладная"],
"columns": [
{ "name": "Склад", "references": ["Document.ПриходнаяНакладная.Attribute.Склад"] },
{ "name": "Контрагент", "references": ["Document.ПриходнаяНакладная.Attribute.Контрагент", "Document.РасходнаяНакладная.Attribute.Контрагент"] }
]
},
"validatePath": "DocumentJournals/ЖурналСкладскихДокументов",
"skipValidation": true,
"expect": {
"files": ["DocumentJournals/ЖурналСкладскихДокументов.xml"]
}
}