From 0226a7a3bdd111d715f2cc0376c9f747077d60ba Mon Sep 17 00:00:00 2001 From: cristinaj Date: Mon, 15 Jul 2019 21:24:57 +0300 Subject: [PATCH] Change the old VisibilityCondition format with the new one (#4934) --- .../form-field}/visibility-condition.e2e.ts | 2 +- .../forms/checkbox-visibility-condition.ts | 394 +++++++++--------- 2 files changed, 193 insertions(+), 203 deletions(-) rename e2e/{core/form => process-services-cloud/form-field}/visibility-condition.e2e.ts (99%) diff --git a/e2e/core/form/visibility-condition.e2e.ts b/e2e/process-services-cloud/form-field/visibility-condition.e2e.ts similarity index 99% rename from e2e/core/form/visibility-condition.e2e.ts rename to e2e/process-services-cloud/form-field/visibility-condition.e2e.ts index 28f549e0d6..726f0a792f 100644 --- a/e2e/core/form/visibility-condition.e2e.ts +++ b/e2e/process-services-cloud/form-field/visibility-condition.e2e.ts @@ -24,7 +24,7 @@ import { UsersActions } from '../../actions/users.actions'; import { FormCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/cloudFormDemoPage'; import { checkboxVisibilityForm } from '../../resources/forms/checkbox-visibility-condition'; -describe('Visibility conditions', () => { +describe('Visibility conditions - cloud', () => { const loginPage = new LoginPage(); const navigationBarPage = new NavigationBarPage(); diff --git a/e2e/resources/forms/checkbox-visibility-condition.ts b/e2e/resources/forms/checkbox-visibility-condition.ts index 91c8cc2f16..4ce38ba090 100644 --- a/e2e/resources/forms/checkbox-visibility-condition.ts +++ b/e2e/resources/forms/checkbox-visibility-condition.ts @@ -17,206 +17,196 @@ /* tslint:disable */ export const checkboxVisibilityForm = `{ - "formRepresentation": { - "id": "form-412cdeab-de90-4099-875f-676366e48fc9", - "name": "test", - "description": "", - "version": 0, - "formDefinition": { - "tabs": [], - "fields": [ - { - "id": "85a4f564-2c70-438a-ae0f-b9c8af4887c2", - "name": "Label", - "type": "container", - "tab": null, - "numberOfColumns": 2, - "fields": { - "1": [ - { - "id": "CheckboxFieldField", - "name": "CheckboxFieldField", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftFormFieldId": "textOne", - "leftRestResponseId": "", - "operator": "==", - "rightValue": "", - "rightType": null, - "rightFormFieldId": "textTwo", - "rightRestResponseId": "", - "nextConditionOperator": "" - }, - "params": { - "existingColspan": 1, - "maxColspan": 2 - } - }, - { - "id": "CheckboxFieldVariable", - "name": "CheckboxFieldVariable", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftFormFieldId": "textOne", - "leftRestResponseId": "", - "operator": "==", - "rightValue": "", - "rightType": null, - "rightFormFieldId": "", - "rightRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b", - "nextConditionOperator": "" - }, - "params": { - "existingColspan": 1, - "maxColspan": 2 - } - }, - { - "id": "CheckboxFieldValue", - "name": "CheckboxFieldValue", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftFormFieldId": "textOne", - "leftRestResponseId": "", - "operator": "==", - "rightValue": "showCheckbox", - "rightType": null, - "rightFormFieldId": "", - "rightRestResponseId": "", - "nextConditionOperator": "", - "nextCondition": null - }, - "params": { - "existingColspan": 1, - "maxColspan": 2 - } - }, - { - "id": "CheckboxVariableValue", - "name": "CheckboxVariableValue", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftFormFieldId": "", - "leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b", - "operator": "==", - "rightValue": "showCheckbox", - "rightType": null, - "rightFormFieldId": "", - "rightRestResponseId": "", - "nextConditionOperator": "", - "nextCondition": null - }, - "params": { - "existingColspan": 1, - "maxColspan": 2 - } - }, - { - "id": "CheckboxVariableVariable", - "name": "CheckboxVariableVariable", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftFormFieldId": "", - "leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b", - "operator": "==", - "rightValue": "", - "rightType": null, - "rightFormFieldId": "", - "rightRestResponseId": "87df371a-4238-43f8-92e5-ef3f6a19f379", - "nextConditionOperator": "", - "nextCondition": null - }, - "params": { - "existingColspan": 1, - "maxColspan": 2 - } - }, - { - "id": "CheckboxVariableField", - "name": "CheckboxVariableField", - "type": "boolean", - "required": false, - "colspan": 1, - "visibilityCondition": { - "leftFormFieldId": "", - "leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b", - "operator": "==", - "rightValue": "", - "rightType": null, - "rightFormFieldId": "textOne", - "rightRestResponseId": "", - "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 - } - }, - { - "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": [ - { - "id": "cbc51284-04c4-462f-ab72-2b9f8b14907b", - "name": "varString1", - "type": "string", - "value": "showCheckbox" - }, - { - "id": "87df371a-4238-43f8-92e5-ef3f6a19f379", - "name": "varString2", - "type": "string", - "value": "showCheckbox" - } - ] - } - } + "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": "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 + } + }, + { + "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 + } + }, + { + "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 + } + }, + { + "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 + } + }, + { + "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 + } + }, + { + "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 + } + } + ], + "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 + } + } + ] + } + } + ], + "outcomes": [], + "metadata": {}, + "variables": [ + { + "id": "33c60b43-2d44-4f25-bdc4-62b34ae11b43", + "name": "varString1", + "type": "string", + "value": "showCheckbox" + }, + { + "id": "0e67eb99-46f7-424e-9a78-6df0faa5844d", + "name": "varString2", + "type": "string", + "value": "showCheckbox" + } + ] + } + } }`;