mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Change the old VisibilityCondition format with the new one (#4934)
This commit is contained in:
committed by
Eugenio Romano
parent
76c938800f
commit
0226a7a3bd
@@ -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();
|
@@ -17,206 +17,196 @@
|
|||||||
|
|
||||||
/* 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,
|
||||||
"formDefinition": {
|
"standAlone": true,
|
||||||
"tabs": [],
|
"formDefinition": {
|
||||||
"fields": [
|
"tabs": [],
|
||||||
{
|
"fields": [
|
||||||
"id": "85a4f564-2c70-438a-ae0f-b9c8af4887c2",
|
{
|
||||||
"name": "Label",
|
"id": "f3445185-b9af-41f7-a836-3b5712abeb0f",
|
||||||
"type": "container",
|
"name": "Label",
|
||||||
"tab": null,
|
"type": "container",
|
||||||
"numberOfColumns": 2,
|
"tab": null,
|
||||||
"fields": {
|
"numberOfColumns": 2,
|
||||||
"1": [
|
"fields": {
|
||||||
{
|
"1": [
|
||||||
"id": "CheckboxFieldField",
|
{
|
||||||
"name": "CheckboxFieldField",
|
"id": "CheckboxFieldField",
|
||||||
"type": "boolean",
|
"name": "CheckboxFieldField",
|
||||||
"required": false,
|
"type": "boolean",
|
||||||
"colspan": 1,
|
"required": false,
|
||||||
"visibilityCondition": {
|
"colspan": 1,
|
||||||
"leftFormFieldId": "textOne",
|
"visibilityCondition": {
|
||||||
"leftRestResponseId": "",
|
"leftType": "field",
|
||||||
"operator": "==",
|
"leftValue": "textOne",
|
||||||
"rightValue": "",
|
"operator": "==",
|
||||||
"rightType": null,
|
"rightValue": "textTwo",
|
||||||
"rightFormFieldId": "textTwo",
|
"rightType": "field",
|
||||||
"rightRestResponseId": "",
|
"nextConditionOperator": "",
|
||||||
"nextConditionOperator": ""
|
"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": {
|
||||||
"leftFormFieldId": "textOne",
|
"leftType": "field",
|
||||||
"leftRestResponseId": "",
|
"leftValue": "textOne",
|
||||||
"operator": "==",
|
"operator": "==",
|
||||||
"rightValue": "",
|
"rightValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
||||||
"rightType": null,
|
"rightType": "variable",
|
||||||
"rightFormFieldId": "",
|
"nextConditionOperator": ""
|
||||||
"rightRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b",
|
},
|
||||||
"nextConditionOperator": ""
|
"params": {
|
||||||
},
|
"existingColspan": 1,
|
||||||
"params": {
|
"maxColspan": 2
|
||||||
"existingColspan": 1,
|
}
|
||||||
"maxColspan": 2
|
},
|
||||||
}
|
{
|
||||||
},
|
"id": "CheckboxFieldValue",
|
||||||
{
|
"name": "CheckboxFieldValue",
|
||||||
"id": "CheckboxFieldValue",
|
"type": "boolean",
|
||||||
"name": "CheckboxFieldValue",
|
"required": false,
|
||||||
"type": "boolean",
|
"colspan": 1,
|
||||||
"required": false,
|
"visibilityCondition": {
|
||||||
"colspan": 1,
|
"leftType": "field",
|
||||||
"visibilityCondition": {
|
"leftValue": "textOne",
|
||||||
"leftFormFieldId": "textOne",
|
"operator": "==",
|
||||||
"leftRestResponseId": "",
|
"rightValue": "showCheckbox",
|
||||||
"operator": "==",
|
"rightType": "value",
|
||||||
"rightValue": "showCheckbox",
|
"nextConditionOperator": "",
|
||||||
"rightType": null,
|
"nextCondition": null
|
||||||
"rightFormFieldId": "",
|
},
|
||||||
"rightRestResponseId": "",
|
"params": {
|
||||||
"nextConditionOperator": "",
|
"existingColspan": 1,
|
||||||
"nextCondition": null
|
"maxColspan": 2
|
||||||
},
|
}
|
||||||
"params": {
|
},
|
||||||
"existingColspan": 1,
|
{
|
||||||
"maxColspan": 2
|
"id": "CheckboxVariableValue",
|
||||||
}
|
"name": "CheckboxVariableValue",
|
||||||
},
|
"type": "boolean",
|
||||||
{
|
"required": false,
|
||||||
"id": "CheckboxVariableValue",
|
"colspan": 1,
|
||||||
"name": "CheckboxVariableValue",
|
"visibilityCondition": {
|
||||||
"type": "boolean",
|
"leftType": "variable",
|
||||||
"required": false,
|
"leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
||||||
"colspan": 1,
|
"operator": "==",
|
||||||
"visibilityCondition": {
|
"rightValue": "showCheckbox",
|
||||||
"leftFormFieldId": "",
|
"rightType": "value",
|
||||||
"leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b",
|
"nextConditionOperator": "",
|
||||||
"operator": "==",
|
"nextCondition": null
|
||||||
"rightValue": "showCheckbox",
|
},
|
||||||
"rightType": null,
|
"params": {
|
||||||
"rightFormFieldId": "",
|
"existingColspan": 1,
|
||||||
"rightRestResponseId": "",
|
"maxColspan": 2
|
||||||
"nextConditionOperator": "",
|
}
|
||||||
"nextCondition": null
|
},
|
||||||
},
|
{
|
||||||
"params": {
|
"id": "CheckboxVariableVariable",
|
||||||
"existingColspan": 1,
|
"name": "CheckboxVariableVariable",
|
||||||
"maxColspan": 2
|
"type": "boolean",
|
||||||
}
|
"required": false,
|
||||||
},
|
"colspan": 1,
|
||||||
{
|
"visibilityCondition": {
|
||||||
"id": "CheckboxVariableVariable",
|
"leftType": "variable",
|
||||||
"name": "CheckboxVariableVariable",
|
"leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
||||||
"type": "boolean",
|
"operator": "==",
|
||||||
"required": false,
|
"rightValue": "0e67eb99-46f7-424e-9a78-6df0faa5844d",
|
||||||
"colspan": 1,
|
"rightType": "variable",
|
||||||
"visibilityCondition": {
|
"nextConditionOperator": "",
|
||||||
"leftFormFieldId": "",
|
"nextCondition": null
|
||||||
"leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b",
|
},
|
||||||
"operator": "==",
|
"params": {
|
||||||
"rightValue": "",
|
"existingColspan": 1,
|
||||||
"rightType": null,
|
"maxColspan": 2
|
||||||
"rightFormFieldId": "",
|
}
|
||||||
"rightRestResponseId": "87df371a-4238-43f8-92e5-ef3f6a19f379",
|
},
|
||||||
"nextConditionOperator": "",
|
{
|
||||||
"nextCondition": null
|
"id": "CheckboxVariableField",
|
||||||
},
|
"name": "CheckboxVariableField",
|
||||||
"params": {
|
"type": "boolean",
|
||||||
"existingColspan": 1,
|
"required": false,
|
||||||
"maxColspan": 2
|
"colspan": 1,
|
||||||
}
|
"visibilityCondition": {
|
||||||
},
|
"leftType": "variable",
|
||||||
{
|
"leftValue": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
||||||
"id": "CheckboxVariableField",
|
"operator": "==",
|
||||||
"name": "CheckboxVariableField",
|
"rightValue": "textOne",
|
||||||
"type": "boolean",
|
"rightType": "field",
|
||||||
"required": false,
|
"nextConditionOperator": "",
|
||||||
"colspan": 1,
|
"nextCondition": null
|
||||||
"visibilityCondition": {
|
},
|
||||||
"leftFormFieldId": "",
|
"params": {
|
||||||
"leftRestResponseId": "cbc51284-04c4-462f-ab72-2b9f8b14907b",
|
"existingColspan": 1,
|
||||||
"operator": "==",
|
"maxColspan": 2
|
||||||
"rightValue": "",
|
}
|
||||||
"rightType": null,
|
}
|
||||||
"rightFormFieldId": "textOne",
|
],
|
||||||
"rightRestResponseId": "",
|
"2": [
|
||||||
"nextConditionOperator": "",
|
{
|
||||||
"nextCondition": null
|
"id": "textOne",
|
||||||
},
|
"name": "textOne",
|
||||||
"params": {
|
"type": "text",
|
||||||
"existingColspan": 1,
|
"required": false,
|
||||||
"maxColspan": 2
|
"colspan": 1,
|
||||||
}
|
"placeholder": null,
|
||||||
}
|
"minLength": 0,
|
||||||
],
|
"maxLength": 0,
|
||||||
"2": [
|
"regexPattern": null,
|
||||||
{
|
"visibilityCondition": null,
|
||||||
"id": "textOne",
|
"params": {
|
||||||
"name": "textOne",
|
"existingColspan": 1,
|
||||||
"type": "text",
|
"maxColspan": 2
|
||||||
"required": false,
|
}
|
||||||
"colspan": 1,
|
},
|
||||||
"placeholder": null,
|
{
|
||||||
"minLength": 0,
|
"id": "textTwo",
|
||||||
"maxLength": 0,
|
"name": "textTwo",
|
||||||
"regexPattern": null,
|
"type": "text",
|
||||||
"visibilityCondition": null,
|
"required": false,
|
||||||
"params": {
|
"colspan": 1,
|
||||||
"existingColspan": 1,
|
"placeholder": null,
|
||||||
"maxColspan": 2
|
"minLength": 0,
|
||||||
}
|
"maxLength": 0,
|
||||||
},
|
"regexPattern": null,
|
||||||
{
|
"visibilityCondition": null,
|
||||||
"id": "textTwo",
|
"params": {
|
||||||
"name": "textTwo",
|
"existingColspan": 1,
|
||||||
"type": "text",
|
"maxColspan": 2
|
||||||
"required": false,
|
}
|
||||||
"colspan": 1,
|
}
|
||||||
"placeholder": null,
|
]
|
||||||
"minLength": 0,
|
}
|
||||||
"maxLength": 0,
|
}
|
||||||
"regexPattern": null,
|
],
|
||||||
"visibilityCondition": null,
|
"outcomes": [],
|
||||||
"params": {
|
"metadata": {},
|
||||||
"existingColspan": 1,
|
"variables": [
|
||||||
"maxColspan": 2
|
{
|
||||||
}
|
"id": "33c60b43-2d44-4f25-bdc4-62b34ae11b43",
|
||||||
}
|
"name": "varString1",
|
||||||
]
|
"type": "string",
|
||||||
}
|
"value": "showCheckbox"
|
||||||
}
|
},
|
||||||
],
|
{
|
||||||
"outcomes": [],
|
"id": "0e67eb99-46f7-424e-9a78-6df0faa5844d",
|
||||||
"metadata": {},
|
"name": "varString2",
|
||||||
"variables": [
|
"type": "string",
|
||||||
{
|
"value": "showCheckbox"
|
||||||
"id": "cbc51284-04c4-462f-ab72-2b9f8b14907b",
|
}
|
||||||
"name": "varString1",
|
]
|
||||||
"type": "string",
|
}
|
||||||
"value": "showCheckbox"
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "87df371a-4238-43f8-92e5-ef3f6a19f379",
|
|
||||||
"name": "varString2",
|
|
||||||
"type": "string",
|
|
||||||
"value": "showCheckbox"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}`;
|
}`;
|
||||||
|
Reference in New Issue
Block a user