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__/ApexTaskEditForm.test.js | |
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__/ApexTaskEditForm.test.js')
-rw-r--r-- | gui-editors/gui-editor-apex/src/main/webapp/js/__test__/ApexTaskEditForm.test.js | 28 |
1 files changed, 4 insertions, 24 deletions
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'); |