From 57f86debae6e90ea1403e653e3eca82aa42557e4 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Wed, 26 Jun 2024 20:01:30 +0530 Subject: [PATCH] test: Really empty DSL (#34510) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of #33724, and extension to #34405. This file's contents are used to call the endpoint: ``` /layouts/{layoutId}/pages/{pageId}?applicationId={applicationId} ``` But this endpoint accepts request payload as `LayoutUpdateDTO`, which only has one single field, `dsl`, and nothing else. But the way we use this JSON, is that we're sending the body as this: ```json { "widgetName": "MainContainer", "backgroundColor": "none", "rightColumn": 1296, "snapColumns": 64, "detachFromLayout": true, "widgetId": "0", "topRow": 0, "bottomRow": 440, "containerStyle": "none", "snapRows": 125, "parentRowSpace": 1, "type": "CANVAS_WIDGET", "canExtend": true, "version": 47, "minHeight": 420, "parentColumnSpace": 1, "dynamicBindingPathList": [], "leftColumn": 0, "children": [] } ``` Not as this: ```json { "dsl": { "widgetName": "MainContainer", "backgroundColor": "none", "rightColumn": 1296, "snapColumns": 64, "detachFromLayout": true, "widgetId": "0", "topRow": 0, "bottomRow": 440, "containerStyle": "none", "snapRows": 125, "parentRowSpace": 1, "type": "CANVAS_WIDGET", "canExtend": true, "version": 47, "minHeight": 420, "parentColumnSpace": 1, "dynamicBindingPathList": [], "leftColumn": 0, "children": [] } } ``` Which means that we aren't sending anything useful. /test widget ide > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: 8ede3e707c0487cdeda62b166487f093f1bcab78 > Cypress dashboard. > Tags: `@tag.Widget, @tag.IDE` --- app/client/cypress/fixtures/emptyDSL.json | 26 +---------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/app/client/cypress/fixtures/emptyDSL.json b/app/client/cypress/fixtures/emptyDSL.json index df1127432c..0967ef424b 100644 --- a/app/client/cypress/fixtures/emptyDSL.json +++ b/app/client/cypress/fixtures/emptyDSL.json @@ -1,25 +1 @@ -{ - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 1296, - "snapColumns": 64, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 440, - "containerStyle": "none", - "snapRows": 125, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "version": 47, - "minHeight": 420, - "parentColumnSpace": 1, - "dynamicBindingPathList": [ - - ], - "leftColumn": 0, - "children": [ - - ] -} \ No newline at end of file +{}