Change the old VisibilityCondition format with the new one (#4934)

This commit is contained in:
cristinaj
2019-07-15 21:24:57 +03:00
committed by Eugenio Romano
parent 76c938800f
commit 0226a7a3bd
2 changed files with 193 additions and 203 deletions

View File

@@ -24,7 +24,7 @@ import { UsersActions } from '../../actions/users.actions';
import { FormCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/cloudFormDemoPage'; import { FormCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/cloudFormDemoPage';
import { checkboxVisibilityForm } from '../../resources/forms/checkbox-visibility-condition'; import { checkboxVisibilityForm } from '../../resources/forms/checkbox-visibility-condition';
describe('Visibility conditions', () => { describe('Visibility conditions - cloud', () => {
const loginPage = new LoginPage(); const loginPage = new LoginPage();
const navigationBarPage = new NavigationBarPage(); const navigationBarPage = new NavigationBarPage();

View File

@@ -18,15 +18,16 @@
/* tslint:disable */ /* tslint:disable */
export const checkboxVisibilityForm = `{ export const checkboxVisibilityForm = `{
"formRepresentation": { "formRepresentation": {
"id": "form-412cdeab-de90-4099-875f-676366e48fc9", "id": "form-fb9245f6-1132-47bd-b0b3-823bb85002da",
"name": "test", "name": "test",
"description": "", "description": "",
"version": 0, "version": 0,
"standAlone": true,
"formDefinition": { "formDefinition": {
"tabs": [], "tabs": [],
"fields": [ "fields": [
{ {
"id": "85a4f564-2c70-438a-ae0f-b9c8af4887c2", "id": "f3445185-b9af-41f7-a836-3b5712abeb0f",
"name": "Label", "name": "Label",
"type": "container", "type": "container",
"tab": null, "tab": null,
@@ -40,14 +41,13 @@ export const checkboxVisibilityForm = `{
"required": false, "required": false,
"colspan": 1, "colspan": 1,
"visibilityCondition": { "visibilityCondition": {
"leftFormFieldId": "textOne", "leftType": "field",
"leftRestResponseId": "", "leftValue": "textOne",
"operator": "==", "operator": "==",
"rightValue": "", "rightValue": "textTwo",
"rightType": null, "rightType": "field",
"rightFormFieldId": "textTwo", "nextConditionOperator": "",
"rightRestResponseId": "", "nextCondition": null
"nextConditionOperator": ""
}, },
"params": { "params": {
"existingColspan": 1, "existingColspan": 1,
@@ -61,13 +61,11 @@ export const checkboxVisibilityForm = `{
"required": false, "required": false,
"colspan": 1, "colspan": 1,
"visibilityCondition": { "visibilityCondition": {
"leftFormFieldId": "textOne", "leftType": "field",
"leftRestResponseId": "", "leftValue": "textOne",
"operator": "==", "operator": "==",
"rightValue": "", "rightValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
"rightType": null, "rightType": "variable",
"rightFormFieldId": "",
"rightRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b",
"nextConditionOperator": "" "nextConditionOperator": ""
}, },
"params": { "params": {
@@ -82,13 +80,11 @@ export const checkboxVisibilityForm = `{
"required": false, "required": false,
"colspan": 1, "colspan": 1,
"visibilityCondition": { "visibilityCondition": {
"leftFormFieldId": "textOne", "leftType": "field",
"leftRestResponseId": "", "leftValue": "textOne",
"operator": "==", "operator": "==",
"rightValue": "showCheckbox", "rightValue": "showCheckbox",
"rightType": null, "rightType": "value",
"rightFormFieldId": "",
"rightRestResponseId": "",
"nextConditionOperator": "", "nextConditionOperator": "",
"nextCondition": null "nextCondition": null
}, },
@@ -104,13 +100,11 @@ export const checkboxVisibilityForm = `{
"required": false, "required": false,
"colspan": 1, "colspan": 1,
"visibilityCondition": { "visibilityCondition": {
"leftFormFieldId": "", "leftType": "variable",
"leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b", "leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
"operator": "==", "operator": "==",
"rightValue": "showCheckbox", "rightValue": "showCheckbox",
"rightType": null, "rightType": "value",
"rightFormFieldId": "",
"rightRestResponseId": "",
"nextConditionOperator": "", "nextConditionOperator": "",
"nextCondition": null "nextCondition": null
}, },
@@ -126,13 +120,11 @@ export const checkboxVisibilityForm = `{
"required": false, "required": false,
"colspan": 1, "colspan": 1,
"visibilityCondition": { "visibilityCondition": {
"leftFormFieldId": "", "leftType": "variable",
"leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b", "leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
"operator": "==", "operator": "==",
"rightValue": "", "rightValue": "0e67eb99-46f7-424e-9a78-6df0faa5844d",
"rightType": null, "rightType": "variable",
"rightFormFieldId": "",
"rightRestResponseId": "87df371a-4238-43f8-92e5-ef3f6a19f379",
"nextConditionOperator": "", "nextConditionOperator": "",
"nextCondition": null "nextCondition": null
}, },
@@ -148,13 +140,11 @@ export const checkboxVisibilityForm = `{
"required": false, "required": false,
"colspan": 1, "colspan": 1,
"visibilityCondition": { "visibilityCondition": {
"leftFormFieldId": "", "leftType": "variable",
"leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b", "leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
"operator": "==", "operator": "==",
"rightValue": "", "rightValue": "textOne",
"rightType": null, "rightType": "field",
"rightFormFieldId": "textOne",
"rightRestResponseId": "",
"nextConditionOperator": "", "nextConditionOperator": "",
"nextCondition": null "nextCondition": null
}, },
@@ -205,13 +195,13 @@ export const checkboxVisibilityForm = `{
"metadata": {}, "metadata": {},
"variables": [ "variables": [
{ {
"id": "cbc51284-04c4-462f-ab72-2b9f8b14907b", "id": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
"name": "varString1", "name": "varString1",
"type": "string", "type": "string",
"value": "showCheckbox" "value": "showCheckbox"
}, },
{ {
"id": "87df371a-4238-43f8-92e5-ef3f6a19f379", "id": "0e67eb99-46f7-424e-9a78-6df0faa5844d",
"name": "varString2", "name": "varString2",
"type": "string", "type": "string",
"value": "showCheckbox" "value": "showCheckbox"