test: updated test and dsl (#16656)

updated test and dsl
This commit is contained in:
NandanAnantharamu 2022-09-13 11:56:37 +05:30 committed by GitHub
parent afb9aa93c1
commit 6f45430395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 270 additions and 153 deletions

View File

@ -2,56 +2,102 @@
"dsl": { "dsl": {
"widgetName": "MainContainer", "widgetName": "MainContainer",
"backgroundColor": "none", "backgroundColor": "none",
"rightColumn": 1224, "rightColumn": 4896,
"snapColumns": 16, "snapColumns": 64,
"detachFromLayout": true, "detachFromLayout": true,
"widgetId": "0", "widgetId": "0",
"topRow": 0, "topRow": 0,
"bottomRow": 1280, "bottomRow": 1130,
"containerStyle": "none", "containerStyle": "none",
"snapRows": 33, "snapRows": 125,
"parentRowSpace": 1, "parentRowSpace": 1,
"type": "CANVAS_WIDGET", "type": "CANVAS_WIDGET",
"canExtend": true, "canExtend": true,
"version": 8, "version": 60,
"minHeight": 1292, "minHeight": 1292,
"dynamicTriggerPathList": [],
"parentColumnSpace": 1, "parentColumnSpace": 1,
"dynamicBindingPathList": [], "dynamicBindingPathList": [],
"leftColumn": 0, "leftColumn": 0,
"children": [{ "children": [
"isVisible": true, {
"isVisiblePagination": true, "boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}",
"isVisibleSearch": true, "isVisibleDownload": true,
"isVisibleFilter": true, "iconSVG": "/static/media/icon.db8a9cbd2acd22a31ea91cc37ea2a46c.svg",
"label": "Data", "topRow": 83,
"widgetName": "Table1", "isSortable": true,
"searchKey": "",
"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\": 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]}}",
"type": "TABLE_WIDGET_V2", "type": "TABLE_WIDGET_V2",
"isLoading": false, "inlineEditingSaveOption": "ROW_LEVEL",
"parentColumnSpace": 74, "animateLoading": true,
"parentRowSpace": 40, "dynamicBindingPathList": [
"leftColumn": 2, {
"rightColumn": 10, "key": "accentColor"
"topRow": 12,
"bottomRow": 19,
"parentId": "0",
"widgetId": "sb070qr2ir",
"dynamicBindingPathList": [],
"columnOrder": [
"id",
"email",
"userName",
"productName",
"orderAmount"
],
"aliasMap": {
"id": "id",
"email": "email",
"userName": "userName",
"productName": "productName",
"orderAmount": "orderAmount"
}, },
{
"key": "borderRadius"
},
{
"key": "boxShadow"
},
{
"key": "childStylesheet.button.buttonColor"
},
{
"key": "childStylesheet.button.borderRadius"
},
{
"key": "childStylesheet.menuButton.menuColor"
},
{
"key": "childStylesheet.menuButton.borderRadius"
},
{
"key": "childStylesheet.iconButton.buttonColor"
},
{
"key": "childStylesheet.iconButton.borderRadius"
},
{
"key": "childStylesheet.editActions.saveButtonColor"
},
{
"key": "childStylesheet.editActions.saveBorderRadius"
},
{
"key": "childStylesheet.editActions.discardButtonColor"
},
{
"key": "childStylesheet.editActions.discardBorderRadius"
},
{
"key": "tableData"
},
{
"key": "primaryColumns.id.computedValue"
},
{
"key": "primaryColumns.email.computedValue"
},
{
"key": "primaryColumns.userName.computedValue"
},
{
"key": "primaryColumns.productName.computedValue"
},
{
"key": "primaryColumns.orderAmount.computedValue"
}
],
"leftColumn": 16,
"delimiter": ",",
"defaultSelectedRowIndex": 0,
"accentColor": "{{appsmith.theme.colors.primaryColor}}",
"isVisibleFilters": true,
"isVisible": true,
"enableClientSideSearch": true,
"version": 1,
"totalRecordsCount": 0,
"isLoading": false,
"childStylesheet": { "childStylesheet": {
"button": { "button": {
"buttonColor": "{{appsmith.theme.colors.primaryColor}}", "buttonColor": "{{appsmith.theme.colors.primaryColor}}",
@ -64,108 +110,179 @@
"boxShadow": "none" "boxShadow": "none"
}, },
"iconButton": { "iconButton": {
"menuColor": "{{appsmith.theme.colors.primaryColor}}", "buttonColor": "{{appsmith.theme.colors.primaryColor}}",
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
"boxShadow": "none" "boxShadow": "none"
},
"editActions": {
"saveButtonColor": "{{appsmith.theme.colors.primaryColor}}",
"saveBorderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
"discardButtonColor": "{{appsmith.theme.colors.primaryColor}}",
"discardBorderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}"
} }
}, },
"borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}",
"defaultSelectedRowIndices": [
0
],
"widgetName": "Table1",
"defaultPageSize": 0,
"columnOrder": [
"id",
"email",
"userName",
"productName",
"orderAmount"
],
"dynamicPropertyPathList": [],
"displayName": "Table",
"bottomRow": 111,
"columnWidthMap": {
"task": 245,
"step": 62,
"status": 75
},
"parentRowSpace": 10,
"hideCard": false,
"parentColumnSpace": 9.96875,
"dynamicTriggerPathList": [],
"primaryColumns": { "primaryColumns": {
"id": { "id": {
"allowCellWrapping": false,
"index": 0, "index": 0,
"width": 150, "width": 150,
"originalId": "id",
"id": "id", "id": "id",
"alias": "id", "alias": "id",
"originalId": "id",
"horizontalAlignment": "LEFT", "horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER", "verticalAlignment": "CENTER",
"columnType": "text", "columnType": "text",
"textColor": "#4E5D78", "textSize": "0.875rem",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true, "enableFilter": true,
"enableSort": true, "enableSort": true,
"isVisible": true, "isVisible": true,
"isDisabled": false,
"isCellEditable": false,
"isEditable": false,
"isCellVisible": true,
"isDerived": false, "isDerived": false,
"label": "id", "label": "id",
"computedValue": "" "isSaveVisible": true,
"isDiscardVisible": true,
"computedValue": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( currentRow[\"id\"]))}}"
}, },
"email": { "email": {
"allowCellWrapping": false,
"index": 1, "index": 1,
"width": 150, "width": 150,
"originalId": "email",
"id": "email", "id": "email",
"alias": "email", "alias": "email",
"originalId": "email",
"horizontalAlignment": "LEFT", "horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER", "verticalAlignment": "CENTER",
"columnType": "text", "columnType": "text",
"textColor": "#4E5D78", "textSize": "0.875rem",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true, "enableFilter": true,
"enableSort": true, "enableSort": true,
"isVisible": true, "isVisible": true,
"isDisabled": false,
"isCellEditable": false,
"isEditable": false,
"isCellVisible": true,
"isDerived": false, "isDerived": false,
"label": "email", "label": "email",
"computedValue": "" "isSaveVisible": true,
"isDiscardVisible": true,
"computedValue": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( currentRow[\"email\"]))}}"
}, },
"userName": { "userName": {
"allowCellWrapping": false,
"index": 2, "index": 2,
"width": 150, "width": 150,
"originalId": "userName",
"id": "userName", "id": "userName",
"alias": "userName", "alias": "userName",
"originalId": "userName",
"horizontalAlignment": "LEFT", "horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER", "verticalAlignment": "CENTER",
"columnType": "text", "columnType": "text",
"textColor": "#4E5D78", "textSize": "0.875rem",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true, "enableFilter": true,
"enableSort": true, "enableSort": true,
"isVisible": true, "isVisible": true,
"isDisabled": false,
"isCellEditable": false,
"isEditable": false,
"isCellVisible": true,
"isDerived": false, "isDerived": false,
"label": "userName", "label": "userName",
"computedValue": "" "isSaveVisible": true,
"isDiscardVisible": true,
"computedValue": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( currentRow[\"userName\"]))}}"
}, },
"productName": { "productName": {
"allowCellWrapping": false,
"index": 3, "index": 3,
"width": 150, "width": 150,
"originalId": "productName",
"id": "productName", "id": "productName",
"alias": "productName", "alias": "productName",
"originalId": "productName",
"horizontalAlignment": "LEFT", "horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER", "verticalAlignment": "CENTER",
"columnType": "text", "columnType": "text",
"textColor": "#4E5D78", "textSize": "0.875rem",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true, "enableFilter": true,
"enableSort": true, "enableSort": true,
"isVisible": true, "isVisible": true,
"isDisabled": false,
"isCellEditable": false,
"isEditable": false,
"isCellVisible": true,
"isDerived": false, "isDerived": false,
"label": "productName", "label": "productName",
"computedValue": "" "isSaveVisible": true,
"isDiscardVisible": true,
"computedValue": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( currentRow[\"productName\"]))}}"
}, },
"orderAmount": { "orderAmount": {
"allowCellWrapping": false,
"index": 4, "index": 4,
"width": 150, "width": 150,
"originalId": "orderAmount",
"id": "orderAmount", "id": "orderAmount",
"alias": "orderAmount", "alias": "orderAmount",
"originalId": "orderAmount",
"horizontalAlignment": "LEFT", "horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER", "verticalAlignment": "CENTER",
"columnType": "text", "columnType": "text",
"textColor": "#4E5D78", "textSize": "0.875rem",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true, "enableFilter": true,
"enableSort": true, "enableSort": true,
"isVisible": true, "isVisible": true,
"isDisabled": false,
"isCellEditable": false,
"isEditable": false,
"isCellVisible": true,
"isDerived": false, "isDerived": false,
"label": "orderAmount", "label": "orderAmount",
"computedValue": "" "isSaveVisible": true,
"isDiscardVisible": true,
"computedValue": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( currentRow[\"orderAmount\"]))}}"
} }
},
"key": "rxs6wup9fz",
"isDeprecated": false,
"rightColumn": 50,
"textSize": "0.875rem",
"widgetId": "8o3mdylmxa",
"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\t {\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\t {\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\t {\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\t {\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]}}",
"label": "Data",
"searchKey": "",
"parentId": "0",
"renderMode": "CANVAS",
"horizontalAlignment": "LEFT",
"isVisibleSearch": true,
"isVisiblePagination": true,
"verticalAlignment": "CENTER"
} }
}] ]
} }
} }

View File

@ -190,7 +190,7 @@ describe("Table Widget property pane feature validation", function() {
const color1 = "rgb(255, 255, 0)"; const color1 = "rgb(255, 255, 0)";
cy.get(widgetsPage.menuColor) cy.get(widgetsPage.menuColor)
.clear() .clear()
.click() .click({force:true})
.type(color1); .type(color1);
cy.get(widgetsPage.tableBtn).should("have.css", "background-color", color1); cy.get(widgetsPage.tableBtn).should("have.css", "background-color", color1);
@ -198,7 +198,7 @@ describe("Table Widget property pane feature validation", function() {
const color2 = "rgb(255, 0, 0)"; const color2 = "rgb(255, 0, 0)";
cy.get(widgetsPage.menuColor) cy.get(widgetsPage.menuColor)
.clear() .clear()
.click() .click({force:true})
// following wait is required to reproduce #9526 // following wait is required to reproduce #9526
.wait(500) .wait(500)
.type(color2); .type(color2);

View File

@ -240,7 +240,7 @@ describe("Table Widget V2 property pane feature validation", function() {
.children() .children()
.contains("URL") .contains("URL")
.click(); .click();
cy.get(".t--property-control-visible span.bp3-control-indicator").click(); // cy.get(".t--property-control-visible span.bp3-control-indicator").click();
cy.wait("@updateLayout"); cy.wait("@updateLayout");
cy.moveToStyleTab(); cy.moveToStyleTab();
// Verifying Center Alignment // Verifying Center Alignment