From 261ea8c96dfa25d2aba4ae074e37586110770964 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Mon, 17 Aug 2026 16:20:33 +0300 Subject: [PATCH] =?UTF-8?q?test:=20=D1=80=D0=B0=D1=81=D0=BA=D1=80=D1=8B?= =?UTF-8?q?=D1=82=D0=B8=D0=B5=20=D1=81=D0=B5=D1=80=D0=B2=D0=B8=D1=81=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B2=20role-compile,=20=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B0=20=D0=BA=D0=BE=D1=80=D0=B5=D0=BD=D1=8C=20?= =?UTF-8?q?=D0=B8=20=D0=B7=D0=B0=D0=B8=D0=BC=D1=81=D1=82=D0=B2=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Кейсы: раскрытие HTTP- и веб-сервиса, раскрытие сервиса интеграции, раскрытие заимствованного сервиса, дедупликация раскрытого листа с явным, отказ без метаданных, отказ основной роли расширения, право на корень сервиса в role-validate и в cfe-validate. Фикстуры HTTP- и веб-сервиса строит preRun через meta-compile — рукописный XML платформа отвергала (у Operation обязателен замыкающий ChildObjects, у сервиса нужен Ext/Module.bsl). Оба кейса проходят verify-snapshots: 1С принимает конфигурацию с раскрытыми правами при полной загрузке. Вручную написаны только фикстуры, которые навыками не собрать, — сервис интеграции (meta-compile его не поддерживает) и расширение с заимствованным сервисом (выгрузка Конфигуратора); оба с skipPlatformVerify и причиной. Co-Authored-By: Claude Opus 5 (1M context) --- .../error-adopted-in-default-role.json | 12 + .../ConfigDumpInfo.xml | 20 ++ .../adopted-in-default-role/Configuration.xml | 74 +++++ .../HTTPServices/Расш1_HTTPСервис1.xml | 34 +++ .../Расш1_HTTPСервис1/Ext/Module.bsl | 5 + .../HTTPServices/ЭДО.xml | 34 +++ .../Languages/Русский.xml | 13 + .../Roles/Расш1_ОсновнаяРоль.xml | 10 + .../Roles/Расш1_ОсновнаяРоль/Ext/Rights.xml | 67 +++++ .../Roles/Расш1_Роль1.xml | 10 + .../Roles/Расш1_Роль1/Ext/Rights.xml | 67 +++++ .../error-adopted-in-default-role.json | 18 ++ .../error-service-no-metadata.json | 20 ++ .../role-compile/expand-adopted-service.json | 24 ++ .../expand-integration-service.json | 22 ++ .../role-compile/expand-service-dedup.json | 31 +++ .../role-compile/expand-service-roots.json | 43 +++ .../fixtures/ext-services/Configuration.xml | 74 +++++ .../HTTPServices/Расш1_HTTPСервис1.xml | 34 +++ .../ext-services/HTTPServices/ЭДО.xml | 34 +++ .../ext-services/Languages/Русский.xml | 13 + .../services-config/Configuration.xml | 252 +++++++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 ++ .../IntegrationServices/Сообщения.xml | 27 ++ .../services-config/Languages/Русский.xml | 16 ++ .../expand-adopted-service/Configuration.xml | 74 +++++ .../HTTPServices/Расш1_HTTPСервис1.xml | 34 +++ .../HTTPServices/ЭДО.xml | 34 +++ .../Languages/Русский.xml | 13 + .../Roles/Расш1_Роль1.xml | 15 ++ .../Roles/Расш1_Роль1/Ext/Rights.xml | 20 ++ .../Configuration.xml | 253 +++++++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 ++ .../IntegrationServices/Сообщения.xml | 27 ++ .../Languages/Русский.xml | 16 ++ .../Roles/ДоступКШине.xml | 15 ++ .../Roles/ДоступКШине/Ext/Rights.xml | 20 ++ .../expand-service-dedup/Configuration.xml | 253 +++++++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 ++ .../HTTPServices/ВнешнийAPI.xml | 92 +++++++ .../HTTPServices/ВнешнийAPI/Ext/Module.bsl | 0 .../Languages/Русский.xml | 16 ++ .../expand-service-dedup/Roles/ДоступКAPI.xml | 15 ++ .../Roles/ДоступКAPI/Ext/Rights.xml | 27 ++ .../expand-service-roots/Configuration.xml | 254 ++++++++++++++++++ .../Ext/ClientApplicationInterface.xml | 18 ++ .../HTTPServices/ВнешнийAPI.xml | 92 +++++++ .../HTTPServices/ВнешнийAPI/Ext/Module.bsl | 0 .../Languages/Русский.xml | 16 ++ .../Roles/ДоступКСервисам.xml | 15 ++ .../Roles/ДоступКСервисам/Ext/Rights.xml | 41 +++ .../WebServices/ОбменДанными.xml | 58 ++++ .../WebServices/ОбменДанными/Ext/Module.bsl | 0 .../error-service-root-right.json | 17 ++ .../Roles/РольСервисы/Ext/Rights.xml | 27 ++ 55 files changed, 2470 insertions(+) create mode 100644 tests/skills/cases/cfe-validate/error-adopted-in-default-role.json create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/ConfigDumpInfo.xml create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Configuration.xml create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/Расш1_HTTPСервис1.xml create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/Расш1_HTTPСервис1/Ext/Module.bsl create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/ЭДО.xml create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_ОсновнаяРоль.xml create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_ОсновнаяРоль/Ext/Rights.xml create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_Роль1.xml create mode 100644 tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_Роль1/Ext/Rights.xml create mode 100644 tests/skills/cases/role-compile/error-adopted-in-default-role.json create mode 100644 tests/skills/cases/role-compile/error-service-no-metadata.json create mode 100644 tests/skills/cases/role-compile/expand-adopted-service.json create mode 100644 tests/skills/cases/role-compile/expand-integration-service.json create mode 100644 tests/skills/cases/role-compile/expand-service-dedup.json create mode 100644 tests/skills/cases/role-compile/expand-service-roots.json create mode 100644 tests/skills/cases/role-compile/fixtures/ext-services/Configuration.xml create mode 100644 tests/skills/cases/role-compile/fixtures/ext-services/HTTPServices/Расш1_HTTPСервис1.xml create mode 100644 tests/skills/cases/role-compile/fixtures/ext-services/HTTPServices/ЭДО.xml create mode 100644 tests/skills/cases/role-compile/fixtures/ext-services/Languages/Русский.xml create mode 100644 tests/skills/cases/role-compile/fixtures/services-config/Configuration.xml create mode 100644 tests/skills/cases/role-compile/fixtures/services-config/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/role-compile/fixtures/services-config/IntegrationServices/Сообщения.xml create mode 100644 tests/skills/cases/role-compile/fixtures/services-config/Languages/Русский.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-adopted-service/Configuration.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-adopted-service/HTTPServices/Расш1_HTTPСервис1.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-adopted-service/HTTPServices/ЭДО.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-adopted-service/Languages/Русский.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-adopted-service/Roles/Расш1_Роль1.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-adopted-service/Roles/Расш1_Роль1/Ext/Rights.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-integration-service/Configuration.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-integration-service/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-integration-service/IntegrationServices/Сообщения.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-integration-service/Languages/Русский.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-integration-service/Roles/ДоступКШине.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-integration-service/Roles/ДоступКШине/Ext/Rights.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-dedup/Configuration.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-dedup/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-dedup/HTTPServices/ВнешнийAPI.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-dedup/HTTPServices/ВнешнийAPI/Ext/Module.bsl create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-dedup/Languages/Русский.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-dedup/Roles/ДоступКAPI.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-dedup/Roles/ДоступКAPI/Ext/Rights.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/Configuration.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/Ext/ClientApplicationInterface.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/HTTPServices/ВнешнийAPI.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/HTTPServices/ВнешнийAPI/Ext/Module.bsl create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/Languages/Русский.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/Roles/ДоступКСервисам.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/Roles/ДоступКСервисам/Ext/Rights.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/WebServices/ОбменДанными.xml create mode 100644 tests/skills/cases/role-compile/snapshots/expand-service-roots/WebServices/ОбменДанными/Ext/Module.bsl create mode 100644 tests/skills/cases/role-validate/error-service-root-right.json create mode 100644 tests/skills/cases/role-validate/fixtures/service-root-right/Roles/РольСервисы/Ext/Rights.xml diff --git a/tests/skills/cases/cfe-validate/error-adopted-in-default-role.json b/tests/skills/cases/cfe-validate/error-adopted-in-default-role.json new file mode 100644 index 00000000..16013e73 --- /dev/null +++ b/tests/skills/cases/cfe-validate/error-adopted-in-default-role.json @@ -0,0 +1,12 @@ +{ + "name": "Ошибка: основная роль расширения даёт права на заимствованный объект", + "setup": "fixture:adopted-in-default-role", + "params": { "extensionPath": "." }, + "expectError": true, + "noSnapshot": "негативный кейс: навык ничего не пишет, проверяется текст и код возврата", + "expect": { + "stdoutContains": [ + "Роль 'Расш1_ОсновнаяРоль' входит в DefaultRoles и даёт права на заимствованный HTTPService.ЭДО" + ] + } +} diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/ConfigDumpInfo.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/ConfigDumpInfo.xml new file mode 100644 index 00000000..54a52250 --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/ConfigDumpInfo.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Configuration.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Configuration.xml new file mode 100644 index 00000000..b5d99dad --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Configuration.xml @@ -0,0 +1,74 @@ + + + + + + 9cd510cd-abfc-11d4-9434-004095e12fc7 + 849f13e5-3711-47a6-a511-7abdbf69ac7d + + + 9fcd25a0-4822-11d4-9414-008048da11f9 + 418e82dc-9ef8-4b8d-b25a-927607e1dcfc + + + e3687481-0a87-462c-a166-9f34594f9bba + 1d719d73-2ee5-4c3b-a13e-0c6e9f241ee1 + + + 9de14907-ec23-4a07-96f0-85521cb6b53b + d0a4b93b-f5c5-4f3a-8e2b-39b04355a9ae + + + 51f2d5d8-ea4d-4064-8892-82951750031e + 5e044713-4d7d-4a70-8207-7a2ce7e05339 + + + e68182ea-4237-4383-967f-90c1e3370bc7 + 9ba64f34-16f4-4c52-8588-722d900f0b0e + + + fb282519-d103-4dd3-bc12-cb271d631dfc + 0c8f9b8d-6e16-4d99-b0f0-0c0a99ae9953 + + + + Adopted + Расширение1 + + + ru + Расширение1 + + + + Customization + true + Расш1_ + Version8_3_17 + ManagedApplication + + PlatformApplication + + Russian + + Role.Расш1_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + Расш1_ОсновнаяРоль + Расш1_Роль1 + ЭДО + Расш1_HTTPСервис1 + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/Расш1_HTTPСервис1.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/Расш1_HTTPСервис1.xml new file mode 100644 index 00000000..c440a8a0 --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/Расш1_HTTPСервис1.xml @@ -0,0 +1,34 @@ + + + + + Расш1_HTTPСервис1 + + + test + AutoUse + 20 + + + + + ШаблонURL1 + + + + + + + + Метод1 + + + GET + ШаблонURL1Метод1 + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/Расш1_HTTPСервис1/Ext/Module.bsl b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/Расш1_HTTPСервис1/Ext/Module.bsl new file mode 100644 index 00000000..9ab35b22 --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/Расш1_HTTPСервис1/Ext/Module.bsl @@ -0,0 +1,5 @@ + +Функция ШаблонURL1Метод1(Запрос) + Ответ = Новый HTTPСервисОтвет(200); + Возврат Ответ; +КонецФункции diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/ЭДО.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/ЭДО.xml new file mode 100644 index 00000000..e10c49ff --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/HTTPServices/ЭДО.xml @@ -0,0 +1,34 @@ + + + + + + Adopted + ЭДО + + 2c3b27e6-6a40-446b-9e8f-eab3e6309aed + + + + + + Adopted + ЕстьНовыеДокументы + + 9f859b05-8d06-47bd-ac5b-b4f9ff1ebb03 + + + + + + Adopted + POST + + a582f07a-8972-4b6a-a7d0-0a562937dce1 + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Languages/Русский.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Languages/Русский.xml new file mode 100644 index 00000000..4ee6345d --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + 0663bf5b-bcba-4a40-a862-a0b3baa2d884 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_ОсновнаяРоль.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_ОсновнаяРоль.xml new file mode 100644 index 00000000..c99b221d --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_ОсновнаяРоль.xml @@ -0,0 +1,10 @@ + + + + + Расш1_ОсновнаяРоль + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_ОсновнаяРоль/Ext/Rights.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_ОсновнаяРоль/Ext/Rights.xml new file mode 100644 index 00000000..583830c7 --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_ОсновнаяРоль/Ext/Rights.xml @@ -0,0 +1,67 @@ + + + false + true + false + + Configuration.Расширение1 + + ThinClient + true + + + WebClient + true + + + MobileClient + true + + + MainWindowModeNormal + true + + + MainWindowModeWorkplace + true + + + MainWindowModeEmbeddedWorkplace + true + + + MainWindowModeFullscreenWorkplace + true + + + MainWindowModeKiosk + true + + + AnalyticsSystemClient + true + + + SaveUserData + true + + + Output + true + + + + HTTPService.ЭДО.URLTemplate.ЕстьНовыеДокументы.Method.POST + + Use + true + + + + HTTPService.Расш1_HTTPСервис1.URLTemplate.ШаблонURL1.Method.Метод1 + + Use + true + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_Роль1.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_Роль1.xml new file mode 100644 index 00000000..94520c94 --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_Роль1.xml @@ -0,0 +1,10 @@ + + + + + Расш1_Роль1 + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_Роль1/Ext/Rights.xml b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_Роль1/Ext/Rights.xml new file mode 100644 index 00000000..583830c7 --- /dev/null +++ b/tests/skills/cases/cfe-validate/fixtures/adopted-in-default-role/Roles/Расш1_Роль1/Ext/Rights.xml @@ -0,0 +1,67 @@ + + + false + true + false + + Configuration.Расширение1 + + ThinClient + true + + + WebClient + true + + + MobileClient + true + + + MainWindowModeNormal + true + + + MainWindowModeWorkplace + true + + + MainWindowModeEmbeddedWorkplace + true + + + MainWindowModeFullscreenWorkplace + true + + + MainWindowModeKiosk + true + + + AnalyticsSystemClient + true + + + SaveUserData + true + + + Output + true + + + + HTTPService.ЭДО.URLTemplate.ЕстьНовыеДокументы.Method.POST + + Use + true + + + + HTTPService.Расш1_HTTPСервис1.URLTemplate.ШаблонURL1.Method.Метод1 + + Use + true + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/error-adopted-in-default-role.json b/tests/skills/cases/role-compile/error-adopted-in-default-role.json new file mode 100644 index 00000000..4e96318c --- /dev/null +++ b/tests/skills/cases/role-compile/error-adopted-in-default-role.json @@ -0,0 +1,18 @@ +{ + "name": "Негатив: основная роль расширения не может давать права на заимствованный сервис", + "setup": "fixture:ext-services", + "input": { + "name": "Расш1_ОсновнаяРоль", + "objects": [ + "HTTPService.ЭДО: Use" + ] + }, + "expectError": true, + "expect": { + "stderrContains": [ + "основная роль расширения (входит в DefaultRoles)", + "HTTPService.ЭДО заимствован" + ] + }, + "noSnapshot": "негатив: роль не создаётся, файлы не пишутся" +} diff --git a/tests/skills/cases/role-compile/error-service-no-metadata.json b/tests/skills/cases/role-compile/error-service-no-metadata.json new file mode 100644 index 00000000..dde97b53 --- /dev/null +++ b/tests/skills/cases/role-compile/error-service-no-metadata.json @@ -0,0 +1,20 @@ +{ + "name": "Негатив: короткая запись на сервис без метаданных — отказ с подсказкой формата", + "setup": "fixture:services-config", + "input": { + "name": "Битая", + "objects": [ + "HTTPService.НетТакого: Use", + "WebService.ТожеНет: Use" + ] + }, + "expectError": true, + "expect": { + "stderrContains": [ + "HTTPService.НетТакого: метаданные сервиса не найдены", + "HTTPService.НетТакого.URLTemplate.<Шаблон>.Method.<Метод>: Use", + "WebService.ТожеНет.Operation.<Операция>: Use" + ] + }, + "noSnapshot": "негатив: роль не создаётся, файлы не пишутся" +} diff --git a/tests/skills/cases/role-compile/expand-adopted-service.json b/tests/skills/cases/role-compile/expand-adopted-service.json new file mode 100644 index 00000000..bf93357e --- /dev/null +++ b/tests/skills/cases/role-compile/expand-adopted-service.json @@ -0,0 +1,24 @@ +{ + "name": "Позитив: заимствованный сервис в обычной роли расширения раскрывается в заимствованные методы", + "setup": "fixture:ext-services", + "input": { + "name": "Расш1_Роль1", + "synonym": "Роль 1", + "objects": [ + "HTTPService.ЭДО: Use", + "HTTPService.Расш1_HTTPСервис1: Use" + ] + }, + "validatePath": "Roles/Расш1_Роль1", + "expect": { + "files": [ + "Roles/Расш1_Роль1.xml", + "Roles/Расш1_Роль1/Ext/Rights.xml" + ], + "stdoutContains": [ + "HTTPService.ЭДО -> раскрыт (вложенных объектов: 1)", + "HTTPService.Расш1_HTTPСервис1 -> раскрыт (вложенных объектов: 1)" + ] + }, + "skipPlatformVerify": "фикстура — расширение ERP с заимствованным HTTP-сервисом; без конфигурации-источника платформа его не принимает" +} diff --git a/tests/skills/cases/role-compile/expand-integration-service.json b/tests/skills/cases/role-compile/expand-integration-service.json new file mode 100644 index 00000000..f3308108 --- /dev/null +++ b/tests/skills/cases/role-compile/expand-integration-service.json @@ -0,0 +1,22 @@ +{ + "name": "Позитив: короткая запись на сервис интеграции раскрывается в каналы", + "setup": "fixture:services-config", + "input": { + "name": "ДоступКШине", + "synonym": "Доступ к шине", + "objects": [ + "IntegrationService.Сообщения: Use" + ] + }, + "validatePath": "Roles/ДоступКШине", + "expect": { + "files": [ + "Roles/ДоступКШине.xml", + "Roles/ДоступКШине/Ext/Rights.xml" + ], + "stdoutContains": [ + "IntegrationService.Сообщения -> раскрыт (вложенных объектов: 2)" + ] + }, + "skipPlatformVerify": "IntegrationService не создаёт ни один навык (meta-compile его не поддерживает), поэтому фикстура написана вручную и платформа отвергает её по составу сервиса, а не по формату Rights.xml" +} diff --git a/tests/skills/cases/role-compile/expand-service-dedup.json b/tests/skills/cases/role-compile/expand-service-dedup.json new file mode 100644 index 00000000..ca234ec2 --- /dev/null +++ b/tests/skills/cases/role-compile/expand-service-dedup.json @@ -0,0 +1,31 @@ +{ + "name": "Позитив: раскрытый лист совпал с явно заданным — одна запись, не дубль", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "HTTPService", "name": "ВнешнийAPI", "rootURL": "api", + "urlTemplates": { + "Заказы": { "template": "/orders", "methods": { "Получить": "GET", "Создать": "POST" } }, + "Версия": { "template": "/version", "methods": { "GET": "GET" } } + } + }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + } + ], + "input": { + "name": "ДоступКAPI", + "synonym": "Доступ к API", + "objects": [ + "HTTPService.ВнешнийAPI.URLTemplate.Заказы.Method.Получить: Use", + "HTTPService.ВнешнийAPI: Use" + ] + }, + "validatePath": "Roles/ДоступКAPI", + "expect": { + "files": [ + "Roles/ДоступКAPI.xml", + "Roles/ДоступКAPI/Ext/Rights.xml" + ] + } +} diff --git a/tests/skills/cases/role-compile/expand-service-roots.json b/tests/skills/cases/role-compile/expand-service-roots.json new file mode 100644 index 00000000..9ccfcd8d --- /dev/null +++ b/tests/skills/cases/role-compile/expand-service-roots.json @@ -0,0 +1,43 @@ +{ + "name": "Позитив: короткая запись на сервис раскрывается во все вложенные объекты", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "HTTPService", "name": "ВнешнийAPI", "rootURL": "api", + "urlTemplates": { + "Заказы": { "template": "/orders", "methods": { "Получить": "GET", "Создать": "POST" } }, + "Версия": { "template": "/version", "methods": { "GET": "GET" } } + } + }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "meta-compile/scripts/meta-compile", + "input": { + "type": "WebService", "name": "ОбменДанными", "namespace": "http://example.org/exchange", + "operations": { "Загрузить": "xs:string", "Выгрузить": "xs:string" } + }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + } + ], + "input": { + "name": "ДоступКСервисам", + "synonym": "Доступ к сервисам", + "objects": [ + "HTTPService.ВнешнийAPI: Use", + "WebService.ОбменДанными: Use" + ] + }, + "validatePath": "Roles/ДоступКСервисам", + "expect": { + "files": [ + "Roles/ДоступКСервисам.xml", + "Roles/ДоступКСервисам/Ext/Rights.xml" + ], + "stdoutContains": [ + "HTTPService.ВнешнийAPI -> раскрыт (вложенных объектов: 3)", + "WebService.ОбменДанными -> раскрыт (вложенных объектов: 2)" + ] + } +} diff --git a/tests/skills/cases/role-compile/fixtures/ext-services/Configuration.xml b/tests/skills/cases/role-compile/fixtures/ext-services/Configuration.xml new file mode 100644 index 00000000..b5d99dad --- /dev/null +++ b/tests/skills/cases/role-compile/fixtures/ext-services/Configuration.xml @@ -0,0 +1,74 @@ + + + + + + 9cd510cd-abfc-11d4-9434-004095e12fc7 + 849f13e5-3711-47a6-a511-7abdbf69ac7d + + + 9fcd25a0-4822-11d4-9414-008048da11f9 + 418e82dc-9ef8-4b8d-b25a-927607e1dcfc + + + e3687481-0a87-462c-a166-9f34594f9bba + 1d719d73-2ee5-4c3b-a13e-0c6e9f241ee1 + + + 9de14907-ec23-4a07-96f0-85521cb6b53b + d0a4b93b-f5c5-4f3a-8e2b-39b04355a9ae + + + 51f2d5d8-ea4d-4064-8892-82951750031e + 5e044713-4d7d-4a70-8207-7a2ce7e05339 + + + e68182ea-4237-4383-967f-90c1e3370bc7 + 9ba64f34-16f4-4c52-8588-722d900f0b0e + + + fb282519-d103-4dd3-bc12-cb271d631dfc + 0c8f9b8d-6e16-4d99-b0f0-0c0a99ae9953 + + + + Adopted + Расширение1 + + + ru + Расширение1 + + + + Customization + true + Расш1_ + Version8_3_17 + ManagedApplication + + PlatformApplication + + Russian + + Role.Расш1_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + Расш1_ОсновнаяРоль + Расш1_Роль1 + ЭДО + Расш1_HTTPСервис1 + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/fixtures/ext-services/HTTPServices/Расш1_HTTPСервис1.xml b/tests/skills/cases/role-compile/fixtures/ext-services/HTTPServices/Расш1_HTTPСервис1.xml new file mode 100644 index 00000000..c440a8a0 --- /dev/null +++ b/tests/skills/cases/role-compile/fixtures/ext-services/HTTPServices/Расш1_HTTPСервис1.xml @@ -0,0 +1,34 @@ + + + + + Расш1_HTTPСервис1 + + + test + AutoUse + 20 + + + + + ШаблонURL1 + + + + + + + + Метод1 + + + GET + ШаблонURL1Метод1 + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/fixtures/ext-services/HTTPServices/ЭДО.xml b/tests/skills/cases/role-compile/fixtures/ext-services/HTTPServices/ЭДО.xml new file mode 100644 index 00000000..e10c49ff --- /dev/null +++ b/tests/skills/cases/role-compile/fixtures/ext-services/HTTPServices/ЭДО.xml @@ -0,0 +1,34 @@ + + + + + + Adopted + ЭДО + + 2c3b27e6-6a40-446b-9e8f-eab3e6309aed + + + + + + Adopted + ЕстьНовыеДокументы + + 9f859b05-8d06-47bd-ac5b-b4f9ff1ebb03 + + + + + + Adopted + POST + + a582f07a-8972-4b6a-a7d0-0a562937dce1 + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/fixtures/ext-services/Languages/Русский.xml b/tests/skills/cases/role-compile/fixtures/ext-services/Languages/Русский.xml new file mode 100644 index 00000000..4ee6345d --- /dev/null +++ b/tests/skills/cases/role-compile/fixtures/ext-services/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + 0663bf5b-bcba-4a40-a862-a0b3baa2d884 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/fixtures/services-config/Configuration.xml b/tests/skills/cases/role-compile/fixtures/services-config/Configuration.xml new file mode 100644 index 00000000..73bc315a --- /dev/null +++ b/tests/skills/cases/role-compile/fixtures/services-config/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 9cd510cd-abfc-11d4-9434-004095e12fc7 + d95d8562-7ac2-468d-a4f8-b41c0c0f5f29 + + + 9fcd25a0-4822-11d4-9414-008048da11f9 + 68c8ad47-00a7-4202-adda-d2452f589775 + + + e3687481-0a87-462c-a166-9f34594f9bba + 95b76872-3ee2-4fd5-976b-96fc1ce60e8d + + + 9de14907-ec23-4a07-96f0-85521cb6b53b + 740a7be3-cb8a-4924-b42e-b5997c948df9 + + + 51f2d5d8-ea4d-4064-8892-82951750031e + 3420f527-c36d-4cdf-8a9c-1d0e14f2b3a5 + + + e68182ea-4237-4383-967f-90c1e3370bc7 + 3f2af96e-6657-40e4-a3de-50332e93462e + + + fb282519-d103-4dd3-bc12-cb271d631dfc + 9f1cce23-2a48-4922-969e-23e181203e02 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + Сообщения + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/fixtures/services-config/Ext/ClientApplicationInterface.xml b/tests/skills/cases/role-compile/fixtures/services-config/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..98165466 --- /dev/null +++ b/tests/skills/cases/role-compile/fixtures/services-config/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + cbab57f2-a0f3-4f0a-89ea-4cb19570ab75 + + + + + b553047f-c9aa-4157-978d-448ecad24248 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/fixtures/services-config/IntegrationServices/Сообщения.xml b/tests/skills/cases/role-compile/fixtures/services-config/IntegrationServices/Сообщения.xml new file mode 100644 index 00000000..45e79c7f --- /dev/null +++ b/tests/skills/cases/role-compile/fixtures/services-config/IntegrationServices/Сообщения.xml @@ -0,0 +1,27 @@ + + + + + Сообщения + + + + + + + + Входящие + + + + + + + Исходящие + + + + + + + diff --git a/tests/skills/cases/role-compile/fixtures/services-config/Languages/Русский.xml b/tests/skills/cases/role-compile/fixtures/services-config/Languages/Русский.xml new file mode 100644 index 00000000..988f236c --- /dev/null +++ b/tests/skills/cases/role-compile/fixtures/services-config/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Configuration.xml b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Configuration.xml new file mode 100644 index 00000000..e37fc7e8 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Configuration.xml @@ -0,0 +1,74 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + Adopted + Расширение1 + + + ru + Расширение1 + + + + Customization + true + Расш1_ + Version8_3_17 + ManagedApplication + + PlatformApplication + + Russian + + Role.Расш1_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + Расш1_ОсновнаяРоль + Расш1_Роль1 + ЭДО + Расш1_HTTPСервис1 + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-adopted-service/HTTPServices/Расш1_HTTPСервис1.xml b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/HTTPServices/Расш1_HTTPСервис1.xml new file mode 100644 index 00000000..50d15d48 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/HTTPServices/Расш1_HTTPСервис1.xml @@ -0,0 +1,34 @@ + + + + + Расш1_HTTPСервис1 + + + test + AutoUse + 20 + + + + + ШаблонURL1 + + + + + + + + Метод1 + + + GET + ШаблонURL1Метод1 + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-adopted-service/HTTPServices/ЭДО.xml b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/HTTPServices/ЭДО.xml new file mode 100644 index 00000000..ef9c33ec --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/HTTPServices/ЭДО.xml @@ -0,0 +1,34 @@ + + + + + + Adopted + ЭДО + + UUID-002 + + + + + + Adopted + ЕстьНовыеДокументы + + UUID-004 + + + + + + Adopted + POST + + UUID-006 + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Languages/Русский.xml b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Languages/Русский.xml new file mode 100644 index 00000000..87112c20 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + UUID-002 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Roles/Расш1_Роль1.xml b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Roles/Расш1_Роль1.xml new file mode 100644 index 00000000..637ca464 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Roles/Расш1_Роль1.xml @@ -0,0 +1,15 @@ + + + + + Расш1_Роль1 + + + ru + Роль 1 + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Roles/Расш1_Роль1/Ext/Rights.xml b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Roles/Расш1_Роль1/Ext/Rights.xml new file mode 100644 index 00000000..58f80e20 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-adopted-service/Roles/Расш1_Роль1/Ext/Rights.xml @@ -0,0 +1,20 @@ + + + false + true + false + + HTTPService.ЭДО.URLTemplate.ЕстьНовыеДокументы.Method.POST + + Use + true + + + + HTTPService.Расш1_HTTPСервис1.URLTemplate.ШаблонURL1.Method.Метод1 + + Use + true + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-integration-service/Configuration.xml b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Configuration.xml new file mode 100644 index 00000000..c825d77f --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Configuration.xml @@ -0,0 +1,253 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + Сообщения + ДоступКШине + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-integration-service/Ext/ClientApplicationInterface.xml b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-integration-service/IntegrationServices/Сообщения.xml b/tests/skills/cases/role-compile/snapshots/expand-integration-service/IntegrationServices/Сообщения.xml new file mode 100644 index 00000000..ef39e1db --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-integration-service/IntegrationServices/Сообщения.xml @@ -0,0 +1,27 @@ + + + + + Сообщения + + + + + + + + Входящие + + + + + + + Исходящие + + + + + + + diff --git a/tests/skills/cases/role-compile/snapshots/expand-integration-service/Languages/Русский.xml b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-integration-service/Roles/ДоступКШине.xml b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Roles/ДоступКШине.xml new file mode 100644 index 00000000..dbd30e4c --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Roles/ДоступКШине.xml @@ -0,0 +1,15 @@ + + + + + ДоступКШине + + + ru + Доступ к шине + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-integration-service/Roles/ДоступКШине/Ext/Rights.xml b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Roles/ДоступКШине/Ext/Rights.xml new file mode 100644 index 00000000..4e0768af --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-integration-service/Roles/ДоступКШине/Ext/Rights.xml @@ -0,0 +1,20 @@ + + + false + true + false + + IntegrationService.Сообщения.IntegrationServiceChannel.Входящие + + Use + true + + + + IntegrationService.Сообщения.IntegrationServiceChannel.Исходящие + + Use + true + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Configuration.xml b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Configuration.xml new file mode 100644 index 00000000..47584249 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Configuration.xml @@ -0,0 +1,253 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + ВнешнийAPI + ДоступКAPI + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Ext/ClientApplicationInterface.xml b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-dedup/HTTPServices/ВнешнийAPI.xml b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/HTTPServices/ВнешнийAPI.xml new file mode 100644 index 00000000..198b577b --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/HTTPServices/ВнешнийAPI.xml @@ -0,0 +1,92 @@ + + + + + ВнешнийAPI + + + ru + ВнешнийAPI + + + + api + DontUse + 20 + + + + + Заказы + + + ru + Заказы + + + + + + + + + Получить + + + ru + Получить + + + + GET + ЗаказыПолучить + + + + + Создать + + + ru + Создать + + + + POST + ЗаказыСоздать + + + + + + + Версия + + + ru + Версия + + + + + + + + + GET + + + ru + GET + + + + GET + ВерсияGET + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-dedup/HTTPServices/ВнешнийAPI/Ext/Module.bsl b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/HTTPServices/ВнешнийAPI/Ext/Module.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Languages/Русский.xml b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Roles/ДоступКAPI.xml b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Roles/ДоступКAPI.xml new file mode 100644 index 00000000..89be23ab --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Roles/ДоступКAPI.xml @@ -0,0 +1,15 @@ + + + + + ДоступКAPI + + + ru + Доступ к API + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Roles/ДоступКAPI/Ext/Rights.xml b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Roles/ДоступКAPI/Ext/Rights.xml new file mode 100644 index 00000000..3ff46bd4 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-dedup/Roles/ДоступКAPI/Ext/Rights.xml @@ -0,0 +1,27 @@ + + + false + true + false + + HTTPService.ВнешнийAPI.URLTemplate.Заказы.Method.Получить + + Use + true + + + + HTTPService.ВнешнийAPI.URLTemplate.Заказы.Method.Создать + + Use + true + + + + HTTPService.ВнешнийAPI.URLTemplate.Версия.Method.GET + + Use + true + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/Configuration.xml b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Configuration.xml new file mode 100644 index 00000000..97142af7 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Configuration.xml @@ -0,0 +1,254 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + UUID-012 + UUID-013 + + + UUID-014 + UUID-015 + + + + TestConfig + + + ru + TestConfig + + + + + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + + + + false + false + false + + + + + + + + + + + + + + + + + + + + + + Biometrics + true + + + Location + false + + + BackgroundLocation + false + + + BluetoothPrinters + false + + + WiFiPrinters + false + + + Contacts + false + + + Calendars + false + + + PushNotifications + false + + + LocalNotifications + false + + + InAppPurchases + false + + + PersonalComputerFileExchange + false + + + Ads + false + + + NumberDialing + false + + + CallProcessing + false + + + CallLog + false + + + AutoSendSMS + false + + + ReceiveSMS + false + + + SMSLog + false + + + Camera + false + + + Microphone + false + + + MusicLibrary + false + + + PictureAndVideoLibraries + false + + + AudioPlaybackAndVibration + false + + + BackgroundAudioPlaybackAndVibration + false + + + InstallPackages + false + + + OSBackup + true + + + ApplicationUsageStatistics + false + + + BarcodeScanning + false + + + BackgroundAudioRecording + false + + + AllFilesAccess + false + + + Videoconferences + false + + + NFC + false + + + DocumentScanning + false + + + SpeechToText + false + + + Geofences + false + + + IncomingShareRequests + false + + + AllIncomingShareRequestsTypesProcessing + false + + + + + + Normal + + + Language.Русский + + + + + + Managed + NotAutoFree + DontUse + DontUse + TaxiEnableVersion8_2 + DontUse + Version8_3_24 + + + + Русский + ВнешнийAPI + ОбменДанными + ДоступКСервисам + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/Ext/ClientApplicationInterface.xml b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Ext/ClientApplicationInterface.xml new file mode 100644 index 00000000..3c1161b2 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Ext/ClientApplicationInterface.xml @@ -0,0 +1,18 @@ + + + + + UUID-002 + + + + + UUID-004 + + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/HTTPServices/ВнешнийAPI.xml b/tests/skills/cases/role-compile/snapshots/expand-service-roots/HTTPServices/ВнешнийAPI.xml new file mode 100644 index 00000000..198b577b --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-roots/HTTPServices/ВнешнийAPI.xml @@ -0,0 +1,92 @@ + + + + + ВнешнийAPI + + + ru + ВнешнийAPI + + + + api + DontUse + 20 + + + + + Заказы + + + ru + Заказы + + + + + + + + + Получить + + + ru + Получить + + + + GET + ЗаказыПолучить + + + + + Создать + + + ru + Создать + + + + POST + ЗаказыСоздать + + + + + + + Версия + + + ru + Версия + + + + + + + + + GET + + + ru + GET + + + + GET + ВерсияGET + + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/HTTPServices/ВнешнийAPI/Ext/Module.bsl b/tests/skills/cases/role-compile/snapshots/expand-service-roots/HTTPServices/ВнешнийAPI/Ext/Module.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/Languages/Русский.xml b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/Roles/ДоступКСервисам.xml b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Roles/ДоступКСервисам.xml new file mode 100644 index 00000000..774f09f4 --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Roles/ДоступКСервисам.xml @@ -0,0 +1,15 @@ + + + + + ДоступКСервисам + + + ru + Доступ к сервисам + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/Roles/ДоступКСервисам/Ext/Rights.xml b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Roles/ДоступКСервисам/Ext/Rights.xml new file mode 100644 index 00000000..3f75e74f --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-roots/Roles/ДоступКСервисам/Ext/Rights.xml @@ -0,0 +1,41 @@ + + + false + true + false + + HTTPService.ВнешнийAPI.URLTemplate.Заказы.Method.Получить + + Use + true + + + + HTTPService.ВнешнийAPI.URLTemplate.Заказы.Method.Создать + + Use + true + + + + HTTPService.ВнешнийAPI.URLTemplate.Версия.Method.GET + + Use + true + + + + WebService.ОбменДанными.Operation.Загрузить + + Use + true + + + + WebService.ОбменДанными.Operation.Выгрузить + + Use + true + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/WebServices/ОбменДанными.xml b/tests/skills/cases/role-compile/snapshots/expand-service-roots/WebServices/ОбменДанными.xml new file mode 100644 index 00000000..da821d5a --- /dev/null +++ b/tests/skills/cases/role-compile/snapshots/expand-service-roots/WebServices/ОбменДанными.xml @@ -0,0 +1,58 @@ + + + + + ОбменДанными + + + ru + Обмен данными + + + + http://example.org/exchange + + ОбменДанными.1cws + DontUse + 20 + + + + + Загрузить + + + ru + Загрузить + + + + xs:string + false + false + Загрузить + Managed + + + + + + Выгрузить + + + ru + Выгрузить + + + + xs:string + false + false + Выгрузить + Managed + + + + + + \ No newline at end of file diff --git a/tests/skills/cases/role-compile/snapshots/expand-service-roots/WebServices/ОбменДанными/Ext/Module.bsl b/tests/skills/cases/role-compile/snapshots/expand-service-roots/WebServices/ОбменДанными/Ext/Module.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/role-validate/error-service-root-right.json b/tests/skills/cases/role-validate/error-service-root-right.json new file mode 100644 index 00000000..fb651070 --- /dev/null +++ b/tests/skills/cases/role-validate/error-service-root-right.json @@ -0,0 +1,17 @@ +{ + "name": "Ошибка: право на сервис целиком вместо вложенного объекта", + "setup": "fixture:service-root-right", + "params": { "rightsPath": "Roles/РольСервисы/Ext/Rights.xml" }, + "expectError": true, + "noSnapshot": "негативный кейс: навык ничего не пишет, проверяется текст и код возврата", + "expect": { + "stdoutContains": [ + "HTTPService.ВнешнийAPI: право на сервис целиком не действует", + "HTTPService.ВнешнийAPI.URLTemplate.<Шаблон>.Method.<Метод>", + "WebService.ОбменДанными.Operation.<Операция>" + ], + "stdoutNotContains": [ + "HTTPService.ВнешнийAPI.URLTemplate.Заказы.Method.Получить: право" + ] + } +} diff --git a/tests/skills/cases/role-validate/fixtures/service-root-right/Roles/РольСервисы/Ext/Rights.xml b/tests/skills/cases/role-validate/fixtures/service-root-right/Roles/РольСервисы/Ext/Rights.xml new file mode 100644 index 00000000..b0a9e6a2 --- /dev/null +++ b/tests/skills/cases/role-validate/fixtures/service-root-right/Roles/РольСервисы/Ext/Rights.xml @@ -0,0 +1,27 @@ + + + false + true + false + + HTTPService.ВнешнийAPI + + Use + true + + + + WebService.ОбменДанными + + Use + true + + + + HTTPService.ВнешнийAPI.URLTemplate.Заказы.Method.Получить + + Use + true + + +