feat(meta-info): выводить «Представление типа» для ссылочных объектов

В шапке ссылочных объектов (справочники, документы, перечисления, ПВХ/ПВР,
планы счетов, планы обмена, бизнес-процессы, задачи) теперь выводится строка
«Представление типа» — имя ссылочного типа в диалогах выбора типа, с fallback
ObjectPresentation -> Synonym -> Name. В режиме full дополнительно выводятся
заданные сырые представления (объекта/списка и расширенные).

Тесты: раннер принимает stdoutContains строкой или массивом, добавлен
stdoutNotContains. Добавлены кейсы meta-info (ед.ч. ПВХ, full со всеми
представлениями, fallback на синоним) и негативная проверка у регистра.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-06-01 15:40:17 +03:00
co-authored by Claude Opus 4.8
parent 7c9769c644
commit b188d338f9
8 changed files with 131 additions and 9 deletions
+23 -5
View File
@@ -588,8 +588,17 @@ async function runCaseAsync(testCase, opts) {
}
}
if (caseData.expect?.stdoutContains) {
if (!stdout.includes(caseData.expect.stdoutContains)) {
errors.push(`stdout does not contain "${caseData.expect.stdoutContains}"`);
const needles = Array.isArray(caseData.expect.stdoutContains)
? caseData.expect.stdoutContains : [caseData.expect.stdoutContains];
for (const needle of needles) {
if (!stdout.includes(needle)) errors.push(`stdout does not contain "${needle}"`);
}
}
if (caseData.expect?.stdoutNotContains) {
const needles = Array.isArray(caseData.expect.stdoutNotContains)
? caseData.expect.stdoutNotContains : [caseData.expect.stdoutNotContains];
for (const needle of needles) {
if (stdout.includes(needle)) errors.push(`stdout unexpectedly contains "${needle}"`);
}
}
if (errors.length === 0 && !caseData.expectError && !workspace.readOnly) {
@@ -754,10 +763,19 @@ function runCase(testCase, opts) {
}
}
// expect.stdoutContains
// expect.stdoutContains / stdoutNotContains (string or array)
if (caseData.expect?.stdoutContains) {
if (!stdout.includes(caseData.expect.stdoutContains)) {
errors.push(`stdout does not contain "${caseData.expect.stdoutContains}"`);
const needles = Array.isArray(caseData.expect.stdoutContains)
? caseData.expect.stdoutContains : [caseData.expect.stdoutContains];
for (const needle of needles) {
if (!stdout.includes(needle)) errors.push(`stdout does not contain "${needle}"`);
}
}
if (caseData.expect?.stdoutNotContains) {
const needles = Array.isArray(caseData.expect.stdoutNotContains)
? caseData.expect.stdoutNotContains : [caseData.expect.stdoutNotContains];
for (const needle of needles) {
if (stdout.includes(needle)) errors.push(`stdout unexpectedly contains "${needle}"`);
}
}