mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4843] - Automate more manual test cases for visibility chaining … (#5014)
* [ADF-4843] - Automate more manual test cases for visibility chaining in ADF * fix lint
This commit is contained in:
@@ -21,7 +21,8 @@ import { browser } from 'protractor';
|
|||||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||||
import { FormCloudDemoPage } from '../../pages/adf/demo-shell/process-services-cloud/cloudFormDemoPage';
|
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', () => {
|
describe('Visibility conditions - cloud', () => {
|
||||||
|
|
||||||
@@ -30,15 +31,16 @@ describe('Visibility conditions - cloud', () => {
|
|||||||
|
|
||||||
const navigationBarPage = new NavigationBarPage();
|
const navigationBarPage = new NavigationBarPage();
|
||||||
const formCloudDemoPage = new FormCloudDemoPage();
|
const formCloudDemoPage = new FormCloudDemoPage();
|
||||||
const checkboxVisibilityFormJson = JSON.parse(checkboxVisibilityForm);
|
|
||||||
const multipleCheckboxVisibilityFormJson = JSON.parse(multipleCheckboxVisibilityForm);
|
|
||||||
const widget = new Widget();
|
const widget = new Widget();
|
||||||
|
|
||||||
let visibleCheckbox;
|
let visibleCheckbox;
|
||||||
|
|
||||||
const widgets = {
|
const widgets = {
|
||||||
textOneId: 'textOne',
|
textOneId: 'textOne',
|
||||||
textTwoId: 'textTwo'
|
textTwoId: 'textTwo',
|
||||||
|
textThreeId: 'textThree',
|
||||||
|
checkboxBasicVariable: 'CheckboxBasicVariableField',
|
||||||
|
checkboxBasicField: 'CheckboxBasicFieldValue'
|
||||||
};
|
};
|
||||||
|
|
||||||
const value = {
|
const value = {
|
||||||
@@ -179,5 +181,70 @@ describe('Visibility conditions - cloud', () => {
|
|||||||
|
|
||||||
await widget.checkboxWidget().clickCheckboxInput('Checkbox2');
|
await widget.checkboxWidget().clickCheckboxInput('Checkbox2');
|
||||||
await widget.checkboxWidget().isCheckboxHidden(checkbox.checkbox1);
|
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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -16,271 +16,271 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
export const checkboxVisibilityForm = `{
|
export const checkboxVisibilityFormJson = {
|
||||||
"formRepresentation": {
|
formRepresentation: {
|
||||||
"id": "form-fb9245f6-1132-47bd-b0b3-823bb85002da",
|
id: 'form-fb9245f6-1132-47bd-b0b3-823bb85002da',
|
||||||
"name": "test",
|
name: 'test',
|
||||||
"description": "",
|
description: '',
|
||||||
"version": 0,
|
version: 0,
|
||||||
"standAlone": true,
|
standAlone: true,
|
||||||
"formDefinition": {
|
formDefinition: {
|
||||||
"tabs": [],
|
tabs: [],
|
||||||
"fields": [
|
fields: [
|
||||||
{
|
{
|
||||||
"id": "f3445185-b9af-41f7-a836-3b5712abeb0f",
|
id: 'f3445185-b9af-41f7-a836-3b5712abeb0f',
|
||||||
"name": "Label",
|
name: 'Label',
|
||||||
"type": "container",
|
type: 'container',
|
||||||
"tab": null,
|
tab: null,
|
||||||
"numberOfColumns": 2,
|
numberOfColumns: 2,
|
||||||
"fields": {
|
fields: {
|
||||||
"1": [
|
1: [
|
||||||
{
|
{
|
||||||
"id": "CheckboxFieldField",
|
id: 'CheckboxFieldField',
|
||||||
"name": "CheckboxFieldField",
|
name: 'CheckboxFieldField',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": {
|
visibilityCondition: {
|
||||||
"leftType": "field",
|
leftType: 'field',
|
||||||
"leftValue": "textOne",
|
leftValue: 'textOne',
|
||||||
"operator": "==",
|
operator: '==',
|
||||||
"rightValue": "textTwo",
|
rightValue: 'textTwo',
|
||||||
"rightType": "field",
|
rightType: 'field',
|
||||||
"nextConditionOperator": "",
|
nextConditionOperator: '',
|
||||||
"nextCondition": null
|
nextCondition: null
|
||||||
},
|
},
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "CheckboxFieldVariable",
|
id: 'CheckboxFieldVariable',
|
||||||
"name": "CheckboxFieldVariable",
|
name: 'CheckboxFieldVariable',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": {
|
visibilityCondition: {
|
||||||
"leftType": "field",
|
leftType: 'field',
|
||||||
"leftValue": "textOne",
|
leftValue: 'textOne',
|
||||||
"operator": "==",
|
operator: '==',
|
||||||
"rightValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
rightValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||||
"rightType": "variable",
|
rightType: 'variable',
|
||||||
"nextConditionOperator": ""
|
nextConditionOperator: ''
|
||||||
},
|
},
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "CheckboxFieldValue",
|
id: 'CheckboxFieldValue',
|
||||||
"name": "CheckboxFieldValue",
|
name: 'CheckboxFieldValue',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": {
|
visibilityCondition: {
|
||||||
"leftType": "field",
|
leftType: 'field',
|
||||||
"leftValue": "textOne",
|
leftValue: 'textOne',
|
||||||
"operator": "==",
|
operator: '==',
|
||||||
"rightValue": "showCheckbox",
|
rightValue: 'showCheckbox',
|
||||||
"rightType": "value",
|
rightType: 'value',
|
||||||
"nextConditionOperator": "",
|
nextConditionOperator: '',
|
||||||
"nextCondition": null
|
nextCondition: null
|
||||||
},
|
},
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "CheckboxVariableValue",
|
id: 'CheckboxVariableValue',
|
||||||
"name": "CheckboxVariableValue",
|
name: 'CheckboxVariableValue',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": {
|
visibilityCondition: {
|
||||||
"leftType": "variable",
|
leftType: 'variable',
|
||||||
"leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||||
"operator": "==",
|
operator: '==',
|
||||||
"rightValue": "showCheckbox",
|
rightValue: 'showCheckbox',
|
||||||
"rightType": "value",
|
rightType: 'value',
|
||||||
"nextConditionOperator": "",
|
nextConditionOperator: '',
|
||||||
"nextCondition": null
|
nextCondition: null
|
||||||
},
|
},
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "CheckboxVariableVariable",
|
id: 'CheckboxVariableVariable',
|
||||||
"name": "CheckboxVariableVariable",
|
name: 'CheckboxVariableVariable',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": {
|
visibilityCondition: {
|
||||||
"leftType": "variable",
|
leftType: 'variable',
|
||||||
"leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||||
"operator": "==",
|
operator: '==',
|
||||||
"rightValue": "0e67eb99-46f7-424e-9a78-6df0faa5844d",
|
rightValue: '0e67eb99-46f7-424e-9a78-6df0faa5844d',
|
||||||
"rightType": "variable",
|
rightType: 'variable',
|
||||||
"nextConditionOperator": "",
|
nextConditionOperator: '',
|
||||||
"nextCondition": null
|
nextCondition: null
|
||||||
},
|
},
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "CheckboxVariableField",
|
id: 'CheckboxVariableField',
|
||||||
"name": "CheckboxVariableField",
|
name: 'CheckboxVariableField',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": {
|
visibilityCondition: {
|
||||||
"leftType": "variable",
|
leftType: 'variable',
|
||||||
"leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
leftValue: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||||
"operator": "==",
|
operator: '==',
|
||||||
"rightValue": "textOne",
|
rightValue: 'textOne',
|
||||||
"rightType": "field",
|
rightType: 'field',
|
||||||
"nextConditionOperator": "",
|
nextConditionOperator: '',
|
||||||
"nextCondition": null
|
nextCondition: null
|
||||||
},
|
},
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"2": [
|
2: [
|
||||||
{
|
{
|
||||||
"id": "textOne",
|
id: 'textOne',
|
||||||
"name": "textOne",
|
name: 'textOne',
|
||||||
"type": "text",
|
type: 'text',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"placeholder": null,
|
placeholder: null,
|
||||||
"minLength": 0,
|
minLength: 0,
|
||||||
"maxLength": 0,
|
maxLength: 0,
|
||||||
"regexPattern": null,
|
regexPattern: null,
|
||||||
"visibilityCondition": null,
|
visibilityCondition: null,
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "textTwo",
|
id: 'textTwo',
|
||||||
"name": "textTwo",
|
name: 'textTwo',
|
||||||
"type": "text",
|
type: 'text',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"placeholder": null,
|
placeholder: null,
|
||||||
"minLength": 0,
|
minLength: 0,
|
||||||
"maxLength": 0,
|
maxLength: 0,
|
||||||
"regexPattern": null,
|
regexPattern: null,
|
||||||
"visibilityCondition": null,
|
visibilityCondition: null,
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outcomes": [],
|
outcomes: [],
|
||||||
"metadata": {},
|
metadata: {},
|
||||||
"variables": [
|
variables: [
|
||||||
{
|
{
|
||||||
"id": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
id: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||||
"name": "varString1",
|
name: 'varString1',
|
||||||
"type": "string",
|
type: 'string',
|
||||||
"value": "showCheckbox"
|
value: 'showCheckbox'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "0e67eb99-46f7-424e-9a78-6df0faa5844d",
|
id: '0e67eb99-46f7-424e-9a78-6df0faa5844d',
|
||||||
"name": "varString2",
|
name: 'varString2',
|
||||||
"type": "string",
|
type: 'string',
|
||||||
"value": "showCheckbox"
|
value: 'showCheckbox'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`;
|
};
|
||||||
|
|
||||||
export const multipleCheckboxVisibilityForm = `{
|
export const multipleCheckboxVisibilityFormJson = {
|
||||||
"formRepresentation": {
|
formRepresentation: {
|
||||||
"id": "form-589a5b5d-da10-4af7-a5be-7dad2482dc19",
|
id: 'form-589a5b5d-da10-4af7-a5be-7dad2482dc19',
|
||||||
"name": "newtestform",
|
name: 'newtestform',
|
||||||
"description": "",
|
description: '',
|
||||||
"version": 0,
|
version: 0,
|
||||||
"standAlone": true,
|
standAlone: true,
|
||||||
"formDefinition": {
|
formDefinition: {
|
||||||
"tabs": [],
|
tabs: [],
|
||||||
"fields": [
|
fields: [
|
||||||
{
|
{
|
||||||
"id": "438a9089-2641-498d-8e84-ffad51ea8379",
|
id: '438a9089-2641-498d-8e84-ffad51ea8379',
|
||||||
"name": "Label",
|
name: 'Label',
|
||||||
"type": "container",
|
type: 'container',
|
||||||
"tab": null,
|
tab: null,
|
||||||
"numberOfColumns": 2,
|
numberOfColumns: 2,
|
||||||
"fields": {
|
fields: {
|
||||||
"1": [
|
1: [
|
||||||
{
|
{
|
||||||
"id": "Checkbox1",
|
id: 'Checkbox1',
|
||||||
"name": "Checkbox1",
|
name: 'Checkbox1',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": {
|
visibilityCondition: {
|
||||||
"leftType": "field",
|
leftType: 'field',
|
||||||
"leftValue": "Checkbox2",
|
leftValue: 'Checkbox2',
|
||||||
"operator": "!=",
|
operator: '!=',
|
||||||
"rightValue": "Checkbox3",
|
rightValue: 'Checkbox3',
|
||||||
"rightType": "field",
|
rightType: 'field',
|
||||||
"nextConditionOperator": "",
|
nextConditionOperator: '',
|
||||||
"nextCondition": null
|
nextCondition: null
|
||||||
},
|
},
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "Checkbox2",
|
id: 'Checkbox2',
|
||||||
"name": "Checkbox2",
|
name: 'Checkbox2',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": null,
|
visibilityCondition: null,
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "Checkbox3",
|
id: 'Checkbox3',
|
||||||
"name": "Checkbox3",
|
name: 'Checkbox3',
|
||||||
"type": "boolean",
|
type: 'boolean',
|
||||||
"required": false,
|
required: false,
|
||||||
"colspan": 1,
|
colspan: 1,
|
||||||
"visibilityCondition": null,
|
visibilityCondition: null,
|
||||||
"params": {
|
params: {
|
||||||
"existingColspan": 1,
|
existingColspan: 1,
|
||||||
"maxColspan": 2
|
maxColspan: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"2": []
|
2: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outcomes": [],
|
outcomes: [],
|
||||||
"metadata": {},
|
metadata: {},
|
||||||
"variables": []
|
variables: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}`;
|
};
|
||||||
|
469
e2e/resources/forms/multiple-visibility-conditions.ts
Normal file
469
e2e/resources/forms/multiple-visibility-conditions.ts
Normal file
@@ -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'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
Reference in New Issue
Block a user