From d6d44b8b35784326e1b63069fc4f53f1ee64ebb6 Mon Sep 17 00:00:00 2001 From: Nick Shirokov Date: Sat, 28 Mar 2026 14:09:00 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20add=20interface-*,=20cfe-*=20tests=20(b?= =?UTF-8?q?atches=208+9)=20=E2=80=94=20all=20skills=20covered?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - interface-edit, interface-validate: 2 cases - cfe-init, cfe-validate, cfe-borrow, cfe-patch-method, cfe-diff: 5 cases - runner: switch params in preRun (true = no value) - Findings: interface-edit JSON-in-JSON, cfe-patch-method type naming 52 tests across 40 skills, all passing (~48s). Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/skills/cases/cfe-borrow/_skill.json | 13 + tests/skills/cases/cfe-borrow/catalog.json | 15 + .../snapshots/catalog/Catalogs/Товары.xml | 327 ++++++++++++++++++ .../Catalogs/Товары/Ext/ObjectModule.bsl | 0 .../snapshots/catalog/Configuration.xml | 252 ++++++++++++++ .../snapshots/catalog/Languages/Русский.xml | 16 + .../snapshots/catalog/ext/Catalogs/Товары.xml | 34 ++ .../snapshots/catalog/ext/Configuration.xml | 72 ++++ .../catalog/ext/Languages/Русский.xml | 13 + .../catalog/ext/Roles/Тест_ОсновнаяРоль.xml | 10 + tests/skills/cases/cfe-diff/_skill.json | 12 + .../cases/cfe-diff/empty-extension.json | 10 + .../empty-extension/Configuration.xml | 251 ++++++++++++++ .../empty-extension/Languages/Русский.xml | 16 + .../empty-extension/ext/Configuration.xml | 71 ++++ .../empty-extension/ext/Languages/Русский.xml | 13 + .../ext/Roles/Тест_ОсновнаяРоль.xml | 10 + tests/skills/cases/cfe-init/_skill.json | 13 + tests/skills/cases/cfe-init/basic.json | 7 + .../snapshots/basic/Configuration.xml | 251 ++++++++++++++ .../snapshots/basic/Languages/Русский.xml | 16 + .../snapshots/basic/ext/Configuration.xml | 71 ++++ .../snapshots/basic/ext/Languages/Русский.xml | 13 + .../ext/Roles/МоёРасширение_ОсновнаяРоль.xml | 10 + .../skills/cases/cfe-patch-method/_skill.json | 14 + .../cases/cfe-patch-method/after-handler.json | 24 ++ .../after-handler/Catalogs/Товары.xml | 327 ++++++++++++++++++ .../Catalogs/Товары/Ext/ObjectModule.bsl | 0 .../snapshots/after-handler/Configuration.xml | 252 ++++++++++++++ .../after-handler/Languages/Русский.xml | 16 + .../after-handler/ext/Catalogs/Товары.xml | 34 ++ .../ext/Catalogs/Товары/Ext/ObjectModule.bsl | 5 + .../after-handler/ext/Configuration.xml | 72 ++++ .../after-handler/ext/Languages/Русский.xml | 13 + .../ext/Roles/Тест_ОсновнаяРоль.xml | 10 + tests/skills/cases/cfe-validate/_skill.json | 11 + .../snapshots/valid/Configuration.xml | 251 ++++++++++++++ .../snapshots/valid/Languages/Русский.xml | 16 + .../snapshots/valid/ext/Configuration.xml | 71 ++++ .../snapshots/valid/ext/Languages/Русский.xml | 13 + .../valid/ext/Roles/Тест_ОсновнаяРоль.xml | 10 + tests/skills/cases/cfe-validate/valid.json | 10 + tests/skills/cases/interface-edit/_skill.json | 13 + tests/skills/cases/interface-edit/basic.json | 20 ++ .../snapshots/basic/Catalogs/Товары.xml | 327 ++++++++++++++++++ .../Catalogs/Товары/Ext/ObjectModule.bsl | 0 .../snapshots/basic/Configuration.xml | 253 ++++++++++++++ .../snapshots/basic/Languages/Русский.xml | 16 + .../snapshots/basic/Subsystems/Склад.xml | 22 ++ .../basic/Subsystems/Склад/CommandInterface | 6 + .../cases/interface-validate/_skill.json | 11 + .../snapshots/valid/Catalogs/Товары.xml | 327 ++++++++++++++++++ .../Catalogs/Товары/Ext/ObjectModule.bsl | 0 .../snapshots/valid/Configuration.xml | 253 ++++++++++++++ .../snapshots/valid/Languages/Русский.xml | 16 + .../snapshots/valid/Subsystems/Склад.xml | 22 ++ .../valid/Subsystems/Склад/CommandInterface | 6 + .../cases/interface-validate/valid.json | 21 ++ tests/skills/runner.mjs | 4 + 59 files changed, 3982 insertions(+) create mode 100644 tests/skills/cases/cfe-borrow/_skill.json create mode 100644 tests/skills/cases/cfe-borrow/catalog.json create mode 100644 tests/skills/cases/cfe-borrow/snapshots/catalog/Catalogs/Товары.xml create mode 100644 tests/skills/cases/cfe-borrow/snapshots/catalog/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/cfe-borrow/snapshots/catalog/Configuration.xml create mode 100644 tests/skills/cases/cfe-borrow/snapshots/catalog/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Catalogs/Товары.xml create mode 100644 tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Configuration.xml create mode 100644 tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Roles/Тест_ОсновнаяРоль.xml create mode 100644 tests/skills/cases/cfe-diff/_skill.json create mode 100644 tests/skills/cases/cfe-diff/empty-extension.json create mode 100644 tests/skills/cases/cfe-diff/snapshots/empty-extension/Configuration.xml create mode 100644 tests/skills/cases/cfe-diff/snapshots/empty-extension/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Configuration.xml create mode 100644 tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Roles/Тест_ОсновнаяРоль.xml create mode 100644 tests/skills/cases/cfe-init/_skill.json create mode 100644 tests/skills/cases/cfe-init/basic.json create mode 100644 tests/skills/cases/cfe-init/snapshots/basic/Configuration.xml create mode 100644 tests/skills/cases/cfe-init/snapshots/basic/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-init/snapshots/basic/ext/Configuration.xml create mode 100644 tests/skills/cases/cfe-init/snapshots/basic/ext/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-init/snapshots/basic/ext/Roles/МоёРасширение_ОсновнаяРоль.xml create mode 100644 tests/skills/cases/cfe-patch-method/_skill.json create mode 100644 tests/skills/cases/cfe-patch-method/after-handler.json create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/Catalogs/Товары.xml create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/Configuration.xml create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Catalogs/Товары.xml create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Configuration.xml create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Roles/Тест_ОсновнаяРоль.xml create mode 100644 tests/skills/cases/cfe-validate/_skill.json create mode 100644 tests/skills/cases/cfe-validate/snapshots/valid/Configuration.xml create mode 100644 tests/skills/cases/cfe-validate/snapshots/valid/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-validate/snapshots/valid/ext/Configuration.xml create mode 100644 tests/skills/cases/cfe-validate/snapshots/valid/ext/Languages/Русский.xml create mode 100644 tests/skills/cases/cfe-validate/snapshots/valid/ext/Roles/Тест_ОсновнаяРоль.xml create mode 100644 tests/skills/cases/cfe-validate/valid.json create mode 100644 tests/skills/cases/interface-edit/_skill.json create mode 100644 tests/skills/cases/interface-edit/basic.json create mode 100644 tests/skills/cases/interface-edit/snapshots/basic/Catalogs/Товары.xml create mode 100644 tests/skills/cases/interface-edit/snapshots/basic/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/interface-edit/snapshots/basic/Configuration.xml create mode 100644 tests/skills/cases/interface-edit/snapshots/basic/Languages/Русский.xml create mode 100644 tests/skills/cases/interface-edit/snapshots/basic/Subsystems/Склад.xml create mode 100644 tests/skills/cases/interface-edit/snapshots/basic/Subsystems/Склад/CommandInterface create mode 100644 tests/skills/cases/interface-validate/_skill.json create mode 100644 tests/skills/cases/interface-validate/snapshots/valid/Catalogs/Товары.xml create mode 100644 tests/skills/cases/interface-validate/snapshots/valid/Catalogs/Товары/Ext/ObjectModule.bsl create mode 100644 tests/skills/cases/interface-validate/snapshots/valid/Configuration.xml create mode 100644 tests/skills/cases/interface-validate/snapshots/valid/Languages/Русский.xml create mode 100644 tests/skills/cases/interface-validate/snapshots/valid/Subsystems/Склад.xml create mode 100644 tests/skills/cases/interface-validate/snapshots/valid/Subsystems/Склад/CommandInterface create mode 100644 tests/skills/cases/interface-validate/valid.json diff --git a/tests/skills/cases/cfe-borrow/_skill.json b/tests/skills/cases/cfe-borrow/_skill.json new file mode 100644 index 00000000..ee40bdd6 --- /dev/null +++ b/tests/skills/cases/cfe-borrow/_skill.json @@ -0,0 +1,13 @@ +{ + "script": "cfe-borrow/scripts/cfe-borrow", + "setup": "empty-config", + "args": [ + { "flag": "-ExtensionPath", "from": "workPath", "field": "extensionPath" }, + { "flag": "-ConfigPath", "from": "workDir" }, + { "flag": "-Object", "from": "case.object" } + ], + "snapshot": { + "root": "workDir", + "normalizeUuids": true + } +} diff --git a/tests/skills/cases/cfe-borrow/catalog.json b/tests/skills/cases/cfe-borrow/catalog.json new file mode 100644 index 00000000..acca0499 --- /dev/null +++ b/tests/skills/cases/cfe-borrow/catalog.json @@ -0,0 +1,15 @@ +{ + "name": "Заимствование справочника", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { "type": "Catalog", "name": "Товары" }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "cfe-init/scripts/cfe-init", + "args": { "-Name": "Тест", "-OutputDir": "{workDir}/ext", "-ConfigPath": "{workDir}" } + } + ], + "params": { "extensionPath": "ext", "object": "Catalog.Товары" } +} diff --git a/tests/skills/cases/cfe-borrow/snapshots/catalog/Catalogs/Товары.xml b/tests/skills/cases/cfe-borrow/snapshots/catalog/Catalogs/Товары.xml new file mode 100644 index 00000000..15a89376 --- /dev/null +++ b/tests/skills/cases/cfe-borrow/snapshots/catalog/Catalogs/Товары.xml @@ -0,0 +1,327 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Товары + + + ru + Товары + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + Auto + InDialog + true + BothWays + + Catalog.Товары.StandardAttribute.Description + Catalog.Товары.StandardAttribute.Code + + Begin + DontUse + Directly + + + + + + + + + + + false + + + Automatic + Use + + + + + + DontUse + Auto + DontUse + false + false + + + + diff --git a/tests/skills/cases/cfe-borrow/snapshots/catalog/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/cfe-borrow/snapshots/catalog/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/cfe-borrow/snapshots/catalog/Configuration.xml b/tests/skills/cases/cfe-borrow/snapshots/catalog/Configuration.xml new file mode 100644 index 00000000..ab2a9dc4 --- /dev/null +++ b/tests/skills/cases/cfe-borrow/snapshots/catalog/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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 + Taxi + DontUse + Version8_3_24 + + + + Русский + Товары + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-borrow/snapshots/catalog/Languages/Русский.xml b/tests/skills/cases/cfe-borrow/snapshots/catalog/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/cfe-borrow/snapshots/catalog/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Catalogs/Товары.xml b/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Catalogs/Товары.xml new file mode 100644 index 00000000..29729ee8 --- /dev/null +++ b/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Catalogs/Товары.xml @@ -0,0 +1,34 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Adopted + Товары + + UUID-012 + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Configuration.xml b/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Configuration.xml new file mode 100644 index 00000000..5c0f84b5 --- /dev/null +++ b/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Configuration.xml @@ -0,0 +1,72 @@ + + + + + + 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 + Тест + + + ru + Тест + + + + Customization + true + Тест_ + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + Role.Тест_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + Тест_ОсновнаяРоль + Товары + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Languages/Русский.xml b/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Languages/Русский.xml new file mode 100644 index 00000000..c21624f5 --- /dev/null +++ b/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + UUID-002 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Roles/Тест_ОсновнаяРоль.xml b/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Roles/Тест_ОсновнаяРоль.xml new file mode 100644 index 00000000..ec9dfbaf --- /dev/null +++ b/tests/skills/cases/cfe-borrow/snapshots/catalog/ext/Roles/Тест_ОсновнаяРоль.xml @@ -0,0 +1,10 @@ + + + + + Тест_ОсновнаяРоль + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-diff/_skill.json b/tests/skills/cases/cfe-diff/_skill.json new file mode 100644 index 00000000..e1570b43 --- /dev/null +++ b/tests/skills/cases/cfe-diff/_skill.json @@ -0,0 +1,12 @@ +{ + "script": "cfe-diff/scripts/cfe-diff", + "setup": "empty-config", + "args": [ + { "flag": "-ExtensionPath", "from": "workPath", "field": "extensionPath" }, + { "flag": "-ConfigPath", "from": "workDir" } + ], + "snapshot": { + "root": "workDir", + "normalizeUuids": true + } +} diff --git a/tests/skills/cases/cfe-diff/empty-extension.json b/tests/skills/cases/cfe-diff/empty-extension.json new file mode 100644 index 00000000..89ccdb47 --- /dev/null +++ b/tests/skills/cases/cfe-diff/empty-extension.json @@ -0,0 +1,10 @@ +{ + "name": "Diff пустого расширения", + "preRun": [ + { + "script": "cfe-init/scripts/cfe-init", + "args": { "-Name": "Тест", "-OutputDir": "{workDir}/ext", "-ConfigPath": "{workDir}" } + } + ], + "params": { "extensionPath": "ext" } +} diff --git a/tests/skills/cases/cfe-diff/snapshots/empty-extension/Configuration.xml b/tests/skills/cases/cfe-diff/snapshots/empty-extension/Configuration.xml new file mode 100644 index 00000000..3435599c --- /dev/null +++ b/tests/skills/cases/cfe-diff/snapshots/empty-extension/Configuration.xml @@ -0,0 +1,251 @@ + + + + + + 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 + Taxi + DontUse + Version8_3_24 + + + + Русский + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-diff/snapshots/empty-extension/Languages/Русский.xml b/tests/skills/cases/cfe-diff/snapshots/empty-extension/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/cfe-diff/snapshots/empty-extension/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Configuration.xml b/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Configuration.xml new file mode 100644 index 00000000..d9a68f84 --- /dev/null +++ b/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Configuration.xml @@ -0,0 +1,71 @@ + + + + + + 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 + Тест + + + ru + Тест + + + + Customization + true + Тест_ + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + Role.Тест_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + Тест_ОсновнаяРоль + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Languages/Русский.xml b/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Languages/Русский.xml new file mode 100644 index 00000000..c21624f5 --- /dev/null +++ b/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + UUID-002 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Roles/Тест_ОсновнаяРоль.xml b/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Roles/Тест_ОсновнаяРоль.xml new file mode 100644 index 00000000..ec9dfbaf --- /dev/null +++ b/tests/skills/cases/cfe-diff/snapshots/empty-extension/ext/Roles/Тест_ОсновнаяРоль.xml @@ -0,0 +1,10 @@ + + + + + Тест_ОсновнаяРоль + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-init/_skill.json b/tests/skills/cases/cfe-init/_skill.json new file mode 100644 index 00000000..419cf051 --- /dev/null +++ b/tests/skills/cases/cfe-init/_skill.json @@ -0,0 +1,13 @@ +{ + "script": "cfe-init/scripts/cfe-init", + "setup": "empty-config", + "args": [ + { "flag": "-Name", "from": "case.name" }, + { "flag": "-OutputDir", "from": "workPath", "field": "outputDir" }, + { "flag": "-ConfigPath", "from": "workDir" } + ], + "snapshot": { + "root": "workDir", + "normalizeUuids": true + } +} diff --git a/tests/skills/cases/cfe-init/basic.json b/tests/skills/cases/cfe-init/basic.json new file mode 100644 index 00000000..10ce8908 --- /dev/null +++ b/tests/skills/cases/cfe-init/basic.json @@ -0,0 +1,7 @@ +{ + "name": "Пустое расширение", + "params": { "name": "МоёРасширение", "outputDir": "ext" }, + "expect": { + "files": ["ext/Configuration.xml"] + } +} diff --git a/tests/skills/cases/cfe-init/snapshots/basic/Configuration.xml b/tests/skills/cases/cfe-init/snapshots/basic/Configuration.xml new file mode 100644 index 00000000..3435599c --- /dev/null +++ b/tests/skills/cases/cfe-init/snapshots/basic/Configuration.xml @@ -0,0 +1,251 @@ + + + + + + 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 + Taxi + DontUse + Version8_3_24 + + + + Русский + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-init/snapshots/basic/Languages/Русский.xml b/tests/skills/cases/cfe-init/snapshots/basic/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/cfe-init/snapshots/basic/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-init/snapshots/basic/ext/Configuration.xml b/tests/skills/cases/cfe-init/snapshots/basic/ext/Configuration.xml new file mode 100644 index 00000000..b3d93f50 --- /dev/null +++ b/tests/skills/cases/cfe-init/snapshots/basic/ext/Configuration.xml @@ -0,0 +1,71 @@ + + + + + + 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 + МоёРасширение + + + ru + МоёРасширение + + + + Customization + true + МоёРасширение_ + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + Role.МоёРасширение_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + МоёРасширение_ОсновнаяРоль + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-init/snapshots/basic/ext/Languages/Русский.xml b/tests/skills/cases/cfe-init/snapshots/basic/ext/Languages/Русский.xml new file mode 100644 index 00000000..c21624f5 --- /dev/null +++ b/tests/skills/cases/cfe-init/snapshots/basic/ext/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + UUID-002 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-init/snapshots/basic/ext/Roles/МоёРасширение_ОсновнаяРоль.xml b/tests/skills/cases/cfe-init/snapshots/basic/ext/Roles/МоёРасширение_ОсновнаяРоль.xml new file mode 100644 index 00000000..65ce0747 --- /dev/null +++ b/tests/skills/cases/cfe-init/snapshots/basic/ext/Roles/МоёРасширение_ОсновнаяРоль.xml @@ -0,0 +1,10 @@ + + + + + МоёРасширение_ОсновнаяРоль + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-patch-method/_skill.json b/tests/skills/cases/cfe-patch-method/_skill.json new file mode 100644 index 00000000..c604d03b --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/_skill.json @@ -0,0 +1,14 @@ +{ + "script": "cfe-patch-method/scripts/cfe-patch-method", + "setup": "empty-config", + "args": [ + { "flag": "-ExtensionPath", "from": "workPath", "field": "extensionPath" }, + { "flag": "-ModulePath", "from": "case.modulePath" }, + { "flag": "-MethodName", "from": "case.methodName" }, + { "flag": "-InterceptorType", "from": "case.interceptorType" } + ], + "snapshot": { + "root": "workDir", + "normalizeUuids": true + } +} diff --git a/tests/skills/cases/cfe-patch-method/after-handler.json b/tests/skills/cases/cfe-patch-method/after-handler.json new file mode 100644 index 00000000..e58897d5 --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/after-handler.json @@ -0,0 +1,24 @@ +{ + "name": "Перехватчик После для модуля объекта", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { "type": "Catalog", "name": "Товары" }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "cfe-init/scripts/cfe-init", + "args": { "-Name": "Тест", "-OutputDir": "{workDir}/ext", "-ConfigPath": "{workDir}" } + }, + { + "script": "cfe-borrow/scripts/cfe-borrow", + "args": { "-ExtensionPath": "{workDir}/ext", "-ConfigPath": "{workDir}", "-Object": "Catalog.Товары" } + } + ], + "params": { + "extensionPath": "ext", + "modulePath": "Catalog.Товары.ObjectModule", + "methodName": "ПриЗаписи", + "interceptorType": "After" + } +} diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Catalogs/Товары.xml b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Catalogs/Товары.xml new file mode 100644 index 00000000..15a89376 --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Catalogs/Товары.xml @@ -0,0 +1,327 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Товары + + + ru + Товары + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + Auto + InDialog + true + BothWays + + Catalog.Товары.StandardAttribute.Description + Catalog.Товары.StandardAttribute.Code + + Begin + DontUse + Directly + + + + + + + + + + + false + + + Automatic + Use + + + + + + DontUse + Auto + DontUse + false + false + + + + diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Configuration.xml b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Configuration.xml new file mode 100644 index 00000000..ab2a9dc4 --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Configuration.xml @@ -0,0 +1,252 @@ + + + + + + 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 + Taxi + DontUse + Version8_3_24 + + + + Русский + Товары + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Languages/Русский.xml b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Catalogs/Товары.xml b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Catalogs/Товары.xml new file mode 100644 index 00000000..29729ee8 --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Catalogs/Товары.xml @@ -0,0 +1,34 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Adopted + Товары + + UUID-012 + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 00000000..bd702ffb --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Catalogs/Товары/Ext/ObjectModule.bsl @@ -0,0 +1,5 @@ +&НаСервере +&После("ПриЗаписи") +Процедура Тест_ПриЗаписи() + // TODO: код после вызова оригинального метода +КонецПроцедуры diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Configuration.xml b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Configuration.xml new file mode 100644 index 00000000..5c0f84b5 --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Configuration.xml @@ -0,0 +1,72 @@ + + + + + + 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 + Тест + + + ru + Тест + + + + Customization + true + Тест_ + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + Role.Тест_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + Тест_ОсновнаяРоль + Товары + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Languages/Русский.xml b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Languages/Русский.xml new file mode 100644 index 00000000..c21624f5 --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + UUID-002 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Roles/Тест_ОсновнаяРоль.xml b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Roles/Тест_ОсновнаяРоль.xml new file mode 100644 index 00000000..ec9dfbaf --- /dev/null +++ b/tests/skills/cases/cfe-patch-method/snapshots/after-handler/ext/Roles/Тест_ОсновнаяРоль.xml @@ -0,0 +1,10 @@ + + + + + Тест_ОсновнаяРоль + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/_skill.json b/tests/skills/cases/cfe-validate/_skill.json new file mode 100644 index 00000000..b332e064 --- /dev/null +++ b/tests/skills/cases/cfe-validate/_skill.json @@ -0,0 +1,11 @@ +{ + "script": "cfe-validate/scripts/cfe-validate", + "setup": "empty-config", + "args": [ + { "flag": "-ExtensionPath", "from": "workPath", "field": "extensionPath" } + ], + "snapshot": { + "root": "workDir", + "normalizeUuids": true + } +} diff --git a/tests/skills/cases/cfe-validate/snapshots/valid/Configuration.xml b/tests/skills/cases/cfe-validate/snapshots/valid/Configuration.xml new file mode 100644 index 00000000..3435599c --- /dev/null +++ b/tests/skills/cases/cfe-validate/snapshots/valid/Configuration.xml @@ -0,0 +1,251 @@ + + + + + + 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 + Taxi + DontUse + Version8_3_24 + + + + Русский + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/snapshots/valid/Languages/Русский.xml b/tests/skills/cases/cfe-validate/snapshots/valid/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/cfe-validate/snapshots/valid/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/snapshots/valid/ext/Configuration.xml b/tests/skills/cases/cfe-validate/snapshots/valid/ext/Configuration.xml new file mode 100644 index 00000000..d9a68f84 --- /dev/null +++ b/tests/skills/cases/cfe-validate/snapshots/valid/ext/Configuration.xml @@ -0,0 +1,71 @@ + + + + + + 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 + Тест + + + ru + Тест + + + + Customization + true + Тест_ + Version8_3_24 + ManagedApplication + + PlatformApplication + + Russian + + Role.Тест_ОсновнаяРоль + + + + Language.Русский + + + + + + TaxiEnableVersion8_2 + + + Русский + Тест_ОсновнаяРоль + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/snapshots/valid/ext/Languages/Русский.xml b/tests/skills/cases/cfe-validate/snapshots/valid/ext/Languages/Русский.xml new file mode 100644 index 00000000..c21624f5 --- /dev/null +++ b/tests/skills/cases/cfe-validate/snapshots/valid/ext/Languages/Русский.xml @@ -0,0 +1,13 @@ + + + + + + Adopted + Русский + + UUID-002 + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/snapshots/valid/ext/Roles/Тест_ОсновнаяРоль.xml b/tests/skills/cases/cfe-validate/snapshots/valid/ext/Roles/Тест_ОсновнаяРоль.xml new file mode 100644 index 00000000..ec9dfbaf --- /dev/null +++ b/tests/skills/cases/cfe-validate/snapshots/valid/ext/Roles/Тест_ОсновнаяРоль.xml @@ -0,0 +1,10 @@ + + + + + Тест_ОсновнаяРоль + + + + + \ No newline at end of file diff --git a/tests/skills/cases/cfe-validate/valid.json b/tests/skills/cases/cfe-validate/valid.json new file mode 100644 index 00000000..11e929e4 --- /dev/null +++ b/tests/skills/cases/cfe-validate/valid.json @@ -0,0 +1,10 @@ +{ + "name": "Корректное расширение проходит валидацию", + "preRun": [ + { + "script": "cfe-init/scripts/cfe-init", + "args": { "-Name": "Тест", "-OutputDir": "{workDir}/ext", "-ConfigPath": "{workDir}" } + } + ], + "params": { "extensionPath": "ext" } +} diff --git a/tests/skills/cases/interface-edit/_skill.json b/tests/skills/cases/interface-edit/_skill.json new file mode 100644 index 00000000..345cb1c6 --- /dev/null +++ b/tests/skills/cases/interface-edit/_skill.json @@ -0,0 +1,13 @@ +{ + "script": "interface-edit/scripts/interface-edit", + "setup": "empty-config", + "args": [ + { "flag": "-CIPath", "from": "workPath", "field": "ciPath" }, + { "flag": "-DefinitionFile", "from": "inputFile" }, + { "flag": "-CreateIfMissing", "from": "switch" } + ], + "snapshot": { + "root": "workDir", + "normalizeUuids": true + } +} diff --git a/tests/skills/cases/interface-edit/basic.json b/tests/skills/cases/interface-edit/basic.json new file mode 100644 index 00000000..b1453742 --- /dev/null +++ b/tests/skills/cases/interface-edit/basic.json @@ -0,0 +1,20 @@ +{ + "name": "Создание командного интерфейса подсистемы", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { "type": "Catalog", "name": "Товары" }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "subsystem-compile/scripts/subsystem-compile", + "input": { "name": "Склад", "objects": ["Catalogs.Товары"] }, + "args": { "-DefinitionFile": "{inputFile}", "-OutputDir": "{workDir}" } + } + ], + "params": { "ciPath": "Subsystems/Склад/CommandInterface" }, + "input": [ + { "operation": "place", "value": "{\"command\": \"Catalog.Товары\", \"group\": \"NavigationPanel.Important\"}" } + ], + "CreateIfMissing": true +} diff --git a/tests/skills/cases/interface-edit/snapshots/basic/Catalogs/Товары.xml b/tests/skills/cases/interface-edit/snapshots/basic/Catalogs/Товары.xml new file mode 100644 index 00000000..15a89376 --- /dev/null +++ b/tests/skills/cases/interface-edit/snapshots/basic/Catalogs/Товары.xml @@ -0,0 +1,327 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Товары + + + ru + Товары + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + Auto + InDialog + true + BothWays + + Catalog.Товары.StandardAttribute.Description + Catalog.Товары.StandardAttribute.Code + + Begin + DontUse + Directly + + + + + + + + + + + false + + + Automatic + Use + + + + + + DontUse + Auto + DontUse + false + false + + + + diff --git a/tests/skills/cases/interface-edit/snapshots/basic/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/interface-edit/snapshots/basic/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/interface-edit/snapshots/basic/Configuration.xml b/tests/skills/cases/interface-edit/snapshots/basic/Configuration.xml new file mode 100644 index 00000000..8a9c2763 --- /dev/null +++ b/tests/skills/cases/interface-edit/snapshots/basic/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 + Taxi + DontUse + Version8_3_24 + + + + Русский + Товары + Склад + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-edit/snapshots/basic/Languages/Русский.xml b/tests/skills/cases/interface-edit/snapshots/basic/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/interface-edit/snapshots/basic/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-edit/snapshots/basic/Subsystems/Склад.xml b/tests/skills/cases/interface-edit/snapshots/basic/Subsystems/Склад.xml new file mode 100644 index 00000000..fd643c89 --- /dev/null +++ b/tests/skills/cases/interface-edit/snapshots/basic/Subsystems/Склад.xml @@ -0,0 +1,22 @@ + + + + + Склад + + + ru + Склад + + + + true + true + false + + + + + + + diff --git a/tests/skills/cases/interface-edit/snapshots/basic/Subsystems/Склад/CommandInterface b/tests/skills/cases/interface-edit/snapshots/basic/Subsystems/Склад/CommandInterface new file mode 100644 index 00000000..c86e277a --- /dev/null +++ b/tests/skills/cases/interface-edit/snapshots/basic/Subsystems/Склад/CommandInterface @@ -0,0 +1,6 @@ + + + + NavigationPanel.ImportantAuto + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/_skill.json b/tests/skills/cases/interface-validate/_skill.json new file mode 100644 index 00000000..fc6eb7a7 --- /dev/null +++ b/tests/skills/cases/interface-validate/_skill.json @@ -0,0 +1,11 @@ +{ + "script": "interface-validate/scripts/interface-validate", + "setup": "empty-config", + "args": [ + { "flag": "-CIPath", "from": "workPath", "field": "ciPath" } + ], + "snapshot": { + "root": "workDir", + "normalizeUuids": true + } +} diff --git a/tests/skills/cases/interface-validate/snapshots/valid/Catalogs/Товары.xml b/tests/skills/cases/interface-validate/snapshots/valid/Catalogs/Товары.xml new file mode 100644 index 00000000..15a89376 --- /dev/null +++ b/tests/skills/cases/interface-validate/snapshots/valid/Catalogs/Товары.xml @@ -0,0 +1,327 @@ + + + + + + UUID-002 + UUID-003 + + + UUID-004 + UUID-005 + + + UUID-006 + UUID-007 + + + UUID-008 + UUID-009 + + + UUID-010 + UUID-011 + + + + Товары + + + ru + Товары + + + + false + HierarchyFoldersAndItems + false + 2 + true + true + + ToItems + 9 + 25 + String + Variable + WholeCatalog + false + true + AsDescription + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + DontCheck + false + false + Auto + + + false + + + Auto + Auto + + false + Use + false + + + + Use + + + + + + + + Auto + InDialog + true + BothWays + + Catalog.Товары.StandardAttribute.Description + Catalog.Товары.StandardAttribute.Code + + Begin + DontUse + Directly + + + + + + + + + + + false + + + Automatic + Use + + + + + + DontUse + Auto + DontUse + false + false + + + + diff --git a/tests/skills/cases/interface-validate/snapshots/valid/Catalogs/Товары/Ext/ObjectModule.bsl b/tests/skills/cases/interface-validate/snapshots/valid/Catalogs/Товары/Ext/ObjectModule.bsl new file mode 100644 index 00000000..e69de29b diff --git a/tests/skills/cases/interface-validate/snapshots/valid/Configuration.xml b/tests/skills/cases/interface-validate/snapshots/valid/Configuration.xml new file mode 100644 index 00000000..8a9c2763 --- /dev/null +++ b/tests/skills/cases/interface-validate/snapshots/valid/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 + Taxi + DontUse + Version8_3_24 + + + + Русский + Товары + Склад + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/snapshots/valid/Languages/Русский.xml b/tests/skills/cases/interface-validate/snapshots/valid/Languages/Русский.xml new file mode 100644 index 00000000..37c60d78 --- /dev/null +++ b/tests/skills/cases/interface-validate/snapshots/valid/Languages/Русский.xml @@ -0,0 +1,16 @@ + + + + + Русский + + + ru + Русский + + + + ru + + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/snapshots/valid/Subsystems/Склад.xml b/tests/skills/cases/interface-validate/snapshots/valid/Subsystems/Склад.xml new file mode 100644 index 00000000..fd643c89 --- /dev/null +++ b/tests/skills/cases/interface-validate/snapshots/valid/Subsystems/Склад.xml @@ -0,0 +1,22 @@ + + + + + Склад + + + ru + Склад + + + + true + true + false + + + + + + + diff --git a/tests/skills/cases/interface-validate/snapshots/valid/Subsystems/Склад/CommandInterface b/tests/skills/cases/interface-validate/snapshots/valid/Subsystems/Склад/CommandInterface new file mode 100644 index 00000000..c86e277a --- /dev/null +++ b/tests/skills/cases/interface-validate/snapshots/valid/Subsystems/Склад/CommandInterface @@ -0,0 +1,6 @@ + + + + NavigationPanel.ImportantAuto + + \ No newline at end of file diff --git a/tests/skills/cases/interface-validate/valid.json b/tests/skills/cases/interface-validate/valid.json new file mode 100644 index 00000000..86d1b2a2 --- /dev/null +++ b/tests/skills/cases/interface-validate/valid.json @@ -0,0 +1,21 @@ +{ + "name": "Корректный командный интерфейс", + "preRun": [ + { + "script": "meta-compile/scripts/meta-compile", + "input": { "type": "Catalog", "name": "Товары" }, + "args": { "-JsonPath": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "subsystem-compile/scripts/subsystem-compile", + "input": { "name": "Склад", "objects": ["Catalogs.Товары"] }, + "args": { "-DefinitionFile": "{inputFile}", "-OutputDir": "{workDir}" } + }, + { + "script": "interface-edit/scripts/interface-edit", + "input": [{ "operation": "place", "value": "{\"command\": \"Catalog.Товары\", \"group\": \"NavigationPanel.Important\"}" }], + "args": { "-CIPath": "{workDir}/Subsystems/Склад/CommandInterface", "-DefinitionFile": "{inputFile}", "-CreateIfMissing": true } + } + ], + "params": { "ciPath": "Subsystems/Склад/CommandInterface" } +} diff --git a/tests/skills/runner.mjs b/tests/skills/runner.mjs index 80ab35ea..816b792a 100644 --- a/tests/skills/runner.mjs +++ b/tests/skills/runner.mjs @@ -343,6 +343,10 @@ function runCase(testCase, opts) { const preArgs = []; for (const [flag, value] of Object.entries(step.args || {})) { preArgs.push(flag); + if (value === true || value === '') { + // Switch parameter — no value + continue; + } const resolved = String(value) .replace('{workDir}', workDir) .replace('{inputFile}', '');