From a6ee26b35b2466050987e3530d1ba0d61b988821 Mon Sep 17 00:00:00 2001 From: Silviu Popa Date: Fri, 30 Aug 2019 13:51:56 +0300 Subject: [PATCH] =?UTF-8?q?[ADF-4843]=20-=20Automate=20more=20manual=20tes?= =?UTF-8?q?t=20cases=20for=20visibility=20chaining=20=E2=80=A6=20(#5014)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [ADF-4843] - Automate more manual test cases for visibility chaining in ADF * fix lint --- .../form-field/visibility-condition.e2e.ts | 75 ++- .../forms/checkbox-visibility-condition.ts | 414 ++++++++-------- .../forms/multiple-visibility-conditions.ts | 469 ++++++++++++++++++ 3 files changed, 747 insertions(+), 211 deletions(-) create mode 100644 e2e/resources/forms/multiple-visibility-conditions.ts diff --git a/e2e/process-services-cloud/form-field/visibility-condition.e2e.ts b/e2e/process-services-cloud/form-field/visibility-condition.e2e.ts index 919adcc79f..38850666b1 100644 --- a/e2e/process-services-cloud/form-field/visibility-condition.e2e.ts +++ b/e2e/process-services-cloud/form-field/visibility-condition.e2e.ts @@ -21,7 +21,8 @@ import { browser } from 'protractor'; import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api'; import { NavigationBarPage } from '../../pages/adf/navigationBarPage'; import { FormCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/cloudFormDemoPage'; -import { checkboxVisibilityForm, multipleCheckboxVisibilityForm } from '../../resources/forms/checkbox-visibility-condition'; +import { checkboxVisibilityFormJson, multipleCheckboxVisibilityFormJson } from '../../resources/forms/checkbox-visibility-condition'; +import { multipleVisibilityFormJson } from '../../resources/forms/multiple-visibility-conditions'; describe('Visibility conditions - cloud', () => { @@ -30,15 +31,16 @@ describe('Visibility conditions - cloud', () => { const navigationBarPage = new NavigationBarPage(); const formCloudDemoPage = new FormCloudDemoPage(); - const checkboxVisibilityFormJson = JSON.parse(checkboxVisibilityForm); - const multipleCheckboxVisibilityFormJson = JSON.parse(multipleCheckboxVisibilityForm); const widget = new Widget(); let visibleCheckbox; const widgets = { textOneId: 'textOne', - textTwoId: 'textTwo' + textTwoId: 'textTwo', + textThreeId: 'textThree', + checkboxBasicVariable: 'CheckboxBasicVariableField', + checkboxBasicField: 'CheckboxBasicFieldValue' }; const value = { @@ -179,5 +181,70 @@ describe('Visibility conditions - cloud', () => { await widget.checkboxWidget().clickCheckboxInput('Checkbox2'); await widget.checkboxWidget().isCheckboxHidden(checkbox.checkbox1); + + }); + + it('[C309650] Should be able to see Checkbox widget when has multiple visibility conditions and next condition operators', async () => { + let text1, text2; + + await formCloudDemoPage.setConfigToEditor(multipleVisibilityFormJson); + await widget.textWidget().isWidgetVisible(widgets.textOneId); + text1 = await widget.textWidget().getFieldValue(widgets.textOneId); + text2 = await widget.textWidget().getFieldValue(widgets.textTwoId); + + await expect(text1).toEqual(''); + await expect(text2).toEqual(''); + + await widget.textWidget().setValue(widgets.textOneId, 'aaa'); + text1 = await widget.textWidget().getFieldValue(widgets.textOneId); + text2 = await widget.textWidget().getFieldValue(widgets.textTwoId); + + await expect(text1).toEqual('aaa'); + await expect(text2).toEqual(''); + await widget.textWidget().isWidgetVisible(widgets.checkboxBasicVariable); + + await widget.textWidget().setValue(widgets.textOneId, 'bbb'); + text1 = await widget.textWidget().getFieldValue(widgets.textOneId); + text2 = await widget.textWidget().getFieldValue(widgets.textTwoId); + + await expect(text1).toEqual('bbb'); + await expect(text2).toEqual(''); + await widget.textWidget().isWidgetVisible(widgets.checkboxBasicField); + + await widget.textWidget().setValue(widgets.textTwoId, 'aaa'); + text1 = await widget.textWidget().getFieldValue(widgets.textOneId); + text2 = await widget.textWidget().getFieldValue(widgets.textTwoId); + + await expect(text1).toEqual('bbb'); + await expect(text2).toEqual('aaa'); + await widget.textWidget().isWidgetNotVisible(widgets.checkboxBasicField); + + await widget.textWidget().setValue(widgets.textOneId, 'aaa'); + text1 = await widget.textWidget().getFieldValue(widgets.textOneId); + text2 = await widget.textWidget().getFieldValue(widgets.textTwoId); + + await expect(text1).toEqual('aaa'); + await expect(text2).toEqual('aaa'); + await widget.textWidget().isWidgetNotVisible(widgets.checkboxBasicField); + }); + + it('[C312443] Should be able to see Checkbox widget when has multiple visibility conditions and OR NOT next condition operators', async () => { + await formCloudDemoPage.setConfigToEditor(multipleVisibilityFormJson); + + await widget.textWidget().setValue(widgets.textTwoId, 'test'); + await widget.textWidget().setValue(widgets.textThreeId, 'test'); + await widget.textWidget().isWidgetNotVisible(widgets.textOneId); + + await widget.textWidget().setValue(widgets.textTwoId, 'test'); + await widget.textWidget().setValue(widgets.textThreeId, 'something'); + await widget.textWidget().isWidgetVisible(widgets.textOneId); + + await widget.textWidget().setValue(widgets.textTwoId, 'something'); + await widget.textWidget().setValue(widgets.textThreeId, 'test'); + await widget.textWidget().isWidgetVisible(widgets.textOneId); + + await widget.textWidget().setValue(widgets.textTwoId, 'something'); + await widget.textWidget().setValue(widgets.textThreeId, 'something'); + await widget.textWidget().isWidgetVisible(widgets.textOneId); }); }); diff --git a/e2e/resources/forms/checkbox-visibility-condition.ts b/e2e/resources/forms/checkbox-visibility-condition.ts index 502fc870e0..2f5d355b71 100644 --- a/e2e/resources/forms/checkbox-visibility-condition.ts +++ b/e2e/resources/forms/checkbox-visibility-condition.ts @@ -16,271 +16,271 @@ */ /* tslint:disable */ -export const checkboxVisibilityForm = `{ - "formRepresentation": { - "id": "form-fb9245f6-1132-47bd-b0b3-823bb85002da", - "name": "test", - "description": "", - "version": 0, - "standAlone": true, - "formDefinition": { - "tabs": [], - "fields": [ +export const checkboxVisibilityFormJson = { + formRepresentation: { + id: 'form-fb9245f6-1132-47bd-b0b3-823bb85002da', + name: 'test', + description: '', + version: 0, + standAlone: true, + formDefinition: { + tabs: [], + fields: [ { - "id": "f3445185-b9af-41f7-a836-3b5712abeb0f", - "name": "Label", - "type": "container", - "tab": null, - "numberOfColumns": 2, - "fields": { - "1": [ + id: 'f3445185-b9af-41f7-a836-3b5712abeb0f', + name: 'Label', + type: 'container', + tab: null, + numberOfColumns: 2, + fields: { + 1: [ { - "id": "CheckboxFieldField", - "name": "CheckboxFieldField", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftType": "field", - "leftValue": "textOne", - "operator": "==", - "rightValue": "textTwo", - "rightType": "field", - "nextConditionOperator": "", - "nextCondition": null + id: 'CheckboxFieldField', + name: 'CheckboxFieldField', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftType: 'field', + leftValue: 'textOne', + operator: '==', + rightValue: 'textTwo', + rightType: 'field', + nextConditionOperator: '', + nextCondition: null }, - "params": { - "existingColspan": 1, - "maxColspan": 2 + params: { + existingColspan: 1, + maxColspan: 2 } }, { - "id": "CheckboxFieldVariable", - "name": "CheckboxFieldVariable", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftType": "field", - "leftValue": "textOne", - "operator": "==", - "rightValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43", - "rightType": "variable", - "nextConditionOperator": "" + id: 'CheckboxFieldVariable', + name: 'CheckboxFieldVariable', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftType: 'field', + leftValue: 'textOne', + operator: '==', + rightValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43', + rightType: 'variable', + nextConditionOperator: '' }, - "params": { - "existingColspan": 1, - "maxColspan": 2 + params: { + existingColspan: 1, + maxColspan: 2 } }, { - "id": "CheckboxFieldValue", - "name": "CheckboxFieldValue", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftType": "field", - "leftValue": "textOne", - "operator": "==", - "rightValue": "showCheckbox", - "rightType": "value", - "nextConditionOperator": "", - "nextCondition": null + id: 'CheckboxFieldValue', + name: 'CheckboxFieldValue', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftType: 'field', + leftValue: 'textOne', + operator: '==', + rightValue: 'showCheckbox', + rightType: 'value', + nextConditionOperator: '', + nextCondition: null }, - "params": { - "existingColspan": 1, - "maxColspan": 2 + params: { + existingColspan: 1, + maxColspan: 2 } }, { - "id": "CheckboxVariableValue", - "name": "CheckboxVariableValue", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftType": "variable", - "leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43", - "operator": "==", - "rightValue": "showCheckbox", - "rightType": "value", - "nextConditionOperator": "", - "nextCondition": null + id: 'CheckboxVariableValue', + name: 'CheckboxVariableValue', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftType: 'variable', + leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43', + operator: '==', + rightValue: 'showCheckbox', + rightType: 'value', + nextConditionOperator: '', + nextCondition: null }, - "params": { - "existingColspan": 1, - "maxColspan": 2 + params: { + existingColspan: 1, + maxColspan: 2 } }, { - "id": "CheckboxVariableVariable", - "name": "CheckboxVariableVariable", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftType": "variable", - "leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43", - "operator": "==", - "rightValue": "0e67eb99-46f7-424e-9a78-6df0faa5844d", - "rightType": "variable", - "nextConditionOperator": "", - "nextCondition": null + id: 'CheckboxVariableVariable', + name: 'CheckboxVariableVariable', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftType: 'variable', + leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43', + operator: '==', + rightValue: '0e67eb99-46f7-424e-9a78-6df0faa5844d', + rightType: 'variable', + nextConditionOperator: '', + nextCondition: null }, - "params": { - "existingColspan": 1, - "maxColspan": 2 + params: { + existingColspan: 1, + maxColspan: 2 } }, { - "id": "CheckboxVariableField", - "name": "CheckboxVariableField", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftType": "variable", - "leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43", - "operator": "==", - "rightValue": "textOne", - "rightType": "field", - "nextConditionOperator": "", - "nextCondition": null + id: 'CheckboxVariableField', + name: 'CheckboxVariableField', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftType: 'variable', + leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43', + operator: '==', + rightValue: 'textOne', + rightType: 'field', + nextConditionOperator: '', + nextCondition: null }, - "params": { - "existingColspan": 1, - "maxColspan": 2 + params: { + existingColspan: 1, + maxColspan: 2 } } ], - "2": [ + 2: [ { - "id": "textOne", - "name": "textOne", - "type": "text", - "required": false, - "colspan": 1, - "placeholder": null, - "minLength": 0, - "maxLength": 0, - "regexPattern": null, - "visibilityCondition": null, - "params": { - "existingColspan": 1, - "maxColspan": 2 + id: 'textOne', + name: 'textOne', + type: 'text', + required: false, + colspan: 1, + placeholder: null, + minLength: 0, + maxLength: 0, + regexPattern: null, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 } }, { - "id": "textTwo", - "name": "textTwo", - "type": "text", - "required": false, - "colspan": 1, - "placeholder": null, - "minLength": 0, - "maxLength": 0, - "regexPattern": null, - "visibilityCondition": null, - "params": { - "existingColspan": 1, - "maxColspan": 2 + id: 'textTwo', + name: 'textTwo', + type: 'text', + required: false, + colspan: 1, + placeholder: null, + minLength: 0, + maxLength: 0, + regexPattern: null, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 } } ] } } ], - "outcomes": [], - "metadata": {}, - "variables": [ + outcomes: [], + metadata: {}, + variables: [ { - "id": "33c60b43-2d44-4f25-bdc4-62b34ae11b43", - "name": "varString1", - "type": "string", - "value": "showCheckbox" + id: '33c60b43-2d44-4f25-bdc4-62b34ae11b43', + name: 'varString1', + type: 'string', + value: 'showCheckbox' }, { - "id": "0e67eb99-46f7-424e-9a78-6df0faa5844d", - "name": "varString2", - "type": "string", - "value": "showCheckbox" + id: '0e67eb99-46f7-424e-9a78-6df0faa5844d', + name: 'varString2', + type: 'string', + value: 'showCheckbox' } ] } } -}`; +}; -export const multipleCheckboxVisibilityForm = `{ - "formRepresentation": { - "id": "form-589a5b5d-da10-4af7-a5be-7dad2482dc19", - "name": "newtestform", - "description": "", - "version": 0, - "standAlone": true, - "formDefinition": { - "tabs": [], - "fields": [ +export const multipleCheckboxVisibilityFormJson = { + formRepresentation: { + id: 'form-589a5b5d-da10-4af7-a5be-7dad2482dc19', + name: 'newtestform', + description: '', + version: 0, + standAlone: true, + formDefinition: { + tabs: [], + fields: [ { - "id": "438a9089-2641-498d-8e84-ffad51ea8379", - "name": "Label", - "type": "container", - "tab": null, - "numberOfColumns": 2, - "fields": { - "1": [ + id: '438a9089-2641-498d-8e84-ffad51ea8379', + name: 'Label', + type: 'container', + tab: null, + numberOfColumns: 2, + fields: { + 1: [ { - "id": "Checkbox1", - "name": "Checkbox1", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftType": "field", - "leftValue": "Checkbox2", - "operator": "!=", - "rightValue": "Checkbox3", - "rightType": "field", - "nextConditionOperator": "", - "nextCondition": null + id: 'Checkbox1', + name: 'Checkbox1', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftType: 'field', + leftValue: 'Checkbox2', + operator: '!=', + rightValue: 'Checkbox3', + rightType: 'field', + nextConditionOperator: '', + nextCondition: null }, - "params": { - "existingColspan": 1, - "maxColspan": 2 + params: { + existingColspan: 1, + maxColspan: 2 } }, { - "id": "Checkbox2", - "name": "Checkbox2", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": null, - "params": { - "existingColspan": 1, - "maxColspan": 2 + id: 'Checkbox2', + name: 'Checkbox2', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 } }, { - "id": "Checkbox3", - "name": "Checkbox3", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": null, - "params": { - "existingColspan": 1, - "maxColspan": 2 + id: 'Checkbox3', + name: 'Checkbox3', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 } } ], - "2": [] + 2: [] } } ], - "outcomes": [], - "metadata": {}, - "variables": [] + outcomes: [], + metadata: {}, + variables: [] } } -}`; +}; diff --git a/e2e/resources/forms/multiple-visibility-conditions.ts b/e2e/resources/forms/multiple-visibility-conditions.ts new file mode 100644 index 0000000000..6915197bf0 --- /dev/null +++ b/e2e/resources/forms/multiple-visibility-conditions.ts @@ -0,0 +1,469 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + export const multipleVisibilityFormJson = { + formRepresentation: { + id: 'form-417ec60f-59ec-4990-a3b4-674f2c90af8a', + name: 'testtesttest', + description: '', + version: 0, + formDefinition: { + tabs: [], + fields: [ + { + id: '693934b1-fb52-45db-8ec0-f0d0f0accbed', + name: 'Label', + type: 'container', + tab: null, + numberOfColumns: 6, + fields: { + 1: [ + { + id: 'CheckboxReq', + name: 'CheckboxReq', + type: 'boolean', + required: true, + colspan: 1, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'CheckboxNotReq', + name: 'CheckboxNotReq', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'CheckboxColspan', + name: 'CheckboxColspan', + type: 'boolean', + required: false, + colspan: 2, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'CheckboxBasicFieldValue', + name: 'CheckboxBasicFieldValue', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'CheckboxBasicFieldVariable', + name: 'CheckboxBasicFieldVariable', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftFormFieldId: 'textOne', + leftRestResponseId: '', + operator: '==', + rightValue: '', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f', + nextConditionOperator: '', + nextCondition: null + }, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'CheckboxBasicVariableField', + name: 'CheckboxBasicVariableField', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftFormFieldId: '', + leftRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f', + operator: '==', + rightValue: '', + rightType: null, + rightFormFieldId: 'textOne', + rightRestResponseId: '', + nextConditionOperator: '', + nextCondition: null + }, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'CheckboxMultiple', + name: 'CheckboxMultiple', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftFormFieldId: 'textOne', + leftRestResponseId: '', + operator: '==', + rightValue: 'aaa', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '', + nextConditionOperator: 'and', + nextCondition: { + leftFormFieldId: 'textTwo', + leftRestResponseId: '', + operator: 'not equal', + rightValue: 'aaa', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '', + nextConditionOperator: '', + nextCondition: null + } + }, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'checkboxone', + name: 'CheckboxOne', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftFormFieldId: 'textOne', + leftRestResponseId: '', + operator: '==', + rightValue: 'aaa', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '', + nextConditionOperator: 'and', + nextCondition: { + leftFormFieldId: 'textTwo', + leftRestResponseId: '', + operator: 'not equal', + rightValue: 'aaa', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '', + nextConditionOperator: 'and not', + nextCondition: { + leftFormFieldId: 'textThree', + leftRestResponseId: '', + operator: 'empty', + rightValue: '', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '', + nextConditionOperator: 'or', + nextCondition: { + leftFormFieldId: 'textfour', + leftRestResponseId: '', + operator: 'not empty', + rightValue: 'aaa', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '', + nextConditionOperator: 'or not', + nextCondition: { + leftFormFieldId: 'textfive', + leftRestResponseId: '', + operator: '==', + rightValue: 'aaa', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '', + nextConditionOperator: '', + nextCondition: null + } + } + } + } + }, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'checkboxtworeq', + name: 'CheckboxTwoReq', + type: 'boolean', + required: true, + colspan: 2, + visibilityCondition: { + leftFormFieldId: '', + leftRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f', + operator: '==', + rightValue: '', + rightType: null, + rightFormFieldId: 'textTwo', + rightRestResponseId: '', + nextConditionOperator: 'and', + nextCondition: { + leftFormFieldId: '', + leftRestResponseId: '08f66ebb-1e5c-4ae4-a8cc-ec9c674d1e40', + operator: 'not equal', + rightValue: '', + rightType: null, + rightFormFieldId: 'textOne', + rightRestResponseId: '', + nextConditionOperator: 'and not', + nextCondition: { + leftFormFieldId: '', + leftRestResponseId: '888786b1-e948-4e7a-9caa-deb2583d222f', + operator: 'not equal', + rightValue: '', + rightType: null, + rightFormFieldId: 'textThree', + rightRestResponseId: '', + nextConditionOperator: 'or', + nextCondition: { + leftFormFieldId: '', + leftRestResponseId: '5007cf47-aa68-42c0-b1ab-a98f0dff6bdc', + operator: 'not equal', + rightValue: '', + rightType: null, + rightFormFieldId: 'textfour', + rightRestResponseId: '', + nextConditionOperator: 'or not', + nextCondition: { + leftFormFieldId: '', + leftRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f', + operator: '==', + rightValue: '', + rightType: null, + rightFormFieldId: 'textfive', + rightRestResponseId: '', + nextConditionOperator: '', + nextCondition: null + } + } + } + } + }, + params: { + existingColspan: 1, + maxColspan: 2 + } + }, + { + id: 'checkboxthree', + name: 'CheckboxThree', + type: 'boolean', + required: false, + colspan: 1, + visibilityCondition: { + leftFormFieldId: 'textOne', + leftRestResponseId: '', + operator: '==', + rightValue: '', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f', + nextConditionOperator: 'and', + nextCondition: { + leftFormFieldId: 'textTwo', + leftRestResponseId: '', + operator: 'not equal', + rightValue: '', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '08f66ebb-1e5c-4ae4-a8cc-ec9c674d1e40', + nextConditionOperator: 'and not', + nextCondition: { + leftFormFieldId: 'textThree', + leftRestResponseId: '', + operator: 'not equal', + rightValue: '', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '888786b1-e948-4e7a-9caa-deb2583d222f', + nextConditionOperator: 'or', + nextCondition: { + leftFormFieldId: 'textfour', + leftRestResponseId: '', + operator: 'not equal', + rightValue: '', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '5007cf47-aa68-42c0-b1ab-a98f0dff6bdc', + nextConditionOperator: 'or not', + nextCondition: { + leftFormFieldId: 'textfive', + leftRestResponseId: '', + operator: '==', + rightValue: '', + rightType: null, + rightFormFieldId: '', + rightRestResponseId: '948aa549-5011-423e-b8a2-020e69daae5f', + nextConditionOperator: '', + nextCondition: null + } + } + } + } + }, + params: { + existingColspan: 1, + maxColspan: 2 + } + } + ], + 2: [ + { + id: 'textOne', + name: 'TextOne', + type: 'text', + required: false, + colspan: 1, + placeholder: null, + minLength: 0, + maxLength: 0, + regexPattern: null, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + } + ], + 3: [ + { + id: 'textTwo', + name: 'TextTwo', + type: 'text', + required: false, + colspan: 1, + placeholder: null, + minLength: 0, + maxLength: 0, + regexPattern: null, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + } + ], + 4: [ + { + id: 'textThree', + name: 'TextThree', + type: 'text', + required: false, + colspan: 1, + placeholder: null, + minLength: 0, + maxLength: 0, + regexPattern: null, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + } + ], + 5: [ + { + id: 'textfour', + name: 'TextFour', + type: 'text', + required: false, + colspan: 1, + placeholder: null, + minLength: 0, + maxLength: 0, + regexPattern: null, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + } + ], + 6: [ + { + id: 'textfive', + name: 'TextFive', + type: 'text', + required: false, + colspan: 1, + placeholder: null, + minLength: 0, + maxLength: 0, + regexPattern: null, + visibilityCondition: null, + params: { + existingColspan: 1, + maxColspan: 2 + } + } + ] + } + } + ], + outcomes: [], + metadata: {}, + variables: [ + { + id: '948aa549-5011-423e-b8a2-020e69daae5f', + name: 'vstring', + type: 'string', + value: 'aaa' + }, + { + id: '08f66ebb-1e5c-4ae4-a8cc-ec9c674d1e40', + name: 'vint', + type: 'integer', + value: 5 + }, + { + id: '888786b1-e948-4e7a-9caa-deb2583d222f', + name: 'vbool', + type: 'boolean', + value: true + }, + { + id: '5007cf47-aa68-42c0-b1ab-a98f0dff6bdc', + name: 'vdate', + type: 'date', + value: '2019-05-10' + } + ] + } + } +};