diff options
author | 2022-03-10 14:39:42 +0000 | |
---|---|---|
committer | 2022-03-14 11:53:36 +0000 | |
commit | 93b5533e44728faa87c291fbf44120ea013fab51 (patch) | |
tree | fa26abbb89f0c596c84371f3c144957b9591167c /gui-editors/gui-editor-apex/src/main/webapp/js/__test__ | |
parent | 1e95c73cef25b524bc1f5791d4578332670202f7 (diff) |
Upgrade apex-pdp version in Apex Editor
Upgrade apex-pdp version to 2.7.1-SNAPSHOT
Fix NullPointerException in ModelHandler::setUuidAndDescription
Allow parsing models from policy_type_impl or apexPolicyModel
Remove deprecated Task input and output field functionality
Fix JS REST calls and tests after JAXB to Gson changes
Fix bugs in Task Edit form relating to task logic edit area
Issue-ID: POLICY-3990
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I4f506889df46619a0178ab99c99c73ec2fd5a1e3
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main/webapp/js/__test__')
12 files changed, 236 insertions, 247 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js index 362a1f9..9880328 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexAjax.test.js @@ -60,49 +60,79 @@ test('Test ajax_get success', (done) => { test('Test ajax_getWithKeyInfo success', (done) => { const myCallback = jest.fn((actual) => { expect(actual).toEqual({ - key: { - name: "name1", - version: "version1" - }, + key: { name: "name1", version: "version1" }, uuid: "UUID1", description: "description1" }); done(); }); - data.messages = [ - '{"apexKeyInfo": {"UUID": "UUID1", "description": "description1", "key":{"name": "name1", "version":' + - ' "version1"}}, "objectType": {"key": {"name": "name1", "version": "version1"}}}' - ]; const jqXHR = {status: 200, responseText: ""}; $.ajax = jest.fn().mockImplementation((args) => { - args.success(data, null, jqXHR); - }); - mod.ajax_getWithKeyInfo("requestUrl", "objectType", myCallback, undefined); + if (args.url.endsWith("/KeyInformation/Get?name=&version=")) { + var results1 = { + messages: [ + JSON.stringify({ + UUID: "UUID1", + description: "description1", + key: { name: "name1", version: "version1" } + }) + ], + result: 'SUCCESS' + }; + args.success(results1, null, jqXHR); + } else if (args.url === "requestUrl") { + var results2 = { + messages: [ + JSON.stringify({ + key: { name: "name1", version: "version1" } + }) + ], + result: 'SUCCESS' + }; + args.success(results2, null, jqXHR); + } + }); + mod.ajax_getWithKeyInfo("requestUrl", myCallback, undefined); }); test('Test ajax_getWithKeyInfo with custom key success', (done) => { const myCallback = jest.fn((actual) => { expect(actual).toEqual({ - customKey: { - name: "name1", - version: "version1" - }, + customKey: { name: "name1", version: "version1" }, uuid: "UUID1", description: "description1" }); done(); }); - data.messages = [ - '{"apexKeyInfo": {"UUID": "UUID1", "description": "description1", "key":{"name": "name1",' + - ' "version": "version1"}}, "objectType": {"customKey": {"name": "name1", "version": "version1"}}}' - ]; const jqXHR = {status: 200, responseText: ""}; $.ajax = jest.fn().mockImplementation((args) => { - args.success(data, null, jqXHR); - }); - mod.ajax_getWithKeyInfo("requestUrl", "objectType", myCallback, "customKey"); + if (args.url.endsWith("/KeyInformation/Get?name=&version=")) { + var results1 = { + messages: [ + JSON.stringify({ + UUID: "UUID1", + description: "description1", + key: { name: "name1", version: "version1" } + }) + ], + result: 'SUCCESS' + }; + args.success(results1, null, jqXHR); + } else if (args.url === "requestUrl") { + var results2 = { + messages: [ + JSON.stringify({ + customKey: { name: "name1", version: "version1" } + }) + ], + result: 'SUCCESS' + }; + args.success(results2, null, jqXHR); + } + }); + mod.ajax_getWithKeyInfo("requestUrl", myCallback, "customKey"); }); test('Test ajax_delete error', () => { diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexContextAlbumEditForm.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexContextAlbumEditForm.test.js index e5268fe..61f4e8e 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexContextAlbumEditForm.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexContextAlbumEditForm.test.js @@ -25,9 +25,7 @@ const formUtils_generateDescription = require('../ApexFormUtils'); let data = { messages: [ - '{"apexContextSchema": {"key":{"name": "name1", "version": "version1"}}, "apexTask":{"key":{"name": "name1", "version": "version1"}},' + - '"apexContextAlbum":{"key":{"name": "name1", "version": "version1"},"itemSchema":{}},"apexEvent":{"key":{"name": "name1", "version": "version1"}},' + - '"apexPolicy":{"policyKey":{"name": "name1", "version": "version1"}}, "apexKeyInfo":{"key":{"name": "name1", "version": "version1"}}}' + JSON.stringify({key: {name: "name1", version: "0.0.1"}, itemSchema: {}}) ], result: 'SUCCESS' }; diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexContextSchemaTab.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexContextSchemaTab.test.js index 9c7ca8c..243190f 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexContextSchemaTab.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexContextSchemaTab.test.js @@ -20,11 +20,9 @@ const mod = require('../ApexContextSchemaTab'); -let data = { +const data = { messages: [ - '{"apexContextSchema": {"key":{"name": "name1", "version": "version1"}}, "apexTask":{"key":{"name": "name1", "version": "version1"}},' + - '"apexContextAlbum":{"key":{"name": "name1", "version": "version1"}},"apexEvent":{"key":{"name": "name1", "version": "version1"}},' + - '"apexPolicy":{"policyKey":{"name": "name1", "version": "version1"}}, "apexKeyInfo":{"key":{"name": "name1", "version": "version1"}}}' + JSON.stringify({key: {name: "name1", version: "0.0.1"}}) ], result: 'SUCCESS' }; diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexEventEditForm.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexEventEditForm.test.js index c1ac98b..f98577e 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexEventEditForm.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexEventEditForm.test.js @@ -26,9 +26,7 @@ const keyInformationTab_reset = require('../ApexKeyInformationTab'); let data = { messages: [ - '{"apexContextSchema": {"key":{"name": "name1", "version": "version1"}}, "apexTask":{"key":{"name": "name1", "version": "version1"}},' + - '"apexContextAlbum":{"key":{"name": "name1", "version": "version1"}},"apexEvent":{"key":{"name": "name1", "version": "version1"}},' + - '"apexPolicy":{"policyKey":{"name": "name1", "version": "version1"}}, "apexKeyInfo":{"key":{"name": "name1", "version": "version1"}}}' + JSON.stringify({key: {name: "name1", version: "0.0.1"}}) ], result: 'SUCCESS' }; diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexEventTab.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexEventTab.test.js index 50d1101..cc9f722 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexEventTab.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexEventTab.test.js @@ -29,18 +29,23 @@ test('Test activate', () => { document.body.innerHTML = '<div id="eventsTab"></div>'; const data = { - useHttps: 'useHttps', - hostname: 'hostname', - port: 'port', - username: 'username', - password: 'password', messages: [ - '{"apexEvent" : {"key": {"name": "name1", "version":"version1"}, "nameSpace":"nameSpace1",' + - ' "source":"source1", "target":"target1", "parameter": ' + - '{"entry": [{"key": "key1", "value": {"optional":"optional", "fieldSchemaKey": ' + - '{"name": "name2", "version":"version2"}}}]}}}' + JSON.stringify({ + key: { name: "name1", version: "version1" }, + nameSpace: "nameSpace1", + source: "source1", + target: "target1", + parameter: { + entry: [{ + key: "key1", + value: { + optional: "optional", + fieldSchemaKey: { name: "name2", version: "version2" } + } + }] + } + }) ], - content: ['01', '02'], result: 'SUCCESS' }; diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexFiles.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexFiles.test.js index 9e2307a..566939c 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexFiles.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexFiles.test.js @@ -21,11 +21,9 @@ const mod = require('../ApexFiles'); const resultForm_activate = require('../ApexResultForm'); -let data = { +const data = { messages: [ - '{"apexContextSchema": {"key":{"name": "name1", "version": "version1"}}, "apexTask":{"key":{"name": "name1", "version": "version1"}},' + - '"apexContextAlbum":{"key":{"name": "name1", "version": "version1"},"itemSchema":{}},"apexEvent":{"key":{"name": "name1", "version": "version1"}},' + - '"apexPolicy":{"policyKey":{"name": "name1", "version": "version1"}}, "apexKeyInfo":{"key":{"name": "name1", "version": "version1"}}}' + JSON.stringify({key: {name: "name1", version: "0.0.1"}}) ], result: 'SUCCESS' }; diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexKeyInformationTab.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexKeyInformationTab.test.js index fb49214..260454a 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexKeyInformationTab.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexKeyInformationTab.test.js @@ -23,16 +23,13 @@ const ApexKeyInformationTab = require("../ApexKeyInformationTab"); test("Test keyInformationTab_activate", () => { document.body.innerHTML = '<div id ="keyInformationTab"></div>'; const data = { - useHttps: 'useHttps', - hostname: 'hostname', - port: 'port', - username: 'username', - password: 'password', messages: [ - '{"apexKeyInfo": {"UUID": "UUID1", "description": "description1", "key":{"name": "name1", "version":' + - ' "version1"}}, "objectType": {"key": {"name": "name1", "version": "version1"}}}' + JSON.stringify({ + UUID: "UUID1", + description: "description1", + key: {name: "name1", version: "version1"} + }) ], - content: ['01', '02'], result: 'SUCCESS' }; $.ajax = jest.fn().mockImplementation((args) => { diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexMain.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexMain.test.js index c825370..8018577 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexMain.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexMain.test.js @@ -31,16 +31,8 @@ require('../../dist/js/jquery-ui-1.12.1/jquery-ui.js'); const data = { messages: [ - '{' + - ' "apexArtifactKey": {' + - ' "key": {' + - ' "name": "name1",' + - ' "version": "version1"' + - ' }' + - ' }' + - '}' + JSON.stringify({ key: { name: "name1", version: "version1" }}) ], - content: ['01', '02'], result: 'SUCCESS' }; diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexPolicyEditForm.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexPolicyEditForm.test.js index fc92934..202ebc9 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexPolicyEditForm.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexPolicyEditForm.test.js @@ -31,9 +31,10 @@ const policy = { } let data = { messages: [ - '{"apexContextSchema": {"key":{"name": "name1", "version": "version1"}}, "apexTask":{"key":{"name": "name1", "version": "version1"}},' + - '"apexContextAlbum":{"key":{"name": "name1", "version": "version1"}},"apexEvent":{"key":{"name": "name1", "version": "version1"}},' + - '"apexPolicy":{"policyKey":{"name": "name1", "version": "version1"}}, "apexKeyInfo":{"key":{"name": "name1", "version": "version1"}}}' + JSON.stringify({ + key: {name: "name1", version: "0.0.1"}, + policyKey: {name: "name1", version: "0.0.1"}, + }) ], result: 'SUCCESS' }; diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexPolicyTab.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexPolicyTab.test.js index 58714c6..50ec488 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexPolicyTab.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexPolicyTab.test.js @@ -28,158 +28,150 @@ test('Test policyTab_activate', () => { document.body.innerHTML = '<div id="policiesTab"></div>'; const data = { - useHttps: 'useHttps', - hostname: 'hostname', - port: 'port', - username: 'username', - password: 'password', messages: [ - '{' + - ' "apexPolicy": {' + - ' "policyKey": {' + - ' "name": "name1",' + - ' "version": "version1"' + - ' },' + - ' "template": "template1",' + - ' "firstState": "key11",' + - ' "state": {' + - ' "entry": [' + - ' {' + - ' "key": "key1",' + - ' "value": {' + - ' "trigger": {' + - ' "name": "name2",' + - ' "version": "version2"' + - ' },' + - ' "taskReferences": {' + - ' "entry": [' + - ' {' + - ' "key": {' + - ' "name": "name3",' + - ' "version": "version3"' + - ' },' + - ' "version": "version2",' + - ' "value": {' + - ' "outputType": "outputType1",' + - ' "output": {' + - ' "localName": "localName1"' + - ' }' + - ' }' + - ' }' + - ' ]' + - ' },' + - ' "defaultTask": {' + - ' "name": "name4",' + - ' "version": "version4"' + - ' },' + - ' "taskSelectionLogic": {' + - ' "logicFlavour": "logicFlavour1"' + - ' },' + - ' "stateOutputs": {' + - ' "entry": [' + - ' {' + - ' "key": "key2",' + - ' "value": {' + - ' "nextState": {' + - ' "localName": "localName2"' + - ' },' + - ' "outgoingEvent": {' + - ' "name": "name4",' + - ' "version": "version4"' + - ' }' + - ' }' + - ' }' + - ' ]' + - ' },' + - ' "stateFinalizerLogicMap": {' + - ' "entry": [' + - ' {' + - ' "key": "key3",' + - ' "value": {' + - ' "logicFlavour": "logicFlavour2"' + - ' }' + - ' }' + - ' ]' + - ' },' + - ' "contextAlbumReference": [' + - ' {' + - ' "name": "name5",' + - ' "version": "version5"' + - ' }' + - ' ]' + - ' }' + - ' },' + - ' {' + - ' "key": "key11",' + - ' "value": {' + - ' "trigger": {' + - ' "name": "name12",' + - ' "version": "version12"' + - ' },' + - ' "taskReferences": {' + - ' "entry": [' + - ' {' + - ' "key": {' + - ' "name": "name13",' + - ' "version": "version13"' + - ' },' + - ' "version": "version12",' + - ' "value": {' + - ' "outputType": "outputType11",' + - ' "output": {' + - ' "localName": "localName11"' + - ' }' + - ' }' + - ' }' + - ' ]' + - ' },' + - ' "defaultTask": {' + - ' "name": "name14",' + - ' "version": "version14"' + - ' },' + - ' "taskSelectionLogic": {' + - ' "logicFlavour": "logicFlavour11"' + - ' },' + - ' "stateOutputs": {' + - ' "entry": [' + - ' {' + - ' "key": "key12",' + - ' "value": {' + - ' "nextState": {' + - ' "localName": "localName12"' + - ' },' + - ' "outgoingEvent": {' + - ' "name": "name14",' + - ' "version": "version14"' + - ' }' + - ' }' + - ' }' + - ' ]' + - ' },' + - ' "stateFinalizerLogicMap": {' + - ' "entry": [' + - ' {' + - ' "key": "key13",' + - ' "value": {' + - ' "logicFlavour": "logicFlavour12"' + - ' }' + - ' }' + - ' ]' + - ' },' + - ' "contextAlbumReference": [' + - ' {' + - ' "name": "name15",' + - ' "version": "version15"' + - ' }' + - ' ]' + - ' }' + - ' }' + - ' ]' + - ' }' + - ' }' + - '}' + JSON.stringify({ + policyKey: { + name: "name1", + version: "version1" + }, + template: "template1", + firstState: "key11", + state: { + entry: [ + { + key: "key1", + value: { + trigger: { + name: "name2", + version: "version2" + }, + taskReferences: { + entry: [ + { + key: { + name: "name3", + version: "version3" + }, + version: "version2", + value: { + outputType: "outputType1", + output: { + localName: "localName1" + } + } + } + ] + }, + defaultTask: { + name: "name4", + version: "version4" + }, + taskSelectionLogic: { + logicFlavour: "logicFlavour1" + }, + stateOutputs: { + entry: [ + { + key: "key2", + value: { + nextState: { + localName: "localName2" + }, + outgoingEvent: { + name: "name4", + version: "version4" + } + } + } + ] + }, + stateFinalizerLogicMap: { + entry: [ + { + key: "key3", + value: { + logicFlavour: "logicFlavour2" + } + } + ] + }, + contextAlbumReference: [ + { + name: "name5", + version: "version5" + } + ] + } + }, + { + key: "key11", + value: { + trigger: { + name: "name12", + version: "version12" + }, + taskReferences: { + entry: [ + { + key: { + name: "name13", + version: "version13" + }, + version: "version12", + value: { + outputType: "outputType11", + output: { + localName: "localName11" + } + } + } + ] + }, + defaultTask: { + name: "name14", + version: "version14" + }, + taskSelectionLogic: { + logicFlavour: "logicFlavour11" + }, + stateOutputs: { + entry: [ + { + key: "key12", + value: { + nextState: { + localName: "localName12" + }, + outgoingEvent: { + name: "name14", + version: "version14" + } + } + } + ] + }, + stateFinalizerLogicMap: { + entry: [ + { + key: "key13", + value: { + logicFlavour: "logicFlavour12" + } + } + ] + }, + contextAlbumReference: [ + { + name: "name15", + version: "version15" + } + ] + } + } + ] + } + }) ], - content: ['01', '02'], result: 'SUCCESS' }; diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskEditForm.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskEditForm.test.js index fdc30d7..d2f8eaa 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskEditForm.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskEditForm.test.js @@ -42,8 +42,6 @@ const task = { taskLogic: { logicFlavour: 'testFlav' }, - inputFields : {entry: [{key: "key1", value: {fieldSchemaKey: { name : "name2", version : "version2"}}}]}, - outputFields : {entry: [{key: "key01", value: {fieldSchemaKey: { name : "name02", version : "version02"}}}]}, taskParameters: {entry: [{key: 'testKey',value: {defaultValue: 'testValue'}}]}, contextAlbumReference : [{name : 'contextEntry.name',version : 'contextEntry.version', displaytext : 'contextName'}, {name : 'contextEntry.name2',version : 'contextEntry.version2', displaytext : 'contextName2'}, @@ -52,9 +50,7 @@ const task = { let data = { messages: [ - '{"apexContextSchema": {"key":{"name": "name1", "version": "version1"}}, "apexTask":{"key":{"name": "name1", "version": "version1"}},' + - '"apexContextAlbum":{"key":{"name": "name1", "version": "version1"}},"apexEvent":{"key":{"name": "name1", "version": "version1"}},' + - '"apexPolicy":{"policyKey":{"name": "name1", "version": "version1"}}, "apexKeyInfo":{"key":{"name": "name1", "version": "version1"}}}' + JSON.stringify({key: {name: "name1", version: "0.0.1"}}) ], result: 'SUCCESS' }; @@ -116,22 +112,6 @@ test('Test Edit Task Inner', () => { expect(mock_activate).toBeCalled(); }); -test('Test editTaskForm_addTaskInputField', () => { - const mock_activate = jest.fn(mod.editTaskForm_addTaskInputField); - let contextSchemas = new Array(); - contextSchemas.push(contextSchema); - mock_activate(parentTBody, true, 'name', null, contextSchema, contextSchemas); - expect(mock_activate).toBeCalled(); -}); - -test('Test editTaskForm_addTaskOutputField', () => { - const mock_activate = jest.fn(mod.editTaskForm_addTaskOutputField); - let contextSchemas = new Array(); - contextSchemas.push(contextSchema); - mock_activate(parentTBody, true, 'name', null, contextSchema, contextSchemas); - expect(mock_activate).toBeCalled(); -}); - test('Test editTaskForm_addTaskParameter', () => { const mock_activate = jest.fn(mod.editTaskForm_addTaskParameter); mock_activate(parentTBody, true, 'name', null); @@ -200,9 +180,9 @@ test('Test editTaskForm_submitPressed with page', () => { document.documentElement.innerHTML = '<html><head></head><body>' + '<table id="editTaskFormInputFieldsTable" value="v0">' + - '<tr class="table" inputfield_id="a1" outputfield_id="b1" param_id="c1" context_id="d1" value="v1"><td>cell1</td><td>cell2</td></tr>' + - '<tr class="table" inputfield_id="a2" outputfield_id="b2" param_id="c2" context_id="d2" value="v2"><td>cell3</td><td>cell4</td></tr>' + - '<tr class="table" inputfield_id="a3" outputfield_id="b3" param_id="c3" context_id="d3" value="v3"><td>cell5</td><td>cell6</td></tr>' + + '<tr class="table" param_id="a1" context_id="b1" value="v1"><td>cell1</td><td>cell2</td></tr>' + + '<tr class="table" param_id="a2" context_id="b2" value="v2"><td>cell3</td><td>cell4</td></tr>' + + '<tr class="table" param_id="a3" context_id="b3" value="v3"><td>cell5</td><td>cell6</td></tr>' + '</table>' + '</body></html>'; let documentSpy = jest.spyOn(document, 'getElementById'); diff --git a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskTab.test.js b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskTab.test.js index bf5faee..4f0d94f 100644 --- a/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskTab.test.js +++ b/gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskTab.test.js @@ -22,13 +22,13 @@ const mod = require('../ApexTaskTab'); let data = { messages: [ - '{"apexContextSchema": {"key":{"name": "name1", "version": "version1"}}, "apexTask":{"key":{"name": "name1", "version": "version1"},' + - '"taskLogic":{"logicFlavour":"logicFlavour"},"inputFields":{"entry": [{"key":"","value":{"fieldSchemaKey":{"name":"name"}}}]},' + - '"outputFields":{"entry": [{"key":"","value":{"fieldSchemaKey":{"name":"name"}}}]},' + - '"taskParameters":{"entry": [{"key":"","value":{"fieldSchemaKey":{"name":"name"}}}]},'+ - '"contextAlbumReference":[{"name":"name", "version":"version"}]},'+ - '"apexContextAlbum":{"key":{"name": "name1", "version": "version1"}},"apexEvent":{"key":{"name": "name1", "version": "version1"}},' + - '"apexPolicy":{"policyKey":{"name": "name1", "version": "version1"}}, "apexKeyInfo":{"key":{"name": "name1", "version": "version1"}}}' + JSON.stringify({ + key: {name: "name1", version: "version1"}, + taskLogic: {logicFlavour: "logicFlavour"}, + taskParameters: {entry: [{key: "", value: {fieldSchemaKey: {name: "name"}}}]}, + contextAlbumReference: [{name: "name", version: "version"}], + policyKey: {name: "name1", version: "version1"}, + }) ], result: 'SUCCESS' }; |