From bd7ae1f9246cf0d54ba3cd08a81a75a7627aa0a5 Mon Sep 17 00:00:00 2001 From: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com> Date: Fri, 18 Feb 2022 17:45:05 +0530 Subject: [PATCH] test: Added test event driver (#11222) * Added test event driver * changed port to 28017 * updated credentials * updated password for postgres * Update forkedApp.json * fixing ImportExportForkApplication_spec * fixing ImportExportFork_spec * updating testdata Co-authored-by: Parthvi Goswami --- app/client/cypress/fixtures/datasources.json | 6 +- app/client/cypress/fixtures/forkedApp.json | 1324 +++++++++-------- .../ImportExportForkApplication_spec.js | 8 +- app/client/cypress/setup-test.sh | 36 +- 4 files changed, 683 insertions(+), 691 deletions(-) diff --git a/app/client/cypress/fixtures/datasources.json b/app/client/cypress/fixtures/datasources.json index b648f893a3..98449e0cd7 100644 --- a/app/client/cypress/fixtures/datasources.json +++ b/app/client/cypress/fixtures/datasources.json @@ -7,13 +7,13 @@ "postgres-host": "localhost", "postgres-port": 5432, "postgres-databaseName": "fakeapi", - "postgres-username": "postgres", - "postgres-password": "postgres", + "postgres-username": "docker", + "postgres-password": "docker", "mysql-host": "localhost", "mysql-port": 3306, "mysql-databaseName": "fakeapi", "mysql-username": "root", - "mysql-password": "root123", + "mysql-password": "root", "mssql-host": "localhost", "mssql-port": 1433, "mssql-databaseName": "fakeapi", diff --git a/app/client/cypress/fixtures/forkedApp.json b/app/client/cypress/fixtures/forkedApp.json index 04354d7907..daa3aec2ec 100644 --- a/app/client/cypress/fixtures/forkedApp.json +++ b/app/client/cypress/fixtures/forkedApp.json @@ -1,685 +1,697 @@ { + "clientSchemaVersion": 1, + "serverSchemaVersion": 1, "exportedApplication": { - "name": "app", - "isPublic": false, - "appIsExample": false, - "unreadCommentThreads": 0, - "color": "#F4FFDE", - "icon": "single-person", - "slug": "forktest", - "evaluationVersion": 2, - "new": true + "name": "app", + "isPublic": false, + "appIsExample": false, + "unreadCommentThreads": 0, + "color": "#F4FFDE", + "icon": "single-person", + "slug": "app", + "evaluationVersion": 2, + "new": true }, "datasourceList": [ - { - "userPermissions": [ - "execute:datasources", - "manage:datasources", - "read:datasources" - ], - "gitSyncId": "61c2d94747cda83965fe72b5_61c5822385c0bd4ccf7d171c", - "name": "mockdata", - "pluginId": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE", - "ssl": { - "authType": "DEFAULT" + { + "userPermissions": [ + "execute:datasources", + "manage:datasources", + "read:datasources" + ], + "gitSyncId": "61c2d94747cda83965fe72b5_61c5822385c0bd4ccf7d171c", + "name": "mockdata", + "pluginId": "postgres-plugin", + "datasourceConfiguration": { + "connection": { + "mode": "READ_WRITE", + "ssl": { + "authType": "DEFAULT" + } + }, + "endpoints": [ + { + "host": "localhost", + "port": 5432 + } + ], + "sshProxyEnabled": false + }, + "invalids": [], + "messages": [], + "isValid": true, + "new": true + } + ], + "pageList": [ + { + "userPermissions": [ + "read:pages", + "manage:pages" + ], + "gitSyncId": "61c580d685c0bd4ccf7d1716_61c580d685c0bd4ccf7d1718", + "unpublishedPage": { + "name": "Page1", + "slug": "page1", + "layouts": [ + { + "id": "Page1", + "userPermissions": [], + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 816, + "snapColumns": 64, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 590, + "containerStyle": "none", + "snapRows": 125, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "version": 52, + "minHeight": 600, + "parentColumnSpace": 1, + "dynamicBindingPathList": [], + "leftColumn": 0, + "children": [ + { + "widgetName": "Table1", + "defaultPageSize": 0, + "columnOrder": [ + "schema_name" + ], + "isVisibleDownload": true, + "dynamicPropertyPathList": [], + "displayName": "Table", + "iconSVG": "/static/media/icon.db8a9cbd.svg", + "topRow": 14, + "bottomRow": 38, + "isSortable": true, + "parentRowSpace": 10, + "type": "TABLE_WIDGET", + "defaultSelectedRow": "0", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 12.5625, + "dynamicTriggerPathList": [], + "dynamicBindingPathList": [ + { + "key": "tableData" + }, + { + "key": "primaryColumns.schema_name.computedValue" + } + ], + "leftColumn": 4, + "primaryColumns": { + "schema_name": { + "index": 0, + "width": 150, + "id": "schema_name", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textSize": "PARAGRAPH", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "schema_name", + "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.schema_name))}}" + } + }, + "delimiter": ",", + "key": "5ejs55im17", + "derivedColumns": {}, + "rightColumn": 25, + "textSize": "PARAGRAPH", + "widgetId": "uyyp0qxfdq", + "isVisibleFilters": true, + "tableData": "{{get_schema.data}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "enableClientSideSearch": true, + "version": 3, + "totalRecordsCount": 0, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "horizontalAlignment": "LEFT", + "isVisibleSearch": true, + "isVisiblePagination": true, + "verticalAlignment": "CENTER", + "columnSizeMap": { + "task": 245, + "step": 62, + "status": 75 } - }, - "endpoints": [ - { - "host": "localhost", - "port": 5432 + }, + { + "widgetName": "Table2", + "defaultPageSize": 0, + "columnOrder": [ + "id", + "title", + "due", + "assignee" + ], + "isVisibleDownload": true, + "dynamicPropertyPathList": [], + "displayName": "Table", + "iconSVG": "/static/media/icon.db8a9cbd.svg", + "topRow": 14, + "bottomRow": 38, + "isSortable": true, + "parentRowSpace": 10, + "type": "TABLE_WIDGET", + "defaultSelectedRow": "0", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 12.5625, + "dynamicTriggerPathList": [], + "dynamicBindingPathList": [ + { + "key": "tableData" + }, + { + "key": "primaryColumns.due.computedValue" + }, + { + "key": "primaryColumns.assignee.computedValue" + }, + { + "key": "primaryColumns.title.computedValue" + }, + { + "key": "primaryColumns.id.computedValue" + } + ], + "leftColumn": 30, + "primaryColumns": { + "due": { + "index": 0, + "width": 150, + "id": "due", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textSize": "PARAGRAPH", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "due", + "computedValue": "{{Table2.sanitizedTableData.map((currentRow) => ( currentRow.due))}}" + }, + "assignee": { + "index": 1, + "width": 150, + "id": "assignee", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textSize": "PARAGRAPH", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "assignee", + "computedValue": "{{Table2.sanitizedTableData.map((currentRow) => ( currentRow.assignee))}}" + }, + "title": { + "index": 2, + "width": 150, + "id": "title", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textSize": "PARAGRAPH", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "title", + "computedValue": "{{Table2.sanitizedTableData.map((currentRow) => ( currentRow.title))}}" + }, + "id": { + "index": 4, + "width": 150, + "id": "id", + "horizontalAlignment": "LEFT", + "verticalAlignment": "CENTER", + "columnType": "text", + "textSize": "PARAGRAPH", + "enableFilter": true, + "enableSort": true, + "isVisible": true, + "isDisabled": false, + "isCellVisible": true, + "isDerived": false, + "label": "id", + "computedValue": "{{Table2.sanitizedTableData.map((currentRow) => ( currentRow.id))}}" + } + }, + "delimiter": ",", + "key": "5ejs55im17", + "derivedColumns": {}, + "rightColumn": 61, + "textSize": "PARAGRAPH", + "widgetId": "r1m4lkt7at", + "isVisibleFilters": true, + "tableData": "{{mockApi.data.headers.info}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "enableClientSideSearch": true, + "version": 3, + "totalRecordsCount": 0, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "horizontalAlignment": "LEFT", + "isVisibleSearch": true, + "isVisiblePagination": true, + "verticalAlignment": "CENTER", + "columnSizeMap": { + "task": 245, + "step": 62, + "status": 75, + "id": 60 } + }, + { + "widgetName": "Input1", + "displayName": "Input", + "iconSVG": "/static/media/icon.9f505595.svg", + "topRow": 43, + "bottomRow": 47, + "parentRowSpace": 10, + "autoFocus": false, + "type": "INPUT_WIDGET_V2", + "hideCard": false, + "animateLoading": true, + "parentColumnSpace": 12.5625, + "dynamicTriggerPathList": [], + "resetOnSubmit": true, + "leftColumn": 18, + "dynamicBindingPathList": [ + { + "key": "defaultText" + } + ], + "labelStyle": "", + "inputType": "TEXT", + "isDisabled": false, + "key": "t02w4ix9o5", + "isRequired": false, + "rightColumn": 38, + "widgetId": "9timcor5m5", + "isVisible": true, + "label": "", + "allowCurrencyChange": false, + "version": 1, + "parentId": "0", + "renderMode": "CANVAS", + "isLoading": false, + "iconAlign": "left", + "defaultText": "{{JSObject1.myVar1}}" + } + ] + }, + "layoutOnLoadActions": [ + [ + { + "id": "Page1_get_schema", + "name": "get_schema", + "pluginType": "DB", + "jsonPathKeys": [], + "timeoutInMillisecond": 10000 + } ], - "sshProxyEnabled": false + [ + { + "id": "Page1_mockApi", + "name": "mockApi", + "pluginType": "API", + "jsonPathKeys": [], + "timeoutInMillisecond": 10000 + } + ] + ], + "new": false + } + ], + "userPermissions": [] + }, + "publishedPage": { + "name": "Page1", + "slug": "page1", + "layouts": [ + { + "id": "Page1", + "userPermissions": [], + "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, + "version": 4, + "minHeight": 1292, + "parentColumnSpace": 1, + "dynamicBindingPathList": [], + "leftColumn": 0, + "children": [] + }, + "new": false + } + ], + "userPermissions": [] + }, + "new": true + } + ], + "publishedDefaultPageName": "Page1", + "unpublishedDefaultPageName": "Page1", + "actionList": [ + { + "id": "Page1_mockApi", + "userPermissions": [ + "read:actions", + "execute:actions", + "manage:actions" + ], + "gitSyncId": "61c580d685c0bd4ccf7d1716_61c580e385c0bd4ccf7d171a", + "pluginType": "API", + "pluginId": "restapi-plugin", + "unpublishedAction": { + "name": "mockApi", + "datasource": { + "userPermissions": [], + "name": "DEFAULT_REST_DATASOURCE", + "pluginId": "restapi-plugin", + "datasourceConfiguration": { + "url": "https://mock-api.appsmith.com" }, "invalids": [], "messages": [], "isValid": true, "new": true - } - ], - "pageList": [ - { - "userPermissions": [ - "read:pages", - "manage:pages" + }, + "pageId": "Page1", + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "path": "/echo/get", + "headers": [ + { + "key": "info", + "value": "[{\"due\":\"2021-11-23\",\"assignee\":\"Dan.Wyman@hotmail.com\",\"title\":\"Recusan\",\"id\":\"1\"},{\"due\":\"2021-11-23\",\"assignee\":\"Dashawn_Maggio30@gmail.com\",\"title\":\"Dignissimos eaque\",\"id\":\"2\"},{\"due\":\"2021-11-24\",\"assignee\":\"Curt50@gmail.com\",\"title\":\"Voluptas explicabo\",\"id\":\"3\"},{\"due\":\"2021-11-23\",\"assignee\":\"Shanna63@hotmail.com\",\"title\":\"Aut omnis.\",\"id\":\"4\"}]" + } ], - "gitSyncId": "61c580d685c0bd4ccf7d1716_61c580d685c0bd4ccf7d1718", - "unpublishedPage": { - "name": "Page1", - "slug": "page1", - "layouts": [ - { - "id": "Page1", - "userPermissions": [], - "dsl": { - "widgetName": "MainContainer", - "backgroundColor": "none", - "rightColumn": 816, - "snapColumns": 64, - "detachFromLayout": true, - "widgetId": "0", - "topRow": 0, - "bottomRow": 590, - "containerStyle": "none", - "snapRows": 125, - "parentRowSpace": 1, - "type": "CANVAS_WIDGET", - "canExtend": true, - "version": 47, - "minHeight": 600, - "parentColumnSpace": 1, - "dynamicBindingPathList": [], - "leftColumn": 0, - "children": [ - { - "widgetName": "Table1", - "defaultPageSize": 0, - "columnOrder": [ - "schema_name" - ], - "isVisibleDownload": true, - "dynamicPropertyPathList": [], - "displayName": "Table", - "iconSVG": "/static/media/icon.db8a9cbd.svg", - "topRow": 14, - "bottomRow": 38, - "isSortable": true, - "parentRowSpace": 10, - "type": "TABLE_WIDGET", - "defaultSelectedRow": "0", - "hideCard": false, - "animateLoading": true, - "parentColumnSpace": 12.5625, - "dynamicTriggerPathList": [], - "dynamicBindingPathList": [ - { - "key": "tableData" - }, - { - "key": "primaryColumns.schema_name.computedValue" - } - ], - "leftColumn": 4, - "primaryColumns": { - "schema_name": { - "index": 0, - "width": 150, - "id": "schema_name", - "horizontalAlignment": "LEFT", - "verticalAlignment": "CENTER", - "columnType": "text", - "textSize": "PARAGRAPH", - "enableFilter": true, - "enableSort": true, - "isVisible": true, - "isDisabled": false, - "isCellVisible": true, - "isDerived": false, - "label": "schema_name", - "computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.schema_name))}}" - } - }, - "delimiter": ",", - "key": "5ejs55im17", - "derivedColumns": {}, - "rightColumn": 25, - "textSize": "PARAGRAPH", - "widgetId": "uyyp0qxfdq", - "isVisibleFilters": true, - "tableData": "{{get_schema.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "enableClientSideSearch": true, - "version": 3, - "totalRecordsCount": 0, - "parentId": "0", - "renderMode": "CANVAS", - "isLoading": false, - "horizontalAlignment": "LEFT", - "isVisibleSearch": true, - "isVisiblePagination": true, - "verticalAlignment": "CENTER", - "columnSizeMap": { - "task": 245, - "step": 62, - "status": 75 - } - }, - { - "widgetName": "Table2", - "defaultPageSize": 0, - "columnOrder": [ - "id", - "title", - "due", - "assignee" - ], - "isVisibleDownload": true, - "dynamicPropertyPathList": [], - "displayName": "Table", - "iconSVG": "/static/media/icon.db8a9cbd.svg", - "topRow": 14, - "bottomRow": 38, - "isSortable": true, - "parentRowSpace": 10, - "type": "TABLE_WIDGET", - "defaultSelectedRow": "0", - "hideCard": false, - "animateLoading": true, - "parentColumnSpace": 12.5625, - "dynamicTriggerPathList": [], - "dynamicBindingPathList": [ - { - "key": "tableData" - }, - { - "key": "primaryColumns.due.computedValue" - }, - { - "key": "primaryColumns.assignee.computedValue" - }, - { - "key": "primaryColumns.title.computedValue" - }, - { - "key": "primaryColumns.id.computedValue" - } - ], - "leftColumn": 30, - "primaryColumns": { - "due": { - "index": 0, - "width": 150, - "id": "due", - "horizontalAlignment": "LEFT", - "verticalAlignment": "CENTER", - "columnType": "text", - "textSize": "PARAGRAPH", - "enableFilter": true, - "enableSort": true, - "isVisible": true, - "isDisabled": false, - "isCellVisible": true, - "isDerived": false, - "label": "due", - "computedValue": "{{Table2.sanitizedTableData.map((currentRow) => ( currentRow.due))}}" - }, - "assignee": { - "index": 1, - "width": 150, - "id": "assignee", - "horizontalAlignment": "LEFT", - "verticalAlignment": "CENTER", - "columnType": "text", - "textSize": "PARAGRAPH", - "enableFilter": true, - "enableSort": true, - "isVisible": true, - "isDisabled": false, - "isCellVisible": true, - "isDerived": false, - "label": "assignee", - "computedValue": "{{Table2.sanitizedTableData.map((currentRow) => ( currentRow.assignee))}}" - }, - "title": { - "index": 2, - "width": 150, - "id": "title", - "horizontalAlignment": "LEFT", - "verticalAlignment": "CENTER", - "columnType": "text", - "textSize": "PARAGRAPH", - "enableFilter": true, - "enableSort": true, - "isVisible": true, - "isDisabled": false, - "isCellVisible": true, - "isDerived": false, - "label": "title", - "computedValue": "{{Table2.sanitizedTableData.map((currentRow) => ( currentRow.title))}}" - }, - "id": { - "index": 4, - "width": 150, - "id": "id", - "horizontalAlignment": "LEFT", - "verticalAlignment": "CENTER", - "columnType": "text", - "textSize": "PARAGRAPH", - "enableFilter": true, - "enableSort": true, - "isVisible": true, - "isDisabled": false, - "isCellVisible": true, - "isDerived": false, - "label": "id", - "computedValue": "{{Table2.sanitizedTableData.map((currentRow) => ( currentRow.id))}}" - } - }, - "delimiter": ",", - "key": "5ejs55im17", - "derivedColumns": {}, - "rightColumn": 61, - "textSize": "PARAGRAPH", - "widgetId": "r1m4lkt7at", - "isVisibleFilters": true, - "tableData": "{{mockApi.data.headers.info}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "enableClientSideSearch": true, - "version": 3, - "totalRecordsCount": 0, - "parentId": "0", - "renderMode": "CANVAS", - "isLoading": false, - "horizontalAlignment": "LEFT", - "isVisibleSearch": true, - "isVisiblePagination": true, - "verticalAlignment": "CENTER", - "columnSizeMap": { - "task": 245, - "step": 62, - "status": 75, - "id": 60 - } - }, - { - "widgetName": "Input1", - "displayName": "Input", - "iconSVG": "/static/media/icon.9f505595.svg", - "topRow": 43, - "bottomRow": 47, - "parentRowSpace": 10, - "autoFocus": false, - "type": "INPUT_WIDGET_V2", - "hideCard": false, - "animateLoading": true, - "parentColumnSpace": 12.5625, - "dynamicTriggerPathList": [], - "resetOnSubmit": true, - "leftColumn": 18, - "dynamicBindingPathList": [ - { - "key": "defaultText" - } - ], - "labelStyle": "", - "inputType": "TEXT", - "isDisabled": false, - "key": "t02w4ix9o5", - "isRequired": false, - "rightColumn": 38, - "widgetId": "9timcor5m5", - "isVisible": true, - "label": "", - "allowCurrencyChange": false, - "version": 1, - "parentId": "0", - "renderMode": "CANVAS", - "isLoading": false, - "iconAlign": "left", - "defaultText": "{{JSObject1.myVar1}}" - } - ] - }, - "layoutOnLoadActions": [ - [ - { - "id": "61c5832685c0bd4ccf7d171f", - "name": "get_schema", - "pluginType": "DB", - "jsonPathKeys": [], - "timeoutInMillisecond": 10000 - } - ], - [ - { - "id": "61c580e385c0bd4ccf7d171b", - "name": "mockApi", - "pluginType": "API", - "jsonPathKeys": [], - "timeoutInMillisecond": 10000 - } - ] - ], - "new": false - } - ], - "userPermissions": [] - }, - "publishedPage": { - "name": "Page1", - "slug": "page1", - "layouts": [ - { - "id": "Page1", - "userPermissions": [], - "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, - "version": 4, - "minHeight": 1292, - "parentColumnSpace": 1, - "dynamicBindingPathList": [], - "leftColumn": 0, - "children": [] - }, - "new": false - } - ], - "userPermissions": [] - }, + "encodeParamsToggle": true, + "queryParameters": [], + "body": "", + "httpMethod": "GET", + "pluginSpecifiedTemplates": [ + { + "value": true + } + ] + }, + "executeOnLoad": true, + "dynamicBindingPathList": [], + "isValid": true, + "invalids": [], + "messages": [], + "jsonPathKeys": [], + "confirmBeforeExecute": false, + "userPermissions": [], + "validName": "mockApi" + }, + "publishedAction": { + "datasource": { + "userPermissions": [], + "messages": [], + "isValid": true, "new": true - } - ], - "publishedDefaultPageName": "Page1", - "unpublishedDefaultPageName": "Page1", - "actionList": [ - { - "id": "61c580e385c0bd4ccf7d171b", - "userPermissions": [ - "read:actions", - "execute:actions", - "manage:actions" - ], - "gitSyncId": "61c580d685c0bd4ccf7d1716_61c580e385c0bd4ccf7d171a", - "pluginType": "API", - "pluginId": "restapi-plugin", - "unpublishedAction": { - "name": "mockApi", - "datasource": { - "userPermissions": [], - "name": "DEFAULT_REST_DATASOURCE", - "pluginId": "restapi-plugin", - "datasourceConfiguration": { - "url": "https://mock-api.appsmith.com" - }, - "invalids": [], - "messages": [], - "isValid": true, - "new": true - }, - "pageId": "Page1", - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "path": "/echo/get", - "headers": [ - { - "key": "info", - "value": "[{\"due\":\"2021-11-23\",\"assignee\":\"Dan.Wyman@hotmail.com\",\"title\":\"Recusan\",\"id\":\"1\"},{\"due\":\"2021-11-23\",\"assignee\":\"Dashawn_Maggio30@gmail.com\",\"title\":\"Dignissimos eaque\",\"id\":\"2\"},{\"due\":\"2021-11-24\",\"assignee\":\"Curt50@gmail.com\",\"title\":\"Voluptas explicabo\",\"id\":\"3\"},{\"due\":\"2021-11-23\",\"assignee\":\"Shanna63@hotmail.com\",\"title\":\"Aut omnis.\",\"id\":\"4\"}]" - } - ], - "encodeParamsToggle": true, - "queryParameters": [], - "body": "", - "httpMethod": "GET", - "pluginSpecifiedTemplates": [ - { - "value": true - } - ] - }, - "executeOnLoad": true, - "dynamicBindingPathList": [], - "isValid": true, - "invalids": [], - "messages": [], - "jsonPathKeys": [], - "confirmBeforeExecute": false, - "userPermissions": [], - "validName": "mockApi" - }, - "publishedAction": { - "datasource": { - "userPermissions": [], - "messages": [], - "isValid": true, - "new": true - }, - "messages": [], - "confirmBeforeExecute": false, - "userPermissions": [] - }, - "new": false + }, + "messages": [], + "confirmBeforeExecute": false, + "userPermissions": [] }, - { - "id": "61c5832685c0bd4ccf7d171f", - "userPermissions": [ - "read:actions", - "execute:actions", - "manage:actions" - ], - "gitSyncId": "61c580d685c0bd4ccf7d1716_61c5832685c0bd4ccf7d171e", - "pluginType": "DB", + "new": false + }, + { + "id": "Page1_get_schema", + "userPermissions": [ + "read:actions", + "execute:actions", + "manage:actions" + ], + "gitSyncId": "61c580d685c0bd4ccf7d1716_61c5832685c0bd4ccf7d171e", + "pluginType": "DB", + "pluginId": "postgres-plugin", + "unpublishedAction": { + "name": "get_schema", + "datasource": { + "id": "mockdata", + "userPermissions": [], "pluginId": "postgres-plugin", - "unpublishedAction": { - "name": "get_schema", - "datasource": { - "id": "mockdata", - "userPermissions": [], - "pluginId": "postgres-plugin", - "messages": [], - "isValid": true, - "new": false - }, - "pageId": "Page1", - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "encodeParamsToggle": true, - "body": "SELECT schema_name FROM information_schema.schemata;", - "pluginSpecifiedTemplates": [ - { - "value": true - } - ] - }, - "executeOnLoad": true, - "dynamicBindingPathList": [], - "isValid": true, - "invalids": [], - "messages": [], - "jsonPathKeys": [], - "confirmBeforeExecute": false, - "userPermissions": [], - "validName": "get_schema" - }, - "publishedAction": { - "datasource": { - "userPermissions": [], - "messages": [], - "isValid": true, - "new": true - }, - "messages": [], - "confirmBeforeExecute": false, - "userPermissions": [] - }, + "messages": [], + "isValid": true, "new": false + }, + "pageId": "Page1", + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "encodeParamsToggle": true, + "body": "SELECT schema_name FROM information_schema.schemata;", + "pluginSpecifiedTemplates": [ + { + "value": true + } + ] + }, + "executeOnLoad": true, + "dynamicBindingPathList": [], + "isValid": true, + "invalids": [], + "messages": [], + "jsonPathKeys": [], + "confirmBeforeExecute": false, + "userPermissions": [], + "validName": "get_schema" }, - { - "id": "61c58ced85c0bd4ccf7d1723", - "userPermissions": [ - "read:actions", - "execute:actions", - "manage:actions" - ], - "gitSyncId": "61c580d685c0bd4ccf7d1716_61c58ced85c0bd4ccf7d1722", - "pluginType": "JS", - "pluginId": "js-plugin", - "unpublishedAction": { - "name": "myFun1", - "fullyQualifiedName": "JSObject1.myFun1", - "datasource": { - "userPermissions": [], - "name": "UNUSED_DATASOURCE", - "pluginId": "js-plugin", - "messages": [], - "isValid": true, - "new": true - }, - "pageId": "Page1", - "collectionId": "61c58ced85c0bd4ccf7d1727", - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "encodeParamsToggle": true, - "body": "() => {\n\t\t//write code here\n\t\treturn JSObject1.myVar1;\n\t}", - "jsArguments": [], - "isAsync": false - }, - "executeOnLoad": false, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "messages": [], - "jsonPathKeys": [ - "() => {\n\t\t//write code here\n\t\treturn JSObject1.myVar1;\n\t}" - ], - "confirmBeforeExecute": false, - "userPermissions": [], - "validName": "JSObject1.myFun1" - }, - "publishedAction": { - "datasource": { - "userPermissions": [], - "messages": [], - "isValid": true, - "new": true - }, - "messages": [], - "confirmBeforeExecute": false, - "userPermissions": [] - }, - "new": false + "publishedAction": { + "datasource": { + "userPermissions": [], + "messages": [], + "isValid": true, + "new": true + }, + "messages": [], + "confirmBeforeExecute": false, + "userPermissions": [] }, - { - "id": "61c58ced85c0bd4ccf7d1725", - "userPermissions": [ - "read:actions", - "execute:actions", - "manage:actions" - ], - "gitSyncId": "61c580d685c0bd4ccf7d1716_61c58ced85c0bd4ccf7d1724", - "pluginType": "JS", + "new": false + }, + { + "id": "Page1_myFun1", + "userPermissions": [ + "read:actions", + "execute:actions", + "manage:actions" + ], + "gitSyncId": "61c580d685c0bd4ccf7d1716_61c58ced85c0bd4ccf7d1722", + "pluginType": "JS", + "pluginId": "js-plugin", + "unpublishedAction": { + "name": "myFun1", + "fullyQualifiedName": "JSObject1.myFun1", + "datasource": { + "userPermissions": [], + "name": "UNUSED_DATASOURCE", "pluginId": "js-plugin", - "unpublishedAction": { - "name": "myFun2", - "fullyQualifiedName": "JSObject1.myFun2", - "datasource": { - "userPermissions": [], - "name": "UNUSED_DATASOURCE", - "pluginId": "js-plugin", - "messages": [], - "isValid": true, - "new": true - }, - "pageId": "Page1", - "collectionId": "61c58ced85c0bd4ccf7d1727", - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "encodeParamsToggle": true, - "body": "() => {\n\t\t//write code here\n\t}", - "jsArguments": [], - "isAsync": false - }, - "executeOnLoad": false, - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "messages": [], - "jsonPathKeys": [ - "() => {\n\t\t//write code here\n\t}" - ], - "confirmBeforeExecute": false, - "userPermissions": [], - "validName": "JSObject1.myFun2" - }, - "publishedAction": { - "datasource": { - "userPermissions": [], - "messages": [], - "isValid": true, - "new": true - }, - "messages": [], - "confirmBeforeExecute": false, - "userPermissions": [] - }, - "new": false - } + "messages": [], + "isValid": true, + "new": true + }, + "pageId": "Page1", + "collectionId": "Page1_JSObject1", + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "encodeParamsToggle": true, + "body": "() => {\n\t\t//write code here\n\t\treturn JSObject1.myVar1;\n\t}", + "jsArguments": [], + "isAsync": false + }, + "executeOnLoad": false, + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "isValid": true, + "invalids": [], + "messages": [], + "jsonPathKeys": [ + "() => {\n\t\t//write code here\n\t\treturn JSObject1.myVar1;\n\t}" + ], + "confirmBeforeExecute": false, + "userPermissions": [], + "validName": "JSObject1.myFun1" + }, + "publishedAction": { + "datasource": { + "userPermissions": [], + "messages": [], + "isValid": true, + "new": true + }, + "messages": [], + "confirmBeforeExecute": false, + "userPermissions": [] + }, + "new": false + }, + { + "id": "Page1_myFun2", + "userPermissions": [ + "read:actions", + "execute:actions", + "manage:actions" + ], + "gitSyncId": "61c580d685c0bd4ccf7d1716_61c58ced85c0bd4ccf7d1724", + "pluginType": "JS", + "pluginId": "js-plugin", + "unpublishedAction": { + "name": "myFun2", + "fullyQualifiedName": "JSObject1.myFun2", + "datasource": { + "userPermissions": [], + "name": "UNUSED_DATASOURCE", + "pluginId": "js-plugin", + "messages": [], + "isValid": true, + "new": true + }, + "pageId": "Page1", + "collectionId": "Page1_JSObject1", + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "encodeParamsToggle": true, + "body": "() => {\n\t\t//write code here\n\t}", + "jsArguments": [], + "isAsync": false + }, + "executeOnLoad": false, + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "isValid": true, + "invalids": [], + "messages": [], + "jsonPathKeys": [ + "() => {\n\t\t//write code here\n\t}" + ], + "confirmBeforeExecute": false, + "userPermissions": [], + "validName": "JSObject1.myFun2" + }, + "publishedAction": { + "datasource": { + "userPermissions": [], + "messages": [], + "isValid": true, + "new": true + }, + "messages": [], + "confirmBeforeExecute": false, + "userPermissions": [] + }, + "new": false + } ], "actionCollectionList": [ - { - "id": "61c58ced85c0bd4ccf7d1727", - "userPermissions": [ - "read:actions", - "execute:actions", - "manage:actions" - ], - "gitSyncId": "61c580d685c0bd4ccf7d1716_61c58ced85c0bd4ccf7d1726", - "unpublishedCollection": { - "name": "JSObject1", - "pageId": "Page1", - "pluginId": "js-plugin", - "pluginType": "JS", - "actionIds": [], - "archivedActionIds": [], - "actions": [], - "archivedActions": [], - "body": "export default {\n\tmyVar1: \"Submit\",\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t\treturn this.myVar1;\n\t},\n\tmyFun2: () => {\n\t\t//write code here\n\t}\n}", - "variables": [ - { - "name": "myVar1", - "value": "Submit" - }, - { - "name": "myVar2", - "value": {} - } - ] + { + "id": "Page1_JSObject1", + "userPermissions": [ + "read:actions", + "execute:actions", + "manage:actions" + ], + "gitSyncId": "61c580d685c0bd4ccf7d1716_61c58ced85c0bd4ccf7d1726", + "unpublishedCollection": { + "name": "JSObject1", + "pageId": "Page1", + "pluginId": "js-plugin", + "pluginType": "JS", + "actionIds": [], + "archivedActionIds": [], + "actions": [], + "archivedActions": [], + "body": "export default {\n\tmyVar1: \"Submit\",\n\tmyVar2: {},\n\tmyFun1: () => {\n\t\t//write code here\n\t\treturn this.myVar1;\n\t},\n\tmyFun2: () => {\n\t\t//write code here\n\t}\n}", + "variables": [ + { + "name": "myVar1", + "value": "Submit" }, - "new": false - } + { + "name": "myVar2", + "value": {} + } + ] + }, + "new": false + } ], "decryptedFields": { - "mockdata": { - "password": "postgres", - "authType": "com.appsmith.external.models.DBAuth", - "dbAuth": { - "authenticationType": "dbAuth", - "username": "postgres", - "databaseName": "fakeapi" - } + "mockdata": { + "password": "docker", + "authType": "com.appsmith.external.models.DBAuth", + "dbAuth": { + "authenticationType": "dbAuth", + "username": "docker", + "databaseName": "fakeapi" } + } + }, + "editModeTheme": { + "name": "Classic", + "new": true, + "isSystemTheme": true + }, + "publishedTheme": { + "name": "Classic", + "new": true, + "isSystemTheme": true }, "publishedLayoutmongoEscapedWidgets": {}, "unpublishedLayoutmongoEscapedWidgets": {} -} \ No newline at end of file + } diff --git a/app/client/cypress/integration/Smoke_TestSuite/Application/ImportExportForkApplication_spec.js b/app/client/cypress/integration/Smoke_TestSuite/Application/ImportExportForkApplication_spec.js index 2a020b043b..ab3dbcaeeb 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/Application/ImportExportForkApplication_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/Application/ImportExportForkApplication_spec.js @@ -35,7 +35,7 @@ describe("Import, Export and Fork application and validate data binding", functi // validating data binding for the imported application cy.xpath("//input[@value='Submit']").should("be.visible"); cy.xpath("//div[text()='schema_name']").should("be.visible"); - cy.xpath("//div[text()='information_schema']").should("be.visible"); + cy.xpath("//div[text()='pg_toast']").should("be.visible"); cy.xpath("//div[text()='title']").should("be.visible"); cy.xpath("//div[text()='Recusan']").should("be.visible"); }); @@ -62,7 +62,7 @@ describe("Import, Export and Fork application and validate data binding", functi // validating data binding for the forked application cy.xpath("//input[@value='Submit']").should("be.visible"); cy.xpath("//div[text()='schema_name']").should("be.visible"); - cy.xpath("//div[text()='information_schema']").should("be.visible"); + cy.xpath("//div[text()='pg_toast']").should("be.visible"); cy.xpath("//div[text()='title']").should("be.visible"); cy.xpath("//div[text()='Recusan']").should("be.visible"); }); @@ -116,9 +116,7 @@ describe("Import, Export and Fork application and validate data binding", functi // validating data binding for imported application cy.xpath("//input[@value='Submit']").should("be.visible"); cy.xpath("//div[text()='schema_name']").should("be.visible"); - cy.xpath("//div[text()='information_schema']").should( - "be.visible", - ); + cy.xpath("//div[text()='pg_toast']").should("be.visible"); cy.xpath("//div[text()='title']").should("be.visible"); cy.xpath("//div[text()='Recusan']").should("be.visible"); diff --git a/app/client/cypress/setup-test.sh b/app/client/cypress/setup-test.sh index 3c7c5ff4fa..8fd7df521f 100755 --- a/app/client/cypress/setup-test.sh +++ b/app/client/cypress/setup-test.sh @@ -20,7 +20,7 @@ echo "$APPSMITH_SSL_KEY" > ./docker/dev.appsmith.com-key.pem echo "Going to run the nginx server" sudo docker pull nginx:latest -sudo docker pull postgres:latest +sudo docker pull appsmith/test-event-driver:latest sudo docker run --network host --name wildcard-nginx -d -p 80:80 -p 443:443 \ -v `pwd`/docker/nginx-root.conf:/etc/nginx/nginx.conf \ @@ -28,33 +28,15 @@ sudo docker run --network host --name wildcard-nginx -d -p 80:80 -p 443:443 \ -v `pwd`/docker/dev.appsmith.com.pem:/etc/certificate/dev.appsmith.com.pem \ -v `pwd`/docker/dev.appsmith.com-key.pem:/etc/certificate/dev.appsmith.com-key.pem \ nginx:latest & +sudo mkdir -p git-server/keys +sudo mkdir -p git-server/repos -sudo docker run --network host --name postgres -d -p 5432:5432 \ - -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \ - -v `pwd`/cypress/init-pg-dump-for-test.sql:/docker-entrypoint-initdb.d/init-pg-dump-for-test.sql \ - --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 \ - postgres:latest & +sudo docker run --name test-event-driver -d -p 2222:22 -p 5001:5001 -p 3306:3306 \ + -p 5432:5432 -p 28017:27017 -v ~/git-server/keys:/git-server/keys \ + -v ~/git-server/repos:/git-server/repos appsmith/test-event-driver:latest -sudo docker run -p 127.0.0.1:3306:3306 --name mariadb -e MARIADB_ROOT_PASSWORD=root123 -d mariadb - -echo "Sleeping for 30 seconds to let the MySQL start" -sleep 30 - -sudo docker exec -i mariadb mysql -uroot -proot123 mysql < `pwd`/cypress/init-mysql-dump-for-test.sql - - -echo "Sleeping for 30 seconds to let the servers start" -sleep 30 - -sudo docker run -d -p 127.0.0.1:28017:27017 --name Cypress-mongodb -e MONGO_INITDB_DATABASE=appsmith -v `pwd`/cypress/mongodb:/data/db mongo -echo "Sleeping for 30 seconds to let the servers start" -sleep 30 - -sudo docker cp `pwd`/cypress/sample_airbnb Cypress-mongodb:/sample_airbnb - -sudo docker exec -i Cypress-mongodb /usr/bin/mongorestore --db sample_airbnb /sample_airbnb/sample_airbnb - -sleep 10 +echo "Waiting for test event driver to start" +sleep 50 echo "Checking if the containers have started" sudo docker ps -a @@ -90,4 +72,4 @@ fi # DEBUG=cypress:* $(npm bin)/cypress version # sed -i -e "s|api_url:.*$|api_url: $CYPRESS_URL|g" /github/home/.cache/Cypress/4.1.0/Cypress/resources/app/packages/server/config/app.yml -# cat /github/home/.cache/Cypress/4.1.0/Cypress/resources/app/packages/server/config/app.yml \ No newline at end of file +# cat /github/home/.cache/Cypress/4.1.0/Cypress/resources/app/packages/server/config/app.yml