ci: Release v1.6.1

Release v1.6.1
This commit is contained in:
Arpit Mohan 2021-12-02 15:24:08 +05:30 committed by GitHub
commit bf2990a87e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
371 changed files with 18338 additions and 3504 deletions

2
.github/config.json vendored

File diff suppressed because one or more lines are too long

View File

@ -257,7 +257,7 @@ jobs:
strategy:
fail-fast: false
matrix:
job: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
job: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
# Service containers to run with this job. Required for running tests
services:
# Label used to access the service container

View File

@ -291,7 +291,7 @@ jobs:
strategy:
fail-fast: false
matrix:
job: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
job: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
# Service containers to run with this job. Required for running tests
services:

1
.nojekyll Normal file
View File

@ -0,0 +1 @@

View File

@ -36,7 +36,8 @@
"react/jsx-fragments": "error",
"react/jsx-no-useless-fragment": "error",
"sort-destructure-keys/sort-destructure-keys": ["error", {"caseSensitive": false}],
"no-console": "warn"
"no-console": "warn",
"no-debugger": "warn"
},
"settings": {
"import/resolver": {

View File

@ -1,6 +1,11 @@
const CracoAlias = require("craco-alias");
module.exports = {
style: {
postcss: {
plugins: [require("tailwindcss"), require("autoprefixer")],
},
},
plugins: [
{
plugin: CracoAlias,

View File

@ -12,6 +12,11 @@
"html": true,
"json": false
},
"ignoreTestFiles": [
"**/Smoke_TestSuite/Application/PgAdmin_spec*.js",
"**/Smoke_TestSuite/ServerSideTests/QueryPane/PostgresCRUDOps_spec*.js",
"**/Smoke_TestSuite/ClientSideTests/Onboarding/FirstTimeUserOnboarding_spec*.js"
],
"chromeWebSecurity": false,
"viewportHeight": 900,
"viewportWidth": 1400,

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
{
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1280,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1230,
"containerStyle": "none",
"snapRows": 125,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 39,
"minHeight": 1240,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"widgetName": "DocumentViewer1",
"rightColumn": 36,
"isCanvas": false,
"displayName": "Document Viewer",
"iconSVG": "/static/media/icon.5c440258.svg",
"widgetId": "0vgeledo9u",
"topRow": 20,
"bottomRow": 60,
"parentRowSpace": 10,
"isVisible": true,
"type": "DOCUMENT_VIEWER_WIDGET",
"version": 1,
"hideCard": false,
"parentId": "0",
"renderMode": "CANVAS",
"isLoading": false,
"parentColumnSpace": 19.8125,
"leftColumn": 12,
"docUrl": "https://www.learningcontainer.com/wp-content/uploads/2019/09/sample-pdf-file.pdf",
"key": "gprnooq82y"
}
]
}

View File

@ -2,7 +2,7 @@
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 966,
"rightColumn": 776,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
@ -13,7 +13,7 @@
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 20,
"version": 44,
"minHeight": 450,
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
@ -91,7 +91,7 @@
"widgetId": "rglduihhzk",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 20,
"bottomRow": 450,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
@ -103,32 +103,31 @@
"dynamicBindingPathList": [],
"children": [
{
"widgetName": "Test",
"rightColumn": 49,
"widgetId": "snzfh3qjo8",
"topRow": 10,
"bottomRow": 43,
"parentRowSpace": 10,
"isVisible": true,
"widgetName": "Chart1",
"chartType": "LINE_CHART",
"chartName": "Last week's revenue",
"allowScroll": false,
"type": "CHART_WIDGET",
"version": 1,
"parentId": "rglduihhzk",
"isLoading": false,
"chartData": {
"q4pm3w97mo": {
"seriesName": "Sales",
"data": ""
}
},
"xAxisName": "Last Week",
"yAxisName": "Total Order Revenue $",
"type": "CHART_WIDGET",
"isLoading": false,
"parentColumnSpace": 14.59375,
"parentRowSpace": 10,
"leftColumn": 20,
"rightColumn": 44,
"topRow": 16,
"bottomRow": 48,
"parentId": "rglduihhzk",
"widgetId": "snzfh3qjo8",
"dynamicTriggerPathList": [],
"chartName": "Last week's revenue",
"leftColumn": 5,
"dynamicBindingPathList": [],
"dynamicTriggerPathList": []
"xAxisName": "Last Week",
"chartType": "LINE_CHART"
}
]
}
@ -173,9 +172,7 @@
"parentColumnSpace": 1,
"leftColumn": 0,
"dynamicBindingPathList": [],
"children": [
null
]
"children": []
}
]
}

View File

@ -42,5 +42,6 @@
"mockHostAddress":"fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com",
"mockDatabaseName": "fakeapi",
"mockDatabaseUsername": "fakeapi",
"mockDatabasePassword": "LimitedAccess123#"
"mockDatabasePassword": "LimitedAccess123#",
"readonly":"readonly"
}

View File

@ -0,0 +1,313 @@
{
"exportedApplication": {
"userPermissions": [
"canComment:applications",
"manage:applications",
"export:applications",
"read:applications",
"publish:applications",
"makePublic:applications"
],
"name": "2eacca10",
"isPublic": false,
"appIsExample": false,
"unreadCommentThreads": 0,
"color": "#F1DEFF",
"icon": "cat",
"new": true
},
"datasourceList": [],
"pageList": [
{
"userPermissions": [
"read:pages",
"manage:pages"
],
"gitSyncId": "61602709ae8b022ed53c23c7_2021-10-08T11:10:01.203693Z",
"unpublishedPage": {
"name": "Page1",
"layouts": [
{
"id": "61602709ae8b022ed53c23c8",
"userPermissions": [],
"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,
"minHeight": 1292,
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container1",
"rightColumn": 8,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "mxbaasg65u",
"containerStyle": "card",
"topRow": 0,
"bottomRow": 9,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"isLoading": false,
"parentColumnSpace": 75.25,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"backgroundColor": "transparent",
"widgetName": "59gdivzv7s",
"rightColumn": 602,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "bxekwxgc1i",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 342,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
"canExtend": false,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"image": "",
"widgetName": "Image1",
"rightColumn": 10,
"widgetId": "glksllew0g",
"topRow": 2,
"bottomRow": 5,
"parentRowSpace": 38,
"isVisible": true,
"type": "IMAGE_WIDGET",
"parentId": "bxekwxgc1i",
"isLoading": false,
"parentColumnSpace": 34.6875,
"imageShape": "RECTANGLE",
"leftColumn": 6,
"defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png"
}
]
}
]
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container3",
"rightColumn": 16,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "i331vll2mg",
"containerStyle": "card",
"topRow": 9,
"bottomRow": 23,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"isLoading": false,
"parentColumnSpace": 75.25,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"backgroundColor": "transparent",
"widgetName": "rhfg2vf1n5",
"rightColumn": 1204,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "rglduihhzk",
"containerStyle": "none",
"topRow": 0,
"bottomRow": 532,
"parentRowSpace": 1,
"isVisible": true,
"type": "CANVAS_WIDGET",
"canExtend": false,
"isLoading": false,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"widgetName": "Chart1",
"rightColumn": 8,
"allowHorizontalScroll": false,
"widgetId": "hwi9cwhg43",
"topRow": 1,
"bottomRow": 9,
"parentRowSpace": 38,
"isVisible": true,
"type": "CHART_WIDGET",
"parentId": "rglduihhzk",
"isLoading": false,
"chartData": [
{
"seriesName": "Sales",
"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
}
]
}
],
"yAxisName": "Total Order Revenue $",
"parentColumnSpace": 71.75,
"chartName": "Sales on working days",
"leftColumn": 2,
"dynamicBindingPathList": [],
"xAxisName": "Last Week",
"chartType": "LINE_CHART"
}
]
}
]
},
{
"backgroundColor": "#FFFFFF",
"widgetName": "Container4",
"rightColumn": 16,
"orientation": "VERTICAL",
"snapColumns": 16,
"widgetId": "qznzsquf70",
"containerStyle": "card",
"topRow": 0,
"bottomRow": 9,
"parentRowSpace": 38,
"isVisible": true,
"type": "CONTAINER_WIDGET",
"isLoading": false,
"parentColumnSpace": 75.25,
"dynamicBindingPathList": [],
"leftColumn": 8,
"children": [
{
"backgroundColor": "transparent",
"widgetName": "3bn6uv0vy4",
"rightColumn": 602,
"orientation": "VERTICAL",
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "7vm5mdu8ey",
"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": 7,
"textAlign": "LEFT",
"widgetId": "9xcfqahpw2",
"topRow": 3,
"bottomRow": 4,
"parentRowSpace": 38,
"isVisible": true,
"type": "TEXT_WIDGET",
"parentId": "bxekwxgc1i",
"isLoading": false,
"parentColumnSpace": 34.6875,
"leftColumn": 3,
"text": "Label"
}
]
}
]
}
]
},
"layoutOnLoadActions": [],
"new": false
}
],
"userPermissions": []
},
"publishedPage": {
"name": "Page1",
"layouts": [
{
"id": "61602709ae8b022ed53c23c8",
"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": [],
"actionCollectionList": [],
"decryptedFields": {},
"publishedLayoutmongoEscapedWidgets": {},
"unpublishedLayoutmongoEscapedWidgets": {}
}

View File

@ -0,0 +1,75 @@
{
"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,
"dynamicBindingPathList": [],
"version": 4,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"isVisible": true,
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"widgetName": "Button1",
"isDisabled": false,
"isDefaultClickDisabled": true,
"type": "BUTTON_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 1,
"rightColumn": 3,
"topRow": 3,
"bottomRow": 4,
"parentId": "0",
"widgetId": "p2jmk6tut5"
},
{
"isVisible": true,
"inputType": "TEXT",
"label": "",
"widgetName": "Input1",
"type": "INPUT_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 4,
"rightColumn": 9,
"topRow": 0,
"bottomRow": 1,
"parentId": "0",
"widgetId": "7grthyn6qd"
},
{
"isVisible": true,
"text": "Label",
"textStyle": "LABEL",
"textAlign": "LEFT",
"widgetName": "Text1",
"type": "TEXT_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 5,
"rightColumn": 9,
"topRow": 1,
"bottomRow": 2,
"parentId": "0",
"widgetId": "xzjri1a2e6"
}
]
}
}

View File

@ -0,0 +1,175 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1095,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 5016,
"containerStyle": "none",
"snapRows": 125,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 46,
"minHeight": 930,
"parentColumnSpace": 1,
"dynamicBindingPathList": [
],
"leftColumn": 0,
"children": [
{
"isVisible": true,
"defaultSelectedRow": "0",
"label": "Data",
"widgetName": "Table1",
"searchKey": "",
"textSize": "PARAGRAPH",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"totalRecordsCount": 0,
"defaultPageSize": 0,
"dynamicBindingPathList": [
{
"key": "primaryColumns.step.computedValue"
},
{
"key": "primaryColumns.task.computedValue"
},
{
"key": "primaryColumns.status.computedValue"
},
{
"key": "primaryColumns.action.computedValue"
}
],
"primaryColumns": {
"step": {
"index": 0,
"width": 150,
"id": "step",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textSize": "PARAGRAPH",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isCellVisible": true,
"isDerived": false,
"label": "step",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.step))}}"
},
"task": {
"index": 1,
"width": 150,
"id": "task",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textSize": "PARAGRAPH",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isCellVisible": true,
"isDerived": false,
"label": "task",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.task))}}"
},
"status": {
"index": 2,
"width": 150,
"id": "status",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textSize": "PARAGRAPH",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isCellVisible": true,
"isDerived": false,
"label": "status",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.status))}}"
},
"action": {
"index": 3,
"width": 150,
"id": "action",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "button",
"textSize": "PARAGRAPH",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isCellVisible": true,
"isDisabled": false,
"isDerived": false,
"label": "action",
"onClick": "{{currentRow.step === '#1' ? showAlert('Done', 'success') : currentRow.step === '#2' ? navigateTo('https://docs.appsmith.com/core-concepts/connecting-to-data-sources/querying-a-database',undefined,'NEW_WINDOW') : navigateTo('https://docs.appsmith.com/core-concepts/displaying-data-read/display-data-tables',undefined,'NEW_WINDOW')}}",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.action))}}"
}
},
"derivedColumns": {
},
"tableData": [
{
"step": "#1",
"task": "Drop a table",
"status": "✅",
"action": ""
},
{
"step": "#2",
"task": "Create a query fetch_users with the Mock DB",
"status": "--",
"action": ""
},
{
"step": "#3",
"task": "Bind the query using => fetch_users.data",
"status": "--",
"action": ""
}
],
"columnSizeMap": {
"task": 245,
"step": 62,
"status": 75
},
"columnOrder": [
"step",
"task",
"status",
"action"
],
"isVisibleSearch": true,
"isVisibleFilters": true,
"isVisibleDownload": true,
"isVisiblePagination": true,
"isSortable": true,
"delimiter": ",",
"version": 3,
"type": "TABLE_WIDGET",
"hideCard": false,
"displayName": "Table",
"key": "y3v2mu6lds",
"iconSVG": "/static/media/icon.db8a9cbd.svg",
"widgetId": "tulofhk1fb",
"renderMode": "CANVAS",
"isLoading": false,
"parentColumnSpace": 16.921875,
"parentRowSpace": 10,
"leftColumn": 15,
"rightColumn": 49,
"topRow": 22,
"bottomRow": 50,
"parentId": "0"
}
]
}
}

View File

@ -25,18 +25,18 @@
"widgetName": "Tabs1",
"tabs": [
{
"label": "Tab 1",
"label": "Tab1",
"id": "tab1",
"widgetId": "uxle0mrg8t"
},
{
"label": "Tab 2",
"label": "Tab2",
"id": "tab2",
"widgetId": "9hy1rmqb2f"
}
],
"shouldShowTabs": true,
"defaultTab": "Tab 1",
"defaultTab": "Tab1",
"type": "TABS_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
@ -51,7 +51,7 @@
{
"type": "CANVAS_WIDGET",
"tabId": "tab1",
"tabName": "Tab 1",
"tabName": "Tab1",
"widgetId": "uxle0mrg8t",
"parentId": "y6rla3dsd6",
"detachFromLayout": true,
@ -69,7 +69,7 @@
{
"type": "CANVAS_WIDGET",
"tabId": "tab2",
"tabName": "Tab 2",
"tabName": "Tab2",
"widgetId": "9hy1rmqb2f",
"parentId": "y6rla3dsd6",
"detachFromLayout": true,
@ -88,4 +88,4 @@
}
]
}
}
}

View File

@ -2,149 +2,205 @@
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"rightColumn": 656,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1280,
"bottomRow": 2860,
"containerStyle": "none",
"snapRows": 33,
"snapRows": 128,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 8,
"version": 46,
"minHeight": 1292,
"parentColumnSpace": 1,
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [{
"isVisible": true,
"label": "Data",
"widgetName": "Table1",
"searchKey": "",
"tableData": "{{\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]\n}}",
"type": "TABLE_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 2,
"rightColumn": 10,
"topRow": 12,
"bottomRow": 19,
"parentId": "0",
"widgetId": "sb070qr2ir",
"dynamicBindingPathList": [],
"primaryColumns": {
"id": {
"index": 0,
"width": 150,
"id": "id",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textColor": "#4E5D78",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDerived": false,
"label": "id",
"computedValue": ""
"children": [
{
"widgetName": "Table1",
"columnOrder": [
"id",
"email",
"userName",
"productName",
"orderAmount"
],
"isVisibleDownload": true,
"topRow": 48,
"bottomRow": 71,
"parentRowSpace": 10,
"isSortable": true,
"type": "TABLE_WIDGET",
"parentColumnSpace": 74,
"dynamicTriggerPathList": [],
"leftColumn": 0,
"dynamicBindingPathList": [
{
"key": "tableData"
},
{
"key": "primaryColumns.id.computedValue"
},
{
"key": "primaryColumns.email.computedValue"
},
{
"key": "primaryColumns.userName.computedValue"
},
{
"key": "primaryColumns.productName.computedValue"
},
{
"key": "primaryColumns.orderAmount.computedValue"
}
],
"primaryColumns": {
"id": {
"index": 0,
"width": 150,
"id": "id",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textSize": "PARAGRAPH",
"fontStyle": "REGULAR",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDisabled": false,
"isCellVisible": true,
"isDerived": false,
"label": "id",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.id))}}"
},
"email": {
"index": 1,
"width": 150,
"id": "email",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textSize": "PARAGRAPH",
"fontStyle": "REGULAR",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDisabled": false,
"isCellVisible": true,
"isDerived": false,
"label": "email",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.email))}}"
},
"userName": {
"index": 2,
"width": 150,
"id": "userName",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textSize": "PARAGRAPH",
"fontStyle": "REGULAR",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDisabled": false,
"isCellVisible": true,
"isDerived": false,
"label": "userName",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.userName))}}"
},
"productName": {
"index": 3,
"width": 150,
"id": "productName",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textSize": "PARAGRAPH",
"fontStyle": "REGULAR",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDisabled": false,
"isCellVisible": true,
"isDerived": false,
"label": "productName",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.productName))}}"
},
"orderAmount": {
"index": 4,
"width": 150,
"id": "orderAmount",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textSize": "PARAGRAPH",
"fontStyle": "REGULAR",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDisabled": false,
"isCellVisible": true,
"isDerived": false,
"label": "orderAmount",
"computedValue": "{{Table1.sanitizedTableData.map((currentRow) => ( currentRow.orderAmount))}}"
}
},
"email": {
"index": 1,
"width": 150,
"id": "email",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textColor": "#4E5D78",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDerived": false,
"label": "email",
"computedValue": ""
},
"userName": {
"index": 2,
"width": 150,
"id": "userName",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textColor": "#4E5D78",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDerived": false,
"label": "userName",
"computedValue": ""
},
"productName": {
"index": 3,
"width": 150,
"id": "productName",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textColor": "#4E5D78",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDerived": false,
"label": "productName",
"computedValue": ""
},
"orderAmount": {
"index": 4,
"width": 150,
"id": "orderAmount",
"horizontalAlignment": "LEFT",
"verticalAlignment": "CENTER",
"columnType": "text",
"textColor": "#4E5D78",
"textSize": "PARAGRAPH",
"fontStyle": "NORMAL",
"enableFilter": true,
"enableSort": true,
"isVisible": true,
"isDerived": false,
"label": "orderAmount",
"computedValue": ""
"delimiter": ",",
"migrated": true,
"derivedColumns": {},
"rightColumn": 57,
"textSize": "PARAGRAPH",
"widgetId": "sb070qr2ir",
"isVisibleFilters": true,
"tableData": "{{\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]\n}}",
"isVisible": true,
"label": "Data",
"searchKey": "",
"fontStyle": "REGULAR",
"version": 3,
"parentId": "0",
"isLoading": false,
"horizontalAlignment": "LEFT",
"isVisibleSearch": true,
"isVisiblePagination": true,
"verticalAlignment": "CENTER",
"columnSizeMap": {
"email": 261
}
},
{
"widgetName": "Text1",
"rightColumn": 60,
"textAlign": "LEFT",
"displayName": "Text",
"widgetId": "16zkg2v0na",
"topRow": 228,
"bottomRow": 284,
"parentRowSpace": 10,
"isVisible": true,
"type": "TEXT_WIDGET",
"fontStyle": "BOLD",
"textColor": "#231F20",
"version": 1,
"hideCard": false,
"parentId": "0",
"isLoading": false,
"parentColumnSpace": 17.28125,
"dynamicTriggerPathList": [],
"leftColumn": 48,
"dynamicBindingPathList": [
{
"key": "text"
}
],
"fontSize": "PARAGRAPH",
"text": "{{Table1.triggeredRow.userName}}",
"key": "r76o6tqjaz"
}
}, {
"widgetName": "Text1",
"displayName": "Text",
"topRow": 57,
"bottomRow": 71,
"parentRowSpace": 10,
"type": "TEXT_WIDGET",
"hideCard": false,
"parentColumnSpace": 17.28125,
"dynamicTriggerPathList": [],
"leftColumn": 12,
"dynamicBindingPathList": [{"key":"text"}],
"text": "{{Table1.triggeredRow.userName}}",
"key": "r76o6tqjaz",
"rightColumn": 15,
"textAlign": "LEFT",
"widgetId": "16zkg2v0na",
"isVisible": true,
"fontStyle": "BOLD",
"textColor": "#231F20",
"parentId": "0",
"isLoading": false,
"fontSize": "PARAGRAPH"
}]
]
}
}

View File

@ -0,0 +1,269 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1280,
"snapColumns": 64,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1990,
"containerStyle": "none",
"snapRows": 125,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"version": 42,
"minHeight": 1970,
"parentColumnSpace": 1,
"dynamicTriggerPathList": [],
"dynamicBindingPathList": [],
"leftColumn": 0,
"children": [
{
"widgetName": "TreeSelect1",
"displayName": "TreeSelect",
"iconSVG": "/static/media/icon.bd99caba.svg",
"labelText": "Label",
"topRow": 14,
"bottomRow": 20.9,
"parentRowSpace": 10,
"type": "SINGLE_SELECT_TREE_WIDGET",
"hideCard": false,
"defaultOptionValue":
"GREEN"
,
"parentColumnSpace": 19.8125,
"leftColumn": 5,
"options": [
{
"label": "Blue",
"value": "BLUE",
"children": [
{
"label": "Dark Blue",
"value": "DARK BLUE"
},
{
"label": "Light Blue",
"value": "LIGHT BLUE"
}
]
},
{
"label": "Green",
"value": "GREEN"
},
{
"label": "Red",
"value": "RED"
}
],
"placeholderText": "Select option",
"isDisabled": false,
"key": "oe8sn5hbxk",
"isRequired": false,
"rightColumn": 18,
"widgetId": "p65c0i01ic",
"isVisible": true,
"version": 1,
"expandAll": false,
"parentId": "0",
"renderMode": "CANVAS",
"isLoading": false,
"allowClear": false
},
{
"widgetName": "MultiTreeSelect2",
"displayName": "Multi TreeSelect",
"iconSVG": "/static/media/icon.b3e28afb.svg",
"labelText": "Label",
"topRow": 31,
"bottomRow": 37.9,
"parentRowSpace": 10,
"type": "MULTI_SELECT_TREE_WIDGET",
"hideCard": false,
"mode": "SHOW_ALL",
"defaultOptionValue": [
"GREEN"
],
"parentColumnSpace": 19.8125,
"leftColumn": 5,
"options": [
{
"label": "Blue",
"value": "BLUE",
"children": [
{
"label": "Dark Blue",
"value": "DARK BLUE"
},
{
"label": "Light Blue",
"value": "LIGHT BLUE"
}
]
},
{
"label": "Green",
"value": "GREEN"
},
{
"label": "Red",
"value": "RED"
}
],
"placeholderText": "Select option(s)",
"isDisabled": false,
"key": "oe8sn5hbxk",
"isRequired": false,
"rightColumn": 18,
"widgetId": "buewtu97rf",
"isVisible": true,
"version": 1,
"expandAll": false,
"parentId": "0",
"renderMode": "CANVAS",
"isLoading": false,
"allowClear": false
},
{
"widgetName": "Select1",
"isFilterable": true,
"displayName": "Select",
"iconSVG": "/static/media/icon.bd99caba.svg",
"labelText": "Label",
"topRow": 50,
"bottomRow": 56.9,
"parentRowSpace": 10,
"type": "DROP_DOWN_WIDGET",
"serverSideFiltering": false,
"hideCard": false,
"defaultOptionValue": "GREEN",
"selectionType": "SINGLE_SELECT",
"parentColumnSpace": 19.8125,
"dynamicTriggerPathList": [],
"leftColumn": 5,
"dynamicBindingPathList": [],
"options": [
{
"label": "Blue",
"value": "BLUE"
},
{
"label": "Green",
"value": "GREEN"
},
{
"label": "Red",
"value": "RED"
}
],
"placeholderText": "Select option",
"isDisabled": false,
"key": "1b9j4l2c65",
"isRequired": false,
"rightColumn": 18,
"widgetId": "vnoxjpwd8a",
"isVisible": true,
"version": 1,
"parentId": "0",
"renderMode": "CANVAS",
"isLoading": false
},
{
"widgetName": "MultiSelect1",
"displayName": "MultiSelect",
"iconSVG": "/static/media/icon.a3495809.svg",
"labelText": "Label",
"topRow": 67,
"bottomRow": 73.9,
"parentRowSpace": 10,
"type": "MULTI_SELECT_WIDGET",
"serverSideFiltering": false,
"hideCard": false,
"defaultOptionValue": [
"GREEN"
],
"parentColumnSpace": 19.8125,
"leftColumn": 5,
"options": [
{
"label": "Blue",
"value": "BLUE"
},
{
"label": "Green",
"value": "GREEN"
},
{
"label": "Red",
"value": "RED"
}
],
"placeholderText": "Select option(s)",
"isDisabled": false,
"key": "z8p14a1gb8",
"isRequired": false,
"rightColumn": 18,
"widgetId": "c2j24v7j6b",
"isVisible": true,
"version": 1,
"parentId": "0",
"renderMode": "CANVAS",
"isLoading": false
},
{
"isCompact": false,
"widgetName": "MenuButton1",
"displayName": "Menu Button",
"iconSVG": "/static/media/icon.0341d17d.svg",
"topRow": 80,
"bottomRow": 84,
"parentRowSpace": 10,
"type": "MENU_BUTTON_WIDGET",
"hideCard": false,
"parentColumnSpace": 19.8125,
"leftColumn": 5,
"isDisabled": false,
"key": "ehx7dguolk",
"rightColumn": 18,
"menuVariant": "PRIMARY",
"widgetId": "33f9n054tq",
"menuItems": {
"menuItem1": {
"label": "First Menu Item",
"id": "menuItem1",
"widgetId": "",
"isVisible": true,
"isDisabled": false,
"index": 0
},
"menuItem2": {
"label": "Second Menu Item",
"id": "menuItem2",
"widgetId": "",
"isVisible": true,
"isDisabled": false,
"index": 1
},
"menuItem3": {
"label": "Third Menu Item",
"id": "menuItem3",
"widgetId": "",
"isVisible": true,
"isDisabled": false,
"index": 2
}
},
"isVisible": true,
"label": "Open Menu",
"version": 1,
"parentId": "0",
"renderMode": "CANVAS",
"isLoading": false,
"menuColor": "#03B365"
}
]
}
}

View File

@ -0,0 +1,119 @@
const dsl = require("../../../fixtures/CMSdsl.json");
const homePage = require("../../../locators/HomePage.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json");
const apiEditor = require("../../../locators/ApiEditor.json");
const appPage = require("../../../locators/CMSApplocators.json");
describe("Content Management System App", function() {
let orgid;
let newOrganizationName;
let appname;
let datasourceName;
before(() => {
cy.addDsl(dsl);
});
beforeEach(() => {
cy.startRoutesForDatasource();
});
it("Create Get echo Api call", function() {
cy.NavigateToAPI_Panel();
cy.CreateAPI("get_data");
// creating get request using echo
cy.enterDatasourceAndPath("https://mock-api.appsmith.com/echo", "/get");
cy.get(apiwidget.headerKey).type("info");
cy.xpath("//span[text()='Key']").click();
// entering the data in header
cy.get(
apiwidget.headerValue,
).type(
'[{"due":"2021-11-23","assignee":"Dan.Wyman@hotmail.com","title":"Recusan","description":"Ut quisquam eum beatae facere eos aliquam laborum ea.","id":"1"},{"due":"2021-11-23","assignee":"Dashawn_Maggio30@gmail.com","title":"Dignissimos eaque","description":"Consequatur corrupti et possimus en.","id":"2"},{"due":"2021-11-24","assignee":"Curt50@gmail.com","title":"Voluptas explicabo","description":"Quia ratione optio et maiores.","id":"3"},{"due":"2021-11-23","assignee":"Shanna63@hotmail.com","title":"Aut omnis.","description":"Neque rerum numquam veniam voluptatum id. Aut daut.","id":"4"}]',
{ parseSpecialCharSequences: false },
);
cy.SaveAndRunAPI();
cy.ResponseStatusCheck("200");
});
it("Create Post echo Api call", function() {
cy.NavigateToAPI_Panel();
cy.CreateAPI("send_mail");
cy.get(apiEditor.ApiVerb).click();
cy.xpath(appPage.selectPost).click();
// creating post request using echo
cy.enterDatasourceAndPath("https://mock-api.appsmith.com/echo", "/post");
cy.contains(apiEditor.bodyTab).click({ force: true });
cy.xpath(apiwidget.postbody)
.click({ force: true })
.clear();
// binding the data with widgets in body tab
cy.xpath(apiwidget.postbody)
.click({ force: true })
.focus()
.type(
'{"to":"{{to_input.text}}","subject":"{{subject.text}}","content":"{{content.text}}"}',
{ parseSpecialCharSequences: false },
)
.type("{del}{del}{del}");
cy.SaveAndRunAPI();
cy.ResponseStatusCheck("201");
});
it("Create Delete echo Api call", function() {
cy.NavigateToAPI_Panel();
cy.CreateAPI("delete_proposal");
cy.get(apiEditor.ApiVerb).click();
cy.xpath(appPage.selectDelete).click();
// creating delete request using echo
cy.enterDatasourceAndPath("https://mock-api.appsmith.com/echo", "/delete");
cy.contains(apiEditor.bodyTab).click({ force: true });
// binding the data with widgets in body tab
cy.xpath(apiwidget.postbody)
.click({ force: true })
.focus()
.type(
'{"title":"{{title.text}}","due":"{{due.text}}","assignee":"{{assignee.text}}"}',
{ parseSpecialCharSequences: false },
)
.type("{del}{del}{del}");
cy.SaveAndRunAPI();
//cy.ResponseStatusCheck("200");
});
it("Send mail and verify post request body", function() {
// navigating to canvas
cy.xpath(appPage.pagebutton).click();
cy.xpath(appPage.submitButton).should("be.visible");
cy.xpath("//div[text()='3']").click({ force: true });
cy.xpath(appPage.mailButton).click();
// verifying the mail to send and asserting post call's response
cy.xpath(appPage.sendMailText).should("be.visible");
cy.xpath("//input[@value='Curt50@gmail.com']").should("be.visible");
cy.xpath(appPage.subjectField).type("Test");
cy.xpath(appPage.contentField)
.last()
.type("Task completed", { force: true });
cy.xpath(appPage.confirmButton).click();
cy.xpath(appPage.closeButton).click();
cy.xpath(appPage.pagebutton).click();
cy.xpath(appPage.datasourcesbutton).click();
cy.xpath(appPage.postApi).click();
cy.ResponseCheck("Test");
// cy.ResponseCheck("Task completed");
cy.ResponseCheck("Curt50@gmail.com");
});
it("Delete proposal and verify delete request body", function() {
// navigating back to canvas
cy.xpath(appPage.pagebutton).click();
cy.xpath(appPage.submitButton).should("be.visible");
cy.xpath("//span[text()='Dan.Wyman@hotmail.com']").click({ force: true });
// deleting the proposal and asserting delete call's response
cy.xpath(appPage.deleteButton).click();
cy.xpath(appPage.deleteTaskText).should("be.visible");
cy.xpath(appPage.confirmButton).click();
cy.xpath(appPage.pagebutton).click();
cy.xpath(appPage.datasourcesbutton).click();
cy.xpath(appPage.deleteApi).click();
cy.ResponseCheck("Dan.Wyman@hotmail.com");
cy.ResponseCheck("Recusan");
});
});

View File

@ -19,17 +19,6 @@ describe("PgAdmin Clone App", function() {
});
it("Add dsl and authenticate datasource", function() {
cy.NavigateToHome();
appname = localStorage.getItem("AppName");
cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
cy.get(homePage.appEditIcon)
.first()
.click({ force: true });
// authenticating datasource
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();
@ -133,7 +122,6 @@ describe("PgAdmin Clone App", function() {
parseSpecialCharSequences: false,
},
);
cy.wait(3000);
cy.WaitAutoSave();
cy.runQuery();
// clicking on chevron icon to go back to the datasources page
@ -176,14 +164,14 @@ describe("PgAdmin Clone App", function() {
cy.xpath(appPage.addTablename)
.clear()
.type(Table);
cy.wait(2000);
// adding column to the table
cy.xpath(appPage.addColumn).click();
cy.wait(2000);
cy.xpath(appPage.columnNamefield).should("be.visible");
cy.xpath(appPage.datatypefield).should("be.visible");
cy.xpath(appPage.addTablename).type("id");
cy.xpath(appPage.textField).click();
cy.get(appPage.dropdownChevronDown)
.last()
.click();
cy.xpath(appPage.selectDatatype).click();
// switching on the Primary Key toggle
cy.get(widgetsPage.switchWidgetInactive)
@ -194,7 +182,6 @@ describe("PgAdmin Clone App", function() {
.last()
.click();
cy.xpath(appPage.submitButton).click();
cy.wait(2000);
cy.xpath(appPage.addColumn).should("be.visible");
cy.xpath(appPage.submitButton).click({ force: true });
cy.xpath(appPage.closeButton).click();
@ -206,7 +193,6 @@ describe("PgAdmin Clone App", function() {
cy.xpath(appPage.viewButton)
.first()
.click({ force: true });
cy.wait(2000);
// deleting the table through modal
cy.xpath(appPage.deleteButton)
.last()

View File

@ -0,0 +1,65 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../../fixtures/buttonApiDsl.json");
const widgetsPage = require("../../../../locators/Widgets.json");
const publishPage = require("../../../../locators/publishWidgetspage.json");
describe("Test Create Api and Bind to Table widget", function() {
before(() => {
cy.addDsl(dsl);
});
it("Test_Add users api and execute api", function() {
cy.createAndFillApi(this.data.userApi, "/random");
cy.RunAPI();
});
it("Call the api without error handling", () => {
cy.SearchEntityandOpen("Button1");
cy.get(widgetsPage.toggleOnClick)
.invoke("attr", "class")
.then((classes) => {
if (classes.includes("is-active")) {
cy.get(widgetsPage.toggleOnClick).click();
}
});
cy.get(widgetsPage.toggleOnClick).click();
cy.get(".t--property-control-onclick").then(($el) => {
cy.updateCodeInput($el, "{{Api1.run()}}");
});
cy.PublishtheApp();
cy.get(publishPage.buttonWidget).click();
cy.wait("@postExecute").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.get(commonlocators.toastAction)
.should("have.length", 1)
.should("contain.text", "failed to execute");
cy.get(publishPage.backToEditor).click({ force: true });
});
it("Call the api with error handling", () => {
cy.SearchEntityandOpen("Button1");
cy.get(".t--property-control-onclick").then(($el) => {
cy.updateCodeInput($el, "{{Api1.run(() => {}, () => {})}}");
});
cy.PublishtheApp();
cy.get(publishPage.buttonWidget).click();
cy.wait("@postExecute").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.get(commonlocators.toastAction).should("not.exist");
});
});

View File

@ -67,11 +67,11 @@ describe("API Panel Test Functionality", function() {
"onclick",
"{{Query1.run(undefined, undefined, { tableName: 'users' })}}",
);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
// Choose dynamic button
cy.SearchEntityandOpen("DynamicButton");
cy.wait(2000);
// toggle js of onClick
cy.get(".t--property-control-onclick").scrollIntoView();
cy.get(".t--property-control-onclick")
.find(".t--js-toggle")
.click({ force: true });

View File

@ -0,0 +1,43 @@
const datasourceEditor = require("../../../../locators/DatasourcesEditor.json");
const queryEditor = require("../../../../locators/QueryEditor.json");
let datasourceName, actionName;
describe("Google Sheet datasource test cases", function() {
before(() => {
cy.NavigateToDatasourceEditor();
cy.get(datasourceEditor.googleSheets).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillGoogleSheetsDatasourceForm();
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
});
cy.NavigateToApiEditor();
cy.get(
`${datasourceEditor.datasourceCard} ${datasourceEditor.createQuerty}`,
)
.last()
.click();
cy.wait("@createNewApi").then((httpResponse) => {
actionName = httpResponse.response.body.data.name;
});
cy.NavigateToApiEditor();
});
it("Create a new query from the datasource editor", function() {
cy.get(
`.t--datasource-name:contains('${datasourceName}') .t--queries-for-SAAS`,
).should("have.text", "1 query on this page");
});
after(() => {
cy.get(`.t--entity-name:contains('${actionName}')`).click();
cy.get(queryEditor.queryMoreAction).click();
cy.get(queryEditor.deleteUsingContext).click();
cy.wait("@deleteAction").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.deleteDatasource(datasourceName);
});
});

View File

@ -1,11 +1,15 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../../locators/apiWidgetslocator.json");
describe("API Panel Test Functionality ", function() {
it("Test API copy/Move/delete feature", function() {
cy.log("Login Successful");
cy.Createpage("SecondPage");
cy.NavigateToAPI_Panel();
cy.log("Navigation to API Panel screen successful");
cy.CreateAPI("FirstAPI");
cy.enterDatasourceAndPath(testdata.baseUrl, "{{ '/random' }}");
cy.log("Creation of FirstAPI Action successful");
cy.GlobalSearchEntity("FirstAPI");
cy.xpath('//*[local-name()="g" and @id="Icon/Outline/more-vertical"]')
@ -13,13 +17,16 @@ describe("API Panel Test Functionality ", function() {
.should("be.hidden")
.invoke("show")
.click({ force: true });
cy.CopyAPIToHome();
cy.copyEntityToPage("SecondPage");
cy.GlobalSearchEntity("FirstAPICopy");
// click on learn how link
cy.get(".t--learn-how-apis-link").click();
// this should open in a global search modal
cy.get(commonlocators.globalSearchModal);
cy.get("body").click(0, 0);
cy.MoveAPIToPage("Page1");
cy.SearchEntityandOpen("FirstAPICopy");
cy.get(apiwidget.resourceUrl).should("contain.text", "{{ '/random' }}");
cy.DeleteAPIFromSideBar();
});
});

View File

@ -16,7 +16,6 @@ describe("Duplicate application", function() {
cy.SearchEntityandOpen("Input1");
cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("inputUpdate");
cy.testJsontext("defaulttext", "A");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@inputUpdate").then((response) => {
parentApplicationDsl = response.response.body.data.dsl;
});

View File

@ -16,7 +16,6 @@ describe("Fork application across orgs", function() {
cy.SearchEntityandOpen("Input1");
cy.intercept("PUT", "/api/v1/layouts/*/pages/*").as("inputUpdate");
cy.testJsontext("defaulttext", "A");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@inputUpdate").then((response) => {
parentApplicationDsl = response.response.body.data.dsl;
});

View File

@ -24,7 +24,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() {
it("Input widget updated with deafult data", function() {
cy.SearchEntityandOpen("Input1");
cy.get(widgetsPage.defaultInput).type("3");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -41,7 +41,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() {
cy.get(widgetsPage.defaultInput).type(testdata.pageloadBinding, {
parseSpecialCharSequences: false,
});
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -32,7 +32,6 @@ describe("Test Create Api and Bind to Table widget", function() {
it("Test_Validate the Api data is updated on List widget", function() {
cy.SearchEntityandOpen("List1");
cy.testJsontext("items", "{{Api1.data.users}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(".t--draggable-textwidget span").should("have.length", 8);
cy.get(".t--draggable-textwidget span")
@ -55,7 +54,6 @@ describe("Test Create Api and Bind to Table widget", function() {
cy.get(publishPage.backToEditor).click({ force: true });
cy.SearchEntityandOpen("List1");
cy.testJsontext("itemspacing\\(px\\)", "50");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(".t--draggable-textwidget span").should("have.length", 6);
cy.get(".t--draggable-textwidget span")
.first()

View File

@ -18,7 +18,6 @@ describe("Binding the Datepicker and Text Widget", function() {
*/
cy.openPropertyPane("textwidget");
cy.testJsontext("text", "{{DatePicker1.selectedDate}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
/**
* Set the Calender for today's date in DatePicker1
@ -57,7 +56,6 @@ describe("Binding the Datepicker and Text Widget", function() {
* Bind the datepicker1 to text widget
*/
cy.testJsontext("text", "{{DatePicker1.defaultDate}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
/**
* Fetching the date on DatePicker2
@ -78,7 +76,6 @@ describe("Binding the Datepicker and Text Widget", function() {
cy.ClearDateFooter();
cy.setDate(1, "ddd MMM DD YYYY");
cy.get(commonlocators.onDateSelectedField).click();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
/**
*Validate the date in text widget

View File

@ -12,7 +12,7 @@ describe("Binding the Table and input Widget", function() {
it("Input widget test with default value from table widget", function() {
cy.SearchEntityandOpen("Input1");
cy.testJsontext("defaulttext", testdata.defaultInputWidget + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -67,7 +67,6 @@ describe("Binding the Table and input Widget", function() {
}
});
cy.get(widgetsPage.defaultInput).type(testdata.sortedColumn);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -17,7 +17,6 @@ describe("Binding the Widgets with JSObject", function() {
cy.createJSObject('return "Success";');
cy.SearchEntityandOpen("Input2");
cy.testJsontext("defaulttext", "{{JSObject1.myFun1()}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -14,7 +14,7 @@ describe("Binding the input Widget with tab Widget", function() {
it("Input widget test with default value from tab widget", function() {
cy.SearchEntityandOpen("Input1");
cy.testJsontext("defaulttext", testdata.tabBinding + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -93,7 +93,6 @@ describe("Test Create Api and Bind to Table widget", function() {
//cy.openPropertyPane("textwidget");
/** Bind the Table widget with Text widget*/
cy.testJsontext("text", "{{Table1.selectedRow.url}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.SearchEntityandOpen("Table1");
cy.testJsontext("tabledata", "{{Api2.data.users}}");
cy.callApi("Api2");
@ -107,6 +106,5 @@ describe("Test Create Api and Bind to Table widget", function() {
cy.get(publishPage.backToEditor).click({ force: true });
cy.ValidatePaginateResponseUrlData(apiPage.apiPaginationNextTest);
cy.wait(5000);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
});

View File

@ -14,7 +14,6 @@ describe("Binding the table widget and input Widget", function() {
it("Input widget test with default value from table widget", function() {
cy.SearchEntityandOpen("Input1");
cy.testJsontext("defaulttext", testdata.defaultInputWidget + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -25,7 +24,6 @@ describe("Binding the table widget and input Widget", function() {
it("validation of data displayed in input widgets based on selected row", function() {
cy.SearchEntityandOpen("Table1");
cy.testJsontext("defaultselectedrow", "2");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.readTabledataPublish("2", "0").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("6788734");

View File

@ -31,7 +31,6 @@ describe("Test Create Api and Bind to Table widget", function() {
cy.SearchEntityandOpen("Table1");
//cy.openPropertyPane("tablewidget");
cy.testJsontext("tabledata", "{{Api1.data.users}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
/**
* readTabledata--> is to read the table contents

View File

@ -12,7 +12,7 @@ describe("Binding the Table and input Widget", function() {
it("Input widget test with default value from table widget", function() {
cy.SearchEntityandOpen("Input1");
cy.testJsontext("defaulttext", testdata.defaultInputWidget + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -23,7 +23,7 @@ describe("Binding the Table and input Widget", function() {
it("validation of data displayed in input widgets based on search value set", function() {
cy.SearchEntityandOpen("Table1");
cy.testJsontext("defaultsearchtext", "2736212");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").isSelectRow(0);
cy.readTabledataPublish("0", "0").then((tabData) => {
const tabValue = tabData;

View File

@ -21,7 +21,7 @@ describe("Binding the button Widgets and validating NavigateTo Page functionalit
.contains("Navigate to")
.click();
cy.enterNavigatePageName(testdata.externalPage);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(300);
});

View File

@ -22,7 +22,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function
.contains("Navigate to")
.click();
cy.enterNavigatePageName(pageid);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(300);
});

View File

@ -15,13 +15,11 @@ describe("Binding the multiple widgets and validating default data", function()
cy.openPropertyPane("dropdownwidget");
cy.testJsontext("options", JSON.stringify(testdata.defaultdataBinding));
cy.evaluateErrorMessage(testdata.dropdownErrorMsg);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
it("Table widget test with invalid binding value", function() {
cy.openPropertyPane("tablewidget");
cy.testJsontext("tabledata", JSON.stringify(testdata.defaultdataBinding));
cy.evaluateErrorMessage(testdata.tableWidgetErrorMsg);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
});

View File

@ -17,7 +17,6 @@ describe("Table Widget with Input Widget and Navigate to functionality validatio
cy.openPropertyPane("tablewidget");
cy.widgetText("Table1", widgetsPage.tableWidget, commonlocators.tableInner);
cy.testJsontext("tabledata", JSON.stringify(testdata.TablePagination));
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
it("Create MyPage and valdiate if its successfully created", function() {

View File

@ -23,7 +23,6 @@ describe("Table Widget and Navigate to functionality validation", function() {
.contains("Navigate to")
.click();
cy.enterNavigatePageName(pageid);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
it("Create MyPage and valdiate if its successfully created", function() {

View File

@ -21,7 +21,7 @@ describe("Table Widget property pane feature validation", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.toggleJsAndUpdate("tabledata", testdata.bindingAlign);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.readTabledataValidateCSS("0", "0", "justify-content", "flex-start");
cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end");
});
@ -29,6 +29,7 @@ describe("Table Widget property pane feature validation", function() {
it("Table widget change text size and validate", function() {
cy.readTabledataValidateCSS("0", "0", "font-size", "14px");
cy.openPropertyPane("tablewidget");
cy.get(".t--property-pane-back-btn").click({ force: true });
cy.editColumn("id");
cy.get(widgetsPage.toggleTextAlign)
.first()
@ -41,12 +42,13 @@ describe("Table Widget property pane feature validation", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.selectTextSize("Heading 1");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.readTabledataValidateCSS("0", "0", "font-size", "24px");
});
it("Table widget toggle test for text size", function() {
cy.openPropertyPane("tablewidget");
cy.get(".t--property-pane-back-btn").click({ force: true });
cy.editColumn("id");
cy.get(widgetsPage.toggleTextSize)
.first()
@ -54,13 +56,14 @@ describe("Table Widget property pane feature validation", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.toggleJsAndUpdate("tabledata", testdata.bindingSize);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.readTabledataValidateCSS("0", "0", "font-size", "14px");
cy.readTabledataValidateCSS("1", "0", "font-size", "24px");
});
it("Table widget toggle test for vertical Alignment", function() {
cy.openPropertyPane("tablewidget");
cy.get(".t--property-pane-back-btn").click({ force: true });
cy.editColumn("id");
cy.get(widgetsPage.toggleTextSize)
.first()
@ -73,13 +76,14 @@ describe("Table Widget property pane feature validation", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.toggleJsAndUpdate("tabledata", testdata.bindingVerticalAlig);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.readTabledataValidateCSS("0", "0", "align-items", "flex-start");
cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end");
});
it("Table widget toggle test for style Alignment", function() {
cy.openPropertyPane("tablewidget");
cy.get(".t--property-pane-back-btn").click({ force: true });
cy.editColumn("id");
cy.get(widgetsPage.toggleVerticalAlig)
.first()
@ -92,13 +96,14 @@ describe("Table Widget property pane feature validation", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.toggleJsAndUpdate("tabledata", testdata.bindingStyle);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.readTabledataValidateCSS("0", "0", "font-style", "normal");
cy.readTabledataValidateCSS("1", "0", "font-style", "italic");
});
it("Table widget toggle test for text color", function() {
cy.openPropertyPane("tablewidget");
cy.get(".t--property-pane-back-btn").click({ force: true });
cy.editColumn("id");
cy.get(widgetsPage.toggleVerticalAlig)
.first()
@ -111,7 +116,7 @@ describe("Table Widget property pane feature validation", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout");
cy.readTabledataValidateCSS("0", "0", "color", "rgb(0, 128, 0)");
cy.readTabledataValidateCSS("1", "0", "color", "rgb(255, 0, 0)");
@ -119,6 +124,7 @@ describe("Table Widget property pane feature validation", function() {
it("Table widget toggle test for background color", function() {
cy.openPropertyPane("tablewidget");
cy.get(".t--property-pane-back-btn").click({ force: true });
cy.editColumn("id");
cy.get(widgetsPage.toggleJsColor)
.first()
@ -131,7 +137,7 @@ describe("Table Widget property pane feature validation", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.toggleJsAndUpdate("tabledata", testdata.bindingTextColor);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout");
cy.readTabledataValidateCSS(
"0",

View File

@ -55,7 +55,7 @@ describe("Binding the multiple widgets and validating default data", function()
it("Button widget test with on action query run", function() {
cy.SearchEntityandOpen("Button1");
cy.executeDbQuery("Query1");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -66,7 +66,7 @@ describe("Binding the multiple widgets and validating default data", function()
it("Input widget test with default value update with query data", function() {
cy.SearchEntityandOpen("Input1");
cy.get(widgetsPage.defaultInput).type(testdata.defaultInputQuery);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -14,7 +14,7 @@ describe("Binding the multiple widgets and validating default data", function()
it("Input widget test with default value from table widget", function() {
cy.openPropertyPane("inputwidget");
cy.testJsontext("defaulttext", testdata.defaultInputWidget + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -26,7 +26,7 @@ describe("Binding the multiple widgets and validating default data", function()
it("Dropdown widget test with default value from table widget", function() {
cy.openPropertyPane("dropdownwidget");
cy.testJsontext("options", JSON.stringify(testdata.deafultDropDownWidget));
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -20,7 +20,7 @@ describe("Binding the multiple input Widget", function() {
it("Cyclic depedancy error message validation", function() {
cy.openPropertyPane("inputwidget");
cy.testJsontext("defaulttext", testdata.defaultMoustacheData + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -32,7 +32,7 @@ describe("Binding the multiple input Widget", function() {
it("Binding input widget1 and validating", function() {
cy.openPropertyPane("inputwidget");
cy.testJsontext("defaulttext", testdata.defaultdata);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -47,7 +47,7 @@ describe("Binding the multiple input Widget", function() {
it("Binding second input widget with first input widget and validating", function() {
cy.SearchEntityandOpen("Input2");
cy.testJsontext("defaulttext", testdata.defaultMoustacheData + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -76,7 +76,7 @@ describe("Binding the multiple input Widget", function() {
it("Binding third input widget with first input widget and validating", function() {
cy.SearchEntityandOpen("Input3");
cy.testJsontext("defaulttext", testdata.defaultMoustacheData + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -14,7 +14,7 @@ describe("Binding the multiple input Widget", function() {
it("Input widget test with default value from table widget", function() {
cy.SearchEntityandOpen("Input1");
cy.testJsontext("defaulttext", testdata.defaultInputWidget + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -14,7 +14,6 @@ describe("aTob and bToa library tests ", function() {
it("Input widget test with default value for atob method", function() {
cy.SearchEntityandOpen("Input1");
cy.testJsontext("defaulttext", testdata.atobInput + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -25,7 +24,6 @@ describe("aTob and bToa library tests ", function() {
it("Input widget test with default value for btoa method", function() {
cy.SearchEntityandOpen("Input2");
cy.testJsontext("defaulttext", testdata.btoaInput + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -14,7 +14,7 @@ describe("Loadash basic test with input Widget", function() {
it("Input widget test with default value from another Input widget", function() {
cy.SearchEntityandOpen("Input1");
cy.testJsontext("defaulttext", testdata.defaultInputBinding + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -25,7 +25,7 @@ describe("Loadash basic test with input Widget", function() {
it("Input widget test with default value for loadash function", function() {
cy.SearchEntityandOpen("Input2");
cy.testJsontext("defaulttext", testdata.loadashInput + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -14,7 +14,7 @@ describe("Moment basic test with input Widget", function() {
it("Input widget test with default value from another Input widget", function() {
cy.SearchEntityandOpen("Input1");
cy.testJsontext("defaulttext", testdata.defaultInputBinding + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -25,7 +25,7 @@ describe("Moment basic test with input Widget", function() {
it("Binding second input widget with first input widget and validating", function() {
cy.SearchEntityandOpen("Input2");
cy.testJsontext("defaulttext", testdata.momentInput + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -17,7 +17,7 @@ describe("Chart Widget Functionality", function() {
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.testJsontext("defaulttext", testdata.bindChartData + "}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -62,8 +62,6 @@ describe("Chart Widget Functionality", function() {
.click({ force: true })
.type(this.data.ylabel);
//Close edit prop
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.PublishtheApp();
});

View File

@ -63,7 +63,7 @@ describe("Chart Widget Functionality around custom chart feature", function() {
.type(this.data.ylabel);
//Close edit prop
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.PublishtheApp();
});
@ -116,7 +116,6 @@ describe("Chart Widget Functionality around custom chart feature", function() {
});
//Close edit prop
cy.get(commonlocators.editPropCrossButton).click();
cy.PublishtheApp();
});

View File

@ -0,0 +1,18 @@
const dsl = require("../../../../fixtures/DocumentViewerDsl.json");
const explorer = require("../../../../locators/explorerlocators.json");
describe("DocumentViewer Widget Functionality", function() {
beforeEach(() => {
cy.addDsl(dsl);
});
it("Add new DocumentViewer", () => {
cy.get(explorer.addWidget).click();
cy.dragAndDropToCanvas("documentviewerwidget", { x: 300, y: 300 });
cy.get(".t--widget-documentviewerwidget").should("exist");
});
it("Open Existing DocumentViewer from Widgets list", () => {
cy.get(".t--widget-documentviewerwidget").should("exist");
});
});

View File

@ -37,7 +37,7 @@ describe("Image Widget Functionality", function() {
cy.openPropertyPane("imagewidget");
//Zoom validation
cy.changeZoomLevel("1x (No Zoom)");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(commonlocators.imgWidget)
.invoke("attr", "style")
.should("not.contain", "zoom-in");

View File

@ -0,0 +1,34 @@
const widgetsPage = require("../../../../locators/Widgets.json");
const dsl = require("../../../../fixtures/tableNewDsl.json");
const commonlocators = require("../../../../locators/commonlocators.json");
describe("prevent duplicate column name in table", function() {
before(() => {
cy.addDsl(dsl);
});
//todo(yash/tolu/pawan) reverting this test for now
// it("evaluted value popup should show when focus on duplicate column input", function() {
// cy.openPropertyPane("tablewidget");
// // Updating the column name ; "id" > "TestUpdated"
// cy.tableColumnPopertyUpdate("id", "TestUpdated");
// // Updating the column name ; "email" > "TestUpdated"
// cy.tableColumnPopertyUpdate("email", "TestUpdated");
// cy.wait("@updateLayout");
// cy.get(commonlocators.evaluatedTypeTitle).should("exist");
// // Updating the column name ; "userName" > "TestUpdated2"
// // this will move focus of input to another column input and let popup close
// cy.tableColumnPopertyUpdate("userName", "TestUpdated2");
// // duplicate column's border should remain red
// cy.get("[data-rbd-draggable-id='email'] > div > div").should(
// "have.class",
// "has-duplicate-label",
// );
// });
afterEach(() => {
// put your clean up code if any
});
});

View File

@ -0,0 +1,260 @@
const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/tableWidgetDsl.json");
describe("Table Widget Filter Functionality", function() {
before(() => {
cy.addDsl(dsl);
});
it("Table Widget Functionality", function() {
cy.openPropertyPane("tablewidget");
cy.widgetText("Table1", widgetsPage.tableWidget, commonlocators.tableInner);
cy.testJsontext("tabledata", JSON.stringify(this.data.TableInput));
cy.wait("@updateLayout");
});
it("Table Widget Functionality To validate download csv and download Excel", function() {
cy.isSelectRow(1);
cy.readTabledataPublish("1", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Lindsay Ferguson");
cy.log("the value is" + tabValue);
cy.get(publish.searchInput)
.first()
.type(tabData);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.readTabledataPublish("1", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Lindsay Ferguson");
});
cy.downloadData("Download as CSV");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000);
//cy.validateDownload('Table1.csv');
cy.verifyDownload("Table1.csv");
cy.downloadData("Download as Excel");
cy.wait(5000);
//cy.validateDownload('Table1.xlsx');
cy.verifyDownload("Table1.xlsx");
cy.get(publish.searchInput)
.first()
.within(() => {
return cy.get("input").clear();
})
.type("7434532");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.readTabledataPublish("3", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Byron Fields");
});
});
});
it("Table Widget Functionality To Filter The Data using does not contain", function() {
cy.isSelectRow(1);
cy.readTabledataPublish("1", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Lindsay Ferguson");
cy.log("the value is" + tabValue);
cy.get(publish.filterBtn).click();
cy.get(publish.attributeDropdown).click();
cy.get(publish.attributeValue)
.contains("userName")
.click();
cy.get(publish.conditionDropdown).click();
cy.get(publish.attributeValue)
.contains("does not contain")
.click();
cy.get(publish.inputValue).type("Lindsay");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.get(widgetsPage.filterApplyBtn).click({ force: true });
cy.wait(500);
cy.readTabledataPublish("0", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).not.to.be.equal("Lindsay Ferguson");
});
cy.get(widgetsPage.filterCloseBtn).click({ force: true });
cy.get(publish.filterBtn).click();
cy.get(publish.removeFilter).click();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.readTabledataPublish("0", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Michael Lawson");
});
cy.get(publish.canvas)
.first()
.click({ force: true });
});
});
it("Table Widget Functionality To Filter The Data using OR operator ", function() {
cy.isSelectRow(1);
cy.readTabledataPublish("1", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Lindsay Ferguson");
cy.log("the value is" + tabValue);
cy.get(publish.filterBtn).click();
cy.get(publish.attributeDropdown).click();
cy.get(publish.attributeValue)
.contains("userName")
.click();
cy.get(publish.conditionDropdown).click();
cy.get(publish.attributeValue)
.contains("contains")
.click();
cy.get(publish.inputValue).type("Tobias Funke");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.AddFilterWithOperator(
"OR",
"email",
"contains",
"tobias.funke@reqres.in",
);
cy.wait(500);
cy.get(widgetsPage.filterApplyBtn).click({ force: true });
cy.wait(500);
cy.readTabledataPublish("0", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Tobias Funke");
});
cy.get(widgetsPage.filterCloseBtn).click({ force: true });
cy.get(publish.filterBtn).click();
cy.get(publish.removeFilter)
.first()
.click({ force: true });
cy.get(publish.removeFilter)
.last()
.click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.readTabledataPublish("0", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Michael Lawson");
});
cy.get(publish.canvas)
.first()
.click({ force: true });
});
});
it("Table Widget Functionality To Filter The Data using AND operator ", function() {
cy.isSelectRow(1);
cy.readTabledataPublish("1", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Lindsay Ferguson");
cy.log("the value is" + tabValue);
cy.get(publish.filterBtn).click();
cy.get(publish.attributeDropdown).click();
cy.get(publish.attributeValue)
.contains("userName")
.click();
cy.get(publish.conditionDropdown).click();
cy.get(publish.attributeValue)
.contains("contains")
.click();
cy.get(publish.inputValue).type("Tobias Funke");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.AddFilterWithOperator(
"AND",
"email",
"contains",
"tobias.funke@reqres.in",
);
cy.wait(500);
cy.get(widgetsPage.filterApplyBtn).click({ force: true });
cy.wait(500);
cy.readTabledataPublish("0", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Tobias Funke");
});
cy.get(widgetsPage.filterCloseBtn).click({ force: true });
cy.get(publish.filterBtn).click();
cy.get(publish.removeFilter)
.first()
.click({ force: true });
cy.get(publish.removeFilter)
.last()
.click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.readTabledataPublish("0", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Michael Lawson");
});
cy.get(publish.canvas)
.first()
.click({ force: true });
});
});
it("Table Widget Functionality To Filter The Data using OR operator with different data ", function() {
cy.isSelectRow(1);
cy.readTabledataPublish("1", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Lindsay Ferguson");
cy.log("the value is" + tabValue);
cy.get(publish.filterBtn).click();
cy.get(publish.attributeDropdown).click();
cy.get(publish.attributeValue)
.contains("userName")
.click();
cy.get(publish.conditionDropdown).click();
cy.get(publish.attributeValue)
.contains("contains")
.click();
cy.get(publish.inputValue).type("Lindsay Ferguson");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.AddFilterWithOperator(
"OR",
"email",
"contains",
"tobias.funke@reqres.in",
);
cy.wait(500);
cy.get(widgetsPage.filterApplyBtn).click({ force: true });
cy.wait(500);
cy.readTabledataPublish("0", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Lindsay Ferguson");
});
cy.readTabledataPublish("1", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Tobias Funke");
});
cy.get(widgetsPage.filterCloseBtn).click({ force: true });
cy.get(publish.filterBtn).click();
cy.get(publish.removeFilter)
.first()
.click({ force: true });
cy.wait(500);
cy.get(publish.removeFilter)
.last()
.click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.readTabledataPublish("0", "3").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("Michael Lawson");
});
cy.get(publish.canvas)
.first()
.click({ force: true });
});
});
afterEach(() => {
// put your clean up code if any
});
});

View File

@ -84,7 +84,6 @@ describe("Table Widget property pane feature validation", function() {
cy.get(widgetsPage.underline).click({ force: true });
// Verify the font style is underline
cy.readTabledataValidateCSS("1", "0", "text-decoration-line", "underline");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
it("Test to validate vertical allignment", function() {
@ -105,14 +104,9 @@ describe("Table Widget property pane feature validation", function() {
.click({ force: true });
// Verify the vertical alignment is bottom
cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
it("Table widget toggle test for text alignment", function() {
// Open property pane
cy.openPropertyPane("tablewidget");
// Open property pane of column "id"
cy.editColumn("id");
// Click on text align JS
cy.get(widgetsPage.toggleTextAlign)
.first()
@ -122,7 +116,7 @@ describe("Table Widget property pane feature validation", function() {
// Change the text align value to right for michael and left for others
cy.toggleJsAndUpdate("tabledata", testdata.bindingGenAlign);
// Close propert pane
cy.get(commonlocators.editPropCrossButton).click({ force: true });
// Verify the text michael id is right aligned
cy.readTabledataValidateCSS("0", "0", "justify-content", "flex-end");
// Verify the 2nd id is left aligned
@ -132,10 +126,7 @@ describe("Table Widget property pane feature validation", function() {
it("Table widget change text size and validate", function() {
// Verify font size is 14px
cy.readTabledataValidateCSS("0", "0", "font-size", "14px");
// Open property pane
cy.openPropertyPane("tablewidget");
// Open property pane
cy.editColumn("id");
// Click on text size JS
cy.get(widgetsPage.toggleTextAlign)
.first()
@ -153,42 +144,46 @@ describe("Table Widget property pane feature validation", function() {
// Verify the font size is 24px
cy.readTabledataValidateCSS("0", "0", "font-size", "24px");
// close propert pane
cy.get(commonlocators.editPropCrossButton).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
// Verify the font size is 24px
cy.readTabledataValidateCSS("0", "0", "font-size", "24px");
});
it("Test to validate open new tab icon shows when URL type data is hovered", function() {
it("Test to validate open new tab icon shows when URL type data validate link text ", function() {
// Open property pane
cy.openPropertyPane("tablewidget");
// go back to 1st
cy.get(commonlocators.editPropBackButton).click({ force: true });
// Open email property pane
cy.editColumn("email");
// Change column type to url
cy.changeColumnType("URL");
// Show the url hidden icon in front of first email
//Check all the occurance
cy.get(".link-text").should("have.length", "3");
/*
cy.get(
`.t--widget-tablewidget .tbody .td[data-rowindex=1][data-colindex=1] .hidden-icon`,
).invoke("show");
// Verify the url icon is visible on hover over email
)
.should("be.hidden")
.invoke("show");
cy.get(
`.t--widget-tablewidget .tbody .td[data-rowindex=1][data-colindex=1] .hidden-icon`,
).should("be.visible");
// Close property pane
cy.get(commonlocators.editPropCrossButton).click();
*/
});
it("Edit column name and test for table header changes", function() {
// Open property pane
cy.openPropertyPane("tablewidget");
cy.get(commonlocators.editPropBackButton).click({ force: true });
// Open email property pane
cy.editColumn("email");
// CHange the Column email name to Email Address
cy.editColName("Email Address");
// verify changed email name is visible
cy.get(".draggable-header:contains('Email Address')").should("be.visible");
cy.get(commonlocators.editPropCrossButton).click();
cy.get(commonlocators.editPropBackButton).click({ force: true });
});
it("Edit Row height and test table for changes", function() {
cy.openPropertyPane("tablewidget");
@ -200,7 +195,6 @@ describe("Table Widget property pane feature validation", function() {
.click({ force: true });
cy.wait(1000);
cy.readTabledataValidateCSS("0", "0", "height", "19px");
cy.get(commonlocators.editPropCrossButton).click();
});
it("Test to validate text color and text background", function() {
// Open property pane
@ -253,6 +247,5 @@ describe("Table Widget property pane feature validation", function() {
"background",
"rgb(128, 0, 128) none repeat scroll 0% 0% / auto padding-box border-box",
);
cy.get(commonlocators.editPropCrossButton).click();
});
});

View File

@ -4,12 +4,10 @@ const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/tableNewDsl.json");
const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../../fixtures/testdata.json");
describe("Table Widget property pane feature validation", function() {
before(() => {
cy.addDsl(dsl);
});
it("Table widget with Add button test and validation", function() {
cy.openPropertyPane("tablewidget");
// Open column details of "id".
@ -27,8 +25,9 @@ describe("Table Widget property pane feature validation", function() {
.click();
cy.addSuccessMessage("Successful ".concat(testdata.currentRowEmail));
// Close Property pane
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(commonlocators.editPropBackButton).click({
force: true,
});
// Validating the button action by clicking
cy.get(widgetsPage.tableBtn)
.last()
@ -45,7 +44,6 @@ describe("Table Widget property pane feature validation", function() {
expect(someText).to.equal("Successful tobias.funke@reqres.in");
});
});
it("Table Button color validation", function() {
cy.openPropertyPane("tablewidget");
// Open column details of "id".
@ -58,10 +56,9 @@ describe("Table Widget property pane feature validation", function() {
.clear()
.type(color);
// Close Property pane
cy.get(commonlocators.editPropCrossButton).click({ force: true });
//cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(widgetsPage.tableBtn).should("have.css", "background-color", color);
});
it("Table widget triggeredRow property should be accessible", function() {
cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke");
});
@ -74,13 +71,13 @@ describe("Table Widget property pane feature validation", function() {
cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke");
});
it("Table widget add new icon button column", function() {
cy.openPropertyPane("tablewidget");
cy.get(".t--property-pane-back-btn").click({ force: true });
// hide id column
cy.makeColumnVisible("id");
cy.wait(1000);
// click on Add new Column.
//cy.get(".t--property-pane-back-btn").click({ force: true });
cy.get(".t--add-column-btn").click();
//Open New Custom Column
cy.editColumn("customColumn1");
// Change Column type to icon Button
@ -109,15 +106,16 @@ describe("Table Widget property pane feature validation", function() {
});
cy.deleteColumn("customColumn1");
// Close Property pane
/*
cy.get(commonlocators.editPropCrossButton).click({
force: true,
});
*/
});
it("Table widget add new menu button column", function() {
cy.openPropertyPane("tablewidget");
// click on Add new Column.
cy.get(".t--add-column-btn").click();
//Open New Custom Column
cy.editColumn("customColumn1");
// Change Column type to icon Button
@ -173,9 +171,11 @@ describe("Table Widget property pane feature validation", function() {
force: true,
});
// update menu item background color
cy.get(widgetsPage.backgroundcolorPickerNew).type("#FFC13D", {
force: true,
});
cy.get(widgetsPage.backgroundcolorPickerNew)
.clear()
.type("#FFC13D", {
force: true,
});
// Go back to table property pane
cy.get(".t--property-pane-back-btn").click({ force: true });
@ -198,7 +198,6 @@ describe("Table Widget property pane feature validation", function() {
// Close Property pane
cy.openPropertyPane("tablewidget");
// Click on the Menu Button
cy.contains("Menu button").click({
force: true,
@ -206,25 +205,22 @@ describe("Table Widget property pane feature validation", function() {
cy.wait(1000);
// verify menu items background color
cy.contains("Menu Item 1").should(
"have.css",
"background-color",
"rgb(3, 179, 101)",
);
cy.contains("Menu Item 2").should(
"have.css",
"background-color",
"rgb(255, 193, 61)",
);
cy.contains("Menu Item 3").should(
"have.css",
"background-color",
"rgb(51, 102, 255)",
);
cy.get(".bp3-menu-item")
.eq(0)
.should("have.css", "background-color", "rgb(3, 179, 101)");
cy.get(".bp3-menu-item")
.eq(1)
.should("have.css", "background-color", "rgb(255, 193, 61)");
cy.get(".bp3-menu-item")
.eq(2)
.should("have.css", "background-color", "rgb(51, 102, 255)");
//cy.closePropertyPane();
// disable menu item 3
cy.openPropertyPane("tablewidget");
cy.editColumn("customColumn1");
//cy.openPropertyPane("tablewidget");
//cy.editColumn("customColumn1");
// Edit a Menu item
cy.get(".t--property-pane-section-menuitems .t--edit-column-btn")
.last()
@ -235,7 +231,7 @@ describe("Table Widget property pane feature validation", function() {
cy.get(".t--property-control-disabled label.bp3-switch.unchecked").click({
force: true,
});
cy.closePropertyPane();
//cy.closePropertyPane();
// Click on the Menu Button
cy.contains("Menu button").click({
@ -243,17 +239,19 @@ describe("Table Widget property pane feature validation", function() {
});
cy.wait(1000);
// check Menu Item 3 is disable
cy.contains("Menu Item 3").should(
"have.css",
"background-color",
"rgb(250, 250, 250)",
);
cy.contains("Menu Item 3").should("have.class", "bp3-disabled");
cy.get(".bp3-menu-item")
.eq(2)
.should("have.css", "background-color", "rgb(250, 250, 250)");
cy.get(".bp3-menu-item")
.eq(2)
.should("have.class", "bp3-disabled");
// Click on the Menu Item
cy.contains("Menu Item 1").click({
force: true,
});
cy.get(".bp3-menu-item")
.eq(0)
.click({
force: true,
});
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(3000);
// Validating the toast message

View File

@ -35,7 +35,6 @@ describe("Table Widget Functionality", function() {
// .first()
// .find("> .bp3-button-text")
// .should("have.text", "{{navigateTo()}}");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
it("Table Widget Functionality To Verify The Data", function() {

View File

@ -8,13 +8,9 @@ const modalWidgetPage = require("../../../../locators/ModalWidget.json");
describe("Dynamic Layout Functionality", function() {
it("Dynamic Layout - Change Layout", function() {
cy.get(commonlocators.canvas)
.invoke("width")
.should("be.gt", 1024);
cy.get(commonlocators.layoutControl).click();
cy.get(commonlocators.layoutPopover)
.contains("Mobile Device")
.click({ force: true });
cy.get(commonlocators.layoutControls)
.eq(4)
.click();
cy.get(commonlocators.canvas)
.invoke("width")
.should("be.eq", 450);

View File

@ -46,7 +46,6 @@ describe("Entity explorer Drag and Drop widgets testcases", function() {
cy.get(formWidgetsPage.formD)
.scrollTo("bottom")
.should("be.visible");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(explorer.explorerSwitchId).click();
cy.PublishtheApp();
cy.get(publish.backToEditor)

View File

@ -0,0 +1,22 @@
const dsl = require("../../../../fixtures/displayWidgetDsl.json");
describe("Entity explorer tests related to pinning and unpinning", function() {
beforeEach(() => {
cy.addDsl(dsl);
});
it("checks entity explorer visibility on unpin", function() {
cy.get(".t--unpin-entity-explorer").click();
// after transition, the entity explorer will not be visible
cy.get("body").trigger("mousemove", { which: 1, pageX: 600, pageY: 600 });
cy.get(".t--entity-explorer").should("not.be.visible");
});
it("checks entity explorer visibility on pin", function() {
cy.get(".t--unpin-entity-explorer").click();
cy.get(".t--pin-entity-explorer").click();
cy.get(".t--entity-explorer").should("be.visible");
});
});

View File

@ -13,7 +13,7 @@ describe("Tab widget test", function() {
});
it("Tab Widget Functionality To rename Tabs from entity explorer", function() {
cy.GlobalSearchEntity("Tab 1");
cy.GlobalSearchEntity("Tab1");
cy.RenameEntity(tabname);
});
@ -27,15 +27,15 @@ describe("Tab widget test", function() {
});
it("Tab Widget Functionality To delete Tabs from entity explorer", function() {
cy.GlobalSearchEntity("Tab 2");
cy.GlobalSearchEntity("Tab2");
cy.RenameEntity(tabname);
cy.validateMessage(tabname);
cy.deleteEntity();
cy.get(commonlocators.entityExplorersearch)
.clear({ force: true })
.type("Tab 2", { force: true });
.type("Tab2", { force: true });
cy.get(
commonlocators.entitySearchResult.concat("Tab 2").concat("')"),
commonlocators.entitySearchResult.concat("Tab2").concat("')"),
).should("not.exist");
});
@ -51,7 +51,7 @@ describe("Tab widget test", function() {
.click({ force: true })
.should("be.selected");
});
it("Tab Widget Functionality To Unchecked Visible Widget", function() {
cy.get(publish.backToEditor).click();
cy.openPropertyPane("tabswidget");

View File

@ -28,7 +28,6 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() {
cy.get(commonlocators.toastBody)
.first()
.contains("Copied");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
it("Delete Widget from sidebar and Undo action validation", function() {

View File

@ -0,0 +1,81 @@
const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const widgetLocators = require("../../../../locators/Widgets.json");
const dsl = require("../../../../fixtures/widgetPopupDsl.json");
describe("Dropdown Widget Functionality", function() {
before(() => {
cy.addDsl(dsl);
});
it("Verify dropdown width of Select widgets and menu button", function() {
// Select
cy.get(formWidgetsPage.dropdownWidget)
.find(widgetLocators.dropdownSingleSelect)
.invoke("outerWidth")
.should("eq", 147.1875);
cy.get(formWidgetsPage.dropdownWidget)
.find(widgetLocators.dropdownSingleSelect)
.click({
force: true,
});
cy.get(".select-popover-wrapper")
.invoke("outerWidth")
.should("eq", 147.1875);
// Menu Button
cy.get(formWidgetsPage.menuButtonWidget)
.find(widgetLocators.menuButton)
.invoke("outerWidth")
.should("eq", 147.1875);
cy.get(formWidgetsPage.menuButtonWidget)
.find(widgetLocators.menuButton)
.click({
force: true,
});
cy.get(".menu-button-popover")
.invoke("outerWidth")
.should("eq", 147.1875);
// MultiSelect
cy.get(formWidgetsPage.multiselectWidget)
.find(".rc-select-multiple")
.invoke("width")
.should("eq", 147.1875);
cy.get(formWidgetsPage.multiselectWidget)
.find(".rc-select-selection-search-input")
.first()
.focus({ force: true })
.type("{uparrow}", { force: true });
cy.get(".multi-select-dropdown")
.invoke("width")
.should("eq", 147.1875);
//Multi tree Select
cy.get(formWidgetsPage.multiselecttreeWidget)
.find(".rc-tree-select-multiple")
.invoke("width")
.should("eq", 147.1875);
cy.get(formWidgetsPage.multiselecttreeWidget)
.find(".rc-tree-select-selection-search-input")
.first()
.focus({ force: true })
.type("{uparrow}", { force: true });
cy.get(".tree-multiselect-dropdown")
.invoke("outerWidth")
.should("eq", 147.1875);
// Tree Select
cy.get(formWidgetsPage.singleselecttreeWidget)
.find(".rc-tree-select-single")
.invoke("outerWidth")
.should("eq", 147.1875);
cy.get(formWidgetsPage.singleselecttreeWidget)
.find(".rc-tree-select-selection-search-input")
.first()
.focus({ force: true })
.type("{uparrow}", { force: true });
cy.get(".single-tree-select-dropdown")
.invoke("outerWidth")
.should("eq", 147.1875);
});
});

View File

@ -50,7 +50,6 @@ describe("Container Widget Functionality", function() {
.eq(0)
.scrollIntoView({ easing: "linear" })
.should("be.visible");
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.PublishtheApp();
});
it("Container Widget Functionality To Verify The Colour", function() {

View File

@ -43,13 +43,10 @@ describe("Tab widget test", function() {
/**
* @param{toggleButton Css} Assert to be checked
*/
cy.togglebar(widgetsPage.Scrollbutton)
.check({ force: true })
.should("be.checked");
cy.togglebar(widgetsPage.Scrollbutton);
cy.get(Layoutpage.tabContainer)
.scrollIntoView({ easing: "linear" })
.should("be.visible");
cy.get(commonlocators.crossbutton).click({ force: true });
cy.PublishtheApp();
});
it("Tab Widget Functionality To Select Tabs", function() {

View File

@ -161,13 +161,14 @@ describe("FirstTimeUserOnboarding", function() {
it("onboarding flow - should check directly opening widget pane", function() {
cy.get(OnboardingLocator.introModalBuild).click();
cy.get(OnboardingLocator.taskDatasourceBtn).should("be.visible");
cy.get(OnboardingLocator.widgetPaneTrigger).click();
cy.get(OnboardingLocator.widgetSidebar).should("be.visible");
cy.get(OnboardingLocator.dropTarget).should("be.visible");
cy.dragAndDropToCanvas("textwidget", { x: 400, y: 400 });
cy.get(OnboardingLocator.textWidgetName).should("be.visible");
cy.get(OnboardingLocator.textWidgetName)
.should("be.visible")
.wait(800);
cy.reload();
cy.wait("@getUser");
cy.get(OnboardingLocator.statusbar).should("be.visible");

View File

@ -0,0 +1,29 @@
const dsl = require("../../../../fixtures/previewMode.json");
describe("Preview mode functionality", function() {
before(() => {
cy.addDsl(dsl);
});
it("checks entity explorer and property pane visiblity", function() {
cy.get(".t--switch-preview-mode-toggle").click();
// in preview mode, entity explorer and property pane are not visible
cy.get(".t--entity-explorer").should("not.be.visible");
cy.get(".t--property-pane-sidebar").should("not.be.visible");
});
it("checks if widgets can be selected or not", function() {
// in preview mode, entity explorer and property pane are not visible
const selector = `.t--draggable-buttonwidget`;
cy.wait(500);
cy.get(selector)
.first()
.trigger("mouseover", { force: true })
.wait(500);
cy.get(
`${selector}:first-of-type .t--widget-propertypane-toggle > .t--widget-name`,
).should("not.exist");
});
});

View File

@ -1,98 +0,0 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/newFormDsl.json");
const formWidgetDsl = require("../../../../fixtures/formWidgetdsl.json");
const pages = require("../../../../locators/Pages.json");
const widgetList = [
"inputwidget",
"dropdownwidget",
"buttonwidget",
"checkboxwidget",
"datepickerwidget",
"richtexteditorwidget",
"filepickerwidget",
"switchwidget",
"containerwidget",
];
//const widgetList = ["radiowidget"];
//const widgetList = ["inputwidget"];
describe("Widget property pane draggable", function() {
before(() => {
cy.addDsl(dsl);
});
it("Property pane initial position same untill it is dragged", function() {
for (const testWidget of widgetList) {
cy.openPropertyPane(testWidget);
cy.get("[data-cy=t--property-pane-drag-handle]").then((oldPorpPane) => {
const oldPropPanePosition = oldPorpPane[0].getBoundingClientRect();
cy.get(commonlocators.collapsesection)
.first()
.click();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.openPropertyPane(testWidget);
cy.get("[data-cy=t--property-pane-drag-handle]").then((newPropPane) => {
const newPropPanePosition = newPropPane[0].getBoundingClientRect();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
expect(oldPropPanePosition.top).to.be.equal(newPropPanePosition.top);
expect(oldPropPanePosition.left).to.be.equal(
newPropPanePosition.left,
);
});
});
}
});
it("Property pane position should stay same after dragging down", () => {
for (const testWidget of widgetList) {
cy.openPropertyPane(testWidget);
cy.get("[data-cy=t--property-pane-drag-handle]")
.trigger("mousedown", { which: 1 })
.trigger("mousemove", { clientX: 0, clientY: 0 })
.trigger("mouseup", { force: true });
cy.get("[data-cy=t--property-pane-drag-handle]").then((oldPorpPane) => {
const oldPropPanePosition = oldPorpPane[0].getBoundingClientRect();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.openPropertyPane("containerwidget");
cy.get("[data-cy=t--property-pane-drag-handle]").then((newPropPane) => {
const newPropPanePosition = newPropPane[0].getBoundingClientRect();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
expect(oldPropPanePosition.top).to.be.equal(newPropPanePosition.top);
expect(oldPropPanePosition.left).to.be.equal(
newPropPanePosition.left,
);
});
});
}
});
it("Property pane should come back into view if forced to drop out of view", () => {
for (const testWidget of widgetList) {
cy.openPropertyPane(testWidget);
cy.get("[data-cy=t--property-pane-drag-handle]")
.trigger("mousedown", { which: 1 })
.trigger("mousemove", { clientX: -10, clientY: -20 })
.trigger("mouseup", { force: true });
cy.get("[data-cy=t--property-pane-drag-handle]").then((porpPane) => {
const propPanePosition = porpPane[0].getBoundingClientRect();
expect(propPanePosition.top).to.be.greaterThan(0);
expect(propPanePosition.left).to.be.gte(0);
});
cy.get("[data-cy=t--property-pane-drag-handle]")
.trigger("mousedown", { which: 1 })
.trigger("mousemove", { clientX: 1600, clientY: 800 })
.trigger("mouseup", { force: true });
cy.get("[data-cy=t--property-pane-drag-handle]").then((porpPane) => {
const propPanePosition = porpPane[0].getBoundingClientRect();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
expect(propPanePosition.top).to.be.lessThan(
Cypress.config().viewportHeight - propPanePosition.height,
);
expect(propPanePosition.left).to.be.lessThan(
Cypress.config().viewportWidth - propPanePosition.width,
);
});
}
});
});

View File

@ -1,72 +0,0 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../../fixtures/TextTabledsl.json");
describe("Table Widget property pane feature validation", function() {
before(() => {
cy.addDsl(dsl);
});
it("Property pane initial position same untill it is dragged", function() {
cy.openPropertyPane("tablewidget");
cy.get("[data-cy=t--property-pane-drag-handle]").then((oldPorpPane) => {
const oldPropPanePosition = oldPorpPane[0].getBoundingClientRect();
cy.get(commonlocators.collapsesection)
.first()
.click();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.openPropertyPane("tablewidget");
cy.get("[data-cy=t--property-pane-drag-handle]").then((newPropPane) => {
const newPropPanePosition = newPropPane[0].getBoundingClientRect();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
expect(oldPropPanePosition.top).to.be.equal(newPropPanePosition.top);
expect(oldPropPanePosition.left).to.be.equal(newPropPanePosition.left);
});
});
});
it("Property pane position should stay same after dragging down", () => {
cy.openPropertyPane("tablewidget");
cy.get("[data-cy=t--property-pane-drag-handle]")
.trigger("mousedown", { which: 1 })
.trigger("mousemove", { clientX: 400, clientY: 500 })
.trigger("mouseup", { force: true });
cy.get("[data-cy=t--property-pane-drag-handle]").then((oldPorpPane) => {
const oldPropPanePosition = oldPorpPane[0].getBoundingClientRect();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.openPropertyPane("containerwidget");
cy.get("[data-cy=t--property-pane-drag-handle]").then((newPropPane) => {
const newPropPanePosition = newPropPane[0].getBoundingClientRect();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
expect(oldPropPanePosition.top).to.be.equal(newPropPanePosition.top);
expect(oldPropPanePosition.left).to.be.equal(newPropPanePosition.left);
});
});
});
it("Property pane should come back into view if forced to drop out of view", () => {
cy.openPropertyPane("tablewidget");
cy.get("[data-cy=t--property-pane-drag-handle]")
.trigger("mousedown", { which: 1 })
.trigger("mousemove", { clientX: -10, clientY: -20 })
.trigger("mouseup", { force: true });
cy.get("[data-cy=t--property-pane-drag-handle]").then((porpPane) => {
const propPanePosition = porpPane[0].getBoundingClientRect();
expect(propPanePosition.top).to.be.greaterThan(0);
expect(propPanePosition.left).to.be.gte(0);
});
cy.get("[data-cy=t--property-pane-drag-handle]")
.trigger("mousedown", { which: 1 })
.trigger("mousemove", { clientX: 1600, clientY: 800 })
.trigger("mouseup", { force: true });
cy.get("[data-cy=t--property-pane-drag-handle]").then((porpPane) => {
const propPanePosition = porpPane[0].getBoundingClientRect();
cy.get(commonlocators.editPropCrossButton).click({ force: true });
expect(propPanePosition.top).to.be.lessThan(
Cypress.config().viewportHeight - propPanePosition.height,
);
expect(propPanePosition.left).to.be.lessThan(
Cypress.config().viewportWidth - propPanePosition.width,
);
});
});
});

View File

@ -1,39 +0,0 @@
/*
* Commenting because CE does not have marketplace anymore
*
* */
// /// <reference types="Cypress" />
// const testdata = require("../../../../fixtures/testdata.json");
// const apiwidget = require("../../../locators/apiWidgetslocator.json");
// describe("API Panel Test Functionality ", function() {
// it("Test Market place API by adding to a page", function() {
// cy.log("Login Successful");
// cy.NavigateToAPI_Panel();
// cy.wait("@getCategories");
// cy.wait("@getTemplateCollections");
// cy.wait("@get3PProviders");
// cy.log("Navigation to API Panel screen successful");
// cy.get(apiwidget.marketPlaceapi)
// .first()
// .click();
// cy.wait("@get3PProviderTemplates");
// cy.get(".apiName")
// .first()
// .invoke("text")
// .then(ApiName => {
// cy.get(apiwidget.addPageButton)
// .first()
// .click();
// const searchApiName = ApiName.replace(/\s/g, "");
// cy.log(searchApiName);
// cy.wait("@getActions");
// cy.SearchAPIandClick(searchApiName);
// cy.get(apiwidget.apidocumentaionLink)
// .invoke("text")
// .then(apidocumentation => {
// cy.log(apidocumentation);
// expect(apidocumentation).to.eq("API documentation");
// });
// });
// });
// });

View File

@ -62,7 +62,6 @@ describe("Addwidget from Query and bind with other widgets", function() {
it("Input widget test with default value from table widget", () => {
cy.SearchEntityandOpen("Input1");
cy.get(widgetsPage.defaultInput).type(testdata.addInputWidgetBinding);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -3,7 +3,7 @@ const queryEditor = require("../../../../locators/QueryEditor.json");
let datasourceName;
describe("Add widget", function() {
describe("Add widget - Postgress DataSource", function() {
beforeEach(() => {
cy.startRoutesForDatasource();
cy.createPostgresDatasource();
@ -12,7 +12,7 @@ describe("Add widget", function() {
});
});
it("Add widget", () => {
it("1. Verify 'Add to widget [Widget Suggestion]' functionality - Postgress", () => {
cy.NavigateToQueryEditor();
cy.contains(".t--datasource-name", datasourceName)
.find(queryLocators.createQuery)

View File

@ -1,7 +1,6 @@
const queryLocators = require("../../../../locators/QueryEditor.json");
const generatePage = require("../../../../locators/GeneratePage.json");
const datasource = require("../../../../locators/DatasourcesEditor.json");
const queryEditor = require("../../../../locators/QueryEditor.json");
let datasourceName;
@ -22,7 +21,7 @@ describe("Create a query with a mongo datasource, run, save and then delete the
});
});
it("2. Validate Raw query command, run, save and then delete the query", function() {
it("2. Validate Raw query command, run and then delete the query", function() {
cy.NavigateToActiveDSQueryPane(datasourceName);
// cy.get("@getPluginForm").should(
@ -31,52 +30,46 @@ describe("Create a query with a mongo datasource, run, save and then delete the
// 200,
// );
cy.xpath('//div[contains(text(),"Find Document(s)")]').click({
force: true,
});
cy.xpath('//div[contains(text(),"Raw")]').click({ force: true });
cy.get(queryLocators.templateMenu).click();
cy.get(".CodeMirror textarea")
.first()
.focus()
.type(`{"find": "listingsAndReviews","limit": 10}`, {
parseSpecialCharSequences: false,
});
cy.validateNSelectDropdown("Commands", "Find Document(s)", "Raw");
cy.get(queryLocators.templateMenu).click();
cy.typeValueNValidate('{"find": "listingsAndReviews","limit": 10}');
// cy.get(".CodeMirror textarea")
// .first()
// .focus()
// .type(`{"find": "listingsAndReviews","limit": 10}`, {
// parseSpecialCharSequences: false,
// });
// cy.EvaluateCurrentValue(`{"find": "listingsAndReviews","limit": 10}`);
cy.EvaluateCurrentValue(`{"find": "listingsAndReviews","limit": 10}`);
cy.runAndDeleteQuery();
});
it("3. Validate Find documents command & Run and then delete the query", function() {
//datasourceName = 'Mongo CRUD ds 09e54713'
cy.NavigateToActiveDSQueryPane(datasourceName);
//cy.xpath(queryLocators.findDocs).should("exist"); //Verifying update is success or below line
cy.expect(queryLocators.findDocs).to.exist;
//cy.expect(queryLocators.findDocs).to.exist;
cy.xpath(queryLocators.collectionField).type("listingsAndReviews");
cy.EvaluateCurrentValue("listingsAndReviews");
cy.validateNSelectDropdown("Commands", "Find Document(s)");
cy.typeValueNValidate("listingsAndReviews", "Collection");
cy.runQuery(); //exeute actions - 200 response is verified in this method
cy.xpath(queryLocators.countText).should("have.text", "10 Records");
cy.xpath(queryLocators.queryField).type(`{{}beds : {{}$lte: 2}}`);
cy.EvaluateCurrentValue("{beds : {$lte: 2}}");
cy.typeValueNValidate("{beds : {$lte: 2}}", "Query");
cy.runQuery(); //exeute actions - 200 response is verified in this method
cy.xpath(queryLocators.countText).should("have.text", "10 Records");
cy.xpath(queryLocators.sortField).type("{{}number_of_reviews: -1}"); //sort descending
cy.EvaluateCurrentValue("{number_of_reviews: -1}");
cy.typeValueNValidate("{number_of_reviews: -1}", "Sort"); //sort descending
cy.runQuery(); //exeute actions - 200 response is verified in this method
cy.xpath(queryLocators.countText).should("have.text", "10 Records");
cy.xpath(queryLocators.projectionField).type(
"{{}house_rules: 1, description:1}",
); //Projection field
cy.EvaluateCurrentValue("{house_rules: 1, description:1}");
cy.typeValueNValidate("{house_rules: 1, description:1}", "Projection"); //Projection field
cy.runQuery(); //exeute actions - 200 response is verified in this method
cy.xpath(queryLocators.limitField).type("5"); //Projection field
cy.EvaluateCurrentValue("5");
cy.typeValueNValidate("5", "Limit"); //Limit field
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.body[0].house_rules).to.contains(
@ -84,10 +77,9 @@ describe("Create a query with a mongo datasource, run, save and then delete the
"Response is not as expected for Aggregate commmand",
);
});
cy.xpath(queryLocators.countText).should("have.text", "5 Records");
cy.xpath(queryLocators.skipField).type("2"); //Skip field
cy.EvaluateCurrentValue("2");
cy.typeValueNValidate("2", "Skip"); //Skip field
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
@ -103,18 +95,10 @@ describe("Create a query with a mongo datasource, run, save and then delete the
it("4. Validate Count command & Run and then delete the query", function() {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.xpath('//div[contains(text(),"Find Document(s)")]').click({
force: true,
});
cy.xpath('//div[contains(text(),"Count")]').click({ force: true });
cy.xpath(queryLocators.collectionField).type("listingsAndReviews");
cy.EvaluateCurrentValue("listingsAndReviews");
cy.validateNSelectDropdown("Commands", "Find Document(s)", "Count");
cy.typeValueNValidate("listingsAndReviews", "Collection");
cy.runQuery();
cy.xpath(queryLocators.queryField).type(`{{}beds : {{}$lte: 2}}`);
cy.EvaluateCurrentValue("{beds : {$lte: 2}}");
cy.typeValueNValidate("{beds : {$lte: 2}}", "Query");
cy.runQuery(); //exeute actions - 200 response is verified in this method
cy.deleteQueryUsingContext();
@ -123,21 +107,10 @@ describe("Create a query with a mongo datasource, run, save and then delete the
it("5. Validate Distinct command & Run and then delete the query", function() {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.xpath('//div[contains(text(),"Find Document(s)")]').click({
force: true,
});
cy.xpath('//div[contains(text(),"Distinct")]').click({ force: true });
cy.xpath(queryLocators.collectionField).type("listingsAndReviews");
cy.EvaluateCurrentValue("listingsAndReviews");
cy.xpath(queryLocators.queryField).type(`{{}beds : {{}$lte: 2}}`);
cy.EvaluateCurrentValue("{beds : {$lte: 2}}");
cy.xpath(queryLocators.keyField).type(`property_type`);
cy.EvaluateCurrentValue("property_type");
//cy.runQuery(); //exeute actions - 200 response is verified in this method
cy.validateNSelectDropdown("Commands", "Find Document(s)", "Distinct");
cy.typeValueNValidate("listingsAndReviews", "Collection");
cy.typeValueNValidate("{beds : {$lte: 2}}", "Query");
cy.typeValueNValidate("property_type", "Key");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ request, response }) => {
expect(response.body.data.body.values[0]).to.eq(
@ -151,22 +124,12 @@ describe("Create a query with a mongo datasource, run, save and then delete the
it("6. Validate Aggregate command & Run and then delete the query", function() {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.xpath('//div[contains(text(),"Find Document(s)")]').click({
force: true,
});
cy.xpath('//div[contains(text(),"Aggregate")]').click({ force: true });
cy.xpath(queryLocators.collectionField).type("listingsAndReviews");
cy.EvaluateCurrentValue("listingsAndReviews");
cy.xpath(queryLocators.arrayOfPipelinesField).type(
`[{{} $project: {{} count: {{} $size:"$amenities" }}}]`,
cy.validateNSelectDropdown("Commands", "Find Document(s)", "Aggregate");
cy.typeValueNValidate("listingsAndReviews", "Collection");
cy.typeValueNValidate(
'[{ $project: { count: { $size:"$amenities" }}}]',
"Array of Pipelines",
);
cy.EvaluateCurrentValue('[{ $project: { count: { $size:"$amenities" }}}]');
//cy.runQuery(); //exeute actions - 200 response is verified in this method
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ request, response }) => {
// cy.log(request.method + ": is req.method")
@ -224,13 +187,86 @@ describe("Create a query with a mongo datasource, run, save and then delete the
409,
);
cy.xpath(generatePage.mongonewPageEntityMenu)
.first()
.click({ force: true });
cy.xpath(generatePage.deleteMenuItem).click();
cy.deleteEntitybyName("ListingsAndReviews");
});
it("9. Delete the datasource after NewPage deletion is success", () => {
it("9. Bug 7399: Validate Form based & Raw command based templates", function() {
let id;
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown("Commands", "Find Document(s)");
cy.xpath(queryLocators.mongoFormFind).click({ force: true });
cy.xpath("//div[text()='Find']")
.click()
.wait(100); //wait for Find form to open
cy.EvaluatFieldValue("Collection").then((colData) => {
colData = colData.replace("{", "").replace("}", "");
cy.log("Collection value is fieldData: " + colData);
cy.wrap(colData).as("colData");
});
cy.EvaluatFieldValue("Query").then((queryData) => {
queryData = queryData.replace("{", "").replace("}", "");
id = queryData;
cy.log("Query value is : " + queryData);
cy.wrap(queryData).as("queryData");
});
cy.EvaluatFieldValue("Sort").then((sortData) => {
sortData = sortData.replace("{", "").replace("}", "");
cy.log("Sort value is : " + sortData);
cy.wrap(sortData).as("sortData");
});
cy.EvaluatFieldValue("Limit").then((limitData) => {
limitData = limitData.replace("{", "").replace("}", "");
cy.log("Limit value is : " + limitData);
cy.wrap(limitData).as("limitData");
});
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body[0]._id).to.eq(
id
.split(":")[1]
.trim()
.replace(/['"]+/g, ""),
);
});
cy.validateNSelectDropdown("Commands", "Find Document(s)", "Raw");
cy.EvaluatFieldValue().then((rawData) => {
rawData = rawData.replace("{", "").replace("}", "");
cy.log("rawData value is : " + rawData);
cy.wrap(rawData).as("rawData");
});
cy.all(
cy.get("@colData"),
cy.get("@queryData"),
cy.get("@sortData"),
cy.get("@limitData"),
cy.get("@rawData"),
).then((values) => {
expect(values[4].trim()).to.contain(values[0].trim());
expect(values[4].trim()).to.contain(values[1].trim());
expect(values[4].trim()).to.contain(values[2].trim());
expect(values[4].trim()).to.contain(values[3].trim());
});
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body[0]._id).to.eq(
id
.split(":")[1]
.trim()
.replace(/['"]+/g, ""),
);
});
cy.deleteQueryUsingContext();
cy.deleteEntitybyName("Query1");
});
it("10. Delete the datasource after NewPage deletion is success", () => {
cy.NavigateToQueryEditor();
cy.NavigateToActiveTab();
cy.contains(".t--datasource-name", datasourceName).click();

View File

@ -30,19 +30,13 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
it("2. Create & runs existing table data and deletes the query", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.get(queryLocators.templateMenu).click();
cy.get(".CodeMirror textarea")
.first()
.focus()
.type("select * from users limit 10");
cy.EvaluateCurrentValue("select * from users limit 10");
cy.get(queryLocators.templateMenu).click({ force: true });
cy.typeValueNValidate("select * from users limit 10");
cy.runAndDeleteQuery();
});
it("3. Create new CRUD Table and populate", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.get(queryLocators.templateMenu).click();
let tableCreateQuery = `CREATE TABLE public.users_crud (
id integer NOT NULL,
@ -53,7 +47,7 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
address text,
role text);
insert into public.users_crud (id, name, status, gender, email, address, role) values
insert into public.users_crud (id, name, status, gender, email, address, role) values
(1, 'CRUD User1', 'PENDING', 'Male', 'cruduser1@ihg.com', '19624 Scofield Way', 'User'),
(2, 'CRUD User2', 'IN PROGRESS', 'Male','cruduser2@ihg.com', '19624 Scofield Way', 'Editor'),
(3, 'CRUD User3', 'APPROVED', 'Female','cruduser3@ihg.com', '19624 Scofield Way', 'Admin'),
@ -85,20 +79,25 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
(29, 'CRUD User29', 'IN PROGRESS', 'Male','cruduser29@ihg.com', '19624 Scofield Way', 'Editor'),
(30, 'CRUD User30', 'APPROVED', 'Female','cruduser30@ihg.com', '19624 Scofield Way', 'Admin');`;
cy.get(queryLocators.templateMenu).click({ force: true });
//cy.typeValueNValidate(tableCreateQuery);//Since type method is slow for such big text - using paste!
cy.get(".CodeMirror textarea").paste(tableCreateQuery);
cy.get(".CodeMirror textarea").focus();
cy.EvaluateCurrentValue(tableCreateQuery);
cy.runAndDeleteQuery(); //exeute actions - 200 response is verified in this method
});
it("4. Validate Select record from Postgress datasource", () => {
let selectQuery = "select * from public.users_crud";
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.xpath(queryLocators.querySelect).click();
cy.get(queryLocators.codeTextArea).type("{cmd+a}{del}");
cy.get(queryLocators.codeTextArea).paste(selectQuery);
cy.get(queryLocators.templateMenu).click({ force: true });
cy.typeValueNValidate(selectQuery);
// cy.xpath(queryLocators.codeTextArea).paste(selectQuery);
//cy.EvaluateCurrentValue(selectQuery);
cy.EvaluateCurrentValue(selectQuery);
cy.runAndDeleteQuery(); //exeute actions - 200 response is verified in this method
});
@ -106,12 +105,8 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
let insertQuery =
"INSERT INTO public.users_crud (id, name, gender, email) VALUES (31, 'CRUD User11','Male','cruduser31@ihg.com');";
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.xpath(queryLocators.queryCreate).click();
cy.get(queryLocators.codeTextArea).type("{cmd+a}{del}");
//.type("{selectall}{del}");
cy.get(queryLocators.codeTextArea).paste(insertQuery);
cy.EvaluateCurrentValue(insertQuery);
cy.get(queryLocators.templateMenu).click({ force: true });
cy.typeValueNValidate(insertQuery);
cy.runAndDeleteQuery();
});
@ -119,22 +114,16 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
let updateQuery =
"UPDATE public.users_crud SET status = 'PENDING', role = 'Viewer' WHERE id = 31;";
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.xpath(queryLocators.queryUpdate).click();
cy.get(queryLocators.codeTextArea).type("{cmd+a}{del}");
cy.get(queryLocators.codeTextArea).paste(updateQuery);
cy.EvaluateCurrentValue(updateQuery);
cy.get(queryLocators.templateMenu).click({ force: true });
cy.typeValueNValidate(updateQuery);
cy.runAndDeleteQuery();
});
it("7. Validate Delete record from Postgress datasource", () => {
let deleteQuery = "DELETE FROM public.users_crud WHERE id = 31;";
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.xpath(queryLocators.queryDelete).click();
cy.get(queryLocators.codeTextArea).type("{cmd+a}{del}");
cy.get(queryLocators.codeTextArea).paste(deleteQuery);
cy.EvaluateCurrentValue(deleteQuery);
cy.get(queryLocators.templateMenu).click({ force: true });
cy.typeValueNValidate(deleteQuery);
cy.runAndDeleteQuery();
});
@ -167,8 +156,12 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
cy.ClickGotIt();
//Verifying Update from UI
cy.xpath(generatePage.selectRowinTable).click();
cy.xpath(generatePage.selectRowinTable)
.scrollIntoView()
.should("be.visible")
.click({ force: true });
cy.xpath(generatePage.currentStatusField)
.scrollIntoView()
.clear()
.click()
.type("APPROVED");
@ -185,7 +178,10 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
//.should("have.nested.property", "response.body.data.request.requestParams.Query.value",);
cy.xpath(generatePage.selectRowinTable).click();
cy.xpath(generatePage.selectRowinTable)
.scrollIntoView()
.should("be.visible")
.click({ force: true });
cy.xpath(generatePage.currentStatusField).should("have.value", "APPROVED"); //Verifying update is success
//verifying Insert from UI
@ -197,14 +193,19 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
cy.xpath(generatePage.emailField)
.type("curduser31@ihg.com")
.wait(1000); //Waiting for Submit button to get enabled
cy.get(generatePage.submitBtn).click();
cy.get(generatePage.submitBtn)
.first()
.click();
cy.xpath(generatePage.sortByDropdown).click(); //Sorting by descending to verify newly added record - also sorting is verified
cy.xpath(generatePage.descending).click();
cy.xpath(generatePage.currentNameField).should("have.value", "CRUD User31"); //Verifying Addition is success
//Verifying Delete from UI
cy.xpath(generatePage.deleteofSelectedRow).click();
cy.xpath(generatePage.deleteofSelectedRow)
.scrollIntoView()
.should("be.visible")
.click({ force: true });
cy.get(generatePage.confirmBtn)
.click()
.wait(2000); //Wait for update call to be success
@ -215,7 +216,9 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
200,
);
cy.xpath(generatePage.currentNameField).should("have.value", "CRUD User30"); //Verifying Deletion of id # 31 is success
cy.xpath(generatePage.currentNameField)
.scrollIntoView()
.should("have.value", "CRUD User30"); //Verifying Deletion of id # 31 is success
});
it("9. Validate Deletion of the Newly Created Page", () => {
@ -229,30 +232,22 @@ describe("Validate CRUD queries for Postgres along with UI flow verifications",
"response.body.responseMeta.status",
409,
);
cy.xpath(generatePage.postgressnewPageEntityMenu)
.first()
.click({ force: true });
cy.xpath(generatePage.deleteMenuItem).click();
cy.deleteEntitybyName("Public.users_crud");
});
it("10. Validate Drop of the Newly Created Table from Postgress datasource", () => {
let deleteTblQuery = "DROP TABLE public.users_crud;";
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.xpath(queryLocators.queryDelete).click();
cy.get(queryLocators.codeTextArea).type("{cmd+a}{del}");
cy.get(queryLocators.codeTextArea).paste(deleteTblQuery);
cy.EvaluateCurrentValue(deleteTblQuery);
cy.get(queryLocators.templateMenu).click({ force: true });
cy.typeValueNValidate(deleteTblQuery);
cy.runAndDeleteQuery();
});
it("11. Deletes the datasource", () => {
cy.NavigateToQueryEditor();
cy.NavigateToActiveTab();
cy.contains(".t--datasource-name", datasourceName).click();
cy.get(".t--delete-datasource").click();
cy.contains(".t--datasource-name", datasourceName).click({ force: true });
cy.get(".t--delete-datasource").click({ force: true });
cy.wait("@deleteDatasource").should(
"have.nested.property",
"response.body.responseMeta.status",

View File

@ -0,0 +1,505 @@
const queryLocators = require("../../../../locators/QueryEditor.json");
const datasource = require("../../../../locators/DatasourcesEditor.json");
const generatePage = require("../../../../locators/GeneratePage.json");
const dsl = require("../../../../fixtures/snippingTableDsl.json");
let datasourceName;
describe("Validate CRUD queries for Amazon S3 along with UI flow verifications", function() {
beforeEach(() => {
cy.startRoutesForDatasource();
});
it("1. Creates a new Amazon S3 datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.AmazonS3)
.click({ force: true })
.wait(1000);
cy.generateUUID().then((uid) => {
datasourceName = `Amazon S3 CRUD ds ${uid}`;
cy.renameDatasource(datasourceName);
cy.wrap(datasourceName).as("dSName");
});
cy.fillAmazonS3DatasourceForm();
cy.testSaveDatasource();
});
it("2. Validate List Files in bucket (all existing files) command, run and then delete the query", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown("Commands", "List files in bucket");
cy.onlyQueryRun();
cy.wait("@postExecute").should(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"Mandatory parameter 'Bucket Name' is missing.",
);
});
cy.typeValueNValidate("AutoTest", "Bucket Name");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body.split("(")[0].trim()).to.be.oneOf([
"The specified bucket does not exist",
"The specified bucket is not valid.",
]);
});
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.runAndDeleteQuery(); //exeute actions - 200 response is verified in this method
});
it("3. Validate Create a new file in bucket command, Verify possible error msgs, run & delete the query", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown(
"Commands",
"List files in bucket",
"Create a new file",
);
cy.onlyQueryRun();
cy.wait("@postExecute").should(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"Mandatory parameter 'Bucket Name' is missing.",
);
});
cy.typeValueNValidate("AutoTest", "Bucket Name");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"Required parameter 'File Path' is missing.",
);
});
cy.typeValueNValidate("AutoFile", "File Path");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.eq(
"Unable to parse content. Expected to receive an object with `data` and `type`",
);
});
cy.typeValueNValidate("Hi", "Content");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.eq(
"Unable to parse content. Expected to receive an object with `data` and `type`",
);
});
cy.typeValueNValidate(
'{"data": "Hi, this is Automation script adding File!"}',
"Content",
);
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"File content is not base64 encoded.",
);
});
cy.validateNSelectDropdown("File Data Type", "Base64", "Text / Binary");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
//expect(['The specified bucket does not exist', 'The specified bucket is not valid.']).to.include(response.body.data.body)
expect(response.body.data.body.split("(")[0].trim()).to.be.oneOf([
"The specified bucket does not exist",
"The specified bucket is not valid.",
]);
});
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
});
cy.deleteQueryUsingContext();
});
it("4. Validate Read file command, Verify possible error msgs, run & delete the query", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown("Commands", "List files in bucket", "Read file");
cy.onlyQueryRun();
cy.wait("@postExecute").should(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"Mandatory parameter 'Bucket Name' is missing.",
);
});
cy.typeValueNValidate("AutoTest", "Bucket Name");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"Required parameter 'File Path' is missing.",
);
});
cy.typeValueNValidate("Auto", "File Path");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body.split("(")[0].trim()).to.be.oneOf([
"The specified bucket does not exist",
"The specified bucket is not valid.",
]);
});
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contain(
"The specified key does not exist.",
);
});
cy.typeValueNValidate("Autofile", "File Path");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contain(
"The specified key does not exist.",
);
});
cy.typeValueNValidate("AutoFile", "File Path");
cy.validateNSelectDropdown("File Data Type", "Base64", "Text / Binary");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body.fileData).to.not.eq(
"Hi, this is Automation script adding File!",
);
});
cy.validateNSelectDropdown("Base64 Encode File - Yes/No", "Yes", "No");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body.fileData).to.eq(
"Hi, this is Automation script adding File!",
);
});
cy.deleteQueryUsingContext();
});
it("5. Validate List Files in bucket command for new file, Verify possible error msgs, run & delete the query", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown("Commands", "List files in bucket");
cy.onlyQueryRun();
cy.wait("@postExecute").should(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"Mandatory parameter 'Bucket Name' is missing.",
);
});
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.typeValueNValidate("Auto", "Prefix");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body[0].fileName).to.contains("Auto");
expect(response.body.data.body[0].url).to.exist;
});
cy.typeValueNValidate("AutoFile", "Prefix");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body[0].fileName).to.contains("Auto");
expect(response.body.data.body[0].url).to.exist;
expect(response.body.data.body[0].signedUrl).not.to.exist;
});
cy.validateNSelectDropdown("Generate Signed URL", "No", "Yes");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body[0].fileName).to.contains("Auto");
expect(response.body.data.body[0].signedUrl).to.exist;
expect(response.body.data.body[0].url).to.exist;
});
cy.validateNSelectDropdown("Generate Un-signed URL", "Yes", "No");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body[0].fileName).to.contains("Auto");
expect(response.body.data.body[0].signedUrl).to.exist;
expect(response.body.data.body[0].url).to.not.exist;
});
cy.deleteQueryUsingContext();
});
it("6. Validate Delete file command for new file, Verify possible error msgs, run & delete the query", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown(
"Commands",
"List files in bucket",
"Delete file",
);
cy.onlyQueryRun();
cy.wait("@postExecute").should(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"Mandatory parameter 'Bucket Name' is missing.",
);
});
cy.typeValueNValidate("AutoTest", "Bucket Name");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body).to.contains(
"Required parameter 'File Path' is missing.",
);
});
cy.typeValueNValidate("Auto", "File Path");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(false);
expect(response.body.data.body.split("(")[0].trim()).to.be.oneOf([
"The specified bucket does not exist",
"The specified bucket is not valid.",
]);
});
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.typeValueNValidate("AutoFile", "File Path");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body.status).to.eq("File deleted successfully");
});
cy.deleteQueryUsingContext();
});
it("7. Validate List Files in bucket command after new file is deleted, Verify possible error msgs, run & delete the query", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown("Commands", "List files in bucket");
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.typeValueNValidate("Auto", "Prefix");
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
expect(response.body.data.body.length).to.eq(0); //checking that body is empty array
});
cy.deleteQueryUsingContext();
});
it("8. Validate Create a new file in bucket for UI Operations, run & delete the query", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown(
"Commands",
"List files in bucket",
"Create a new file",
);
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.typeValueNValidate("CRUDNewPageFile", "File Path");
cy.validateNSelectDropdown("File Data Type", "Base64", "Text / Binary");
cy.typeValueNValidate(
'{"data": "Hi, this is Automation script adding file for S3 CRUD New Page validation!"}',
"Content",
);
cy.get(queryLocators.settings).click();
cy.xpath(queryLocators.queryTimeout)
.clear()
.type(30000);
cy.get(queryLocators.query).click();
cy.onlyQueryRun();
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
});
cy.deleteQueryUsingContext();
});
it("9. Verify Search, Delete operations from NewPage UI created in S3 ds", function() {
// cy.wrap(Cypress.automation('remote:debugger:protocol', {
// command: 'Browser.grantPermissions',
// params: {
// permissions: ['clipboardReadWrite', 'clipboardSanitizedWrite'],
// // make the permission tighter by allowing the current origin only
// // like "http://localhost:56978"
// origin: window.location.origin,
// },
// }))
cy.NavigateToDSGeneratePage(datasourceName);
//Verifying List of Files from UI
cy.get(generatePage.selectTableDropdown).click();
cy.get(generatePage.dropdownOption)
.contains("assets-test.appsmith.com")
.scrollIntoView()
.should("be.visible")
.click();
cy.get(generatePage.generatePageFormSubmitBtn).click();
cy.wait("@replaceLayoutWithCRUDPage").should(
"have.nested.property",
"response.body.responseMeta.status",
201,
);
cy.wait("@getActions");
cy.wait("@postExecute").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
); //This verifies the Select on the table, ie page is created fine
cy.ClickGotIt();
//Verifying Searching File from UI
cy.xpath(queryLocators.searchFilefield)
.type("CRUD")
.wait(500); //for search to finish
expect(
cy.xpath(
"//div[@data-cy='overlay-comments-wrapper']//span[text()='CRUDNewPageFile']",
),
).to.exist;
cy.xpath(
"//div[@data-cy='overlay-comments-wrapper']//span[text()='CRUDNewPageFile']",
).scrollIntoView();
//Verifying CopyFile URL icon from UI - Browser pop up appearing
// cy.xpath(queryLocators.copyURLicon).click()
// cy.window().its('navigator.clipboard').invoke('readText').should('contain', 'CRUDNewPageFile')
//Verifying DeleteFile icon from UI
cy.xpath(queryLocators.deleteFileicon).click();
expect(
cy.xpath("//span[text()='Are you sure you want to delete the file?']"),
).to.exist; //verify Delete File dialog appears
cy.clickButton("Confirm").wait(1000); //wait for Dlete operation to be successfull
cy.wait("@postExecute").then(({ response }) => {
expect(response.body.data.isExecutionSuccess).to.eq(true);
});
cy.get("span:contains('CRUDNewPageFile')").should("not.exist"); //verify Deletion of file is success from UI also
});
it("10. Validate Deletion of the Newly Created Page", () => {
cy.NavigateToQueryEditor();
cy.NavigateToActiveTab();
cy.contains(".t--datasource-name", datasourceName).click();
cy.get(".t--delete-datasource").click();
cy.wait("@deleteDatasource").should(
"have.nested.property",
"response.body.responseMeta.status",
409,
);
cy.deleteEntitybyName("Assets-test.appsmith.com");
});
it("11. Verify 'Add to widget [Widget Suggestion]' functionality - S3", () => {
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown("Commands", "List files in bucket");
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.runQuery();
cy.xpath(queryLocators.suggestedWidgetDropdown)
.click()
.wait(1000);
cy.wait("@updateLayout").then(({ response }) => {
expect(response.body.data.dsl.children[0].type).to.eq("DROP_DOWN_WIDGET");
});
cy.xpath(queryLocators.Query1)
.click()
.wait(2000);
cy.get(queryLocators.suggestedTableWidget)
.click()
.wait(1000);
cy.wait("@updateLayout").then(({ response }) => {
expect(response.body.data.dsl.children[1].type).to.eq("TABLE_WIDGET");
});
cy.xpath(queryLocators.Query1)
.click()
.wait(2000);
cy.xpath(queryLocators.suggestedWidgetText)
.click()
.wait(1000);
cy.wait("@updateLayout").then(({ response }) => {
expect(response.body.data.dsl.children[2].type).to.eq("TEXT_WIDGET");
});
cy.xpath(queryLocators.Query1)
.click()
.wait(2000);
cy.deleteQueryUsingContext();
});
it("12. Verify 'Connect Widget [snipping]' functionality - S3 ", () => {
cy.addDsl(dsl);
cy.NavigateToActiveDSQueryPane(datasourceName);
cy.validateNSelectDropdown("Commands", "List files in bucket");
cy.typeValueNValidate("assets-test.appsmith.com", "Bucket Name");
cy.runQuery();
cy.clickButton("Select Widget");
cy.xpath(queryLocators.snipeableTable).click();
cy.wait("@updateLayout").then(({ response }) => {
expect(response.body.data.dsl.children[0].widgetName).to.eq("Table1");
expect(response.body.data.messages[0]).to.contain(
"will be executed automatically on page load",
);
});
cy.xpath(queryLocators.Query1)
.click()
.wait(2000);
cy.deleteQueryUsingContext();
cy.deleteEntitybyName("Table1");
});
it("11. Deletes the datasource", () => {
cy.NavigateToQueryEditor();
cy.NavigateToActiveTab();
cy.contains(".t--datasource-name", datasourceName).click();
cy.get(".t--delete-datasource").click();
cy.wait("@deleteDatasource").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
});
});

View File

@ -0,0 +1,18 @@
{
"selectPost":"//span[text()='POST']",
"selectDelete":"//span[text()='DELETE']",
"pagebutton":"//div[text()='Page1']",
"submitButton":"//span[text()='Submit New Proposal']",
"mailButton":"//span[text()='Mail']",
"sendMailText":"//span[text()='Send Mail']",
"inputMail":"//input[@value='Curt50@gmail.com']",
"subjectField":"(//div[@class='bp3-input-group']//input)[6]",
"contentField":"//textarea[@class='bp3-input']",
"confirmButton":"//span[text()='Confirm']",
"closeButton":"//span[text()='Close']",
"datasourcesbutton":"//div[text()='Datasources']",
"postApi":"//div[text()='send_mail']",
"deleteApi":"//div[text()='delete_proposal']",
"deleteButton":"//span[text()='Delete Proposal']",
"deleteTaskText":"//span[text()='Delete this task']"
}

View File

@ -25,7 +25,9 @@
"datasourceTitle": ".t--edit-datasource-name .bp3-editable-text-content",
"defaultDatabaseName": "input[name='datasourceConfiguration.connection.defaultDatabaseName']",
"datasourceConfigurationProperty":"input[name='datasourceConfiguration.properties[0]']",
"googleSheets":".t--plugin-name:contains('Google Sheets')",
"selConnectionType": "[data-cy='datasourceConfiguration.connection.type']",
"scope":"[data-cy='datasourceConfiguration.authentication.scopeString']",
"Mysql": ".t--plugin-name:contains('Mysql')",
"ElasticSearch": ".t--plugin-name:contains('ElasticSearch')",
"DynamoDB": ".t--plugin-name:contains('DynamoDB')",

View File

@ -1,6 +1,7 @@
{
"checkboxWidget": ".t--draggable-checkboxwidget",
"dropdownWidget": ".t--draggable-dropdownwidget",
"menuButtonWidget": ".t--draggable-menubuttonwidget",
"multiselectWidget": ".t--draggable-multiselectwidget",
"multiselecttreeWidget": ".t--draggable-multiselecttreewidget",
"singleselecttreeWidget": ".t--draggable-singleselecttreewidget",

View File

@ -23,8 +23,5 @@
"currentNameField": "//div[@type='FORM_WIDGET']//span[text()='name:']//ancestor::div[contains(@class,'t--widget-textwidget')]/preceding-sibling::div[contains(@class, 't--widget-inputwidget')][1]//input",
"deleteofSelectedRow": "//div[@class='tr selected-row']//span[text()='Delete']",
"confirmBtn": "span:contains('Confirm')",
"postgressnewPageEntityMenu": "//div[text()='Public.users_crud']/ancestor::div[contains(@class, 't--entity page')]//span[contains(@class, 'entity-context-menu')]//div",
"deleteMenuItem": "//div[text()='Delete']/parent::a[contains(@class, 'single-select')]",
"mongonewPageEntityMenu": "//div[text()='ListingsAndReviews']/ancestor::div[contains(@class, 't--entity page')]//span[contains(@class, 'entity-context-menu')]//div"
"deleteMenuItem": "//div[text()='Delete']/parent::a[contains(@class, 'single-select')]"
}

View File

@ -21,19 +21,15 @@
"queryCreate": "//div[contains(@class, 't--template-menu')]//div[text()='Create']",
"queryUpdate": "//div[contains(@class, 't--template-menu')]//div[text()='Update']",
"queryDelete": "//div[contains(@class, 't--template-menu')]//div[text()='Delete']",
"codeTextArea": "div.CodeMirror-code",
"findDocs" : "//div[text()='Find Document(s)']",
"collectionField": "//p[text()='Collection']/following-sibling::div//div[@class='CodeMirror-code']",
"queryField": "//p[text()='Query']/following-sibling::div//div[@class='CodeMirror-code']",
"sortField": "//p[text()='Sort']/following-sibling::div//div[@class='CodeMirror-code']",
"projectionField": "//p[text()='Projection']/following-sibling::div//div[@class='CodeMirror-code']",
"limitField": "//p[text()='Limit']/following-sibling::div//div[@class='CodeMirror-code']",
"skipField": "//p[text()='Skip']/following-sibling::div//div[@class='CodeMirror-code']",
"keyField": "//p[text()='Key']/following-sibling::div//div[@class='CodeMirror-code']",
"arrayOfPipelinesField": "//p[text()='Array of Pipelines']/following-sibling::div//div[@class='CodeMirror-code']",
"countText": "//span[contains(@class, 'cs-text')][text()='Result:']/span"
"codeTextArea": "//div[@class='CodeMirror-code']//span/span",
"countText": "//span[contains(@class, 'cs-text')][text()='Result:']/span",
"searchFilefield": "//input[@placeholder='Search File Prefix']",
"copyURLicon": "//button/span[@icon='link']",
"deleteFileicon": "//button/span[@icon='trash']",
"snipeableTable":"//input[@type='search']",
"Query1": "//div[contains(@class, 't--entity-name')][text()='Query1']",
"suggestedWidgetDropdown": "//div[contains(@class, 't--suggested-widget-DROP_DOWN_WIDGET')]",
"suggestedWidgetText": "//div[contains(@class, 't--suggested-widget-TEXT_WIDGET')]",
"queryTimeout": "//input[@name='actionConfiguration.timeoutInMillisecond']",
"mongoFormFind": "//div[text()='listingsAndReviews']/ancestor::div/following-sibling::div[contains(@class, 'entity-context-menu')]"
}

View File

@ -12,7 +12,7 @@
"buttonBackground": ".sc-ecQjpJ > div > .bp3-button",
"copyWidget": ".t--copy-widget svg",
"removeWidget": ".t--delete-widget svg",
"propertypaneText": ".t--propertypane .bp3-panel-stack-view",
"propertypaneText": ".t--propertypane .t--property-pane-view",
"formButtonWidget": ".t--widget-formbuttonwidget",
"dropdownwidget": ".t--widget-dropdownwidget",
"textWidget": ".t--draggable-textwidget",
@ -60,6 +60,7 @@
"autoPlay": ".t--property-control-autoplay > .bp3-control > .bp3-control-indicator",
"defaultOption": ".t--property-control-defaultoption .CodeMirror-code",
"dropdownSingleSelect": ".bp3-popover-target > div > .bp3-button",
"menuButton": ".bp3-popover2-target",
"defaultSingleSelectValue": ".bp3-popover-target > div > .bp3-button > .bp3-button-text",
"widgetBtn": ".t--widget-buttonwidget button",
"widgetBtnText": ".t--widget-buttonwidget button .bp3-button-text",

View File

@ -2,6 +2,7 @@
"editIcon": ".t--widget-propertypane-toggle",
"helpIcon": ".t--widget-help-control",
"editPropCrossButton": ".t--property-pane-close-btn",
"editPropBackButton": ".t--property-pane-back-btn",
"deleteWidgetIcon": ".t--widget-delete-control",
"dropdownSelectButton": ".t--open-dropdown-Select-Action",
"crossbutton": ".t--property-pane-close-btn",
@ -65,7 +66,7 @@
"selectMenuItem": ".bp3-menu li>a>div",
"evaluatedTypeTitle": ".t--CodeEditor-evaluatedValue > p:first-of-type",
"evaluatedType": ".t--CodeEditor-evaluatedValue > div:first-of-type pre",
"evaluatedCurrentValue": ".t--CodeEditor-evaluatedValue > div:last-of-type pre",
"evaluatedCurrentValue": "div:last-of-type .t--CodeEditor-evaluatedValue > div:last-of-type pre",
"entityExplorersearch": "#entity-explorer-search",
"entitySearchResult": ".t--entity-name:contains('",
"saveStatusContainer": ".t--save-status-container",
@ -95,7 +96,7 @@
"selectedColType": ".t--property-control-columntype button span",
"collapsesection": ".t--property-pane-section-collapse-general .bp3-icon",
"selectTab": ".t--tab-Tab",
"layoutControl": ".t--layout-control-wrapper",
"layoutControls": ".t--layout-control-wrapper button",
"layoutPopover": ".bp3-popover.bp3-minimal.layout-control",
"canvas": ".t--canvas-artboard",
"deflautSelectedRow": ".t--property-control-defaultselectedrow textarea",

View File

@ -44,5 +44,9 @@
"pageInfo": ".bp3-heading",
"inputGrp": ".bp3-input-group input",
"datePickerNew": ".t--widget-datepickerwidget2",
"tab": ".t--tab-Tab"
"tab": ".t--tab-Tab",
"downloadOption": ".t--table-download-data-option",
"addFilter": ".t--add-filter-btn",
"operatorsDropdown": ".t--table-filter-operators-dropdown",
"attributesDropdown": ".t--table-filter-columns-dropdown"
}

View File

@ -5,6 +5,7 @@ const path = require("path");
const dotenv = require("dotenv");
const chalk = require("chalk");
const cypressLogToOutput = require("cypress-log-to-output");
const { isFileExist } = require("cy-verify-downloads");
// ***********************************************************
// This example plugins/index.js can be used to load plugins
@ -30,13 +31,19 @@ module.exports = (on, config) => {
}
return false;
});
};
module.exports = (on, config) => {
on("task", {
isFileExist,
});
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on("before:browser:launch", (browser = {}, launchOptions) => {
/*
Uncomment below to get console log printed in cypress output
*/
Uncomment below to get console log printed in cypress output
*/
launchOptions.args = cypressLogToOutput.browserLaunchHandler(
browser,

View File

@ -2,7 +2,9 @@
/* eslint-disable cypress/no-unnecessary-waiting */
/* eslint-disable cypress/no-assigning-return-values */
require("cy-verify-downloads").addCustomCommand();
require("cypress-file-upload");
const dayjs = require("dayjs");
const loginPage = require("../locators/LoginPage.json");
@ -27,8 +29,10 @@ const generatePage = require("../locators/GeneratePage.json");
const jsEditorLocators = require("../locators/JSEditor.json");
const queryLocators = require("../locators/QueryEditor.json");
const welcomePage = require("../locators/welcomePage.json");
const publishWidgetspage = require("../locators/publishWidgetspage.json");
let pageidcopy = " ";
const chainStart = Symbol();
export const initLocalstorage = () => {
cy.window().then((window) => {
@ -51,8 +55,13 @@ Cypress.Commands.add("renameOrg", (orgName, newOrgName) => {
.click({ force: true });
cy.get(homePage.renameOrgInput)
.should("be.visible")
.type(newOrgName)
.type("{enter}");
.type(newOrgName);
cy.get(commonlocators.homeIcon).click({ force: true });
cy.wait("@updateOrganization").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.contains(newOrgName);
});
@ -75,6 +84,49 @@ Cypress.Commands.add(
},
);
Cypress.Commands.add("downloadData", (filetype) => {
cy.get(publishWidgetspage.downloadBtn).click({ force: true });
cy.get(publishWidgetspage.downloadOption)
.contains(filetype)
.click({ force: true });
});
Cypress.Commands.add("validateDownload", (fileName) => {
const downloadedFilename = Cypress.config("downloadsFolder")
.concat("/")
.concat(fileName);
cy.readFile(downloadedFilename, "binary", {
timeout: 15000,
}).should((buffer) => expect(buffer.length).to.be.gt(100));
});
Cypress.Commands.add(
"AddFilterWithOperator",
(operator, option, condition, value) => {
cy.get(publishWidgetspage.addFilter).click();
cy.get(publishWidgetspage.operatorsDropdown).click({ force: true });
cy.get(publishWidgetspage.attributeValue)
.contains(operator)
.click({ force: true });
cy.get(publishWidgetspage.attributesDropdown)
.last()
.click({ force: true });
cy.get(publishWidgetspage.attributeValue)
.contains(option)
.click({ force: true });
cy.get(publishWidgetspage.conditionDropdown)
.last()
.click({ force: true });
cy.get(publishWidgetspage.attributeValue)
.contains(condition)
.click({ force: true });
cy.get(publishWidgetspage.inputValue)
.last()
.type(value);
},
);
Cypress.Commands.add("navigateToOrgSettings", (orgName) => {
cy.get(homePage.orgList.concat(orgName).concat(")"))
.scrollIntoView()
@ -85,7 +137,6 @@ Cypress.Commands.add("navigateToOrgSettings", (orgName) => {
.find(homePage.optionsIcon)
.click({ force: true });
cy.xpath(homePage.MemberSettings).click({ force: true });
cy.wait("@getOrganisation");
cy.wait("@getRoles").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -138,7 +189,7 @@ Cypress.Commands.add("CheckShareIcon", (orgName, count) => {
Cypress.Commands.add("stubPostHeaderReq", () => {
cy.intercept("POST", "/api/v1/users/invite", (req) => {
req.headers.origin = "Cypress";
req.headers["origin"] = "Cypress";
}).as("mockPostInvite");
});
@ -192,7 +243,6 @@ Cypress.Commands.add("deleteUserFromOrg", (orgName, email) => {
.find(homePage.optionsIcon)
.click({ force: true });
cy.xpath(homePage.MemberSettings).click({ force: true });
cy.wait("@getOrganisation");
cy.wait("@getRoles").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -369,17 +419,17 @@ Cypress.Commands.add("firestoreDatasourceForm", () => {
cy.get(datasourceEditor.datasourceConfigUrl).type(
datasourceFormData["database-url"],
);
cy.get(datasourceEditor.projectID).type(datasourceFormData.projectID);
cy.get(datasourceEditor.projectID).type(datasourceFormData["projectID"]);
cy.get(datasourceEditor.serviceAccCredential)
.clear()
.type(datasourceFormData.serviceAccCredentials);
.type(datasourceFormData["serviceAccCredentials"]);
});
Cypress.Commands.add("amazonDatasourceForm", () => {
cy.get(datasourceEditor.projectID).type(datasourceFormData.access_key);
cy.get(datasourceEditor.projectID).type(datasourceFormData["access_key"]);
cy.get(datasourceEditor.serviceAccCredential)
.clear()
.type(datasourceFormData.secret_key);
.type(datasourceFormData["secret_key"]);
});
Cypress.Commands.add("DeleteApp", (appName) => {
@ -506,12 +556,10 @@ Cypress.Commands.add("LogOut", () => {
Cypress.Commands.add("NavigateToHome", () => {
cy.get(commonlocators.homeIcon).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.wait("@applications").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.wait(3000);
cy.wait("@applications");
cy.get(".t--applications-container .createnew").should("be.visible");
cy.get(".t--applications-container .createnew").should("be.enabled");
});
Cypress.Commands.add("NavigateToWidgets", (pageName) => {
@ -582,6 +630,7 @@ Cypress.Commands.add("ResponseTextCheck", (textTocheck) => {
Cypress.Commands.add("NavigateToAPI_Panel", () => {
cy.get(pages.addEntityAPI)
.last()
.should("be.visible")
.click({ force: true });
cy.get(pages.integrationCreateNew)
@ -1153,7 +1202,6 @@ Cypress.Commands.add("AddActionWithModal", () => {
.click({ force: true });
cy.get(modalWidgetPage.selectModal).click();
cy.get(modalWidgetPage.createModalButton).click({ force: true });
cy.get(commonlocators.editPropCrossButton).click({ force: true });
});
Cypress.Commands.add("createModal", (ModalName) => {
@ -1173,7 +1221,6 @@ Cypress.Commands.add("createModal", (ModalName) => {
modalWidgetPage.modalName,
modalWidgetPage.modalName,
);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
//changing the Model label
cy.get(modalWidgetPage.modalWidget + " " + widgetsPage.textWidget)
@ -1281,7 +1328,9 @@ Cypress.Commands.add("EvaluateCurrentValue", (currentValue) => {
cy.get(commonlocators.evaluatedCurrentValue)
.first()
.should("be.visible")
.contains(currentValue);
.then(($text) => {
expect($text.text()).to.eq(currentValue);
});
});
Cypress.Commands.add("PublishtheApp", () => {
@ -2089,9 +2138,16 @@ Cypress.Commands.add("NavigateToActiveTab", () => {
Cypress.Commands.add("NavigateToActiveDSQueryPane", (datasourceName) => {
cy.NavigateToQueryEditor();
cy.NavigateToActiveTab();
cy.contains(".t--datasource-name", datasourceName)
.find(queryLocators.createQuery)
.click();
cy.get(datasource.datasourceCard)
.contains(datasourceName)
.scrollIntoView()
.should("be.visible")
.closest(datasource.datasourceCard)
.within(() => {
cy.get(queryLocators.createQuery).click({ force: true });
})
.wait(2000); //for the specified page to load
});
Cypress.Commands.add("NavigateToDSGeneratePage", (datasourceName) => {
@ -2105,7 +2161,8 @@ Cypress.Commands.add("NavigateToDSGeneratePage", (datasourceName) => {
.closest(datasource.datasourceCard)
.within(() => {
cy.get(datasource.datasourceCardGeneratePageBtn).click();
});
})
.wait(2000); //for the specified page to load
});
Cypress.Commands.add("ClickGotIt", () => {
@ -2141,6 +2198,10 @@ Cypress.Commands.add("testSaveDatasource", () => {
cy.testDatasource();
});
Cypress.Commands.add("fillGoogleSheetsDatasourceForm", () => {
cy.get(datasourceEditor["scope"]).click();
});
Cypress.Commands.add(
"fillMongoDatasourceForm",
(shouldAddTrailingSpaces = false) => {
@ -2151,23 +2212,24 @@ Cypress.Commands.add(
? datasourceFormData["mongo-defaultDatabaseName"] + " "
: datasourceFormData["mongo-defaultDatabaseName"];
cy.get(datasourceEditor.host).type(hostAddress);
cy.get(datasourceEditor["host"]).type(hostAddress);
//cy.get(datasourceEditor.port).type(datasourceFormData["mongo-port"]);
cy.get(datasourceEditor.selConnectionType).click();
//cy.get(datasourceEditor["port"]).type(datasourceFormData["mongo-port"]);
cy.get(datasourceEditor["selConnectionType"]).click();
cy.contains(datasourceFormData["connection-type"]).click();
cy.get(datasourceEditor.defaultDatabaseName).type(databaseName);
cy.get(datasourceEditor["defaultDatabaseName"]).type(databaseName);
cy.get(datasourceEditor.sectionAuthentication).click();
cy.get(datasourceEditor.databaseName)
cy.get(datasourceEditor["databaseName"])
.clear()
.type(datasourceFormData["mongo-databaseName"]);
cy.get(datasourceEditor.username).type(
cy.get(datasourceEditor["username"]).type(
datasourceFormData["mongo-username"],
);
cy.get(datasourceEditor.password).type(
cy.get(datasourceEditor["password"]).type(
datasourceFormData["mongo-password"],
);
cy.get(datasourceEditor.authenticationAuthtype).click();
cy.get(datasourceEditor["authenticationAuthtype"]).click();
cy.contains(datasourceFormData["mongo-authenticationAuthtype"]).click({
force: true,
});
@ -2308,32 +2370,32 @@ Cypress.Commands.add(
"fillUsersMockDatasourceForm",
(shouldAddTrailingSpaces = false) => {
const userMockDatabaseName = shouldAddTrailingSpaces
? `${datasourceFormData.mockDatabaseName + " "}`
: datasourceFormData.mockDatabaseName;
? `${datasourceFormData["mockDatabaseName"] + " "}`
: datasourceFormData["mockDatabaseName"];
const userMockHostAddress = shouldAddTrailingSpaces
? `${datasourceFormData.mockHostAddress + " "}`
: datasourceFormData.mockHostAddress;
? `${datasourceFormData["mockHostAddress"] + " "}`
: datasourceFormData["mockHostAddress"];
const userMockDatabaseUsername = shouldAddTrailingSpaces
? `${datasourceFormData.mockDatabaseUsername + " "}`
: datasourceFormData.mockDatabaseUsername;
? `${datasourceFormData["mockDatabaseUsername"] + " "}`
: datasourceFormData["mockDatabaseUsername"];
cy.get(datasourceEditor.host)
cy.get(datasourceEditor["host"])
.clear()
.type(userMockHostAddress);
cy.get(datasourceEditor.databaseName)
cy.get(datasourceEditor["databaseName"])
.clear()
.type(userMockDatabaseName);
cy.get(datasourceEditor.sectionAuthentication).click();
cy.get(datasourceEditor["sectionAuthentication"]).click();
cy.get(datasourceEditor.password)
cy.get(datasourceEditor["password"])
.clear()
.type(datasourceFormData.mockDatabasePassword);
.type(datasourceFormData["mockDatabasePassword"]);
cy.get(datasourceEditor.username)
cy.get(datasourceEditor["username"])
.clear()
.type(userMockDatabaseUsername);
},
@ -2362,9 +2424,7 @@ Cypress.Commands.add("deleteDatasource", (datasourceName) => {
});
Cypress.Commands.add("runQuery", () => {
cy.xpath(queryEditor.runQuery)
.last()
.click();
cy.onlyQueryRun();
cy.wait("@postExecute").should(
"have.nested.property",
"response.body.responseMeta.status",
@ -2375,7 +2435,7 @@ Cypress.Commands.add("runQuery", () => {
Cypress.Commands.add("onlyQueryRun", () => {
cy.xpath(queryEditor.runQuery)
.last()
.click();
.click({ force: true });
});
Cypress.Commands.add("hoverAndClick", () => {
@ -2544,7 +2604,7 @@ Cypress.Commands.add("changeButtonColor", (buttonColor) => {
});
Cypress.Commands.add("closePropertyPane", () => {
cy.get(commonlocators.editPropCrossButton).click({ force: true });
cy.get(commonlocators.canvas).click({ force: true });
});
Cypress.Commands.add("onClickActions", (forSuccess, forFailure, endp) => {
@ -2669,9 +2729,9 @@ Cypress.Commands.add("createAndFillApi", (url, parameters) => {
});
Cypress.Commands.add("isSelectRow", (index) => {
cy.get(
'.tbody .td[data-rowindex="' + index + '"][data-colindex="' + 0 + '"]',
).click({ force: true });
cy.get('.tbody .td[data-rowindex="' + index + '"][data-colindex="' + 0 + '"]')
.first()
.click({ force: true });
});
Cypress.Commands.add("readTabledata", (rowNum, colNum) => {
@ -3037,6 +3097,7 @@ Cypress.Commands.add("createJSObject", (JSCode) => {
});
Cypress.Commands.add("createSuperUser", () => {
cy.wait(1000);
cy.get(welcomePage.getStarted).should("be.visible");
cy.get(welcomePage.getStarted).should("not.be.disabled");
cy.get(welcomePage.getStarted).click();
@ -3210,3 +3271,128 @@ Cypress.Commands.add(
});
},
);
Cypress.Commands.add(
"validateNSelectDropdown",
(ddTitle, currentValue, newValue) => {
let toChange = false;
cy.xpath('//div[contains(text(),"' + currentValue + '")]').should(
"exist",
currentValue + " dropdown value not present",
);
if (newValue) toChange = true;
if (toChange) {
cy.xpath(
"//p[text()='" + ddTitle + "']/following-sibling::div/div",
).click(); //to expand the dropdown
cy.xpath('//div[contains(text(),"' + newValue + '")]')
.last()
.click({ force: true }); //to select the new value
}
},
);
Cypress.Commands.add("typeValueNValidate", (valueToType, fieldName = "") => {
if (fieldName) {
cy.xpath("//p[text()='" + fieldName + "']/following-sibling::div").then(
($field) => {
cy.updateCodeInput($field, valueToType);
},
);
} else {
cy.xpath("//div[@class='CodeEditorTarget']").then(($field) => {
cy.updateCodeInput($field, valueToType);
});
}
cy.EvaluateCurrentValue(valueToType);
// cy.xpath("//p[text()='" + fieldName + "']/following-sibling::div//div[@class='CodeMirror-code']//span/span").should((fieldValue) => {
// textF = fieldValue.innerText
// fieldValue.innerText = ""
// }).then(() => {
// cy.log("current field value is : '" + textF + "'")
// })
});
Cypress.Commands.add("clickButton", (btnVisibleText) => {
cy.xpath("//span[text()='" + btnVisibleText + "']/parent::button").click({
force: true,
});
});
Cypress.Commands.add("deleteEntitybyName", (entityNameinLeftSidebar) => {
cy.xpath(
"//div[text()='" +
entityNameinLeftSidebar +
"']/ancestor::div[contains(@class, 't--entity')]//span[contains(@class, 'entity-context-menu')]//div",
)
.first()
.click({ force: true });
cy.xpath(generatePage.deleteMenuItem).click();
});
Cypress.Commands.add(
"EvaluatFieldValue",
(fieldName = "", currentValue = "") => {
let toValidate = false;
if (currentValue) toValidate = true;
if (fieldName) {
cy.xpath(
"//p[text()='" +
fieldName +
"']/following-sibling::div//div[@class='CodeMirror-code']",
).click();
} else {
cy.xpath("//div[@class='CodeMirror-code']").click();
}
cy.wait(2000);
const val = cy
.get(commonlocators.evaluatedCurrentValue)
.first()
.should("be.visible")
.invoke("text");
if (toValidate) expect(val).to.eq(currentValue);
return val;
},
);
cy.all = function(...commands) {
const _ = Cypress._;
const chain = cy.wrap(null, { log: false });
const stopCommand = _.find(cy.queue.commands, {
attributes: { chainerId: chain.chainerId },
});
const startCommand = _.find(cy.queue.commands, {
attributes: { chainerId: commands[0].chainerId },
});
const p = chain.then(() => {
return _(commands)
.map((cmd) => {
return cmd[chainStart]
? cmd[chainStart].attributes
: _.find(cy.queue.commands, {
attributes: { chainerId: cmd.chainerId },
}).attributes;
})
.concat(stopCommand.attributes)
.slice(1)
.flatMap((cmd) => {
return cmd.prev.get("subject");
})
.value();
});
p[chainStart] = startCommand;
return p;
};
// Cypress.Commands.overwrite("type", (originalFn, element, text, options) => {
// const clearedText = '{selectall}{backspace}'+`${text}`;
// return originalFn(element, clearedText, options);
// });

0
app/client/index.tsx Normal file
View File

View File

@ -15,7 +15,7 @@ module.exports = {
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "css"],
moduleDirectories: ["node_modules", "src", "test"],
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!codemirror|react-dnd|dnd-core|@babel|(@blueprintjs/core/lib/esnext)|(@blueprintjs/core/lib/esm)|@github|lodash-es|@draft-js-plugins)",
"<rootDir>/node_modules/(?!codemirror|react-dnd|dnd-core|@babel|(@blueprintjs/core/lib/esnext)|(@blueprintjs/core/lib/esm)|@github|lodash-es|@draft-js-plugins|react-documents)",
],
moduleNameMapper: {
"\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js",

View File

@ -39,6 +39,7 @@
"axios": "^0.21.1",
"caniuse-lite": "^1.0.30001208",
"chance": "^1.1.3",
"classnames": "^2.3.1",
"codemirror": "^5.59.2",
"copy-to-clipboard": "^3.3.1",
"core-js": "^3.9.1",
@ -50,6 +51,7 @@
"draft-js": "^0.11.7",
"emoji-mart": "^3.0.1",
"eslint": "^7.11.0",
"exceljs-lightweight": "^1.14.0",
"fast-deep-equal": "^3.1.1",
"fast-xml-parser": "^3.17.5",
"flow-bin": "^0.148.0",
@ -73,6 +75,7 @@
"lodash-move": "^1.1.1",
"loglevel": "^1.7.1",
"lottie-web": "^5.7.4",
"mammoth": "^1.4.19",
"marked": "^2.0.0",
"memoize-one": "^5.2.1",
"moment": "^2.24.0",
@ -96,6 +99,7 @@
"react-dnd": "^9.3.4",
"react-dnd-html5-backend": "^9.3.4",
"react-dnd-touch-backend": "^9.4.0",
"react-documents": "^1.0.4",
"react-dom": "^16.7.0",
"react-google-maps": "^9.4.5",
"react-google-recaptcha": "^2.1.0",
@ -236,6 +240,7 @@
"@types/toposort": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^4.15.0",
"@typescript-eslint/parser": "^4.15.0",
"autoprefixer": "^9",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-styled-components": "^1.10.7",
"cra-bundle-analyzer": "^0.1.0",
@ -245,6 +250,7 @@
"cypress-multi-reporters": "^1.2.4",
"cypress-real-events": "^1.5.1",
"cypress-xpath": "^1.4.0",
"cy-verify-downloads": "^0.0.5",
"dotenv": "^8.1.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.12.0",
@ -265,6 +271,7 @@
"msw": "^0.28.0",
"patch-package": "^6.4.7",
"plop": "^2.7.4",
"postcss": "^7",
"postinstall-postinstall": "^2.1.0",
"raw-loader": "^4.0.2",
"react-docgen-typescript-loader": "^3.6.0",
@ -273,6 +280,8 @@
"redux-devtools": "^3.5.0",
"redux-devtools-extension": "^2.13.8",
"redux-mock-store": "^1.5.4",
"storybook-addon-designs": "^5.4.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat",
"ts-jest": "^26.5.4",
"webpack-merge": "^4.2.2",
"workbox-webpack-plugin": "^5.1.2"

View File

@ -85,7 +85,7 @@ export interface UpdateWidgetPropertyPayload {
shouldReplay?: boolean;
}
export interface UpdateCanvasLayout {
export interface UpdateCanvasLayoutPayload {
width: number;
height: number;
}

View File

@ -0,0 +1,33 @@
import { ReduxActionTypes } from "constants/ReduxActionConstants";
/**
* action that sets preview mode
*
* @param payload
* @returns
*/
export const setPreviewModeAction = (payload: boolean) => ({
type: ReduxActionTypes.SET_PREVIEW_MODE,
payload,
});
/**
* action that update canvas layout
*
* @param width
* @param height
* @returns
*/
export const updateCanvasLayoutAction = (
width: number,
height: number | undefined,
) => {
return {
type: ReduxActionTypes.UPDATE_CANVAS_LAYOUT,
payload: {
height,
width,
},
};
};

View File

@ -8,3 +8,47 @@ export const initExplorerEntityNameEdit = (actionId: string) => {
},
};
};
/**
* action that make explorer pin/unpin
*
* @param shouldPin
* @returns
*/
export const setExplorerPinnedAction = (shouldPin: boolean) => {
return {
type: ReduxActionTypes.SET_EXPLORER_PINNED,
payload: {
shouldPin,
},
};
};
/**
* action that make explorer active/inactive
* NOTE: active state is used to slide the sidebar in unpinned state on hover.
*
* @param shouldPin
* @returns
*/
export const setExplorerActiveAction = (active: boolean) => {
return {
type: ReduxActionTypes.SET_EXPLORER_ACTIVE,
payload: active,
};
};
/**
* action that updates explorer width
*
* @param shouldPin
* @returns
*/
export const updateExplorerWidthAction = (width: number | undefined) => {
return {
type: ReduxActionTypes.UPDATE_EXPLORER_WIDTH,
payload: {
width,
},
};
};

View File

@ -1,11 +0,0 @@
import * as actions from "./propertyPaneActions";
import { ReduxActionTypes } from "constants/ReduxActionConstants";
describe("property pane action actions", () => {
it("should create an action hide Property Pane", () => {
const expectedAction = {
type: ReduxActionTypes.HIDE_PROPERTY_PANE,
};
expect(actions.hidePropertyPane()).toEqual(expectedAction);
});
});

View File

@ -9,12 +9,6 @@ export const updateWidgetName = (widgetId: string, newName: string) => {
};
};
export const hidePropertyPane = () => {
return {
type: ReduxActionTypes.HIDE_PROPERTY_PANE,
};
};
export const bindDataToWidget = (payload: { widgetId: string }) => {
return {
type: ReduxActionTypes.BIND_DATA_TO_WIDGET,

View File

@ -0,0 +1,3 @@
<svg width="12" height="11" viewBox="0 0 12 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.18555 10.7676C5.32031 10.8965 5.48438 10.9668 5.67188 10.9668C6.06445 10.9668 6.36914 10.6621 6.36914 10.2754C6.36914 10.082 6.29297 9.90625 6.1582 9.77148L2.05664 5.76367L6.1582 1.76758C6.29297 1.63281 6.36914 1.45117 6.36914 1.26367C6.36914 0.876953 6.06445 0.572266 5.67188 0.572266C5.48438 0.572266 5.32031 0.642578 5.19141 0.771484L0.632812 5.22461C0.46875 5.37695 0.386719 5.56445 0.386719 5.76953C0.386719 5.97461 0.46875 6.15039 0.626953 6.30859L5.18555 10.7676ZM10.4238 10.7676C10.5586 10.8965 10.7168 10.9668 10.9102 10.9668C11.3027 10.9668 11.6074 10.6621 11.6074 10.2754C11.6074 10.082 11.5254 9.90625 11.3965 9.77148L7.28906 5.76367L11.3965 1.76758C11.5312 1.63281 11.6074 1.45117 11.6074 1.26367C11.6074 0.876953 11.3027 0.572266 10.9102 0.572266C10.7168 0.572266 10.5586 0.642578 10.4238 0.771484L5.86523 5.22461C5.70703 5.37695 5.625 5.56445 5.61914 5.76953C5.61914 5.97461 5.70117 6.15039 5.86523 6.30859L10.4238 10.7676Z" fill="#858282"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,4 @@
<svg width="12" height="11" viewBox="0 0 12 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.32227 10.9668C6.50977 10.9668 6.67383 10.8965 6.80859 10.7676L11.3672 6.30859C11.5254 6.15039 11.6074 5.97461 11.6074 5.76953C11.6074 5.56445 11.5254 5.37695 11.3613 5.22461L6.80273 0.771484C6.67383 0.642578 6.50977 0.572266 6.32227 0.572266C5.92969 0.572266 5.61914 0.876953 5.61914 1.26367C5.61914 1.45117 5.70117 1.63281 5.83594 1.76758L9.9375 5.76367L5.83594 9.77148C5.70117 9.90625 5.61914 10.082 5.61914 10.2754C5.61914 10.6621 5.92969 10.9668 6.32227 10.9668ZM1.08398 10.9668C1.27734 10.9668 1.43555 10.8965 1.57031 10.7676L6.12891 6.30859C6.29297 6.15039 6.36914 5.97461 6.36914 5.76953C6.36914 5.56445 6.28711 5.37695 6.12891 5.22461L1.57031 0.771484C1.43555 0.642578 1.27734 0.572266 1.08398 0.572266C0.691406 0.572266 0.386719 0.876953 0.386719 1.26367C0.386719 1.45117 0.462891 1.63281 0.597656 1.76758L4.70508 5.76367L0.597656 9.77148C0.46875 9.90625 0.386719 10.082 0.386719 10.2754C0.386719 10.6621 0.691406 10.9668 1.08398 10.9668Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="10" fill="none" viewBox="0 0 8 10"><path fill="#716E6E" fill-rule="evenodd" d="M2.12158 1.4H0.998746V0.199999H6.98718V1.4H5.86435L6.23863 5.6C6.99044 5.6 7.5999 6.20947 7.5999 6.96128V7.39926H4.59181V9.2L3.99296 9.8L3.39412 9.2V7.4L0.399904 7.39926V6.9474C0.399904 6.20325 1.00315 5.6 1.7473 5.6L2.12158 1.4Z" clip-rule="evenodd"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="10" fill="none" viewBox="0 0 8 10">
<path fill="currentColor" fill-rule="evenodd"
d="M2.12158 1.4H0.998746V0.199999H6.98718V1.4H5.86435L6.23863 5.6C6.99044 5.6 7.5999 6.20947 7.5999 6.96128V7.39926H4.59181V9.2L3.99296 9.8L3.39412 9.2V7.4L0.399904 7.39926V6.9474C0.399904 6.20325 1.00315 5.6 1.7473 5.6L2.12158 1.4Z"
clip-rule="evenodd" />
</svg>

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 422 B

View File

@ -1 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none" viewBox="0 0 18 18"><path fill="#939090" fill-rule="evenodd" d="M4.49948 3.60005H6.18595L6.08493 4.73217L12.2829 8.92729L11.8075 3.60005H13.494V1.80005H4.49948V3.60005ZM2.95899 4.27167L2.2052 5.39132L5.80942 7.81977L5.62379 9.90005H5.60003C4.49546 9.90005 3.60003 10.7955 3.60003 11.9001V12.5989L8.09728 12.6001V15.3001L8.99673 16.2001L9.89619 15.3001V12.5989H12.8978L15.4014 14.2863L16.1552 13.1667L2.95899 4.27167Z" clip-rule="evenodd"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none" viewBox="0 0 18 18">
<path fill="currentColor" fill-rule="evenodd"
d="M4.49948 3.60005H6.18595L6.08493 4.73217L12.2829 8.92729L11.8075 3.60005H13.494V1.80005H4.49948V3.60005ZM2.95899 4.27167L2.2052 5.39132L5.80942 7.81977L5.62379 9.90005H5.60003C4.49546 9.90005 3.60003 10.7955 3.60003 11.9001V12.5989L8.09728 12.6001V15.3001L8.99673 16.2001L9.89619 15.3001V12.5989H12.8978L15.4014 14.2863L16.1552 13.1667L2.95899 4.27167Z"
clip-rule="evenodd" />
</svg>

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 547 B

View File

@ -1 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="none" viewBox="0 0 18 20"><path fill="#A2A6A8" d="M11.1484 20H3.6875C1.96432 20 0.5625 18.5982 0.5625 16.875V6.28906C0.5625 4.56589 1.96432 3.16406 3.6875 3.16406H11.1484C12.8716 3.16406 14.2734 4.56589 14.2734 6.28906V16.875C14.2734 18.5982 12.8716 20 11.1484 20ZM3.6875 4.72656C2.82599 4.72656 2.125 5.42755 2.125 6.28906V16.875C2.125 17.7365 2.82599 18.4375 3.6875 18.4375H11.1484C12.0099 18.4375 12.7109 17.7365 12.7109 16.875V6.28906C12.7109 5.42755 12.0099 4.72656 11.1484 4.72656H3.6875ZM17.3984 14.9219V3.125C17.3984 1.40182 15.9966 0 14.2734 0H5.60156C5.17004 0 4.82031 0.349731 4.82031 0.78125C4.82031 1.21277 5.17004 1.5625 5.60156 1.5625H14.2734C15.1349 1.5625 15.8359 2.26349 15.8359 3.125V14.9219C15.8359 15.3534 16.1857 15.7031 16.6172 15.7031C17.0487 15.7031 17.3984 15.3534 17.3984 14.9219Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="none" viewBox="0 0 18 20">
<path fill="currentColor"
d="M11.1484 20H3.6875C1.96432 20 0.5625 18.5982 0.5625 16.875V6.28906C0.5625 4.56589 1.96432 3.16406 3.6875 3.16406H11.1484C12.8716 3.16406 14.2734 4.56589 14.2734 6.28906V16.875C14.2734 18.5982 12.8716 20 11.1484 20ZM3.6875 4.72656C2.82599 4.72656 2.125 5.42755 2.125 6.28906V16.875C2.125 17.7365 2.82599 18.4375 3.6875 18.4375H11.1484C12.0099 18.4375 12.7109 17.7365 12.7109 16.875V6.28906C12.7109 5.42755 12.0099 4.72656 11.1484 4.72656H3.6875ZM17.3984 14.9219V3.125C17.3984 1.40182 15.9966 0 14.2734 0H5.60156C5.17004 0 4.82031 0.349731 4.82031 0.78125C4.82031 1.21277 5.17004 1.5625 5.60156 1.5625H14.2734C15.1349 1.5625 15.8359 2.26349 15.8359 3.125V14.9219C15.8359 15.3534 16.1857 15.7031 16.6172 15.7031C17.0487 15.7031 17.3984 15.3534 17.3984 14.9219Z" />
</svg>

Before

Width:  |  Height:  |  Size: 885 B

After

Width:  |  Height:  |  Size: 904 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20"><path fill="#000" fill-opacity=".87" d="M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 17H9V15H11V17ZM13.07 9.25L12.17 10.17C11.45 10.9 11 11.5 11 13H9V12.5C9 11.4 9.45 10.4 10.17 9.67L11.41 8.41C11.78 8.05 12 7.55 12 7C12 5.9 11.1 5 10 5C8.9 5 8 5.9 8 7H6C6 4.79 7.79 3 10 3C12.21 3 14 4.79 14 7C14 7.88 13.64 8.68 13.07 9.25Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20"><path fill="currentColor" fill-opacity=".87" d="M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM11 17H9V15H11V17ZM13.07 9.25L12.17 10.17C11.45 10.9 11 11.5 11 13H9V12.5C9 11.4 9.45 10.4 10.17 9.67L11.41 8.41C11.78 8.05 12 7.55 12 7C12 5.9 11.1 5 10 5C8.9 5 8 5.9 8 7H6C6 4.79 7.79 3 10 3C12.21 3 14 4.79 14 7C14 7.88 13.64 8.68 13.07 9.25Z"/></svg>

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 489 B

Some files were not shown because too many files have changed in this diff Show More