diff --git a/app/client/cypress/fixtures/Mapdsl.json b/app/client/cypress/fixtures/Mapdsl.json index 93d3df14b1..482d036670 100644 --- a/app/client/cypress/fixtures/Mapdsl.json +++ b/app/client/cypress/fixtures/Mapdsl.json @@ -1,6 +1,5 @@ - { -"dsl": { + "dsl": { "widgetName": "MainContainer", "backgroundColor": "none", "rightColumn": 1224, @@ -20,203 +19,203 @@ "parentColumnSpace": 1, "leftColumn": 0, "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", - "type": "CONTAINER_WIDGET", - "containerStyle": "card", + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 8, + "topRow": 0, + "bottomRow": 9, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "transparent", + "widgetName": "a78zsh8adr", + "type": "CANVAS_WIDGET", + "containerStyle": "none", "isVisible": true, "isLoading": false, - "parentColumnSpace": 75.25, - "parentRowSpace": 38, - "dynamicBindings": {}, + "parentColumnSpace": 1, + "parentRowSpace": 1, "leftColumn": 0, - "rightColumn": 8, + "rightColumn": 602, "topRow": 0, - "bottomRow": 9, + "bottomRow": 342, "snapColumns": 16, "orientation": "VERTICAL", "children": [ - { - "backgroundColor": "transparent", - "widgetName": "a78zsh8adr", - "type": "CANVAS_WIDGET", - "containerStyle": "none", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 602, - "topRow": 0, - "bottomRow": 342, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "text": "Title", - "textStyle": "HEADING", - "widgetName": "Text1", - "type": "TEXT_WIDGET", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 35.25, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 0, - "rightColumn": 3, - "topRow": 0, - "bottomRow": 1, - "widgetId": "5mijsozz1o" - } - ], - "widgetId": "hvosuw4z59", - "detachFromLayout": true, - "canExtend": false - } + { + "text": "Title", + "textStyle": "HEADING", + "widgetName": "Text1", + "type": "TEXT_WIDGET", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 35.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 3, + "topRow": 0, + "bottomRow": 1, + "widgetId": "5mijsozz1o" + } ], - "widgetId": "go64l3m18d" - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container3", - "type": "CONTAINER_WIDGET", - "containerStyle": "card", + "widgetId": "hvosuw4z59", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "go64l3m18d" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container3", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 16, + "topRow": 9, + "bottomRow": 23, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "transparent", + "widgetName": "ycnnb3haff", + "type": "CANVAS_WIDGET", + "containerStyle": "none", "isVisible": true, "isLoading": false, - "parentColumnSpace": 75.25, - "parentRowSpace": 38, - "dynamicBindings": {}, + "parentColumnSpace": 1, + "parentRowSpace": 1, "leftColumn": 0, - "rightColumn": 16, - "topRow": 9, - "bottomRow": 23, + "rightColumn": 1204, + "topRow": 0, + "bottomRow": 532, "snapColumns": 16, "orientation": "VERTICAL", "children": [ - { - "backgroundColor": "transparent", - "widgetName": "ycnnb3haff", - "type": "CANVAS_WIDGET", - "containerStyle": "none", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 1204, - "topRow": 0, - "bottomRow": 532, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "text": "Title", - "textStyle": "HEADING", - "widgetName": "Text3", - "type": "TEXT_WIDGET", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 72.875, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 0, - "rightColumn": 3, - "topRow": 0, - "bottomRow": 1, - "widgetId": "ig6nii17j0" - }, - { - "isVisible": true, - "isDisabled": false, - "widgetName": "Map1", - "enableSearch": true, - "zoomLevel": 50, - "enablePickLocation": true, - "allowZoom": true, - "mapCenter": { - "lat": 20.593684, - "long": 78.96288 - }, - "defaultMarkers": "[\n {\n \"lat\": -34.397,\n \"long\": 150.644,\n \"title\": \"Test A\"\n }\n]", - "type": "MAP_WIDGET", - "isLoading": false, - "parentColumnSpace": 71.75, - "parentRowSpace": 38, - "leftColumn": 3, - "rightColumn": 11, - "topRow": 0, - "bottomRow": 12, - "parentId": "yt4ouwn0sk", - "widgetId": "673etzjyv9", - "dynamicBindings": {} - } - ], - "widgetId": "yt4ouwn0sk", - "detachFromLayout": true, - "canExtend": false - } + { + "text": "Title", + "textStyle": "HEADING", + "widgetName": "Text3", + "type": "TEXT_WIDGET", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 72.875, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 3, + "topRow": 0, + "bottomRow": 1, + "widgetId": "ig6nii17j0" + }, + { + "isVisible": true, + "isDisabled": false, + "widgetName": "Map1", + "enableSearch": true, + "zoomLevel": 50, + "enablePickLocation": true, + "allowZoom": true, + "mapCenter": { + "lat": 20.593684, + "long": 78.96288 + }, + "defaultMarkers": "[\n {\n \"lat\": -34.397,\n \"long\": 150.644,\n \"title\": \"Test A\"\n }\n]", + "type": "MAP_WIDGET", + "isLoading": false, + "parentColumnSpace": 71.75, + "parentRowSpace": 38, + "leftColumn": 3, + "rightColumn": 11, + "topRow": 0, + "bottomRow": 12, + "parentId": "yt4ouwn0sk", + "widgetId": "673etzjyv9", + "dynamicBindings": {} + } ], - "widgetId": "s2x1p6okr1" - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container4", - "type": "CONTAINER_WIDGET", - "containerStyle": "card", + "widgetId": "yt4ouwn0sk", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "s2x1p6okr1" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container4", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 8, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 9, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "transparent", + "widgetName": "796xzyf2fj", + "type": "CANVAS_WIDGET", + "containerStyle": "none", "isVisible": true, "isLoading": false, - "parentColumnSpace": 75.25, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 8, - "rightColumn": 16, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 602, "topRow": 0, - "bottomRow": 9, + "bottomRow": 342, "snapColumns": 16, "orientation": "VERTICAL", "children": [ - { - "backgroundColor": "transparent", - "widgetName": "796xzyf2fj", - "type": "CANVAS_WIDGET", - "containerStyle": "none", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 602, - "topRow": 0, - "bottomRow": 342, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "text": "Title", - "textStyle": "HEADING", - "widgetName": "Text2", - "type": "TEXT_WIDGET", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 35.25, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 0, - "rightColumn": 3, - "topRow": 0, - "bottomRow": 1, - "widgetId": "8oo6fcjhy4" - } - ], - "widgetId": "tf53p2yg6n", - "detachFromLayout": true, - "canExtend": false - } + { + "text": "Title", + "textStyle": "HEADING", + "widgetName": "Text2", + "type": "TEXT_WIDGET", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 35.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 3, + "topRow": 0, + "bottomRow": 1, + "widgetId": "8oo6fcjhy4" + } ], - "widgetId": "2q5e9wr5vi" - } + "widgetId": "tf53p2yg6n", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "2q5e9wr5vi" + } ] -}, -"layoutOnLoadActions": [] + }, + "layoutOnLoadActions": [] } \ No newline at end of file diff --git a/app/client/cypress/fixtures/TextTabledsl.json b/app/client/cypress/fixtures/TextTabledsl.json new file mode 100644 index 0000000000..fc74351bf7 --- /dev/null +++ b/app/client/cypress/fixtures/TextTabledsl.json @@ -0,0 +1,183 @@ +{ + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1292, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": {}, + "version": 4, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 8, + "topRow": 0, + "bottomRow": 9, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "transparent", + "widgetName": "2maowfwe99", + "type": "CANVAS_WIDGET", + "containerStyle": "none", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 602, + "topRow": 0, + "bottomRow": 342, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "isVisible": true, + "text": "Label", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text4", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.6875, + "parentRowSpace": 38, + "leftColumn": 4, + "rightColumn": 9, + "topRow": 3, + "bottomRow": 4, + "parentId": "rlnoulfiiz", + "widgetId": "ljzwxmav4b" + } + ], + "widgetId": "rlnoulfiiz", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "6ro2rmfbpz" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container3", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 16, + "topRow": 9, + "bottomRow": 23, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "transparent", + "widgetName": "8muuok24ny", + "type": "CANVAS_WIDGET", + "containerStyle": "none", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 1204, + "topRow": 0, + "bottomRow": 532, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "isVisible": true, + "label": "Data", + "widgetName": "Table1", + "tableData": "[\n {\n \"id\": 2381224,\n \"email\": \"michael.lawson@reqres.in\",\n \"userName\": \"Michael Lawson\",\n \"productName\": \"Chicken Sandwich\",\n \"orderAmount\": 4.99\n },\n {\n \"id\": 2736212,\n \"email\": \"lindsay.ferguson@reqres.in\",\n \"userName\": \"Lindsay Ferguson\",\n \"productName\": \"Tuna Salad\",\n \"orderAmount\": 9.99\n },\n {\n \"id\": 6788734,\n \"email\": \"tobias.funke@reqres.in\",\n \"userName\": \"Tobias Funke\",\n \"productName\": \"Beef steak\",\n \"orderAmount\": 19.99\n },\n {\n \"id\": 7434532,\n \"email\": \"byron.fields@reqres.in\",\n \"userName\": \"Byron Fields\",\n \"productName\": \"Chicken Sandwich\",\n \"orderAmount\": 4.99\n },\n {\n \"id\": 7434532,\n \"email\": \"ryan.holmes@reqres.in\",\n \"userName\": \"Ryan Holmes\",\n \"productName\": \"Avocado Panini\",\n \"orderAmount\": 7.99\n }\n]", + "type": "TABLE_WIDGET", + "isLoading": false, + "parentColumnSpace": 71.75, + "parentRowSpace": 38, + "leftColumn": 1, + "rightColumn": 10, + "topRow": 1, + "bottomRow": 8, + "parentId": "tyiwk4xuq0", + "widgetId": "c5h0m17qxj", + "dynamicBindings": { + "selectedRow": true + } + } + ], + "widgetId": "tyiwk4xuq0", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "3oe1ka7jon" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container4", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 8, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 9, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "transparent", + "widgetName": "rcpfairf1h", + "type": "CANVAS_WIDGET", + "containerStyle": "none", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 602, + "topRow": 0, + "bottomRow": 342, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [], + "widgetId": "q0atwguzda", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "l5lvm9yd4e" + } + ] + }, + "layoutOnLoadActions": [] +} \ No newline at end of file diff --git a/app/client/cypress/fixtures/commondsl.json b/app/client/cypress/fixtures/commondsl.json index 7a1cae3cf3..961aec8c89 100644 --- a/app/client/cypress/fixtures/commondsl.json +++ b/app/client/cypress/fixtures/commondsl.json @@ -1,514 +1,514 @@ { - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1292, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 3, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#C0C0C0", - "widgetName": "Aditya", - "rightColumn": 8, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "gmm48aishv", - "containerStyle": "card", - "topRow": 0, - "bottomRow": 9, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "shouldScrollContents": true, - "parentColumnSpace": 75.25, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "jmwwbtgjry", - "rightColumn": 602, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "hjiybwqair", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 342, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "onTextChanged": "{{showAlert('Ahello')}}", - "widgetName": "input", - "rightColumn": 11, - "widgetId": "oudih5fvwa", - "topRow": 6, - "bottomRow": 7, - "isValid": "{{input.isRequired ? input.text && descriptionInput.text.length > 0 ? input.regex ? new RegExp(input.regex).test(input.text) : true : input.regex ? new RegExp(input.regex).test(input.text) : true}}", - "parentRowSpace": 38, - "isVisible": true, - "label": "Test Input Label", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true - }, - "parentId": "iw4o07jvik", - "isLoading": false, - "parentColumnSpace": 34.6875, - "leftColumn": 6, - "dynamicTriggers": { - "onTextChanged": true - }, - "inputType": "NUMBER", - "placeholderText": "aditya", - "defaultText": "" - }, - { - "widgetName": "TestTextBox", - "rightColumn": 5, - "widgetId": "4d8d2eh4xg", - "dynamicProperties": {}, - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 38, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": {}, - "shouldScroll": true, - "parentId": "hjiybwqair", - "isLoading": false, - "parentColumnSpace": 34.6875, - "leftColumn": 1, - "text": "Test text", - "textStyle": "HEADING" - }, - { - "widgetName": "Submitbutton", - "rightColumn": 12, - "onClick": "{{showModal()}}", - "isDefaultClickDisabled": true, - "widgetId": "3p92qmlzfl", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 38, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "hjiybwqair", - "isLoading": false, - "parentColumnSpace": 34.6875, - "leftColumn": 10, - "dynamicTriggers": { - "onClick": true - }, - "text": "Test Button Text", - "isDisabled": false - } - ] - } - ], - "text": "n TexttuTest Button Text" - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container3", - "rightColumn": 16, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "28hfrtdb1a", - "containerStyle": "card", - "topRow": 9, - "bottomRow": 23, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 75.25, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "lvl7ajf1rn", - "rightColumn": 1204, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "ac4kpozgg3", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 532, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Table1", - "rightColumn": 11, - "widgetId": "yum9t90tb2", - "topRow": 1, - "bottomRow": 8, - "parentRowSpace": 38, - "tableData": "{{UsersApi.data}}", - "isVisible": true, - "label": "Data", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true - }, - "isLoading": false, - "parentColumnSpace": 71.75, - "leftColumn": 1, - "dynamicTriggers": { - "onRowSelected": true - }, - "onRowSelected": "{{navigateTo()}}", - "selectedRow": "{{Table1.tableData[Table1.selectedRowIndex]}}" - } - ] - } - ] - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container4", - "rightColumn": 16, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "ii6dnhfrba", - "containerStyle": "card", - "topRow": 0, - "bottomRow": 9, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 75.25, - "leftColumn": 8, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "rnz3m8xrzc", - "rightColumn": 602, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "iw4o07jvik", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 342, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [] - } - ] - }, - { - "widgetName": "TestModal", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "s8mtp5krfz", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": false, - "canOutsideClickClose": true, - "type": "MODAL_WIDGET", - "canEscapeKeyClose": true, - "dynamicBindings": {}, - "parentId": "0", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 1 - }, - "position": { - "top": 0, - "left": 15 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 15 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "detachFromLayout": true, - "children": [], - "isVisible": true, - "isDisabled": false, - "canExtend": true - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 1, - "size": "MODAL_SMALL", - "leftColumn": 0, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "dma7flgdrm", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": true, - "type": "CANVAS_WIDGET", - "parentId": "s8mtp5krfz", - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 1 - }, - "position": { - "top": 0, - "left": 15 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 15 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Icon1", - "rightColumn": 16, - "onClick": "{{closeModal('TestModal')}}", - "color": "#040627", - "iconName": "cross", - "widgetId": "n5fc0ven2a", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "ICON_WIDGET", - "parentId": "dma7flgdrm", - "isLoading": false, - "leftColumn": 15, - "iconSize": 24 - }, - { - "isLoading": false, - "widgetName": "Text1", - "rightColumn": 15, - "leftColumn": 0, - "widgetId": "s818l5hhvq", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "text": "Modal Title", - "textStyle": "HEADING", - "type": "TEXT_WIDGET", - "parentId": "dma7flgdrm" - }, - { - "widgetName": "Button1", - "rightColumn": 13, - "isDefaultClickDisabled": true, - "widgetId": "io777lh7bc", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 4, - "bottomRow": 5, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "dma7flgdrm", - "isLoading": false, - "leftColumn": 10, - "text": "Cancel", - "isDisabled": false - }, - { - "widgetName": "Button2", - "rightColumn": 16, - "isDefaultClickDisabled": true, - "widgetId": "gexp49bfyb", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 4, - "bottomRow": 5, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "dma7flgdrm", - "isLoading": false, - "leftColumn": 13, - "text": "Confirm", - "isDisabled": false - } - ], - "isDisabled": false - } - ] - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "id": "5e906ba76e910873a331b648", - "name": "UsersApi", - "pluginType": "API", - "jsonPathKeys": [] - } - ] + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1292, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": {}, + "version": 3, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#C0C0C0", + "widgetName": "Aditya", + "rightColumn": 8, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "gmm48aishv", + "containerStyle": "card", + "topRow": 0, + "bottomRow": 9, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "shouldScrollContents": true, + "parentColumnSpace": 75.25, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "jmwwbtgjry", + "rightColumn": 602, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "hjiybwqair", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 342, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "onTextChanged": "", + "widgetName": "input", + "rightColumn": 11, + "widgetId": "oudih5fvwa", + "topRow": 6, + "bottomRow": 7, + "isValid": "{{input.isRequired ? input.text && descriptionInput.text.length > 0 ? input.regex ? new RegExp(input.regex).test(input.text) : true : input.regex ? new RegExp(input.regex).test(input.text) : true}}", + "parentRowSpace": 38, + "isVisible": true, + "label": "Test Input Label", + "type": "INPUT_WIDGET", + "dynamicBindings": { + "isValid": true + }, + "parentId": "iw4o07jvik", + "isLoading": false, + "parentColumnSpace": 34.6875, + "leftColumn": 6, + "dynamicTriggers": { + "onTextChanged": true + }, + "inputType": "", + "placeholderText": "", + "defaultText": "" + }, + { + "widgetName": "TestTextBox", + "rightColumn": 5, + "widgetId": "4d8d2eh4xg", + "dynamicProperties": {}, + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 38, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": {}, + "shouldScroll": true, + "parentId": "hjiybwqair", + "isLoading": false, + "parentColumnSpace": 34.6875, + "leftColumn": 1, + "text": "Test text", + "textStyle": "HEADING" + }, + { + "widgetName": "Submitbutton", + "rightColumn": 12, + "onClick": "{{showModal()}}", + "isDefaultClickDisabled": true, + "widgetId": "3p92qmlzfl", + "buttonStyle": "PRIMARY_BUTTON", + "topRow": 1, + "bottomRow": 2, + "parentRowSpace": 38, + "isVisible": true, + "type": "BUTTON_WIDGET", + "dynamicBindings": {}, + "parentId": "hjiybwqair", + "isLoading": false, + "parentColumnSpace": 34.6875, + "leftColumn": 10, + "dynamicTriggers": { + "onClick": true + }, + "text": "Test Button Text", + "isDisabled": false + } + ] + } + ], + "text": "n TexttuTest Button Text" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container3", + "rightColumn": 16, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "28hfrtdb1a", + "containerStyle": "card", + "topRow": 9, + "bottomRow": 23, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 75.25, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "lvl7ajf1rn", + "rightColumn": 1204, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "ac4kpozgg3", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 532, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Table1", + "rightColumn": 11, + "widgetId": "yum9t90tb2", + "topRow": 1, + "bottomRow": 8, + "parentRowSpace": 38, + "tableData": "{{UsersApi.data}}", + "isVisible": true, + "label": "Data", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true + }, + "isLoading": false, + "parentColumnSpace": 71.75, + "leftColumn": 1, + "dynamicTriggers": { + "onRowSelected": true + }, + "onRowSelected": "{{navigateTo()}}", + "selectedRow": "{{Table1.tableData[Table1.selectedRowIndex]}}" + } + ] + } + ] + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container4", + "rightColumn": 16, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "ii6dnhfrba", + "containerStyle": "card", + "topRow": 0, + "bottomRow": 9, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 75.25, + "leftColumn": 8, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "rnz3m8xrzc", + "rightColumn": 602, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "iw4o07jvik", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 342, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [] + } + ] + }, + { + "widgetName": "TestModal", + "rightColumn": 0, + "detachFromLayout": true, + "widgetId": "s8mtp5krfz", + "topRow": 0, + "bottomRow": 0, + "parentRowSpace": 1, + "isVisible": false, + "canOutsideClickClose": true, + "type": "MODAL_WIDGET", + "canEscapeKeyClose": true, + "dynamicBindings": {}, + "parentId": "0", + "shouldScrollContents": true, + "blueprint": { + "view": [ + { + "position": { + "top": 0, + "left": 0 + }, + "type": "CANVAS_WIDGET", + "props": { + "shouldScrollContents": false, + "blueprint": { + "view": [ + { + "size": { + "rows": 1, + "cols": 1 + }, + "position": { + "top": 0, + "left": 15 + }, + "type": "ICON_WIDGET", + "props": { + "color": "#040627", + "iconName": "cross", + "iconSize": 24 + } + }, + { + "size": { + "rows": 1, + "cols": 15 + }, + "position": { + "top": 0, + "left": 0 + }, + "type": "TEXT_WIDGET", + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "size": { + "rows": 1, + "cols": 3 + }, + "position": { + "top": 4, + "left": 10 + }, + "type": "BUTTON_WIDGET", + "props": { + "buttonStyle": "SECONDARY_BUTTON", + "text": "Cancel" + } + }, + { + "size": { + "rows": 1, + "cols": 3 + }, + "position": { + "top": 4, + "left": 13 + }, + "type": "BUTTON_WIDGET", + "props": { + "buttonStyle": "PRIMARY_BUTTON", + "text": "Confirm" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + }, + "detachFromLayout": true, + "children": [], + "isVisible": true, + "isDisabled": false, + "canExtend": true + } + } + ] + }, + "isLoading": false, + "parentColumnSpace": 1, + "size": "MODAL_SMALL", + "leftColumn": 0, + "children": [ + { + "widgetName": "Canvas1", + "rightColumn": 0, + "detachFromLayout": true, + "widgetId": "dma7flgdrm", + "topRow": 0, + "bottomRow": 0, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": true, + "type": "CANVAS_WIDGET", + "parentId": "s8mtp5krfz", + "shouldScrollContents": false, + "blueprint": { + "view": [ + { + "size": { + "rows": 1, + "cols": 1 + }, + "position": { + "top": 0, + "left": 15 + }, + "type": "ICON_WIDGET", + "props": { + "color": "#040627", + "iconName": "cross", + "iconSize": 24 + } + }, + { + "size": { + "rows": 1, + "cols": 15 + }, + "position": { + "top": 0, + "left": 0 + }, + "type": "TEXT_WIDGET", + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "size": { + "rows": 1, + "cols": 3 + }, + "position": { + "top": 4, + "left": 10 + }, + "type": "BUTTON_WIDGET", + "props": { + "buttonStyle": "SECONDARY_BUTTON", + "text": "Cancel" + } + }, + { + "size": { + "rows": 1, + "cols": 3 + }, + "position": { + "top": 4, + "left": 13 + }, + "type": "BUTTON_WIDGET", + "props": { + "buttonStyle": "PRIMARY_BUTTON", + "text": "Confirm" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + }, + "minHeight": 0, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Icon1", + "rightColumn": 16, + "onClick": "{{closeModal('TestModal')}}", + "color": "#040627", + "iconName": "cross", + "widgetId": "n5fc0ven2a", + "topRow": 0, + "bottomRow": 1, + "isVisible": true, + "type": "ICON_WIDGET", + "parentId": "dma7flgdrm", + "isLoading": false, + "leftColumn": 15, + "iconSize": 24 + }, + { + "isLoading": false, + "widgetName": "Text1", + "rightColumn": 15, + "leftColumn": 0, + "widgetId": "s818l5hhvq", + "topRow": 0, + "bottomRow": 1, + "isVisible": true, + "text": "Modal Title", + "textStyle": "HEADING", + "type": "TEXT_WIDGET", + "parentId": "dma7flgdrm" + }, + { + "widgetName": "Button1", + "rightColumn": 13, + "isDefaultClickDisabled": true, + "widgetId": "io777lh7bc", + "buttonStyle": "SECONDARY_BUTTON", + "topRow": 4, + "bottomRow": 5, + "isVisible": true, + "type": "BUTTON_WIDGET", + "parentId": "dma7flgdrm", + "isLoading": false, + "leftColumn": 10, + "text": "Cancel", + "isDisabled": false + }, + { + "widgetName": "Button2", + "rightColumn": 16, + "isDefaultClickDisabled": true, + "widgetId": "gexp49bfyb", + "buttonStyle": "PRIMARY_BUTTON", + "topRow": 4, + "bottomRow": 5, + "isVisible": true, + "type": "BUTTON_WIDGET", + "parentId": "dma7flgdrm", + "isLoading": false, + "leftColumn": 13, + "text": "Confirm", + "isDisabled": false + } + ], + "isDisabled": false + } + ] + } ] - } \ No newline at end of file + }, + "layoutOnLoadActions": [ + [ + { + "id": "5e906ba76e910873a331b648", + "name": "UsersApi", + "pluginType": "API", + "jsonPathKeys": [] + } + ] + ] +} \ No newline at end of file diff --git a/app/client/cypress/fixtures/example.json b/app/client/cypress/fixtures/example.json index 47dc71d630..56e72b7ce2 100644 --- a/app/client/cypress/fixtures/example.json +++ b/app/client/cypress/fixtures/example.json @@ -1,5 +1,83 @@ { - "name": "Using fixtures to represent data", + "country": "India", + "link": "www.google.com", + "command": "{command}{A}{del}", + "marker": [ + { + "lat": -34.397, + "lng": 150.644, + "title": "Marker Test" + } + ], + "location2": "Australia", + "name": "containtest", + "colour": "Red", + "Hover": "mouseover", + "inputdata": "one", + "text": "Adi12", + "number": "2", + "default": "initial", + "radio1": "test1", + "radio2": "test2", + "radio3": "test3", + "radio4": "test4", + "textcheck": "checker", + "textverify": "input", + "alert": "hello", + "layoutId": "5e86eb6492fdf85af565096f", + "contains": "lock", + "input": [ + { + "label": "Option 1", + "value": "1" + }, + { + "label": "Option 2", + "value": "2" + }, + { + "label": "Option 3", + "value": "3" + }, + { + "label": "Option 4", + "value": "4" + }, + { + "label": "Option 5", + "value": "5" + } + ], + "para": "This is to test the system data.", + "regex": "z{3}", + "chartInput": [ + { + "x": "Day1", + "y": 10000 + }, + { + "x": "Day2", + "y": 12000 + }, + { + "x": "Day3", + "y": 32000 + } + ], + "series": "Weekly", + "plan": "Weekly plan", + "ylabel": "total wages", + "placeholder": "check", + "chartIndata": "App Sign Up", + "dropdownInput": "TestD", + "radioInputName": "Test Radio", + "checkbocInputName": "value", + "defaultimage": "https://i0.wp.com/www.heyuguys.com/images/2016/04/The-Joker.png?fit=1920%2C960", + "NewImage": "https://cdn.dribbble.com/users/1787323/screenshots/4563995/dribbbe_hammer-01.png", + "textfun": "{{Table1.selectedRow.userName}}", + "textfunID": "{{Table1.selectedRow.id}}", + "textfunemail": "{{Table1.selectedRow.email}}", + "name1": "Using fixtures to represent data", "email": "hello@cypress.io", "body": "Fixtures are a great way to mock data for responses to routes", "ButtonLabel": "Test Button", @@ -15,5 +93,7 @@ "DatepickerLable": "date", "RichTextEditorName": "RichtextEditor", "HtmlText": "This is the initialcontent
This is a paragraph.
", - "RichTexteditorBody": "Here is the text area to edit html" + "RichTexteditorBody": "Here is the text area to edit html", + "userApi": "http://postgrest.appsmith.com:3000", + "validateImage": "https://cdn.dribbble.com/users/1787323/screenshots/4563995/dribbbe_hammer-01.png" } \ No newline at end of file diff --git a/app/client/cypress/fixtures/formdsl.json b/app/client/cypress/fixtures/formdsl.json index 640a46ee6a..d41b11e29e 100644 --- a/app/client/cypress/fixtures/formdsl.json +++ b/app/client/cypress/fixtures/formdsl.json @@ -1,509 +1,508 @@ { "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1292, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 3, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", - "rightColumn": 8, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "gmm48aishv", - "containerStyle": "card", - "topRow": 0, - "bottomRow": 9, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 75.25, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "jmwwbtgjry", - "rightColumn": 602, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "hjiybwqair", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 342, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Dropdown1", - "rightColumn": 8, - "selectedOptionArr": "{{\n Dropdown1.selectionType === \"MULTI_SELECT\"\n ? Dropdown1.options.filter((opt, index) =>\n _.includes(Dropdown1.selectedIndexArr, index),\n )\n : undefined\n }}", - "widgetId": "n9hyiainl8", - "topRow": 0, - "bottomRow": 1, - "isValid": "{{Dropdown1.isRequired ? Dropdown1.selectionType === 'SINGLE_SELECT' ? !!Dropdown1.selectedOption : !!Dropdown1.selectedIndexArr && Dropdown1.selectedIndexArr.length > 0 : true}}", - "parentRowSpace": 38, - "isVisible": true, - "label": "Test Dropdown", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "selectedIndex": true - }, - "selectedOption": "{{\n Dropdown1.selectionType === 'SINGLE_SELECT'\n ? Dropdown1.options[Dropdown1.selectedIndex]\n : undefined\n }}", - "isLoading": false, - "selectionType": "MULTI_SELECT", - "parentColumnSpace": 34.6875, - "leftColumn": 0, - "options": "[\n {\n \"label\": \"Option 1\",\n \"value\": \"1\"\n },\n {\n \"label\": \"Option 2\",\n \"value\": \"2\"\n },\n {\n \"label\": \"Option 3\",\n \"value\": \"3\"\n },\n {\n \"label\": \"Option 4\",\n \"value\": \"4\"\n },\n {\n \"label\": \"Option 5\",\n \"value\": \"5\"\n }\n]" - }, - { - "isRequired": true, - "widgetName": "checker", - "rightColumn": 14, - "widgetId": "b9wzxcluhi", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 38, - "isVisible": true, - "label": "Test Checkbox", - "type": "CHECKBOX_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 34.6875, - "leftColumn": 11, - "dynamicTriggers": { - "onCheckChange": true - }, - "defaultCheckedState": true, - "onCheckChange": "{{navigateToUrl('Awww.google.com')}}" - }, - { - "widgetName": "RichTextEditor1", - "rightColumn": 11, - "widgetId": "x0v0ywkeod", - "topRow": 3, - "bottomRow": 8, - "parentRowSpace": 38, - "isVisible": true, - "type": "RICH_TEXT_EDITOR_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 34.6875, - "leftColumn": 3, - "dynamicTriggers": { - "onTextChange": true - }, - "defaultText": "", - "text": "This is the initial content of the editor", - "isDisabled": false, - "onTextChange": "{{navigateTo()}}" - }, - { - "widgetName": "Adi12", - "rightColumn": 16, - "widgetId": "76qupajn9l", - "topRow": 3, - "bottomRow": 5, - "isValid": "{{ Adi12.isRequired ? !!Adi12.selectedOptionValue : true }}", - "parentRowSpace": 38, - "isVisible": true, - "label": "Test Radio", - "type": "RADIO_GROUP_WIDGET", - "dynamicBindings": { - "isValid": true, - "selectedOption": true - }, - "selectedOption": "{{_.find(Adi12.options, { value: Adi12.selectedOptionValue })}}", - "isLoading": false, - "defaultOptionValue": "1", - "parentColumnSpace": 34.6875, - "leftColumn": 12, - "dynamicTriggers": { - "onSelectionChange": true - }, - "onSelectionChange": "{{navigateTo()}}", - "options": [ - { - "id": "1", - "label": "jarvis", - "value": "1" - }, - { - "id": "2", - "label": "marvel", - "value": "2" - }, - { - "label": "iron", - "value": "4" - } - ] - } - ] - } - ] - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container3", - "rightColumn": 16, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "28hfrtdb1a", - "containerStyle": "card", - "topRow": 9, - "bottomRow": 23, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 75.25, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "lvl7ajf1rn", - "rightColumn": 1204, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "ac4kpozgg3", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 532, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Form1", - "backgroundColor": "Gray", - "rightColumn": 11, - "widgetId": "z62mnh15y5", - "topRow": 0, - "bottomRow": 13, - "parentRowSpace": 38, - "isVisible": true, - "type": "FORM_WIDGET", - "dynamicBindings": {}, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": false, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 71.75, - "leftColumn": 5, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 430.5, - "detachFromLayout": true, - "widgetId": "nxlutw2g3v", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 494, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "dynamicBindings": {}, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 12 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 12 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": false, - "disabledWhenInvalid": true, - "buttonStyle": "PRIMARY_BUTTON", - "text": "Submit" - } - }, - { - "size": { - "rows": 1, - "cols": 4 - }, - "position": { - "top": 11, - "left": 8 - }, - "type": "FORM_BUTTON_WIDGET", - "props": { - "resetFormOnClick": true, - "disabledWhenInvalid": false, - "buttonStyle": "SECONDARY_BUTTON", - "text": "Reset" - } - } - ] - }, - "minHeight": 494, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "isLoading": false, - "widgetName": "Text1", - "rightColumn": 12, - "leftColumn": 0, - "widgetId": "uvz6hzdz7c", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "text": "Title", - "textStyle": "HEADING", - "type": "TEXT_WIDGET", - "dynamicBindings": {} - }, - { - "resetFormOnClick": false, - "widgetName": "FormButton1", - "rightColumn": 16, - "isDefaultClickDisabled": true, - "widgetId": "tf20n9k4z2", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 11, - "bottomRow": 12, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "disabledWhenInvalid": true, - "leftColumn": 12, - "text": "Submit" - }, - { - "resetFormOnClick": true, - "widgetName": "FormButton2", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "6xnpe13jie", - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 11, - "bottomRow": 12, - "isVisible": true, - "type": "FORM_BUTTON_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "disabledWhenInvalid": false, - "leftColumn": 8, - "text": "Reset" - } - ] - } - ] - } - ] - } - ] - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container4", - "rightColumn": 16, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "ii6dnhfrba", - "containerStyle": "card", - "topRow": 0, - "bottomRow": 9, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 75.25, - "leftColumn": 8, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "rnz3m8xrzc", - "rightColumn": 602, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "iw4o07jvik", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 342, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "FilePicker1", - "rightColumn": 8, - "isDefaultClickDisabled": true, - "widgetId": "q5skceaq3h", - "topRow": 1, - "bottomRow": 2, - "isValid": "{{ FilePicker1.isRequired ? FilePicker1.files.length > 0 : true }}", - "parentRowSpace": 38, - "isVisible": true, - "label": "Upload Files", - "maxFileSize": "", - "type": "FILE_PICKER_WIDGET", - "dynamicBindings": { - "isValid": true - }, - "isLoading": false, - "parentColumnSpace": 34.6875, - "leftColumn": 4, - "files": [] - }, - { - "widgetName": "DatePicker1", - "rightColumn": 11, - "dateFormat": "DD/MM/YYYY", - "widgetId": "qx038sqrin", - "topRow": 7, - "bottomRow": 8, - "isValid": "{{ DatePicker1.isRequired ? !!DatePicker1.selectedDate : true }}", - "parentRowSpace": 38, - "isVisible": true, - "datePickerType": "DATE_PICKER", - "label": "From Date", - "type": "DATE_PICKER_WIDGET", - "dynamicBindings": { - "isValid": true - }, - "isLoading": false, - "enableTimePicker": true, - "parentColumnSpace": 34.6875, - "leftColumn": 3, - "isDisabled": false - } - ] - } - ] - } - ] + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1292, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": {}, + "version": 3, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "rightColumn": 8, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "gmm48aishv", + "containerStyle": "card", + "topRow": 0, + "bottomRow": 9, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 75.25, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "jmwwbtgjry", + "rightColumn": 602, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "hjiybwqair", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 342, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Dropdown1", + "rightColumn": 8, + "selectedOptionArr": "{{\n Dropdown1.selectionType === \"MULTI_SELECT\"\n ? Dropdown1.options.filter((opt, index) =>\n _.includes(Dropdown1.selectedIndexArr, index),\n)\n : undefined\n}}", + "widgetId": "n9hyiainl8", + "topRow": 0, + "bottomRow": 1, + "isValid": "{{Dropdown1.isRequired ? Dropdown1.selectionType === 'SINGLE_SELECT' ? !!Dropdown1.selectedOption : !!Dropdown1.selectedIndexArr && Dropdown1.selectedIndexArr.length > 0 : true}}", + "parentRowSpace": 38, + "isVisible": true, + "label": "Test Dropdown", + "type": "DROP_DOWN_WIDGET", + "dynamicBindings": { + "selectedOptionArr": true, + "isValid": true, + "selectedIndexArr": true, + "selectedOption": true, + "selectedIndex": true + }, + "selectedOption": "{{\nDropdown1.selectionType === 'SINGLE_SELECT'\n ? Dropdown1.options[Dropdown1.selectedIndex]\n: undefined\n}}", + "isLoading": false, + "selectionType": "", + "parentColumnSpace": 34.6875, + "leftColumn": 0, + "options": "[\n {\n \"label\": \"Option 1\",\n \"value\": \"1\"\n },\n {\n \"label\": \"Option 2\",\n \"value\": \"2\"\n },\n {\n \"label\": \"Option 3\",\n \"value\": \"3\"\n },\n {\n \"label\": \"Option 4\",\n \"value\": \"4\"\n },\n {\n \"label\": \"Option 5\",\n \"value\": \"5\"\n }\n]" + }, + { + "isRequired": true, + "widgetName": "checker", + "rightColumn": 14, + "widgetId": "b9wzxcluhi", + "topRow": 1, + "bottomRow": 2, + "parentRowSpace": 38, + "isVisible": true, + "label": "Test Checkbox", + "type": "CHECKBOX_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 34.6875, + "leftColumn": 11, + "dynamicTriggers": { + "onCheckChange": true + }, + "defaultCheckedState": true, + "onCheckChange": "{{navigateToUrl('Awww.google.com')}}" + }, + { + "widgetName": "RichTextEditor1", + "rightColumn": 11, + "widgetId": "x0v0ywkeod", + "topRow": 3, + "bottomRow": 8, + "parentRowSpace": 38, + "isVisible": true, + "type": "RICH_TEXT_EDITOR_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 34.6875, + "leftColumn": 3, + "dynamicTriggers": { + "onTextChange": true + }, + "defaultText": "", + "text": "This is the initial content of the editor", + "isDisabled": false, + "onTextChange": "{{navigateTo()}}" + }, + { + "widgetName": "Adi12", + "rightColumn": 16, + "widgetId": "76qupajn9l", + "topRow": 3, + "bottomRow": 5, + "isValid": "{{ Adi12.isRequired ? !!Adi12.selectedOptionValue : true }}", + "parentRowSpace": 38, + "isVisible": true, + "label": "Test Radio", + "type": "RADIO_GROUP_WIDGET", + "dynamicBindings": { + "isValid": true, + "selectedOption": true + }, + "selectedOption": "{{_.find(Adi12.options, { value: Adi12.selectedOptionValue })}}", + "isLoading": false, + "defaultOptionValue": "1", + "parentColumnSpace": 34.6875, + "leftColumn": 12, + "dynamicTriggers": { + "onSelectionChange": true + }, + "onSelectionChange": "{{navigateTo()}}", + "options": [ + { + "id": "1", + "label": "jarvis", + "value": "1" + }, + { + "id": "2", + "label": "marvel", + "value": "2" + }, + { + "label": "iron", + "value": "4" + } + ] + } + ] + } + ] + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container3", + "rightColumn": 16, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "28hfrtdb1a", + "containerStyle": "card", + "topRow": 9, + "bottomRow": 23, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 75.25, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "lvl7ajf1rn", + "rightColumn": 1204, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "ac4kpozgg3", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 532, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Form1", + "backgroundColor": "Gray", + "rightColumn": 11, + "widgetId": "z62mnh15y5", + "topRow": 0, + "bottomRow": 13, + "parentRowSpace": 38, + "isVisible": true, + "type": "FORM_WIDGET", + "dynamicBindings": {}, + "blueprint": { + "view": [ + { + "position": { + "top": 0, + "left": 0 + }, + "type": "CANVAS_WIDGET", + "props": { + "blueprint": { + "view": [ + { + "size": { + "rows": 1, + "cols": 12 + }, + "position": { + "top": 0, + "left": 0 + }, + "type": "TEXT_WIDGET", + "props": { + "text": "Title", + "textStyle": "HEADING" + } + }, + { + "size": { + "rows": 1, + "cols": 4 + }, + "position": { + "top": 11, + "left": 12 + }, + "type": "FORM_BUTTON_WIDGET", + "props": { + "resetFormOnClick": false, + "disabledWhenInvalid": true, + "buttonStyle": "PRIMARY_BUTTON", + "text": "Submit" + } + }, + { + "size": { + "rows": 1, + "cols": 4 + }, + "position": { + "top": 11, + "left": 8 + }, + "type": "FORM_BUTTON_WIDGET", + "props": { + "resetFormOnClick": true, + "disabledWhenInvalid": false, + "buttonStyle": "SECONDARY_BUTTON", + "text": "Reset" + } + } + ] + }, + "detachFromLayout": true, + "children": [], + "containerStyle": "none", + "canExtend": false + } + } + ] + }, + "isLoading": false, + "parentColumnSpace": 71.75, + "leftColumn": 5, + "children": [ + { + "widgetName": "Canvas1", + "rightColumn": 430.5, + "detachFromLayout": true, + "widgetId": "nxlutw2g3v", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 494, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "dynamicBindings": {}, + "blueprint": { + "view": [ + { + "size": { + "rows": 1, + "cols": 12 + }, + "position": { + "top": 0, + "left": 0 + }, + "type": "TEXT_WIDGET", + "props": { + "text": "Title", + "textStyle": "HEADING" + } + }, + { + "size": { + "rows": 1, + "cols": 4 + }, + "position": { + "top": 11, + "left": 12 + }, + "type": "FORM_BUTTON_WIDGET", + "props": { + "resetFormOnClick": false, + "disabledWhenInvalid": true, + "buttonStyle": "PRIMARY_BUTTON", + "text": "Submit" + } + }, + { + "size": { + "rows": 1, + "cols": 4 + }, + "position": { + "top": 11, + "left": 8 + }, + "type": "FORM_BUTTON_WIDGET", + "props": { + "resetFormOnClick": true, + "disabledWhenInvalid": false, + "buttonStyle": "SECONDARY_BUTTON", + "text": "Reset" + } + } + ] + }, + "minHeight": 494, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "isLoading": false, + "widgetName": "Text1", + "rightColumn": 12, + "leftColumn": 0, + "widgetId": "uvz6hzdz7c", + "topRow": 0, + "bottomRow": 1, + "isVisible": true, + "text": "Title", + "textStyle": "HEADING", + "type": "TEXT_WIDGET", + "dynamicBindings": {} + }, + { + "resetFormOnClick": false, + "widgetName": "FormButton1", + "rightColumn": 16, + "isDefaultClickDisabled": true, + "widgetId": "tf20n9k4z2", + "buttonStyle": "PRIMARY_BUTTON", + "topRow": 11, + "bottomRow": 12, + "isVisible": true, + "type": "FORM_BUTTON_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "disabledWhenInvalid": true, + "leftColumn": 12, + "text": "Submit" + }, + { + "resetFormOnClick": true, + "widgetName": "FormButton2", + "rightColumn": 12, + "isDefaultClickDisabled": true, + "widgetId": "6xnpe13jie", + "buttonStyle": "SECONDARY_BUTTON", + "topRow": 11, + "bottomRow": 12, + "isVisible": true, + "type": "FORM_BUTTON_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "disabledWhenInvalid": false, + "leftColumn": 8, + "text": "Reset" + } + ] + } + ] + } + ] + } + ] + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container4", + "rightColumn": 16, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "ii6dnhfrba", + "containerStyle": "card", + "topRow": 0, + "bottomRow": 9, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 75.25, + "leftColumn": 8, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "rnz3m8xrzc", + "rightColumn": 602, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "iw4o07jvik", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 342, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "FilePicker1", + "rightColumn": 8, + "isDefaultClickDisabled": true, + "widgetId": "q5skceaq3h", + "topRow": 1, + "bottomRow": 2, + "isValid": "{{ FilePicker1.isRequired ? FilePicker1.files.length > 0 : true }}", + "parentRowSpace": 38, + "isVisible": true, + "label": "Upload Files", + "maxFileSize": "", + "type": "FILE_PICKER_WIDGET", + "dynamicBindings": { + "isValid": true + }, + "isLoading": false, + "parentColumnSpace": 34.6875, + "leftColumn": 4, + "files": [] + }, + { + "widgetName": "DatePicker1", + "rightColumn": 11, + "dateFormat": "DD/MM/YYYY", + "widgetId": "qx038sqrin", + "topRow": 7, + "bottomRow": 8, + "isValid": "{{ DatePicker1.isRequired ? !!DatePicker1.selectedDate : true }}", + "parentRowSpace": 38, + "isVisible": true, + "datePickerType": "DATE_PICKER", + "label": "From Date", + "type": "DATE_PICKER_WIDGET", + "dynamicBindings": { + "isValid": true + }, + "isLoading": false, + "enableTimePicker": true, + "parentColumnSpace": 34.6875, + "leftColumn": 3, + "isDisabled": false + } + ] + } + ] + } + ] }, "layoutOnLoadActions": [] - } - \ No newline at end of file + } \ No newline at end of file diff --git a/app/client/cypress/fixtures/layoutdsl.json b/app/client/cypress/fixtures/layoutdsl.json index eae95b168e..d410fc03dd 100644 --- a/app/client/cypress/fixtures/layoutdsl.json +++ b/app/client/cypress/fixtures/layoutdsl.json @@ -1,438 +1,547 @@ { - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1292, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 3, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", - "rightColumn": 8, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "8elnkhrzdb", - "containerStyle": "card", - "topRow": 0, - "bottomRow": 9, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 75.25, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "s3m9o0kzef", - "rightColumn": 602, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "4utikp3lta", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 342, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text1", - "rightColumn": 3, - "widgetId": "6350kah7vo", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 38, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 35.25, - "leftColumn": 0, - "text": "Title", - "textStyle": "HEADING" - } - ] - } - ] - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container3", - "rightColumn": 16, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "eavpzddsyy", - "containerStyle": "card", - "topRow": 9, - "bottomRow": 23, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 75.25, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "7023pcljqc", - "rightColumn": 1204, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "fwrt1tntll", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 532, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text3", - "rightColumn": 3, - "widgetId": "lzz2qxcwi5", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 38, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 72.875, - "leftColumn": 0, - "text": "Title", - "textStyle": "HEADING" - }, - { - "widgetName": "Aditya", - "rightColumn": 15, - "widgetId": "p4ph0yxggg", - "topRow": 1, - "bottomRow": 7, - "tabs": [ - { - "label": "Tab 1", - "id": "tab1" - }, - { - "label": "Tab 2", - "id": "tab2" - } - ], - "parentRowSpace": 38, - "isVisible": true, - "type": "TABS_WIDGET", - "dynamicBindings": {}, - "parentId": "fwrt1tntll", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "size": { - "rows": 6, - "cols": 16 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "tabId": "tab1", - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - }, - { - "size": { - "rows": 6, - "cols": 16 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "tabId": "tab2", - "detachFromLayout": true, - "children": [], - "containerStyle": "none", - "canExtend": false - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 71.75, - "leftColumn": 3, - "children": [ - { - "tabId": "tab1", - "widgetName": "Canvas1", - "rightColumn": 574, - "detachFromLayout": true, - "widgetId": "s3lmx5acn6", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 266, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "p4ph0yxggg", - "minHeight": 266, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Input1", - "rightColumn": 6, - "widgetId": "tl5p847ta8", - "topRow": 0, - "bottomRow": 1, - "isValid": "{{Input1.isRequired ? Input1.text && descriptionInput.text.length > 0 ? Input1.regex ? new RegExp(Input1.regex).test(Input1.text) : true : Input1.regex ? new RegExp(Input1.regex).test(Input1.text) : true}}", - "parentRowSpace": 38, - "isVisible": true, - "label": "Label me", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true - }, - "parentId": "s3lmx5acn6", - "isLoading": false, - "parentColumnSpace": 51.4375, - "leftColumn": 1, - "inputType": "TEXT" - }, - { - "widgetName": "Checkbox1", - "rightColumn": 6, - "widgetId": "e0da18s6li", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 38, - "isVisible": true, - "label": "Label me", - "type": "CHECKBOX_WIDGET", - "dynamicBindings": {}, - "parentId": "s3lmx5acn6", - "isLoading": false, - "parentColumnSpace": 51.4375, - "leftColumn": 3, - "defaultCheckedState": true - }, - { - "widgetName": "RadioGroup1", - "rightColumn": 12, - "widgetId": "xop37d5kql", - "topRow": 1, - "bottomRow": 3, - "isValid": "{{ RadioGroup1.isRequired ? !!RadioGroup1.selectedOptionValue : true }}", - "parentRowSpace": 38, - "isVisible": true, - "label": "Label", - "type": "RADIO_GROUP_WIDGET", - "dynamicBindings": { - "isValid": true, - "selectedOption": true - }, - "selectedOption": "{{_.find(RadioGroup1.options, { value: RadioGroup1.selectedOptionValue })}}", - "parentId": "s3lmx5acn6", - "isLoading": false, - "defaultOptionValue": "1", - "parentColumnSpace": 51.4375, - "leftColumn": 9, - "options": [ - { - "id": "1", - "label": "Alpha", - "value": "1" - }, - { - "id": "2", - "label": "Bravo", - "value": "2" - }, - { - "id": "3", - "label": "Charlie", - "value": "3" - } - ] - }, - { - "widgetName": "Button1", - "rightColumn": 9, - "isDefaultClickDisabled": true, - "widgetId": "ih7kwqfhsb", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 38, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": {}, - "parentId": "s3lmx5acn6", - "isLoading": false, - "parentColumnSpace": 51.4375, - "leftColumn": 7, - "text": "Submit", - "isDisabled": false - } - ] - }, - { - "tabId": "tab2", - "widgetName": "Canvas2", - "rightColumn": 574, - "detachFromLayout": true, - "widgetId": "4gm6hualwh", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 266, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "p4ph0yxggg", - "minHeight": 266, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "RichTextEditor1", - "rightColumn": 12, - "isDefaultClickDisabled": true, - "widgetId": "k3ec6crxfs", - "topRow": 0, - "bottomRow": 5, - "parentRowSpace": 38, - "isVisible": true, - "type": "RICH_TEXT_EDITOR_WIDGET", - "dynamicBindings": {}, - "parentId": "4gm6hualwh", - "isLoading": false, - "parentColumnSpace": 51.4375, - "leftColumn": 4, - "defaultText": "This is the initial content of the editor", - "isDisabled": false - }, - { - "widgetName": "Checkbox2", - "rightColumn": 4, - "widgetId": "68e5f5kehb", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 38, - "isVisible": true, - "label": "Label me", - "type": "CHECKBOX_WIDGET", - "dynamicBindings": {}, - "parentId": "4gm6hualwh", - "isLoading": false, - "parentColumnSpace": 51.4375, - "leftColumn": 1, - "defaultCheckedState": true - } - ] - } - ], - "selectedTab": "AAditya" - } - ] - } - ] - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container4", - "rightColumn": 16, - "orientation": "VERTICAL", - "snapColumns": 16, - "widgetId": "m2nzemp45g", - "containerStyle": "card", - "topRow": 0, - "bottomRow": 9, - "parentRowSpace": 38, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 75.25, - "leftColumn": 8, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "hr7raim6z1", - "rightColumn": 602, - "orientation": "VERTICAL", - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "nlnjrkg0uh", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 342, - "parentRowSpace": 1, - "isVisible": true, - "type": "CANVAS_WIDGET", - "canExtend": false, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Text2", - "rightColumn": 3, - "widgetId": "k7lop1jds0", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 38, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": {}, - "isLoading": false, - "parentColumnSpace": 35.25, - "leftColumn": 0, - "text": "Title", - "textStyle": "HEADING" - } - ] - } - ] - } - ] - }, - "layoutOnLoadActions": [] - } - \ No newline at end of file + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1254, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": {}, + "version": 4, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "rightColumn": 8, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "8elnkhrzdb", + "containerStyle": "card", + "topRow": 0, + "bottomRow": 9, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 75.25, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "s3m9o0kzef", + "rightColumn": 602, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "4utikp3lta", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 342, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text1", + "rightColumn": 3, + "widgetId": "6350kah7vo", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 38, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 35.25, + "leftColumn": 0, + "text": "Title", + "textStyle": "HEADING" + } + ] + } + ] + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container3", + "rightColumn": 16, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "eavpzddsyy", + "containerStyle": "card", + "topRow": 9, + "bottomRow": 20, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 75.25, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "7023pcljqc", + "rightColumn": 1204, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "fwrt1tntll", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 532, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text3", + "rightColumn": 3, + "widgetId": "lzz2qxcwi5", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 38, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 72.875, + "leftColumn": 0, + "text": "Title", + "textStyle": "HEADING" + }, + { + "widgetName": "Tab", + "rightColumn": 7, + "widgetId": "p4ph0yxggg", + "topRow": 2, + "bottomRow": 8, + "tabs": [ + { + "label": "Tab 1", + "id": "tab1" + }, + { + "label": "Tab 2", + "id": "tab2" + }, + { + "id": "tab6zuucm7r5j", + "label": "Tab 3" + }, + { + "id": "tab5fcogap5gv", + "label": "Tab 4" + } + ], + "parentRowSpace": 38, + "isVisible": true, + "type": "TABS_WIDGET", + "dynamicBindings": {}, + "parentId": "fwrt1tntll", + "shouldScrollContents": true, + "blueprint": { + "view": [ + { + "size": { + "rows": 6, + "cols": 16 + }, + "position": { + "top": 0, + "left": 0 + }, + "type": "CANVAS_WIDGET", + "props": { + "tabId": "tab1", + "detachFromLayout": true, + "children": [], + "containerStyle": "none", + "canExtend": false + } + }, + { + "size": { + "rows": 6, + "cols": 16 + }, + "position": { + "top": 0, + "left": 0 + }, + "type": "CANVAS_WIDGET", + "props": { + "tabId": "tab2", + "detachFromLayout": true, + "children": [], + "containerStyle": "none", + "canExtend": false + } + } + ] + }, + "isLoading": false, + "parentColumnSpace": 71.75, + "leftColumn": 1, + "children": [ + { + "tabId": "tab1", + "widgetName": "Canvas1", + "rightColumn": 574, + "detachFromLayout": true, + "widgetId": "s3lmx5acn6", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 266, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "p4ph0yxggg", + "minHeight": 266, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Input1", + "rightColumn": 6, + "widgetId": "tl5p847ta8", + "topRow": 0, + "bottomRow": 1, + "isValid": "{{Input1.isRequired ? Input1.text && descriptionInput.text.length > 0 ? Input1.regex ? new RegExp(Input1.regex).test(Input1.text) : true : Input1.regex ? new RegExp(Input1.regex).test(Input1.text) : true}}", + "parentRowSpace": 38, + "isVisible": true, + "label": "Label me", + "type": "INPUT_WIDGET", + "dynamicBindings": { + "isValid": true + }, + "parentId": "s3lmx5acn6", + "isLoading": false, + "parentColumnSpace": 51.4375, + "leftColumn": 1, + "inputType": "TEXT" + }, + { + "widgetName": "Checkbox1", + "rightColumn": 6, + "widgetId": "e0da18s6li", + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 38, + "isVisible": true, + "label": "Label me", + "type": "CHECKBOX_WIDGET", + "dynamicBindings": {}, + "parentId": "s3lmx5acn6", + "isLoading": false, + "parentColumnSpace": 51.4375, + "leftColumn": 3, + "defaultCheckedState": true + }, + { + "widgetName": "RadioGroup1", + "rightColumn": 12, + "widgetId": "xop37d5kql", + "topRow": 1, + "bottomRow": 3, + "isValid": "{{ RadioGroup1.isRequired ? !!RadioGroup1.selectedOptionValue : true }}", + "parentRowSpace": 38, + "isVisible": true, + "label": "Label", + "type": "RADIO_GROUP_WIDGET", + "dynamicBindings": { + "isValid": true, + "selectedOption": true + }, + "selectedOption": "{{_.find(RadioGroup1.options, { value: RadioGroup1.selectedOptionValue })}}", + "parentId": "s3lmx5acn6", + "isLoading": false, + "defaultOptionValue": "1", + "parentColumnSpace": 51.4375, + "leftColumn": 9, + "options": [ + { + "id": "1", + "label": "Alpha", + "value": "1" + }, + { + "id": "2", + "label": "Bravo", + "value": "2" + }, + { + "id": "3", + "label": "Charlie", + "value": "3" + } + ] + }, + { + "widgetName": "Button1", + "rightColumn": 9, + "isDefaultClickDisabled": true, + "widgetId": "ih7kwqfhsb", + "buttonStyle": "PRIMARY_BUTTON", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 38, + "isVisible": true, + "type": "BUTTON_WIDGET", + "dynamicBindings": {}, + "parentId": "s3lmx5acn6", + "isLoading": false, + "parentColumnSpace": 51.4375, + "leftColumn": 7, + "text": "Submit", + "isDisabled": false + } + ] + }, + { + "tabId": "tab2", + "widgetName": "Canvas2", + "rightColumn": 574, + "detachFromLayout": true, + "widgetId": "4gm6hualwh", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 228, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "p4ph0yxggg", + "minHeight": 266, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Checkbox2", + "rightColumn": 4, + "widgetId": "68e5f5kehb", + "topRow": 1, + "bottomRow": 2, + "parentRowSpace": 38, + "isVisible": true, + "label": "Label me", + "type": "CHECKBOX_WIDGET", + "dynamicBindings": {}, + "parentId": "4gm6hualwh", + "isLoading": false, + "parentColumnSpace": 51.4375, + "leftColumn": 1, + "defaultCheckedState": true + } + ] + }, + { + "tabId": "tabp0uz4ucxjy", + "widgetName": "Canvas3", + "rightColumn": 430.5, + "detachFromLayout": true, + "widgetId": "d3vnpcqfux", + "containerStyle": "none", + "topRow": 1, + "bottomRow": 229, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "p4ph0yxggg", + "minHeight": 228, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [] + }, + { + "tabId": "tab9deewfrkvy", + "widgetName": "Canvas4", + "rightColumn": 1076.25, + "detachFromLayout": true, + "widgetId": "f12x4oh4im", + "containerStyle": "none", + "topRow": 1, + "bottomRow": 305, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "p4ph0yxggg", + "minHeight": 304, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [] + }, + { + "tabId": "tab5mky7wi8s7", + "widgetName": "Canvas5", + "rightColumn": 1076.25, + "detachFromLayout": true, + "widgetId": "7mvuw32897", + "containerStyle": "none", + "topRow": 1, + "bottomRow": 305, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "p4ph0yxggg", + "minHeight": 304, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [] + }, + { + "tabId": "tabf93xg6z8ic", + "widgetName": "Canvas6", + "rightColumn": 1076.25, + "detachFromLayout": true, + "widgetId": "z7br5p9n30", + "containerStyle": "none", + "topRow": 1, + "bottomRow": 305, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "p4ph0yxggg", + "minHeight": 304, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [] + }, + { + "tabId": "tabvpmnf6jds8", + "widgetName": "Canvas7", + "rightColumn": 1076.25, + "detachFromLayout": true, + "widgetId": "msmbeq6d5x", + "containerStyle": "none", + "topRow": 1, + "bottomRow": 305, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "p4ph0yxggg", + "minHeight": 304, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [] + }, + { + "tabId": "tabq1fozv19qz", + "widgetName": "Canvas8", + "rightColumn": 1076.25, + "detachFromLayout": true, + "widgetId": "mkl9qtbdxw", + "containerStyle": "none", + "topRow": 1, + "bottomRow": 305, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "p4ph0yxggg", + "minHeight": 304, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [] + } + ], + "selectedTab": "Tab 2" + } + ] + } + ] + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container4", + "rightColumn": 16, + "orientation": "VERTICAL", + "snapColumns": 16, + "widgetId": "m2nzemp45g", + "containerStyle": "card", + "topRow": 0, + "bottomRow": 9, + "parentRowSpace": 38, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 75.25, + "leftColumn": 8, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "hr7raim6z1", + "rightColumn": 602, + "orientation": "VERTICAL", + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "nlnjrkg0uh", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 342, + "parentRowSpace": 1, + "isVisible": true, + "type": "CANVAS_WIDGET", + "canExtend": false, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text2", + "rightColumn": 3, + "widgetId": "k7lop1jds0", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 38, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": {}, + "isLoading": false, + "parentColumnSpace": 35.25, + "leftColumn": 0, + "text": "Title", + "textStyle": "HEADING" + } + ] + } + ] + } + ] + }, + "layoutOnLoadActions": [] +} \ No newline at end of file diff --git a/app/client/cypress/fixtures/tableWidgetDsl.json b/app/client/cypress/fixtures/tableWidgetDsl.json new file mode 100644 index 0000000000..d0df88b443 --- /dev/null +++ b/app/client/cypress/fixtures/tableWidgetDsl.json @@ -0,0 +1,84 @@ +{ + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1254, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": {}, + "version": 4, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container3", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 23, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "transparent", + "widgetName": "8muuok24ny", + "type": "CANVAS_WIDGET", + "containerStyle": "none", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 1204, + "topRow": 0, + "bottomRow": 532, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "isVisible": true, + "label": "Data", + "widgetName": "Table1", + "tableData": "", + "type": "TABLE_WIDGET", + "isLoading": false, + "parentColumnSpace": 71.75, + "parentRowSpace": 38, + "leftColumn": 2, + "rightColumn": 10, + "topRow": 3, + "bottomRow": 10, + "parentId": "tyiwk4xuq0", + "widgetId": "5up3r2iuvs", + "dynamicBindings": { + "selectedRow": true + } + } + ], + "widgetId": "tyiwk4xuq0", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "3oe1ka7jon" + } + ] + } +} \ No newline at end of file diff --git a/app/client/cypress/fixtures/uiBindDsl.json b/app/client/cypress/fixtures/uiBindDsl.json new file mode 100644 index 0000000000..56a5f97104 --- /dev/null +++ b/app/client/cypress/fixtures/uiBindDsl.json @@ -0,0 +1,394 @@ +{ + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1254, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": {}, + "version": 3, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 1, + "rightColumn": 15, + "topRow": 0, + "bottomRow": 15, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "utncsu66ty", + "type": "CANVAS_WIDGET", + "containerStyle": "none", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 602, + "topRow": 0, + "bottomRow": 342, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "isVisible": true, + "isDisabled": false, + "datePickerType": "DATE_PICKER", + "dateFormat": "DD/MM/YYYY", + "label": "Date", + "widgetName": "DatePicker1", + "defaultDate": "2020-04-25T13:33:46.277+05:30", + "type": "DATE_PICKER_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.6875, + "parentRowSpace": 38, + "leftColumn": 1, + "rightColumn": 9, + "topRow": 1, + "bottomRow": 2, + "parentId": "acizsl94my", + "widgetId": "o87a4mf3lq", + "dynamicProperties": {}, + "dynamicBindings": { + "isValid": true + }, + "dynamicTriggers": { + "onDateSelected": true + }, + "onDateSelected": "{{showModal('Modal1')}}" + }, + { + "isVisible": true, + "isDisabled": false, + "datePickerType": "DATE_PICKER", + "dateFormat": "DD/MM/YYYY", + "label": "Date", + "widgetName": "DatePicker2", + "defaultDate": "2020-04-24T13:03:46.277+05:30", + "type": "DATE_PICKER_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.6875, + "parentRowSpace": 38, + "leftColumn": 1, + "rightColumn": 9, + "topRow": 3, + "bottomRow": 4, + "parentId": "acizsl94my", + "widgetId": "tq86uzjesl" + }, + { + "isVisible": true, + "text": "{{DatePicker1.defaultDate}}", + "textStyle": "LABEL", + "widgetName": "Text5", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.6875, + "parentRowSpace": 38, + "leftColumn": 4, + "rightColumn": 8, + "topRow": 5, + "bottomRow": 6, + "parentId": "acizsl94my", + "widgetId": "dodyn4d4qd", + "dynamicBindings": { + "text": true + } + } + ], + "widgetId": "acizsl94my", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "mp429a7dl3" + }, + { + "isVisible": false, + "size": "MODAL_SMALL", + "canEscapeKeyClose": true, + "detachFromLayout": true, + "canOutsideClickClose": true, + "shouldScrollContents": true, + "widgetName": "Modal1", + "children": [ + { + "isVisible": true, + "widgetName": "Canvas1", + "detachFromLayout": true, + "canExtend": true, + "isDisabled": false, + "shouldScrollContents": false, + "children": [ + { + "isVisible": true, + "widgetName": "Icon1", + "iconName": "cross", + "iconSize": 24, + "color": "#040627", + "type": "ICON_WIDGET", + "isLoading": false, + "leftColumn": 15, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 1, + "parentId": "cwamdbv44c", + "widgetId": "t3sjfihdb1", + "onClick": "{{closeModal('Modal1')}}" + }, + { + "isVisible": true, + "text": "Modal Title", + "textStyle": "HEADING", + "widgetName": "Text4", + "type": "TEXT_WIDGET", + "isLoading": false, + "leftColumn": 0, + "rightColumn": 15, + "topRow": 0, + "bottomRow": 1, + "parentId": "cwamdbv44c", + "widgetId": "x893ud3zjh", + "dynamicBindings": {} + }, + { + "isVisible": true, + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON", + "widgetName": "Button2", + "isDisabled": false, + "isDefaultClickDisabled": true, + "type": "BUTTON_WIDGET", + "isLoading": false, + "leftColumn": 10, + "rightColumn": 13, + "topRow": 4, + "bottomRow": 5, + "parentId": "cwamdbv44c", + "widgetId": "q9snwskqan" + }, + { + "isVisible": true, + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON", + "widgetName": "Button3", + "isDisabled": false, + "isDefaultClickDisabled": true, + "type": "BUTTON_WIDGET", + "isLoading": false, + "leftColumn": 13, + "rightColumn": 16, + "topRow": 4, + "bottomRow": 5, + "parentId": "cwamdbv44c", + "widgetId": "tufuj2kdpz" + } + ], + "blueprint": { + "view": [ + { + "type": "ICON_WIDGET", + "position": { + "left": 15, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 1 + }, + "props": { + "iconName": "cross", + "iconSize": 24, + "color": "#040627" + } + }, + { + "type": "TEXT_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 15 + }, + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 10, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 13, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + }, + "minHeight": 0, + "type": "CANVAS_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 0, + "topRow": 0, + "bottomRow": 0, + "parentId": "bx9a2jg08o", + "widgetId": "cwamdbv44c" + } + ], + "blueprint": { + "view": [ + { + "type": "CANVAS_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "props": { + "detachFromLayout": true, + "canExtend": true, + "isVisible": true, + "isDisabled": false, + "shouldScrollContents": false, + "children": [], + "blueprint": { + "view": [ + { + "type": "ICON_WIDGET", + "position": { + "left": 15, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 1 + }, + "props": { + "iconName": "cross", + "iconSize": 24, + "color": "#040627" + } + }, + { + "type": "TEXT_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 15 + }, + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 10, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 13, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + } + } + } + ] + }, + "type": "MODAL_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 0, + "topRow": 0, + "bottomRow": 0, + "parentId": "0", + "widgetId": "bx9a2jg08o" + } + ] + } +} diff --git a/app/client/cypress/fixtures/viewdsl.json b/app/client/cypress/fixtures/viewdsl.json index 7c4f191394..19c9d06392 100644 --- a/app/client/cypress/fixtures/viewdsl.json +++ b/app/client/cypress/fixtures/viewdsl.json @@ -1,268 +1,268 @@ { "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1224, - "snapColumns": 16, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 1292, - "containerStyle": "none", - "snapRows": 33, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "dynamicBindings": {}, - "version": 3, - "minHeight": 1292, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", - "type": "CONTAINER_WIDGET", - "containerStyle": "card", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 75.25, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 0, - "rightColumn": 8, - "topRow": 0, - "bottomRow": 9, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "c7p0vl1zqc", - "type": "CANVAS_WIDGET", - "containerStyle": "none", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 602, - "topRow": 0, - "bottomRow": 342, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "text": "Title", - "textStyle": "HEADING", - "widgetName": "Text1", - "type": "TEXT_WIDGET", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 35.25, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 0, - "rightColumn": 3, - "topRow": 0, - "bottomRow": 1, - "widgetId": "5bjvswgbeq" - }, - { - "isVisible": true, - "defaultImage": "https://www.cowgirlcontractcleaning.com/wp-content/uploads/sites/360/2018/05/placeholder-img-5.jpg", - "imageShape": "RECTANGLE", - "image": "https://images.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", - "widgetName": "Image1", - "type": "IMAGE_WIDGET", - "isLoading": false, - "parentColumnSpace": 34.6875, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 5, - "rightColumn": 7, - "topRow": 2, - "bottomRow": 5, - "widgetId": "csc9e18wrn" - } - ], - "widgetId": "odbku2ed33", - "detachFromLayout": true, - "canExtend": false - } - ], - "widgetId": "sicjgah1h4" - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container3", - "type": "CONTAINER_WIDGET", - "containerStyle": "card", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 75.25, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 0, - "rightColumn": 16, - "topRow": 9, - "bottomRow": 23, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "l02um7toe4", - "type": "CANVAS_WIDGET", - "containerStyle": "none", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 1204, - "topRow": 0, - "bottomRow": 532, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "text": "Title", - "textStyle": "HEADING", - "widgetName": "Text3", - "type": "TEXT_WIDGET", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 72.875, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 0, - "rightColumn": 3, - "topRow": 0, - "bottomRow": 1, - "widgetId": "x6fphn5297" - }, - { - "isVisible": true, - "widgetName": "Chart1", - "chartType": "BAR_CHART", - "chartName": "App Sign Up", - "allowHorizontalScroll": false, - "chartData": [ - { - "seriesName": "", - "data": [ - { - "x": "Mon", - "y": 10000 - }, - { - "x": "Tue", - "y": 12000 - }, - { - "x": "Wed", - "y": 32000 - }, - { - "x": "Thu", - "y": 28000 - }, - { - "x": "Fri", - "y": 14000 - }, - { - "x": "Sat", - "y": 19000 - }, - { - "x": "Sun", - "y": 36000 - } - ] - } - ], - "xAxisName": "Last Week", - "yAxisName": "Total Order Revenue $", - "type": "CHART_WIDGET", - "isLoading": false, - "parentColumnSpace": 71.75, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 3, - "rightColumn": 13, - "topRow": 2, - "bottomRow": 10, - "parentId": "mt3eypejz7", - "widgetId": "km95vrd4sy" - } - ], - "widgetId": "mt3eypejz7", - "detachFromLayout": true, - "canExtend": false - } - ], - "widgetId": "oz8vs26002" - }, - { - "backgroundColor": "#FFFFFF", - "widgetName": "Container4", - "type": "CONTAINER_WIDGET", - "containerStyle": "card", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 75.25, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 8, - "rightColumn": 16, - "topRow": 0, - "bottomRow": 9, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "backgroundColor": "#FFFFFF", - "widgetName": "9w520wvlzd", - "type": "CANVAS_WIDGET", - "containerStyle": "none", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 602, - "topRow": 0, - "bottomRow": 342, - "snapColumns": 16, - "orientation": "VERTICAL", - "children": [ - { - "text": "Title", - "textStyle": "HEADING", - "widgetName": "Text2", - "type": "TEXT_WIDGET", - "isVisible": true, - "isLoading": false, - "parentColumnSpace": 35.25, - "parentRowSpace": 38, - "dynamicBindings": {}, - "leftColumn": 0, - "rightColumn": 3, - "topRow": 0, - "bottomRow": 1, - "widgetId": "ffvzxjjeok" - } - ], - "widgetId": "5kvdaa6y6m", - "detachFromLayout": true, - "canExtend": false - } - ], - "widgetId": "z6owhekptc" - } - ] + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1292, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": {}, + "version": 3, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 8, + "topRow": 0, + "bottomRow": 9, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "c7p0vl1zqc", + "type": "CANVAS_WIDGET", + "containerStyle": "none", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 602, + "topRow": 0, + "bottomRow": 342, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "text": "Title", + "textStyle": "HEADING", + "widgetName": "Text1", + "type": "TEXT_WIDGET", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 35.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 3, + "topRow": 0, + "bottomRow": 1, + "widgetId": "5bjvswgbeq" + }, + { + "isVisible": true, + "defaultImage": "https://www.cowgirlcontractcleaning.com/wp-content/uploads/sites/360/2018/05/placeholder-img-5.jpg", + "imageShape": "RECTANGLE", + "image": "https://images.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940hotos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940", + "widgetName": "Image1", + "type": "IMAGE_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.6875, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 5, + "rightColumn": 7, + "topRow": 2, + "bottomRow": 5, + "widgetId": "csc9e18wrn" + } + ], + "widgetId": "odbku2ed33", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "sicjgah1h4" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container3", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 16, + "topRow": 9, + "bottomRow": 23, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "l02um7toe4", + "type": "CANVAS_WIDGET", + "containerStyle": "none", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 1204, + "topRow": 0, + "bottomRow": 532, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "text": "Title", + "textStyle": "HEADING", + "widgetName": "Text3", + "type": "TEXT_WIDGET", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 72.875, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 3, + "topRow": 0, + "bottomRow": 1, + "widgetId": "x6fphn5297" + }, + { + "isVisible": true, + "widgetName": "Chart1", + "chartType": "BAR_CHART", + "chartName": "App Sign Up", + "allowHorizontalScroll": false, + "chartData": [ + { + "seriesName": "", + "data": [ + { + "x": "Mon", + "y": 10000 + }, + { + "x": "Tue", + "y": 12000 + }, + { + "x": "Wed", + "y": 32000 + }, + { + "x": "Thu", + "y": 28000 + }, + { + "x": "Fri", + "y": 14000 + }, + { + "x": "Sat", + "y": 19000 + }, + { + "x": "Sun", + "y": 36000 + } + ] + } + ], + "xAxisName": "Last Week", + "yAxisName": "Total Order Revenue $", + "type": "CHART_WIDGET", + "isLoading": false, + "parentColumnSpace": 71.75, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 3, + "rightColumn": 13, + "topRow": 2, + "bottomRow": 10, + "parentId": "mt3eypejz7", + "widgetId": "km95vrd4sy" + } + ], + "widgetId": "mt3eypejz7", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "oz8vs26002" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container4", + "type": "CONTAINER_WIDGET", + "containerStyle": "card", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 75.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 8, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 9, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "backgroundColor": "#FFFFFF", + "widgetName": "9w520wvlzd", + "type": "CANVAS_WIDGET", + "containerStyle": "none", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 602, + "topRow": 0, + "bottomRow": 342, + "snapColumns": 16, + "orientation": "VERTICAL", + "children": [ + { + "text": "Title", + "textStyle": "HEADING", + "widgetName": "Text2", + "type": "TEXT_WIDGET", + "isVisible": true, + "isLoading": false, + "parentColumnSpace": 35.25, + "parentRowSpace": 38, + "dynamicBindings": {}, + "leftColumn": 0, + "rightColumn": 3, + "topRow": 0, + "bottomRow": 1, + "widgetId": "ffvzxjjeok" + } + ], + "widgetId": "5kvdaa6y6m", + "detachFromLayout": true, + "canExtend": false + } + ], + "widgetId": "z6owhekptc" + } + ] }, "layoutOnLoadActions": [] - } + } \ No newline at end of file diff --git a/app/client/cypress/integration/Smoke_TestSuite/Binding/Bind_DatePicker_Text_spec.js b/app/client/cypress/integration/Smoke_TestSuite/Binding/Bind_DatePicker_Text_spec.js new file mode 100644 index 0000000000..52a8e26d8e --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/Binding/Bind_DatePicker_Text_spec.js @@ -0,0 +1,58 @@ +const commonlocators = require("../../../locators/commonlocators.json"); +const formWidgetsPage = require("../../../locators/FormWidgets.json"); +const widgetsPage = require("../../../locators/Widgets.json"); +const dsl = require("../../../fixtures/uiBindDsl.json"); + +describe("Binding the Datepicker and Text Widget", function() { + let nextDay; + let dateDp2; + before(() => { + cy.addDsl(dsl); + }); + + it("DatePicker1-text: Change the date in DatePicker1 and Validate the same in text widget", function() { + cy.openPropertyPane("textwidget"); + + /** + * Bind the datepicker1 to text widget + */ + cy.testJsontext("text", "{{DatePicker1.defaultDate}}"); + cy.get(commonlocators.editPropCrossButton).click(); + + /** + * Fetching the date on DatePicker2 + */ + + cy.get(formWidgetsPage.datepickerWidget + " .bp3-input") + .eq(1) + .invoke("val") + .then(val => { + dateDp2 = val; + cy.log(dateDp2); + }); + + /** + * Changing date on datepicker1 to current date +1 + */ + cy.openPropertyPane("datepickerwidget"); + cy.SetDateToToday(); + cy.get(formWidgetsPage.nextDayBtn).click(); + cy.get(commonlocators.onDateSelectedField).click(); + cy.get(commonlocators.editPropCrossButton).click(); + + /** + *Validate the date in text widget + */ + + nextDay = Cypress.moment() + .add(1, "days") + .format("YYYY-MM-DD"); + cy.get(commonlocators.labelTextStyle).should("contain", nextDay); + }); + + it("Validate the Date is not changed in DatePicker2", function() { + cy.get(formWidgetsPage.datepickerWidget + " .bp3-input") + .eq(1) + .should("have.value", dateDp2); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/Binding/Bind_tableApi_spec.js b/app/client/cypress/integration/Smoke_TestSuite/Binding/Bind_tableApi_spec.js new file mode 100644 index 0000000000..4a454bffec --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/Binding/Bind_tableApi_spec.js @@ -0,0 +1,45 @@ +const commonlocators = require("../../../locators/commonlocators.json"); +const dsl = require("../../../fixtures/tableWidgetDsl.json"); +const pages = require("../../../locators/Pages.json"); +const apiPage = require("../../../locators/ApiEditor.json"); +let apiData; + +describe("Test Create Api and Bind to Table widget", function() { + before(() => { + cy.addDsl(dsl); + }); + + it("Test_Add users api and execute api", function() { + cy.NavigateToApiEditor(); + cy.testCreateApiButton(); + cy.createApi(this.data.userApi, "users"); + cy.get(apiPage.responseBody) + .contains("name") + .siblings("span") + .invoke("text") + .then(text => { + cy.log(text); + apiData = text; + cy.log("val1:" + apiData); + }); + }); + + it("Test_Validate the Api data is updated on Table widget", function() { + cy.get(pages.pagesIcon).click({ force: true }); + cy.openPropertyPane("tablewidget"); + cy.testJsontext("tabledata", "{{Api1.data}}"); + cy.get(commonlocators.editPropCrossButton).click(); + + /** + * readTabledata--> is to read the table contents + * @param --> "row num" and "col num" + */ + cy.readTabledata("0", "1").then(tabData => { + expect(apiData).to.eq(`\"${tabData}\"`); + }); + }); + + afterEach(() => { + // put your clean up code if any + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/Binding/TextTable.js b/app/client/cypress/integration/Smoke_TestSuite/Binding/TextTable.js new file mode 100644 index 0000000000..e71dd67dac --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/Binding/TextTable.js @@ -0,0 +1,29 @@ +const commonlocators = require("../../../locators/commonlocators.json"); +const dsl = require("../../../fixtures/TextTabledsl.json"); + +describe("Text-Table Binding Functionality", function() { + before(() => { + cy.addDsl(dsl); + }); + it("Text-Table Binding Functionality For Username", function() { + cy.openPropertyPane("tablewidget"); + /** + * @param(Index) Provide index value to select the row. + */ + cy.isSelectRow(1); + cy.openPropertyPane("textwidget"); + cy.testJsontext("text", JSON.stringify(this.data.textfun)); + /** + * @param{Row Index} Provide the row index + * @param(Column Index) Provide column index + */ + cy.readTabledata("1", "2").then(tabData => { + const tabValue = `\"${tabData}\"`; + cy.get(commonlocators.TextInside).should("have.text", tabValue); + }); + }); + afterEach(() => { + // put your clean up code if any + cy.get(commonlocators.editPropCrossButton).click(); + }); +}); diff --git a/app/client/cypress/integration/Smoke_TestSuite/CommonWidgets/Container_spec.js b/app/client/cypress/integration/Smoke_TestSuite/CommonWidgets/Container_spec.js index 6f017d1aca..d1e8449912 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/CommonWidgets/Container_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/CommonWidgets/Container_spec.js @@ -1,4 +1,5 @@ const commonlocators = require("../../../locators/commonlocators.json"); +const widgetsPage = require("../../../locators/Widgets.json"); const dsl = require("../../../fixtures/commondsl.json"); describe("Container Widget Functionality", function() { @@ -8,9 +9,31 @@ describe("Container Widget Functionality", function() { it("Container Widget Functionality", function() { cy.openPropertyPane("containerwidget"); - - //Checking the edit props for container changing the background color of container - cy.testCodeMirror("#C0C0C0"); + /** + * @param{Text} Random Text + * @param{ContainerWidget}Mouseover + * @param{ContainerPre Css} Assertion + */ + cy.widgetText( + "job", + widgetsPage.containerWidget, + commonlocators.containerInnerText, + ); + /** + * @param{Text} Random Colour + */ + cy.testCodeMirror(this.data.colour); + cy.get(widgetsPage.containerD) + .should("have.css", "background-color") + .and("eq", "rgb(255, 0, 0)"); + /** + * @param{toggleButton Css} Assert to be checked + */ + cy.togglebar(widgetsPage.Scrollbutton); + cy.get(widgetsPage.containerD) + .eq(0) + .scrollIntoView({ easing: "linear" }) + .should("be.visible"); cy.get(commonlocators.editPropCrossButton).click(); }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/CommonWidgets/Input_spec.js b/app/client/cypress/integration/Smoke_TestSuite/CommonWidgets/Input_spec.js index 2aa7858fec..fb185b354e 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/CommonWidgets/Input_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/CommonWidgets/Input_spec.js @@ -1,5 +1,6 @@ const commonlocators = require("../../../locators/commonlocators.json"); const dsl = require("../../../fixtures/commondsl.json"); +const widgetsPage = require("../../../locators/Widgets.json"); describe("Input Widget Functionality", function() { beforeEach(() => { @@ -7,11 +8,54 @@ describe("Input Widget Functionality", function() { }); it("Input Widget Functionality", function() { cy.openPropertyPane("inputwidget"); - - //Checking the edit props for container and changing the Input label name - cy.testCodeMirror("Test Input Label"); - - cy.get(commonlocators.editPropCrossButton).click(); + /** + * @param{Text} Random Text + * @param{InputWidget}Mouseover + * @param{InputPre Css} Assertion + */ + cy.widgetText("day", widgetsPage.inputWidget, widgetsPage.inputval); + /** + * @param{Text} Random Value + */ + cy.testCodeMirror(this.data.inputdata); + cy.get(widgetsPage.label) + .first() + .trigger(this.data.Hover, { force: true }) + .should("have.text", "one"); + cy.get(widgetsPage.datatype) + .find(commonlocators.dropdownbuttonclick) + .click({ force: true }) + .get(commonlocators.dropdownmenu) + .children() + .contains("Number") + .click(); + cy.get(widgetsPage.innertext) + .click({ force: true }) + .type(this.data.para) + .should("be.empty"); + cy.openPropertyPane("inputwidget"); + cy.get(widgetsPage.defaultInput) + .type(this.data.command) + .type("hello"); + cy.get(widgetsPage.placeholder) + .type(this.data.command) + .type(this.data.placeholder); + /** + * @param{Widget} Widget InnerCss + */ + cy.get(widgetsPage.innertext) + .invoke("attr", "placeholder") + .should("contain", "check"); + cy.get(widgetsPage.Regex) + .click() + .type(this.data.regex); + /** + * @param{Show Alert} Css for InputChange + */ + cy.getAlert(commonlocators.optionchangetextInput); + cy.get(widgetsPage.inputButtonPos) + .eq(0) + .click({ force: true }); }); afterEach(() => { diff --git a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/CheckBox_spec.js b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/CheckBox_spec.js index 98aabbf050..184cdcb55f 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/CheckBox_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/CheckBox_spec.js @@ -1,4 +1,6 @@ const commonlocators = require("../../../locators/commonlocators.json"); +const formWidgetsPage = require("../../../locators/FormWidgets.json"); +const widgetsPage = require("../../../locators/Widgets.json"); const dsl = require("../../../fixtures/formdsl.json"); describe("Checkbox Widget Functionality", function() { @@ -8,10 +10,32 @@ describe("Checkbox Widget Functionality", function() { it("Checkbox Widget Functionality", function() { cy.openPropertyPane("checkboxwidget"); - - //Checking the edit props for Checkbox and also the properties of Checkbox widget - cy.testCodeMirror("Test Checkbox"); - cy.get(commonlocators.editPropCrossButton).click(); + /** + * @param{Text} Random Text + * @param{CheckboxWidget}Mouseover + * @param{CheckboxPre Css} Assertion + */ + cy.widgetText( + "checker", + formWidgetsPage.checkboxWidget, + widgetsPage.checkboxInput, + ); + /** + * @param{Text} Random Value + */ + cy.testCodeMirror(this.data.checkbocInputName); + cy.get(widgetsPage.checkboxLabel).should("have.text", "value"); + /** + * @param{toggleButton Css} Assert to be checked + */ + cy.togglebar(widgetsPage.defaultcheck); + /** + * @param{Show Alert} Css for InputChange + */ + cy.getAlert(commonlocators.optionchangetextCheckbox); + cy.get(widgetsPage.checkboxLabel) + .contains("value") + .click({ force: true }); }); afterEach(() => { diff --git a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js index 0396785d3f..2bc690df72 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/FormWidgets/DatePicker_spec.js @@ -10,15 +10,30 @@ describe("DatePicker Widget Functionality", function() { it("DatePicker Widget Functionality", function() { cy.openPropertyPane("datepickerwidget"); - //Checking the edit props for DatePicker and also the properties of DatePicker widget - cy.testCodeMirror(this.data.DatepickerLable); - // changing the date to today cy.SetDateToToday(); + //changing the Button Name + cy.widgetText( + this.data.Datepickername, + formWidgetsPage.datepickerWidget, + formWidgetsPage.datepickerWidget + " pre", + ); + + //Checking the edit props for DatePicker and also the properties of DatePicker widget + cy.testCodeMirror(this.data.DatepickerLable); + cy.wait("@updateLayout"); + // change the date to next day cy.get(".t--property-control-defaultdate input").click(); - cy.get(".DayPicker-Day[aria-selected='true'] + div").click(); + + /** + * setDate--> is a Command to select the date in the date picker + * @param1 --> its takes currentday+{organization.name}
+Query error
+Query response
@@ -470,16 +483,7 @@ const QueryEditorForm: React.FC