PromucFlow_constructor/app/client/cypress/fixtures/formdsl.json
Shrikant Sharat Kandula dc79ebb918
test: Remove unused data in DSL fixtures (#34405)
Part of #33724.

We have a lot of fixture files in our Cypress tests with DSLs of various
kinds. They are used to update the DSL using the
`/api/v1/layouts/{layoutId}/pages/{pageId}?applicationId={applicationId}`.

This API, is [in this line in
`LayoutControllerCE`](c4e5d5e6c8/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ce/LayoutControllerCE.java (L71)),
and the request body is parsed as [objects of `LayoutUpdateDTO`
record](71bc84fc76/app/server/appsmith-server/src/main/java/com/appsmith/server/dtos/LayoutUpdateDTO.java (L6)).
This `record`, accepts _only_ the `dsl` field, and nothing else.

List of potential files that have this problem was identified with this
command:

```sh
cd app/client/cypress
rg -Io 'AddDsl\(".+?\)' \
  | cut -d\" -f2 \
  | sort -u \
  | while read line; do
    if rg -q '"(layoutOnLoadActions|layoutOnLoadActionErrors|userPermissions|new)":' fixtures/"$line".json; then
      echo $line
    fi
  done
```

(For reference, and to use on EE repo, after this is merged).

**/test all**

<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]
> 🔴 🔴 🔴 Some tests have failed.
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9633990737>
> Commit: 9e848f1ed0c3332177d2e6c4a75e2483f045395f
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9633990737&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail"
target="_blank">Cypress dashboard</a>.
> Tags: ``
> The following are new failures, please fix them before merging the PR:
<ol>
>
<li>cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor3_spec.ts
>
<li>cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_1_spec.js
>
<li>cypress/e2e/Regression/ClientSide/Widgets/RTE/RichTextEditor_2_spec.js
</ol>
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master"
target="_blank">List of identified flaky tests</a>.

<!-- end of auto-generated comment: Cypress test results  -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Corrected the file path for loading DSL configuration in the nested
list widget scenario.

- **Chores**
- Streamlined multiple JSON files by removing deprecated
`layoutOnLoadActions` arrays and other obsolete fields, resulting in
cleaner and more manageable configurations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-24 17:17:43 +05:30

498 lines
17 KiB
JSON

{
"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,
"dynamicBindingPathList": [],
"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",
"dynamicBindingPathList": [],
"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,
"widgetId": "n9hyiainl8",
"topRow": 0,
"bottomRow": 1,
"parentRowSpace": 38,
"isVisible": true,
"label": "Test Dropdown",
"type": "SELECT_WIDGET",
"dynamicBindingPathList": [],
"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",
"dynamicBindingPathList": [],
"isLoading": false,
"parentColumnSpace": 34.6875,
"leftColumn": 11,
"dynamicTriggerPathList": [
{
"key": "onCheckChange"
}
],
"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",
"dynamicBindingPathList": [],
"isLoading": false,
"parentColumnSpace": 34.6875,
"leftColumn": 3,
"dynamicTriggerPathList": [
{
"key": "onTextChange"
}
],
"defaultText": "",
"text": "This is the initial <b>content</b> of the editor",
"isDisabled": false,
"onTextChange": "{{navigateTo()}}"
},
{
"widgetName": "Adi12",
"rightColumn": 16,
"widgetId": "76qupajn9l",
"topRow": 3,
"bottomRow": 5,
"parentRowSpace": 38,
"isVisible": true,
"label": "Test Radio",
"type": "RADIO_GROUP_WIDGET",
"dynamicBindingPathList": [],
"isLoading": false,
"defaultOptionValue": "1",
"parentColumnSpace": 34.6875,
"leftColumn": 12,
"dynamicTriggerPathList": [
{
"key": "onSelectionChange"
}
],
"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",
"dynamicBindingPathList": [],
"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,
"parentId": "28hfrtdb1a",
"children": [
{
"widgetName": "Form1",
"backgroundColor": "Gray",
"rightColumn": 11,
"widgetId": "z62mnh15y5",
"topRow": 1,
"bottomRow": 13,
"parentRowSpace": 38,
"isVisible": true,
"type": "FORM_WIDGET",
"dynamicBindingPathList": [],
"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",
"dynamicBindingPathList": [],
"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",
"dynamicBindingPathList": []
},
{
"resetFormOnClick": false,
"widgetName": "FormButton1",
"rightColumn": 16,
"isDefaultClickDisabled": true,
"widgetId": "tf20n9k4z2",
"buttonStyle": "PRIMARY_BUTTON",
"topRow": 11,
"bottomRow": 12,
"isVisible": true,
"type": "FORM_BUTTON_WIDGET",
"dynamicBindingPathList": [],
"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",
"dynamicBindingPathList": [],
"isLoading": false,
"disabledWhenInvalid": false,
"leftColumn": 8,
"text": "Reset"
}
]
}
],
"parentId": "ac4kpozgg3"
}
]
}
]
},
{
"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",
"dynamicBindingPathList": [],
"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",
"dynamicBindingPathList": [],
"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",
"dynamicBindingPathList": [],
"isLoading": false,
"enableTimePicker": true,
"parentColumnSpace": 34.6875,
"leftColumn": 3,
"isDisabled": false
}
]
}
]
}
]
}
}