From 276f28a764535a8a791aab090aa3638f4a20f603 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 26 Aug 2024 12:29:28 +0530 Subject: [PATCH 01/50] fix: added a limited test to check the failures --- app/client/cypress/limited-tests.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 31c0c0253fef..1fc6f605b851 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,8 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts +cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts # For running all specs - uncomment below: #cypress/e2e/**/**/* From ac60ca5cfe1602be00bcd8ae441113503b12bcbe Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 26 Aug 2024 14:06:19 +0530 Subject: [PATCH 02/50] fix: api multipart --- app/client/cypress/support/Pages/ApiPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/support/Pages/ApiPage.ts b/app/client/cypress/support/Pages/ApiPage.ts index 793a6d03c102..8804ae793dde 100644 --- a/app/client/cypress/support/Pages/ApiPage.ts +++ b/app/client/cypress/support/Pages/ApiPage.ts @@ -303,7 +303,7 @@ export class ApiPage { | "RAW", ) { this.agHelper.GetNClick(this._bodyTypeSelect); - cy.xpath(this._bodyTypeToSelect(subTabName)).should("be.visible").click(); + this.agHelper.GetNClick(this._bodyTypeToSelect(subTabName)); } AssertRightPaneSelectedTab(tabName: RightPaneTabs) { From 0cb3558fd779fd4333f1a4bb6a901b285a765120 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 27 Aug 2024 14:43:20 +0530 Subject: [PATCH 03/50] fix: mysql 2 spec for checking the 12th index instead of 17 --- .../e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts index aee98caa858b..bd942f9d4f8a 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts @@ -129,13 +129,13 @@ describe( updateNVerify(6, 4, newStoreSecret as string); }); - table.SelectTableRow(17, 0, true, "v2"); - dataSources.AssertJSONFormHeader(17, 0, "store_id"); - generateStoresSecretInfo(17); + table.SelectTableRow(12, 0, true, "v2"); + dataSources.AssertJSONFormHeader(12, 0, "store_id"); + generateStoresSecretInfo(12); cy.get("@secretInfo").then(($secretInfo) => { newStoreSecret = $secretInfo; cy.log("newStoreSecret is : " + newStoreSecret); - updateNVerify(17, 4, newStoreSecret as string); + updateNVerify(12, 4, newStoreSecret as string); }); //Hidden field bug - to add here aft secret codes are updated for some fields! From 46349b5cd030a846cba913479d67b57298ce2eed Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 27 Aug 2024 15:59:43 +0530 Subject: [PATCH 04/50] fix: changed the page name to page1 from stores --- .../e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts index bd942f9d4f8a..02c7111734fe 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts @@ -361,7 +361,7 @@ describe( table.WaitUntilTableLoad(0, 0, "v2"); //Delete the test data entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Stores", + entityNameinLeftSidebar: "Page1", action: "Delete", entityType: entityItems.Page, }); From c1d311225fc4390db9a19c7d9ef8060e10eb61b2 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 28 Aug 2024 04:45:28 +0530 Subject: [PATCH 05/50] fix: api multipart to use ted api --- .../ServerSide/ApiTests/API_MultiPart_Spec.ts | 15 ++++++++------- app/client/cypress/support/Objects/DataManager.ts | 4 ++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts index ec7e2ab5801e..0dbc6ae57d20 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts @@ -2,6 +2,7 @@ import { agHelper, apiPage, assertHelper, + dataManager, deployMode, entityItems, jsEditor, @@ -128,8 +129,8 @@ describe( agHelper.AddDsl("multiPartFormDataDsl"); apiPage.CreateAndFillApi( - "https://api.cloudinary.com/v1_1/appsmithautomationcloud/image/upload?upload_preset=fbbhg4xu", - "CloudinaryUploadApi", + dataManager.dsValues[dataManager.defaultEnviorment].multipartAPI, + "MultipartAPI", 30000, "POST", ); @@ -145,7 +146,7 @@ describe( myVar1: [], myVar2: {}, upload: async () => { - await CloudinaryUploadApi.run().then(()=> showAlert('Image uploaded to Cloudinary successfully', 'success')).catch(err => showAlert(err.message, 'error')); + await MultipartAPI.run().then(()=> showAlert('Image uploaded to Cloudinary successfully', 'success')).catch(err => showAlert(err.message, 'error')); await resetWidget('FilePicker1', true); } }`, @@ -163,11 +164,11 @@ describe( EditorNavigation.SelectEntityByName("Image1", EntityType.Widget); propPane.UpdatePropertyFieldValue( "Image", - "{{CloudinaryUploadApi.data.url}}", + "{{MultipartAPI.data.url}}", ); EditorNavigation.SelectEntityByName( - "CloudinaryUploadApi", + "MultipartAPI", EntityType.Api, ); @@ -196,7 +197,7 @@ describe( it("8. Checks MultiPart form data for a Array Type upload results in API error", () => { const imageNameToUpload = "AAAFlowerVase.jpeg"; EditorNavigation.SelectEntityByName( - "CloudinaryUploadApi", + "MultipartAPI", EntityType.Api, ); apiPage.EnterBodyFormData( @@ -215,7 +216,7 @@ describe( agHelper.ClickButton("Select Files"); agHelper.UploadFile(imageNameToUpload); assertHelper.AssertNetworkExecutionSuccess("@postExecute", false); - agHelper.ValidateToastMessage("CloudinaryUploadApi failed to execute"); + agHelper.ValidateToastMessage("MultipartAPI failed to execute"); agHelper.AssertElementVisibility(locators._buttonByText("Select Files")); //verifying if reset in case of failure! }); }, diff --git a/app/client/cypress/support/Objects/DataManager.ts b/app/client/cypress/support/Objects/DataManager.ts index 515b3f050327..a54e1162eb30 100644 --- a/app/client/cypress/support/Objects/DataManager.ts +++ b/app/client/cypress/support/Objects/DataManager.ts @@ -80,6 +80,8 @@ export class DataManager { "http://host.docker.internal:5001/v1/mock-api-object?records=10", echoApiUrl: "http://host.docker.internal:5001/v1/mock-api/echo", randomCatfactUrl: "http://host.docker.internal:5001/v1/catfact/random", + multipartAPI: + "http://host.docker.internal:5001/v1/mock-api/echo-multipart", randomTrumpApi: "http://host.docker.internal:5001/v1/whatdoestrumpthink/random", mockHttpCodeUrl: "http://host.docker.internal:5001/v1/mock-http-codes/", @@ -179,6 +181,8 @@ export class DataManager { mockApiUrl: "http://host.docker.internal:5001/v1/mock-api?records=10", echoApiUrl: "http://host.docker.internal:5001/v1/mock-api/echo", randomCatfactUrl: "http://host.docker.internal:5001/v1/catfact/random", + multipartAPI: + "http://host.docker.internal:5001/v1/mock-api/echo-multipart", mockHttpCodeUrl: "http://host.docker.internal:5001/v1/mock-http-codes/", AirtableBaseForME: "appubHrVbovcudwN6", AirtableTableForME: "tblsFCQSskVFf7xNd", From 8a0bca23627a1a9c94a98d858e81f53b4bcdb6e1 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 28 Aug 2024 14:06:46 +0530 Subject: [PATCH 06/50] fix: changing only the mysql2 spec and reverting other changes --- .../ServerSide/ApiTests/API_MultiPart_Spec.ts | 15 +++++++-------- .../ServerSide/GenerateCRUD/MySQL2_Spec.ts | 11 ++++++----- app/client/cypress/limited-tests.txt | 3 --- app/client/cypress/support/Objects/DataManager.ts | 4 ---- app/client/cypress/support/Pages/ApiPage.ts | 2 +- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts index 0dbc6ae57d20..ec7e2ab5801e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts @@ -2,7 +2,6 @@ import { agHelper, apiPage, assertHelper, - dataManager, deployMode, entityItems, jsEditor, @@ -129,8 +128,8 @@ describe( agHelper.AddDsl("multiPartFormDataDsl"); apiPage.CreateAndFillApi( - dataManager.dsValues[dataManager.defaultEnviorment].multipartAPI, - "MultipartAPI", + "https://api.cloudinary.com/v1_1/appsmithautomationcloud/image/upload?upload_preset=fbbhg4xu", + "CloudinaryUploadApi", 30000, "POST", ); @@ -146,7 +145,7 @@ describe( myVar1: [], myVar2: {}, upload: async () => { - await MultipartAPI.run().then(()=> showAlert('Image uploaded to Cloudinary successfully', 'success')).catch(err => showAlert(err.message, 'error')); + await CloudinaryUploadApi.run().then(()=> showAlert('Image uploaded to Cloudinary successfully', 'success')).catch(err => showAlert(err.message, 'error')); await resetWidget('FilePicker1', true); } }`, @@ -164,11 +163,11 @@ describe( EditorNavigation.SelectEntityByName("Image1", EntityType.Widget); propPane.UpdatePropertyFieldValue( "Image", - "{{MultipartAPI.data.url}}", + "{{CloudinaryUploadApi.data.url}}", ); EditorNavigation.SelectEntityByName( - "MultipartAPI", + "CloudinaryUploadApi", EntityType.Api, ); @@ -197,7 +196,7 @@ describe( it("8. Checks MultiPart form data for a Array Type upload results in API error", () => { const imageNameToUpload = "AAAFlowerVase.jpeg"; EditorNavigation.SelectEntityByName( - "MultipartAPI", + "CloudinaryUploadApi", EntityType.Api, ); apiPage.EnterBodyFormData( @@ -216,7 +215,7 @@ describe( agHelper.ClickButton("Select Files"); agHelper.UploadFile(imageNameToUpload); assertHelper.AssertNetworkExecutionSuccess("@postExecute", false); - agHelper.ValidateToastMessage("MultipartAPI failed to execute"); + agHelper.ValidateToastMessage("CloudinaryUploadApi failed to execute"); agHelper.AssertElementVisibility(locators._buttonByText("Select Files")); //verifying if reset in case of failure! }); }, diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts index 02c7111734fe..3271e32094da 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts @@ -82,10 +82,11 @@ describe( dataSources.RunQueryNVerifyResponseViews(10); dataSources.AssertQueryTableResponse(5, "2112"); dataSources.AssertQueryTableResponse(6, "Mike's Liquors"); - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, - }); + // Commenting this deletion of query to make the generate crud work on the new page instead of the current page + // agHelper.ActionContextMenuWithInPane({ + // action: "Delete", + // entityType: entityItems.Query, + // }); }); it("3. Verify Generate CRUD for the new table & Verify Deploy mode for table - Stores", () => { @@ -361,7 +362,7 @@ describe( table.WaitUntilTableLoad(0, 0, "v2"); //Delete the test data entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Page1", + entityNameinLeftSidebar: "Stores", action: "Delete", entityType: entityItems.Page, }); diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 1fc6f605b851..2ee3b8146c09 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,7 +1,4 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ServerSide/ApiTests/API_MultiPart_Spec.ts -cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts -cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts # For running all specs - uncomment below: diff --git a/app/client/cypress/support/Objects/DataManager.ts b/app/client/cypress/support/Objects/DataManager.ts index a54e1162eb30..515b3f050327 100644 --- a/app/client/cypress/support/Objects/DataManager.ts +++ b/app/client/cypress/support/Objects/DataManager.ts @@ -80,8 +80,6 @@ export class DataManager { "http://host.docker.internal:5001/v1/mock-api-object?records=10", echoApiUrl: "http://host.docker.internal:5001/v1/mock-api/echo", randomCatfactUrl: "http://host.docker.internal:5001/v1/catfact/random", - multipartAPI: - "http://host.docker.internal:5001/v1/mock-api/echo-multipart", randomTrumpApi: "http://host.docker.internal:5001/v1/whatdoestrumpthink/random", mockHttpCodeUrl: "http://host.docker.internal:5001/v1/mock-http-codes/", @@ -181,8 +179,6 @@ export class DataManager { mockApiUrl: "http://host.docker.internal:5001/v1/mock-api?records=10", echoApiUrl: "http://host.docker.internal:5001/v1/mock-api/echo", randomCatfactUrl: "http://host.docker.internal:5001/v1/catfact/random", - multipartAPI: - "http://host.docker.internal:5001/v1/mock-api/echo-multipart", mockHttpCodeUrl: "http://host.docker.internal:5001/v1/mock-http-codes/", AirtableBaseForME: "appubHrVbovcudwN6", AirtableTableForME: "tblsFCQSskVFf7xNd", diff --git a/app/client/cypress/support/Pages/ApiPage.ts b/app/client/cypress/support/Pages/ApiPage.ts index 8804ae793dde..793a6d03c102 100644 --- a/app/client/cypress/support/Pages/ApiPage.ts +++ b/app/client/cypress/support/Pages/ApiPage.ts @@ -303,7 +303,7 @@ export class ApiPage { | "RAW", ) { this.agHelper.GetNClick(this._bodyTypeSelect); - this.agHelper.GetNClick(this._bodyTypeToSelect(subTabName)); + cy.xpath(this._bodyTypeToSelect(subTabName)).should("be.visible").click(); } AssertRightPaneSelectedTab(tabName: RightPaneTabs) { From b84cf4f1209bc43424d9122d7013f78a55a0a83e Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Fri, 6 Sep 2024 05:22:26 +0530 Subject: [PATCH 07/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts | 6 +++--- app/client/cypress/limited-tests.txt | 3 ++- app/client/cypress/support/Pages/Table.ts | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index dfa1c2c48f6e..24f8990f9a9e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -107,13 +107,13 @@ describe( //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(0, 0, "v2", 2000).then(($cellData) => { + table.ReadTableRowColumnData(-1, 0, "v2", 2000).then(($cellData) => { expect($cellData).to.eq(col1Text); }); - table.ReadTableRowColumnData(0, 3, "v2", 200).then(($cellData) => { + table.ReadTableRowColumnData(-1, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq(col2Text); }); - table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { + table.ReadTableRowColumnData(-1, 6, "v2", 200).then(($cellData) => { expect($cellData).to.eq(col3Text); }); diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 2ee3b8146c09..5c26e9ef3f54 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,6 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ServerSide/GenerateCRUD/MySQL2_Spec.ts +cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts # For running all specs - uncomment below: #cypress/e2e/**/**/* diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index c82f7e9a0548..bfde0fead552 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -58,7 +58,7 @@ export class Table { ".t--widget-tablewidget .t--table-widget-page-input input"; _tableRow = (rowNum: number, colNum: number, version: "v1" | "v2") => this._tableWidgetVersion(version) + - ` .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}]`; + ` .tbody .td${rowNum > -1 ? `[data-rowindex=${rowNum}]` : ""}[data-colindex=${colNum}]`; _editCellIconDiv = ".t--editable-cell-icon"; _editCellEditor = ".t--inlined-cell-editor"; _editCellEditorInput = this._editCellEditor + " input"; From a246fd55050e6238a69aac470abe4cb12056211f Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Fri, 6 Sep 2024 06:26:12 +0530 Subject: [PATCH 08/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts | 7 ++++--- app/client/cypress/support/Pages/Table.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index 24f8990f9a9e..a227f405aea5 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -107,13 +107,14 @@ describe( //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(-1, 0, "v2", 2000).then(($cellData) => { + table.SearchTable(col1Text); + table.ReadTableRowColumnData(0, 0, "v2", 2000).then(($cellData) => { expect($cellData).to.eq(col1Text); }); - table.ReadTableRowColumnData(-1, 3, "v2", 200).then(($cellData) => { + table.ReadTableRowColumnData(0, 3, "v2", 200).then(($cellData) => { expect($cellData).to.eq(col2Text); }); - table.ReadTableRowColumnData(-1, 6, "v2", 200).then(($cellData) => { + table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { expect($cellData).to.eq(col3Text); }); diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index bfde0fead552..c82f7e9a0548 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -58,7 +58,7 @@ export class Table { ".t--widget-tablewidget .t--table-widget-page-input input"; _tableRow = (rowNum: number, colNum: number, version: "v1" | "v2") => this._tableWidgetVersion(version) + - ` .tbody .td${rowNum > -1 ? `[data-rowindex=${rowNum}]` : ""}[data-colindex=${colNum}]`; + ` .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}]`; _editCellIconDiv = ".t--editable-cell-icon"; _editCellEditor = ".t--inlined-cell-editor"; _editCellEditorInput = this._editCellEditor + " input"; From 8538c57748914d8e094bad9d1d7c8f8fde49a236 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Sat, 7 Sep 2024 02:26:06 +0530 Subject: [PATCH 09/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/Mongo_Spec.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index a227f405aea5..ced82008a888 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -12,6 +12,7 @@ import { locators, table, } from "../../../../support/Objects/ObjectsCore"; +import EditorNavigation from "../../../../support/Pages/EditorNavigation"; import PageList from "../../../../support/Pages/PageList"; describe( @@ -40,12 +41,13 @@ describe( }); assertHelper.AssertNetworkStatus("@getDatasourceStructure"); //Making sure table dropdown is populated agHelper.GetNClick(dataSources._selectTableDropdown, 0, true); - agHelper.GetNClickByContains(dataSources._dropdownOption, "pokemon"); + agHelper.GetNClickByContains(dataSources._dropdownOption, "movies"); GenerateCRUDNValidateDeployPage( "http://www.serebii.net/pokemongo/pokemon/150.png", "150", `["Bug","Ghost","Dark"]`, 10, + `{ img: /{{data_table.searchText||""}}/i }`, ); deployMode.NavigateBacktoEditor(); @@ -95,6 +97,7 @@ describe( col2Text: string, col3Text: string, idIndex: number, + updateFindQuery?: string, ) { agHelper.GetNClick(dataSources._generatePageBtn); assertHelper.AssertNetworkStatus("@replaceLayoutWithCRUDPage", 201); @@ -103,6 +106,16 @@ describe( assertHelper.AssertNetworkStatus("@postExecute", 200); agHelper.ClickButton("Got it"); assertHelper.AssertNetworkStatus("@updateLayout", 200); + + if (updateFindQuery) { + EditorNavigation.NavigateToQuery("FindQuery"); + agHelper.UpdateCodeInput( + ".t--actionConfiguration.formData.find.query.data", + updateFindQuery, + "query", + ); + } + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); //Validating loaded table From 71361225bb4a77b279996cc71e2dac19dcb5c92e Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Sat, 7 Sep 2024 03:04:13 +0530 Subject: [PATCH 10/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index ced82008a888..fc33e5611d4c 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -41,7 +41,7 @@ describe( }); assertHelper.AssertNetworkStatus("@getDatasourceStructure"); //Making sure table dropdown is populated agHelper.GetNClick(dataSources._selectTableDropdown, 0, true); - agHelper.GetNClickByContains(dataSources._dropdownOption, "movies"); + agHelper.GetNClickByContains(dataSources._dropdownOption, "pokemon"); GenerateCRUDNValidateDeployPage( "http://www.serebii.net/pokemongo/pokemon/150.png", "150", From a83388abec7ef6e03b8012cadab753914ec863f0 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Sat, 7 Sep 2024 04:02:38 +0530 Subject: [PATCH 11/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/Mongo_Spec.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index fc33e5611d4c..8144ddeafa59 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -42,12 +42,15 @@ describe( assertHelper.AssertNetworkStatus("@getDatasourceStructure"); //Making sure table dropdown is populated agHelper.GetNClick(dataSources._selectTableDropdown, 0, true); agHelper.GetNClickByContains(dataSources._dropdownOption, "pokemon"); + + agHelper.GetNClick(dataSources._selectTableDropdown, 1, true); + agHelper.GetNClickByContains(dataSources._dropdownOption, "img"); + GenerateCRUDNValidateDeployPage( "http://www.serebii.net/pokemongo/pokemon/150.png", "150", `["Bug","Ghost","Dark"]`, 10, - `{ img: /{{data_table.searchText||""}}/i }`, ); deployMode.NavigateBacktoEditor(); @@ -97,7 +100,6 @@ describe( col2Text: string, col3Text: string, idIndex: number, - updateFindQuery?: string, ) { agHelper.GetNClick(dataSources._generatePageBtn); assertHelper.AssertNetworkStatus("@replaceLayoutWithCRUDPage", 201); @@ -107,15 +109,6 @@ describe( agHelper.ClickButton("Got it"); assertHelper.AssertNetworkStatus("@updateLayout", 200); - if (updateFindQuery) { - EditorNavigation.NavigateToQuery("FindQuery"); - agHelper.UpdateCodeInput( - ".t--actionConfiguration.formData.find.query.data", - updateFindQuery, - "query", - ); - } - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); //Validating loaded table From 2319acf4f4220182d20995db4bfe7e5969885782 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Sat, 7 Sep 2024 15:15:34 +0530 Subject: [PATCH 12/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/Mongo_Spec.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index 8144ddeafa59..aebfa238fd66 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -44,13 +44,14 @@ describe( agHelper.GetNClickByContains(dataSources._dropdownOption, "pokemon"); agHelper.GetNClick(dataSources._selectTableDropdown, 1, true); - agHelper.GetNClickByContains(dataSources._dropdownOption, "img"); + agHelper.GetNClickByContains(dataSources._dropdownOption, "pokemon"); GenerateCRUDNValidateDeployPage( "http://www.serebii.net/pokemongo/pokemon/150.png", "150", `["Bug","Ghost","Dark"]`, 10, + `{ img: /{{data_table.searchText||""}}/i }`, ); deployMode.NavigateBacktoEditor(); @@ -100,6 +101,7 @@ describe( col2Text: string, col3Text: string, idIndex: number, + updateFindQuery?: string, ) { agHelper.GetNClick(dataSources._generatePageBtn); assertHelper.AssertNetworkStatus("@replaceLayoutWithCRUDPage", 201); @@ -109,6 +111,15 @@ describe( agHelper.ClickButton("Got it"); assertHelper.AssertNetworkStatus("@updateLayout", 200); + if (updateFindQuery) { + EditorNavigation.NavigateToQuery("FindQuery"); + agHelper.UpdateCodeInput( + ".t--actionConfiguration.formData.find.query.data", + updateFindQuery, + "query", + ); + } + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); //Validating loaded table From 2bcac45135e99795e09a5aa37d6bc010e9749961 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 9 Sep 2024 11:49:47 +0530 Subject: [PATCH 13/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index aebfa238fd66..6ef046a2077a 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -114,7 +114,7 @@ describe( if (updateFindQuery) { EditorNavigation.NavigateToQuery("FindQuery"); agHelper.UpdateCodeInput( - ".t--actionConfiguration.formData.find.query.data", + ".t--actionConfiguration\\.formData\\.find\\.query\\.data", updateFindQuery, "query", ); From aece969908e9116f4fa11460763eb30c2a66f506 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 10 Sep 2024 01:04:22 +0530 Subject: [PATCH 14/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index 6ef046a2077a..e0ca8d4c5b00 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -44,7 +44,7 @@ describe( agHelper.GetNClickByContains(dataSources._dropdownOption, "pokemon"); agHelper.GetNClick(dataSources._selectTableDropdown, 1, true); - agHelper.GetNClickByContains(dataSources._dropdownOption, "pokemon"); + agHelper.GetNClickByContains(dataSources._dropdownOption, "img"); GenerateCRUDNValidateDeployPage( "http://www.serebii.net/pokemongo/pokemon/150.png", @@ -118,6 +118,7 @@ describe( updateFindQuery, "query", ); + dataSources.RunQuery(); } deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); From 6aff87d0ad65bf60054e5a4fd4c54226c80b53f5 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 10 Sep 2024 03:22:19 +0530 Subject: [PATCH 15/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/Mongo_Spec.ts | 86 ++++++++++++------- app/client/cypress/support/Pages/Table.ts | 9 ++ 2 files changed, 64 insertions(+), 31 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index e0ca8d4c5b00..d1e5083b5c76 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -51,7 +51,6 @@ describe( "150", `["Bug","Ghost","Dark"]`, 10, - `{ img: /{{data_table.searchText||""}}/i }`, ); deployMode.NavigateBacktoEditor(); @@ -101,7 +100,6 @@ describe( col2Text: string, col3Text: string, idIndex: number, - updateFindQuery?: string, ) { agHelper.GetNClick(dataSources._generatePageBtn); assertHelper.AssertNetworkStatus("@replaceLayoutWithCRUDPage", 201); @@ -111,41 +109,67 @@ describe( agHelper.ClickButton("Got it"); assertHelper.AssertNetworkStatus("@updateLayout", 200); - if (updateFindQuery) { - EditorNavigation.NavigateToQuery("FindQuery"); - agHelper.UpdateCodeInput( - ".t--actionConfiguration\\.formData\\.find\\.query\\.data", - updateFindQuery, - "query", - ); - dataSources.RunQuery(); - } - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - table.SearchTable(col1Text); - table.ReadTableRowColumnData(0, 0, "v2", 2000).then(($cellData) => { - expect($cellData).to.eq(col1Text); - }); - table.ReadTableRowColumnData(0, 3, "v2", 200).then(($cellData) => { - expect($cellData).to.eq(col2Text); - }); - table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { - expect($cellData).to.eq(col3Text); - }); - - //Validating loaded JSON form - cy.xpath(locators._buttonByText("Update")).then((selector) => { - cy.wrap(selector) - .invoke("attr", "class") - .then((classes) => { - //cy.log("classes are:" + classes); - expect(classes).not.contain("bp3-disabled"); + // @ts-ignore + findTheDataRow(col1Text).then((rowIndex: number) => { + cy.log(`This is the rowIndex of ${col1Text} : ${rowIndex}`); + table + .ReadTableRowColumnData(rowIndex, 0, "v2", 2000) + .then(($cellData) => { + expect($cellData).to.eq(col1Text); + }); + table + .ReadTableRowColumnData(rowIndex, 3, "v2", 200) + .then(($cellData) => { + expect($cellData).to.eq(col2Text); }); + table + .ReadTableRowColumnData(rowIndex, 6, "v2", 200) + .then(($cellData) => { + expect($cellData).to.eq(col3Text); + }); + + //Validating loaded JSON form + cy.xpath(locators._buttonByText("Update")).then((selector) => { + cy.wrap(selector) + .invoke("attr", "class") + .then((classes) => { + //cy.log("classes are:" + classes); + expect(classes).not.contain("bp3-disabled"); + }); + }); + dataSources.AssertJSONFormHeader(0, idIndex, "Id", "", true); }); - dataSources.AssertJSONFormHeader(0, idIndex, "Id", "", true); + } + + function findTheDataRow(col1Text: string) { + if (col1Text.length === 0) { + return cy.wrap(0); + } + + return agHelper + .GetElement(table._tableColumnDataWithText(0, col1Text, "v2")) + .closest(".tr") + .then(($p1) => { + return cy + .wrap($p1) + .parent() + .children() + .then(($children) => { + let index; + $children.each((i, el) => { + // Iterate through the children + if (Cypress.$(el).is($p1)) { + // Check if the current child is p1 + index = i; // Assign the index when found + } + }); + return index; + }); + }); } }, ); diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index c82f7e9a0548..4f5a221a0ba8 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -59,6 +59,15 @@ export class Table { _tableRow = (rowNum: number, colNum: number, version: "v1" | "v2") => this._tableWidgetVersion(version) + ` .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}]`; + _tableColumnDataWithText = ( + colNum: number, + columnText: string, + version: "v1" | "v2", + ) => + this._tableWidgetVersion(version) + + ` .tbody .td[data-colindex=${colNum}]` + + this._tableRowColumnDataVersion(version) + + `div:contains("${columnText}")`; _editCellIconDiv = ".t--editable-cell-icon"; _editCellEditor = ".t--inlined-cell-editor"; _editCellEditorInput = this._editCellEditor + " input"; From e29d3725abeb88474e814889de57a801bd174737 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 10 Sep 2024 11:12:39 +0530 Subject: [PATCH 16/50] fix: testing mongo spec fix --- app/client/cypress/support/Pages/Table.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index 4f5a221a0ba8..2f90efb052c7 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -67,7 +67,7 @@ export class Table { this._tableWidgetVersion(version) + ` .tbody .td[data-colindex=${colNum}]` + this._tableRowColumnDataVersion(version) + - `div:contains("${columnText}")`; + ` div:contains("${columnText}")`; _editCellIconDiv = ".t--editable-cell-icon"; _editCellEditor = ".t--inlined-cell-editor"; _editCellEditorInput = this._editCellEditor + " input"; From 506cec84a40f8a0653f6cd151c067b3e5836b646 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 10 Sep 2024 11:13:34 +0530 Subject: [PATCH 17/50] fix: testing mongo spec fix --- app/client/cypress/limited-tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 5c26e9ef3f54..ec7cff37b089 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,6 +1,6 @@ # To run only limited tests - give the spec names in below format: cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts -cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +#cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts # For running all specs - uncomment below: #cypress/e2e/**/**/* From 2d381f26d6e786cc4c700dc8ba9d547b5888f95f Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 10 Sep 2024 12:14:04 +0530 Subject: [PATCH 18/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts index d1e5083b5c76..94cf82fc284e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts @@ -12,7 +12,6 @@ import { locators, table, } from "../../../../support/Objects/ObjectsCore"; -import EditorNavigation from "../../../../support/Pages/EditorNavigation"; import PageList from "../../../../support/Pages/PageList"; describe( @@ -113,7 +112,7 @@ describe( //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - // @ts-ignore + findTheDataRow(col1Text).then((rowIndex: number) => { cy.log(`This is the rowIndex of ${col1Text} : ${rowIndex}`); table @@ -159,7 +158,7 @@ describe( .parent() .children() .then(($children) => { - let index; + let index = 0; $children.each((i, el) => { // Iterate through the children if (Cypress.$(el).is($p1)) { From 85eb601cc6b42854b895c7c8623b6a9fa8cb74eb Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 10 Sep 2024 15:27:13 +0530 Subject: [PATCH 19/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 14 ++++++++++++-- app/client/cypress/limited-tests.txt | 3 +-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 9eab077782bd..af49534c3d7b 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -141,8 +141,18 @@ describe( ), ); agHelper.ClickButton("Confirm"); - assertHelper.AssertNetworkStatus("@postExecute", 200); - assertHelper.AssertNetworkStatus("@postExecute", 200); + cy.wait(["@postExecute", "@postExecute"]).then((interceptions: any[]) => { + const responseStatus0 = Number( + interceptions[0].body.responseMeta.status, + ); + const responseStatus1 = Number( + interceptions[1].body.responseMeta.status, + ); + expect(responseStatus0).to.equal(200); + expect(responseStatus1).to.equal(200); + }); + // assertHelper.AssertNetworkStatus("@postExecute", 200); + // assertHelper.AssertNetworkStatus("@postExecute", 200); table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { expect($cellData).to.eq("Coffee Mug"); }); diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index ec7cff37b089..f3b9f2559d35 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,6 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ServerSide/GenerateCRUD/Mongo_Spec.ts -#cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts # For running all specs - uncomment below: #cypress/e2e/**/**/* From 272d1b907cc34d275f87da5240d7683c9921538b Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 10 Sep 2024 16:26:34 +0530 Subject: [PATCH 20/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index af49534c3d7b..762e6715b7fd 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -141,15 +141,13 @@ describe( ), ); agHelper.ClickButton("Confirm"); - cy.wait(["@postExecute", "@postExecute"]).then((interceptions: any[]) => { - const responseStatus0 = Number( - interceptions[0].body.responseMeta.status, - ); - const responseStatus1 = Number( - interceptions[1].body.responseMeta.status, - ); - expect(responseStatus0).to.equal(200); - expect(responseStatus1).to.equal(200); + cy.wait("@postExecute").then((interception: any) => { + const valueToTest = JSON.stringify(interception.response.body); + cy.log(valueToTest); + }); + cy.wait("@postExecute").then((interception: any) => { + const valueToTest = JSON.stringify(interception.response.body); + cy.log(valueToTest); }); // assertHelper.AssertNetworkStatus("@postExecute", 200); // assertHelper.AssertNetworkStatus("@postExecute", 200); From f2587be27395ed845ec016c1c6fd53e86be8cc06 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 10 Sep 2024 18:09:48 +0530 Subject: [PATCH 21/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 762e6715b7fd..ef755065994e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -56,6 +56,8 @@ describe( it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { //Update documents query to handle the int _id data + EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); + EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { propFieldName: "", @@ -142,7 +144,7 @@ describe( ); agHelper.ClickButton("Confirm"); cy.wait("@postExecute").then((interception: any) => { - const valueToTest = JSON.stringify(interception.response.body); + const valueToTest = JSON.stringify(interception); cy.log(valueToTest); }); cy.wait("@postExecute").then((interception: any) => { From 4da52dc899399c615a3754baff16f2539075ae21 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 11 Sep 2024 11:15:28 +0530 Subject: [PATCH 22/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index ef755065994e..a9e02c985829 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -57,6 +57,11 @@ describe( it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { //Update documents query to handle the int _id data EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); + agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { + propFieldName: "", + directInput: false, + inputFieldName: "Query", + }); EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { From 52703b2f8e2ef5e4bfa602a933b58c1ccdb93d17 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 11 Sep 2024 14:21:55 +0530 Subject: [PATCH 23/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index a9e02c985829..3fb765be6513 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -139,7 +139,7 @@ describe( } }); - it("4. Verify Delete from Deploy page - on MongoMart - newly added record", () => { + it("4. Verify Delete from Deploy page - on MongoMart", () => { agHelper.ClickButton("Delete", 0); agHelper.AssertElementVisibility(locators._modal); agHelper.AssertElementVisibility( @@ -148,22 +148,15 @@ describe( ), ); agHelper.ClickButton("Confirm"); - cy.wait("@postExecute").then((interception: any) => { - const valueToTest = JSON.stringify(interception); - cy.log(valueToTest); - }); - cy.wait("@postExecute").then((interception: any) => { - const valueToTest = JSON.stringify(interception.response.body); - cy.log(valueToTest); - }); - // assertHelper.AssertNetworkStatus("@postExecute", 200); - // assertHelper.AssertNetworkStatus("@postExecute", 200); - table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { - expect($cellData).to.eq("Coffee Mug"); - }); - table.ReadTableRowColumnData(1, 6, "v2", 200).then(($cellData) => { - expect($cellData).to.eq("Track Jacket"); - }); + assertHelper.AssertNetworkExecutionSuccess("@postExecute"); + assertHelper.AssertNetworkStatus("@postExecute", 200); + // This is just verifying the table data + // table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { + // expect($cellData).to.eq("Coffee Mug"); + // }); + // table.ReadTableRowColumnData(1, 6, "v2", 200).then(($cellData) => { + // expect($cellData).to.eq("Track Jacket"); + // }); }); it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => { From 3930f07ff2a32c2b7a41f8480a0ce31eabcf7ef2 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 12 Sep 2024 00:10:05 +0530 Subject: [PATCH 24/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 3fb765be6513..67d50a360e84 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -56,6 +56,7 @@ describe( it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { //Update documents query to handle the int _id data + EditorNavigation.SelectEntityByName("FindQuery", EntityType.Query); EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { propFieldName: "", @@ -132,6 +133,10 @@ describe( false, ); agHelper.ClickButton("Submit"); + cy.wait("@postExecute").then((interception: any) => { + const valueToTest = JSON.stringify(interception); + cy.log(valueToTest); + }); for (let i = 0; i <= 1; i++) { table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { expect($cellData).contains("Coffee Mug"); From 92570e764a94dad3124e893b815be47b1a119ed1 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 12 Sep 2024 00:23:49 +0530 Subject: [PATCH 25/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 67d50a360e84..e7a0ba9fc556 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -58,11 +58,11 @@ describe( //Update documents query to handle the int _id data EditorNavigation.SelectEntityByName("FindQuery", EntityType.Query); EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); - agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { - propFieldName: "", - directInput: false, - inputFieldName: "Query", - }); + // agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { + // propFieldName: "", + // directInput: false, + // inputFieldName: "Query", + // }); EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { From 1f5df781c0101d5a79f5c8f9b4ff9763b1e6c017 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 12 Sep 2024 03:07:34 +0530 Subject: [PATCH 26/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index e7a0ba9fc556..a9bd9821fb53 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -133,10 +133,6 @@ describe( false, ); agHelper.ClickButton("Submit"); - cy.wait("@postExecute").then((interception: any) => { - const valueToTest = JSON.stringify(interception); - cy.log(valueToTest); - }); for (let i = 0; i <= 1; i++) { table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { expect($cellData).contains("Coffee Mug"); @@ -145,6 +141,7 @@ describe( }); it("4. Verify Delete from Deploy page - on MongoMart", () => { + table.SelectTableRow(0, 0, true, "v2"); agHelper.ClickButton("Delete", 0); agHelper.AssertElementVisibility(locators._modal); agHelper.AssertElementVisibility( @@ -155,13 +152,6 @@ describe( agHelper.ClickButton("Confirm"); assertHelper.AssertNetworkExecutionSuccess("@postExecute"); assertHelper.AssertNetworkStatus("@postExecute", 200); - // This is just verifying the table data - // table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { - // expect($cellData).to.eq("Coffee Mug"); - // }); - // table.ReadTableRowColumnData(1, 6, "v2", 200).then(($cellData) => { - // expect($cellData).to.eq("Track Jacket"); - // }); }); it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => { From a7d22caeb06914543ab3b7282e631116758610b1 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 12 Sep 2024 03:50:36 +0530 Subject: [PATCH 27/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index a9bd9821fb53..d34298e3c0a1 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -56,13 +56,12 @@ describe( it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { //Update documents query to handle the int _id data - EditorNavigation.SelectEntityByName("FindQuery", EntityType.Query); EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); - // agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { - // propFieldName: "", - // directInput: false, - // inputFieldName: "Query", - // }); + agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { + propFieldName: "", + directInput: false, + inputFieldName: "Query", + }); EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { @@ -141,7 +140,6 @@ describe( }); it("4. Verify Delete from Deploy page - on MongoMart", () => { - table.SelectTableRow(0, 0, true, "v2"); agHelper.ClickButton("Delete", 0); agHelper.AssertElementVisibility(locators._modal); agHelper.AssertElementVisibility( From 9eb8ed087bb913fdf1072e7cf61beb8fbbb81d9f Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 12 Sep 2024 16:07:00 +0530 Subject: [PATCH 28/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index d34298e3c0a1..8a1d565c3b36 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -225,7 +225,11 @@ function GenerateCRUDNValidateDeployPage( appSettings.OpenPaneAndChangeTheme("Pacific"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - //Validating loaded table + cy.get(`${table._tableV2Head} [role="columnheader"]`).each(($el, index) => { + // Iterate over each element and index + const headerText = ($el.attr("data-header") || "").trim(); // Get the text of the header and trim whitespace + cy.log(`Column header: ${headerText}, Index: ${index}`); // Log the header text and its index + }); agHelper.AssertElementExist(dataSources._selectedRow); table.ReadTableRowColumnData(0, 1, "v2", 2000).then(($cellData) => { expect($cellData).to.eq(col1Text); From 416eeb5a2e36f552ecb9fc95026e9b95cf65246d Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 12 Sep 2024 18:07:03 +0530 Subject: [PATCH 29/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 8a1d565c3b36..09b2d231bf9f 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -225,7 +225,7 @@ function GenerateCRUDNValidateDeployPage( appSettings.OpenPaneAndChangeTheme("Pacific"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - cy.get(`${table._tableV2Head} [role="columnheader"]`).each(($el, index) => { + cy.get(`.t--widget-tablewidgetv2 .thead [role="columnheader"]`).each(($el, index) => { // Iterate over each element and index const headerText = ($el.attr("data-header") || "").trim(); // Get the text of the header and trim whitespace cy.log(`Column header: ${headerText}, Index: ${index}`); // Log the header text and its index From 619cdd95fb9e80dd9e14ee64fc2b34763e8ddad6 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 12 Sep 2024 18:38:59 +0530 Subject: [PATCH 30/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 09b2d231bf9f..830f69392c6e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -57,7 +57,7 @@ describe( it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { //Update documents query to handle the int _id data EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); - agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { + agHelper.EnterValue(`{ _id: {{data_table.p._id}}}`, { propFieldName: "", directInput: false, inputFieldName: "Query", From 3882b8ffc6435db07012a80b00454db1986bb7b3 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Thu, 12 Sep 2024 18:59:14 +0530 Subject: [PATCH 31/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 830f69392c6e..7a4e2928107d 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -56,12 +56,12 @@ describe( it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { //Update documents query to handle the int _id data - EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); - agHelper.EnterValue(`{ _id: {{data_table.p._id}}}`, { - propFieldName: "", - directInput: false, - inputFieldName: "Query", - }); + // EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); + // agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { + // propFieldName: "", + // directInput: false, + // inputFieldName: "Query", + // }); EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { From 39da7f9bd4699657dfe79e33cb7d89ab2b7a51f7 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Fri, 13 Sep 2024 00:08:11 +0530 Subject: [PATCH 32/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 7a4e2928107d..a930b14eb594 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -140,6 +140,11 @@ describe( }); it("4. Verify Delete from Deploy page - on MongoMart", () => { + cy.get(`.t--widget-tablewidgetv2 .thead [role="columnheader"]`).each(($el, index) => { + // Iterate over each element and index + const headerText = ($el.attr("data-header") || "").trim(); // Get the text of the header and trim whitespace + cy.log(`Column header: ${headerText}, Index: ${index}`); // Log the header text and its index + }); agHelper.ClickButton("Delete", 0); agHelper.AssertElementVisibility(locators._modal); agHelper.AssertElementVisibility( From 7bddaa8e046d32008964068fb7f40a9c19732f66 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Fri, 13 Sep 2024 02:44:28 +0530 Subject: [PATCH 33/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index a930b14eb594..2bae2a763a82 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -56,12 +56,12 @@ describe( it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { //Update documents query to handle the int _id data - // EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); - // agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { - // propFieldName: "", - // directInput: false, - // inputFieldName: "Query", - // }); + EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); + agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { + propFieldName: "", + directInput: false, + inputFieldName: "Query", + }); EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { From 128fffda922f250a4db309fc3cc2798664594f11 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Fri, 13 Sep 2024 03:36:34 +0530 Subject: [PATCH 34/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 2bae2a763a82..80bed49a8409 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -22,6 +22,10 @@ describe( () => { let dsName: any; + beforeEach(() => { + agHelper.CypressReload(); + }); + it("1. Create DS & Generate CRUD template", () => { dataSources.NavigateToDSCreateNew(); agHelper.GenerateUUID(); @@ -140,11 +144,6 @@ describe( }); it("4. Verify Delete from Deploy page - on MongoMart", () => { - cy.get(`.t--widget-tablewidgetv2 .thead [role="columnheader"]`).each(($el, index) => { - // Iterate over each element and index - const headerText = ($el.attr("data-header") || "").trim(); // Get the text of the header and trim whitespace - cy.log(`Column header: ${headerText}, Index: ${index}`); // Log the header text and its index - }); agHelper.ClickButton("Delete", 0); agHelper.AssertElementVisibility(locators._modal); agHelper.AssertElementVisibility( @@ -230,11 +229,6 @@ function GenerateCRUDNValidateDeployPage( appSettings.OpenPaneAndChangeTheme("Pacific"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - cy.get(`.t--widget-tablewidgetv2 .thead [role="columnheader"]`).each(($el, index) => { - // Iterate over each element and index - const headerText = ($el.attr("data-header") || "").trim(); // Get the text of the header and trim whitespace - cy.log(`Column header: ${headerText}, Index: ${index}`); // Log the header text and its index - }); agHelper.AssertElementExist(dataSources._selectedRow); table.ReadTableRowColumnData(0, 1, "v2", 2000).then(($cellData) => { expect($cellData).to.eq(col1Text); From d7ee02780d55f4c0db53eaeaaf85fc4a96adb2f1 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Sat, 14 Sep 2024 03:11:37 +0530 Subject: [PATCH 35/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 80bed49a8409..9414f5510b45 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -232,12 +232,12 @@ function GenerateCRUDNValidateDeployPage( agHelper.AssertElementExist(dataSources._selectedRow); table.ReadTableRowColumnData(0, 1, "v2", 2000).then(($cellData) => { expect($cellData).to.eq(col1Text); - }); - table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { - expect($cellData).to.eq(col6Text); - }); - table.ReadTableRowColumnData(0, 7, "v2", 200).then(($cellData) => { - expect($cellData).to.eq(col7Text); + table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { + expect($cellData).to.eq(col6Text); + table.ReadTableRowColumnData(0, 7, "v2", 200).then(($cellData) => { + expect($cellData).to.eq(col7Text); + }); + }); }); //Validating loaded JSON form From 930d858574d2d3f589a2257179f9cc7388eb7738 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Sat, 14 Sep 2024 15:19:04 +0530 Subject: [PATCH 36/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 20 +++++-------------- app/client/cypress/support/Pages/Table.ts | 14 +++++++++++++ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 9414f5510b45..39333b90d575 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -84,12 +84,8 @@ describe( table.ReadTableRowColumnData(2, 0, "v2", 200).then(($cellData) => { expect($cellData).to.be.empty; }); - table.ReadTableRowColumnData(2, 6, "v2", 2000).then(($cellData) => { - expect($cellData).to.eq("WiredTiger T-shirt"); - }); - table.ReadTableRowColumnData(2, 7, "v2", 200).then(($cellData) => { - expect($cellData).to.eq("Apparel"); - }); + table.VerifyTableRowColumnData(2, 6, "v2", "WiredTiger T-shirt", 2000); + table.VerifyTableRowColumnData(2, 7, "v2", "Apparel", 200); table.SelectTableRow(8, 0, true, "v2"); deployMode.ClearJSONFieldValue("Slogan"); @@ -230,15 +226,9 @@ function GenerateCRUDNValidateDeployPage( deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(0, 1, "v2", 2000).then(($cellData) => { - expect($cellData).to.eq(col1Text); - table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { - expect($cellData).to.eq(col6Text); - table.ReadTableRowColumnData(0, 7, "v2", 200).then(($cellData) => { - expect($cellData).to.eq(col7Text); - }); - }); - }); + table.VerifyTableRowColumnData(0, 1, "v2", col1Text, 2000); + table.VerifyTableRowColumnData(0, 6, "v2", col6Text, 200); + table.VerifyTableRowColumnData(0, 7, "v2", col7Text, 200); //Validating loaded JSON form cy.xpath(locators._buttonByText("Update")).then((selector) => { diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index 2f90efb052c7..ff32b5b7680d 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -299,6 +299,20 @@ export class Table { .invoke("text"); } + public VerifyTableRowColumnData( + rowNum: number, + colNum: number, + tableVersion: "v1" | "v2" = "v1", + text: string, + timeout = 1000, + ) { + //timeout can be sent higher values incase of larger tables + this.agHelper.Sleep(timeout); //Settling time for table! + return this.agHelper.AssertElementExist( + `${this._tableRowColumnData(rowNum, colNum, tableVersion)} div:contains("${text}")`, + ); + } + public AssertTableRowImageColumnIsLoaded( rowNum: number, colNum: number, From 6e4f4b136ea5fbbcadc9b10d99f49c8d6a3bc770 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 02:54:59 +0530 Subject: [PATCH 37/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 39333b90d575..3f3d86c6de43 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -227,6 +227,27 @@ function GenerateCRUDNValidateDeployPage( agHelper.AssertElementExist(dataSources._selectedRow); table.VerifyTableRowColumnData(0, 1, "v2", col1Text, 2000); + agHelper + .GetElement(`.tbody .td[data-colindex=6] .cell-wrapper`) + .then(($elements: any) => { + const arr: string[] = []; + $elements.each((index: any, element: any) => { + const eleText = Cypress.$(element).text().trim(); + arr.push(eleText); + }); + cy.log(JSON.stringify(arr)); + }); + + agHelper + .GetElement(`.tbody .td[data-colindex=7] .cell-wrapper`) + .then(($elements: any) => { + const arr: string[] = []; + $elements.each((index: any, element: any) => { + const eleText = Cypress.$(element).text().trim(); + arr.push(eleText); + }); + cy.log(JSON.stringify(arr)); + }); table.VerifyTableRowColumnData(0, 6, "v2", col6Text, 200); table.VerifyTableRowColumnData(0, 7, "v2", col7Text, 200); From 23384ea574c627b4a534a498bcd43614808315c7 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 12:11:25 +0530 Subject: [PATCH 38/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 32 ++----------------- app/client/cypress/support/Pages/Table.ts | 29 +++++++++++------ 2 files changed, 23 insertions(+), 38 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 3f3d86c6de43..9d4c5b19fa68 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -22,10 +22,6 @@ describe( () => { let dsName: any; - beforeEach(() => { - agHelper.CypressReload(); - }); - it("1. Create DS & Generate CRUD template", () => { dataSources.NavigateToDSCreateNew(); agHelper.GenerateUUID(); @@ -84,8 +80,8 @@ describe( table.ReadTableRowColumnData(2, 0, "v2", 200).then(($cellData) => { expect($cellData).to.be.empty; }); - table.VerifyTableRowColumnData(2, 6, "v2", "WiredTiger T-shirt", 2000); - table.VerifyTableRowColumnData(2, 7, "v2", "Apparel", 200); + + table.VerifyDataInRow(2, "v2", ["WiredTiger T-shirt", "Apparel"]); table.SelectTableRow(8, 0, true, "v2"); deployMode.ClearJSONFieldValue("Slogan"); @@ -226,30 +222,8 @@ function GenerateCRUDNValidateDeployPage( deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); agHelper.AssertElementExist(dataSources._selectedRow); - table.VerifyTableRowColumnData(0, 1, "v2", col1Text, 2000); - agHelper - .GetElement(`.tbody .td[data-colindex=6] .cell-wrapper`) - .then(($elements: any) => { - const arr: string[] = []; - $elements.each((index: any, element: any) => { - const eleText = Cypress.$(element).text().trim(); - arr.push(eleText); - }); - cy.log(JSON.stringify(arr)); - }); - agHelper - .GetElement(`.tbody .td[data-colindex=7] .cell-wrapper`) - .then(($elements: any) => { - const arr: string[] = []; - $elements.each((index: any, element: any) => { - const eleText = Cypress.$(element).text().trim(); - arr.push(eleText); - }); - cy.log(JSON.stringify(arr)); - }); - table.VerifyTableRowColumnData(0, 6, "v2", col6Text, 200); - table.VerifyTableRowColumnData(0, 7, "v2", col7Text, 200); + table.VerifyDataInRow(0, "v2", [col1Text, col6Text, col7Text]); //Validating loaded JSON form cy.xpath(locators._buttonByText("Update")).then((selector) => { diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index ff32b5b7680d..c384571b65a4 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -68,6 +68,8 @@ export class Table { ` .tbody .td[data-colindex=${colNum}]` + this._tableRowColumnDataVersion(version) + ` div:contains("${columnText}")`; + _tableRowColumns = (rowNum: number, version: "v1" | "v2") => + this._tableWidgetVersion(version) + ` .tbody .td[data-rowindex=${rowNum}]`; _editCellIconDiv = ".t--editable-cell-icon"; _editCellEditor = ".t--inlined-cell-editor"; _editCellEditorInput = this._editCellEditor + " input"; @@ -299,18 +301,27 @@ export class Table { .invoke("text"); } - public VerifyTableRowColumnData( + public VerifyDataInRow( rowNum: number, - colNum: number, tableVersion: "v1" | "v2" = "v1", - text: string, - timeout = 1000, + text: string[] | string, ) { - //timeout can be sent higher values incase of larger tables - this.agHelper.Sleep(timeout); //Settling time for table! - return this.agHelper.AssertElementExist( - `${this._tableRowColumnData(rowNum, colNum, tableVersion)} div:contains("${text}")`, - ); + this.agHelper + .GetElement(this._tableRowColumns(rowNum, tableVersion)) + .then(($elements: any) => { + const rowColumnTexts: string[] = []; + $elements.each((_: number, element: any) => { + const eleText = Cypress.$(element).text().trim(); + rowColumnTexts.push(eleText); + }); + if (typeof text === "string") { + expect(rowColumnTexts).to.include(text); + } else { + cy.wrap(text).each((textItem: string) => { + expect(rowColumnTexts).to.include(textItem); + }); + } + }); } public AssertTableRowImageColumnIsLoaded( From d221262714b6da1e71b706903a9df77012734755 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 13:13:46 +0530 Subject: [PATCH 39/50] fix: testing mongo spec fix --- app/client/cypress/support/Pages/Table.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index c384571b65a4..02ea196f9ead 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -314,6 +314,9 @@ export class Table { const eleText = Cypress.$(element).text().trim(); rowColumnTexts.push(eleText); }); + cy.log( + `Array to look into : ${JSON.stringify(rowColumnTexts)} -- ${typeof text === "string" ? text : JSON.stringify(text)}`, + ); if (typeof text === "string") { expect(rowColumnTexts).to.include(text); } else { From 06ab268a3bbd076fb2054c6b3500ba025b8bfda6 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 16:09:31 +0530 Subject: [PATCH 40/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 37 +- .../cypress/fixtures/mongouri_data_spec.json | 512 ++++++++++++++++++ 2 files changed, 547 insertions(+), 2 deletions(-) create mode 100644 app/client/cypress/fixtures/mongouri_data_spec.json diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 9d4c5b19fa68..327b9deb986d 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -15,12 +15,14 @@ import EditorNavigation, { AppSidebar, } from "../../../../support/Pages/EditorNavigation"; import PageList from "../../../../support/Pages/PageList"; +import data from "../../../../fixtures/mongouri_data_spec.json"; describe( "Validate Mongo URI CRUD with JSON Form", { tags: ["@tag.Datasource"] }, () => { let dsName: any; + let importDataCollectionName: string; it("1. Create DS & Generate CRUD template", () => { dataSources.NavigateToDSCreateNew(); @@ -32,13 +34,40 @@ describe( dataSources.FillMongoDatasourceFormWithURI(); dataSources.TestSaveDatasource(); AppSidebar.navigate(AppSidebarButton.Editor); + + importDataCollectionName = dsName + "_Import_data"; + + // Create data dump in new collection + dataSources.CreateQueryForDS(dsName, "", importDataCollectionName); + dataSources.ValidateNSelectDropdown( + "Command", + "Find document(s)", + "Raw", + ); + dataSources.EnterJSContext({ + fieldLabel: "Collection", + fieldValue: importDataCollectionName, + }); + agHelper.EnterValue(JSON.stringify(data), { + propFieldName: "", + directInput: false, + inputFieldName: "Query", + }); + + dataSources.RunQuery(); + EditorNavigation.NavigateToDatasource(dsName); + dataSources.RefreshDatasourceSchema(); + PageList.AddNewPage("Generate page with data"); agHelper.GetNClick(dataSources._selectDatasourceDropdown); agHelper.GetNClickByContains(dataSources._dropdownOption, dsName); assertHelper.AssertNetworkStatus("@getDatasourceStructure"); //Making sure table dropdown is populated agHelper.GetNClick(dataSources._selectTableDropdown, 0, true); - agHelper.GetNClickByContains(dataSources._dropdownOption, "mongomart"); + agHelper.GetNClickByContains( + dataSources._dropdownOption, + importDataCollectionName, + ); GenerateCRUDNValidateDeployPage( "/img/products/mug.jpg", "Coffee Mug", @@ -195,7 +224,11 @@ describe( table.WaitUntilTableLoad(0, 0, "v2"); PageList.AddNewPage(); dataSources.CreateQueryForDS(dsName); - dataSources.ValidateNSelectDropdown("Collection", "", "mongomart"); + dataSources.ValidateNSelectDropdown( + "Collection", + "", + importDataCollectionName, + ); dataSources.RunQuery({ toValidateResponse: false }); dataSources.AddSuggestedWidget(Widgets.Table); table.ReadTableRowColumnData(0, 3, "v2").then((cellData) => { diff --git a/app/client/cypress/fixtures/mongouri_data_spec.json b/app/client/cypress/fixtures/mongouri_data_spec.json new file mode 100644 index 000000000000..55305b4c1295 --- /dev/null +++ b/app/client/cypress/fixtures/mongouri_data_spec.json @@ -0,0 +1,512 @@ +[ + { + "_id": { + "$numberInt": "1" + }, + "title": "Gray Hooded Sweatshirt", + "slogan": "The top hooded sweatshirt we offer", + "description": "Unless you live in a nudist colony, there are moments when the chill you feel demands that you put on something warm, and for those times, there's nothing better than this sharp MongoDB hoodie. Made of 100% cotton, this machine washable, mid-weight hoodie is all you need to stay comfortable when the temperature drops. And, since being able to keep your vital stuff with you is important, the hoodie features two roomy kangaroo pockets to ensure nothing you need ever gets lost.", + "stars": { + "$numberInt": "0" + }, + "category": "Apparel", + "img_url": "/img/products/hoodie.jpg", + "price": { + "$numberDouble": "29.99" + } + }, + { + "_id": { + "$numberInt": "5" + }, + "title": "Women's T-shirt", + "slogan": "MongoDB shirt in-style", + "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", + "stars": { + "$numberInt": "0" + }, + "category": "Apparel", + "img_url": "/img/products/white-mongo.jpg", + "price": { + "$numberDouble": "45.0" + } + }, + { + "_id": { + "$numberInt": "3" + }, + "title": "Stress Ball", + "slogan": "Squeeze your stress away", + "description": "The moment life piles more onto your already heaping plate and you start feeling hopelessly overwhelmed, take a stress ball in hand and squeeze as hard as you can. Take a deep breath and just let that tension go. Repeat as needed. It will all be OK! Having something small, portable and close at hand is a must for stress management.", + "stars": { + "$numberInt": "0" + }, + "category": "Swag", + "img_url": "/img/products/stress-ball.jpg", + "price": { + "$numberDouble": "5.0" + } + }, + { + "_id": { + "$numberInt": "6" + }, + "title": "Brown Carry-all Bag", + "slogan": "Keep extra items here", + "description": "Let your style speak for itself with this chic brown carry-all bag. Featuring a nylon exterior with solid contrast trim, brown in color, and MongoDB logo", + "stars": { + "$numberInt": "0" + }, + "category": "Swag", + "img_url": "/img/products/brown-bag.jpg", + "price": { + "$numberDouble": "5.0" + } + }, + { + "_id": { + "$numberInt": "7" + }, + "title": "Brown Tumbler", + "slogan": "Bring your coffee to go", + "description": "The MongoDB Insulated Travel Tumbler is smartly designed to maintain temperatures and go anywhere. Dual wall construction will keep your beverages hot or cold for hours and a slide lock lid helps minimize spills.", + "stars": { + "$numberInt": "0" + }, + "category": "Kitchen", + "img_url": "/img/products/brown-tumbler.jpg", + "price": { + "$numberDouble": "9.0" + } + }, + { + "_id": { + "$numberInt": "8" + }, + "title": "Pen (Green)", + "slogan": "The only pen you'll ever need", + "description": "Erase and rewrite repeatedly without damaging documents. The needlepoint tip creates clear precise lines and the thermo-sensitive gel ink formula disappears with erasing friction.", + "stars": { + "$numberInt": "0" + }, + "category": "Office", + "img_url": "/img/products/green-pen.jpg", + "price": { + "$numberDouble": "2.0" + } + }, + { + "_id": { + "$numberInt": "10" + }, + "title": "Green T-shirt", + "slogan": "MongoDB community shirt", + "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", + "stars": { + "$numberInt": "0" + }, + "category": "Apparel", + "img_url": "/img/products/green-tshirt.jpg", + "price": { + "$numberDouble": "20.0" + } + }, + { + "_id": { + "$numberInt": "11" + }, + "title": "MongoDB The Definitive Guide", + "slogan": "2nd Edition", + "description": "Manage the huMONGOus amount of data collected through your web application with MongoDB. This authoritative introduction—written by a core contributor to the project—shows you the many advantages of using document-oriented databases, and demonstrates how this reliable, high-performance system allows for almost infinite horizontal scalability.", + "stars": { + "$numberInt": "0" + }, + "category": "Books", + "img_url": "/img/products/guide-book.jpg", + "price": { + "$numberDouble": "20.0" + } + }, + { + "_id": { + "$numberInt": "2" + }, + "title": "Coffee Mug", + "slogan": "Keep your coffee hot!", + "description": "A mug is a type of cup used for drinking hot beverages, such as coffee, tea, hot chocolate or soup. Mugs usually have handles, and hold a larger amount of fluid than other types of cup. Usually a mug holds approximately 12 US fluid ounces (350 ml) of liquid; double a tea cup. A mug is a less formal style of drink container and is not usually used in formal place settings, where a teacup or coffee cup is preferred.", + "stars": { + "$numberInt": "0" + }, + "category": "Kitchen", + "img_url": "/img/products/mug.jpg", + "price": { + "$numberDouble": "12.5" + }, + "reviews": [ + { + "name": "", + "comment": "", + "stars": { + "$numberInt": "5" + }, + "date": { + "$numberDouble": "1.456067725049E+12" + } + }, + { + "name": "", + "comment": "When I drank coffee from this mug the coffee seemed somehow unstructured, as if the molecules weren't following a specific chemical structure. When I drink coffee from my Oracle mug it tastes like all the caffeine has the same atomic formula. Plus the leaf makes it taste funny. ", + "stars": { + "$numberInt": "1" + }, + "date": { + "$numberDouble": "1.471519691157E+12" + } + }, + { + "name": "", + "comment": "Much better than a datastax mug!!!!! And all my hipster web developer friends now think I'm terribly cool ", + "stars": { + "$numberInt": "5" + }, + "date": { + "$numberDouble": "1.471519744173E+12" + } + } + ] + }, + { + "_id": { + "$numberInt": "12" + }, + "title": "Leaf Sticker", + "slogan": "Add to your sticker collection", + "description": "Waterproof vinyl, will last 18 months outdoors. Ideal for smooth flat surfaces like laptops, journals, windows etc. Easy to remove. 50% discounts on all orders of any 6+", + "stars": { + "$numberInt": "0" + }, + "category": "Stickers", + "img_url": "/img/products/leaf-sticker.jpg", + "price": { + "$numberDouble": "1.0" + }, + "reviews": [ + { + "name": "r1", + "comment": "My First Review", + "stars": { + "$numberInt": "5" + }, + "date": { + "$numberDouble": "1.468800807077E+12" + } + }, + { + "name": "r 2", + "comment": "My Second review", + "stars": { + "$numberInt": "2" + }, + "date": { + "$numberDouble": "1.468800824493E+12" + } + } + ] + }, + { + "_id": { + "$numberInt": "4" + }, + "title": "Track Jacket", + "slogan": "Go to the track in style!", + "description": "Crafted from ultra-soft combed cotton, this essential jacket features sporty contrast tipping and MongoDB's signature embroidered leaf.", + "stars": { + "$numberInt": "0" + }, + "category": "Apparel", + "img_url": "/img/products/track-jacket.jpg", + "price": { + "$numberDouble": "45.0" + }, + "reviews": [ + { + "name": "Shannon", + "comment": "This is so warm and comfortable.", + "stars": { + "$numberInt": "2" + }, + "date": { + "$numberDouble": "1.455800194995E+12" + } + }, + { + "name": "Bob", + "comment": "Love this.", + "stars": { + "$numberInt": "5" + }, + "date": { + "$numberDouble": "1.455804800769E+12" + } + }, + { + "name": "Jorge", + "comment": "Brown. It's brown.", + "stars": { + "$numberInt": "4" + }, + "date": { + "$numberDouble": "1.455804825509E+12" + } + }, + { + "name": "Guy", + "comment": "My five star review", + "stars": { + "$numberInt": "5" + }, + "date": { + "$numberDouble": "1.46880086461E+12" + } + } + ] + }, + { + "_id": { + "$numberInt": "14" + }, + "title": "USB Stick (Leaf)", + "slogan": "1GB of space", + "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", + "stars": { + "$numberInt": "0" + }, + "category": "Electronics", + "img_url": "/img/products/leaf-usb.jpg", + "price": { + "$numberDouble": "20.0" + } + }, + { + "_id": { + "$numberInt": "16" + }, + "title": "Powered by MongoDB Sticker", + "slogan": "Add to your sticker collection", + "description": "Waterproof vinyl, will last 18 months outdoors. Ideal for smooth flat surfaces like laptops, journals, windows etc. Easy to remove. 50% discounts on all orders of any 6+", + "stars": { + "$numberInt": "0" + }, + "category": "Stickers", + "img_url": "/img/products/sticker.jpg", + "price": { + "$numberDouble": "1.0" + } + }, + { + "_id": { + "$numberInt": "15" + }, + "title": "Scaling MongoDB", + "slogan": "2nd Edition", + "description": "Create a MongoDB cluster that will grow to meet the needs of your application. With this short and concise book, you'll get guidelines for setting up and using clusters to store a large volume of data, and learn how to access the data efficiently. In the process, you'll understand how to make your application work with a distributed database system.", + "stars": { + "$numberInt": "0" + }, + "category": "Books", + "img_url": "/img/products/scaling-book.jpg", + "price": { + "$numberDouble": "29.0" + }, + "reviews": [ + { + "name": "Horatio", + "comment": "This is a pretty good book", + "stars": { + "$numberInt": "4" + }, + "date": { + "$numberDouble": "1.456086633854E+12" + } + } + ] + }, + { + "_id": { + "$numberInt": "9" + }, + "title": "Pen (Black)", + "slogan": "The only pen you'll ever need", + "description": "Erase and rewrite repeatedly without damaging documents. The needlepoint tip creates clear precise lines and the thermo-sensitive gel ink formula disappears with erasing friction.", + "stars": { + "$numberInt": "0" + }, + "category": "Office", + "img_url": "/img/products/pen.jpg", + "price": { + "$numberDouble": "2.0" + } + }, + { + "_id": { + "$numberInt": "18" + }, + "title": "MongoDB Umbrella (Gray)", + "slogan": "Premium Umbrella", + "description": "Our crook handle stick umbrella opens automatically with the push of a button. A traditional umbrella with classic appeal.", + "stars": { + "$numberInt": "0" + }, + "category": "Umbrellas", + "img_url": "/img/products/umbrella.jpg", + "price": { + "$numberDouble": "21.0" + } + }, + { + "_id": { + "$numberInt": "20" + }, + "title": "MongoDB University T-shirt", + "slogan": "Show Your MDBU Alumni Status", + "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", + "stars": { + "$numberInt": "0" + }, + "category": "Apparel", + "img_url": "/img/products/univ-tshirt.jpg", + "price": { + "$numberDouble": "45.0" + } + }, + { + "_id": { + "$numberInt": "21" + }, + "title": "USB Stick", + "slogan": "5GB of space", + "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", + "stars": { + "$numberInt": "0" + }, + "category": "Electronics", + "img_url": "/img/products/leaf-usb.jpg", + "price": { + "$numberDouble": "40.0" + } + }, + { + "_id": { + "$numberInt": "22" + }, + "title": "Water Bottle", + "slogan": "Glass water bottle", + "description": "High quality glass bottle provides a healthier way to drink. Silicone sleeve provides a good grip, a see-through window, and protects the glass vessel. Eliminates toxic leaching that plastic can cause. Innovative design holds 22-1/2 ounces. Dishwasher safe", + "stars": { + "$numberInt": "0" + }, + "category": "Kitchen", + "img_url": "/img/products/water-bottle.jpg", + "price": { + "$numberDouble": "23.0" + } + }, + { + "_id": { + "$numberInt": "17" + }, + "title": "MongoDB Umbrella (Brown)", + "slogan": "Premium Umbrella", + "description": "Our crook handle stick umbrella opens automatically with the push of a button. A traditional umbrella with classic appeal.", + "stars": { + "$numberInt": "0" + }, + "category": "Umbrellas", + "img_url": "/img/products/umbrella-brown.jpg", + "price": { + "$numberDouble": "21.0" + }, + "reviews": [ + { + "name": "Donald Trump", + "comment": "This is the best umbrella you will ever use.", + "stars": { + "$numberInt": "5" + }, + "date": { + "$numberDouble": "1.456270097364E+12" + } + }, + { + "name": "Shannon", + "comment": "Sturdy construction, but a little too big to fit in my bag for work.", + "stars": { + "$numberInt": "3" + }, + "date": { + "$numberDouble": "1.456270240382E+12" + } + } + ] + }, + { + "_id": { + "$numberInt": "19" + }, + "title": "MongoDB University Book", + "slogan": "A concise summary of MongoDB commands", + "description": "Keep the MongoDB commands you'll need at your fingertips with this concise book.", + "stars": { + "$numberInt": "0" + }, + "category": "Books", + "img_url": "/img/products/univ-book.jpg", + "price": { + "$numberDouble": "4.0" + } + }, + { + "_id": { + "$numberInt": "23" + }, + "title": "WiredTiger T-shirt", + "slogan": "Unleash the tiger", + "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", + "stars": { + "$numberInt": "0" + }, + "category": "Apparel", + "img_url": "/img/products/wt-shirt.jpg", + "price": { + "$numberDouble": "22.0" + } + }, + { + "_id": { + "$numberInt": "13" + }, + "title": "USB Stick (Green)", + "slogan": "1GB of space", + "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", + "stars": { + "$numberInt": "0" + }, + "category": "Electronics", + "img_url": "/img/products/greenusb.jpg", + "price": { + "$numberDouble": "20.0" + }, + "reviews": [ + { + "name": "Ringo", + "comment": "He's very green.", + "stars": { + "$numberInt": "4" + }, + "date": { + "$numberDouble": "1.45580490225E+12" + } + } + ] + } +] \ No newline at end of file From dfbdbde58b851013681c5b91e1b6c237b96c7809 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 16:31:24 +0530 Subject: [PATCH 41/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 278 +++++++++--------- 1 file changed, 139 insertions(+), 139 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 327b9deb986d..5c845eec9e78 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -42,7 +42,7 @@ describe( dataSources.ValidateNSelectDropdown( "Command", "Find document(s)", - "Raw", + "Insert document(s)", ); dataSources.EnterJSContext({ fieldLabel: "Collection", @@ -83,158 +83,158 @@ describe( }); }); - it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { - //Update documents query to handle the int _id data - EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); - agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { - propFieldName: "", - directInput: false, - inputFieldName: "Query", - }); + // it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { + // //Update documents query to handle the int _id data + // EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); + // agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { + // propFieldName: "", + // directInput: false, + // inputFieldName: "Query", + // }); - EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); - agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { - propFieldName: "", - directInput: false, - inputFieldName: "Query", - }); - deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - agHelper.GetNAssertElementText( - locators._textWidgetInDeployed, - "mongomart Data", - ); - //Validating loaded table - table.SelectTableRow(2, 0, true, "v2"); - agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(2, 0, "v2", 200).then(($cellData) => { - expect($cellData).to.be.empty; - }); + // EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); + // agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { + // propFieldName: "", + // directInput: false, + // inputFieldName: "Query", + // }); + // deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); + // agHelper.GetNAssertElementText( + // locators._textWidgetInDeployed, + // "mongomart Data", + // ); + // //Validating loaded table + // table.SelectTableRow(2, 0, true, "v2"); + // agHelper.AssertElementExist(dataSources._selectedRow); + // table.ReadTableRowColumnData(2, 0, "v2", 200).then(($cellData) => { + // expect($cellData).to.be.empty; + // }); - table.VerifyDataInRow(2, "v2", ["WiredTiger T-shirt", "Apparel"]); + // table.VerifyDataInRow(2, "v2", ["WiredTiger T-shirt", "Apparel"]); - table.SelectTableRow(8, 0, true, "v2"); - deployMode.ClearJSONFieldValue("Slogan"); - deployMode.ClearJSONFieldValue("Category"); + // table.SelectTableRow(8, 0, true, "v2"); + // deployMode.ClearJSONFieldValue("Slogan"); + // deployMode.ClearJSONFieldValue("Category"); - agHelper.ClickButton("Update"); - agHelper.AssertElementAbsence(locators._toastMsg); //Validating fix for Bug 14063 - for (let i = 7; i <= 8; i++) { - table.ReadTableRowColumnData(8, i, "v2").then(($cellData) => { - expect($cellData).to.be.empty; - }); - } - deployMode.EnterJSONInputValue( - "Slogan", - "Write Your Story with Elegance: The Pen of Choice!", - ); - agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //1 - agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //2 - agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //3 + // agHelper.ClickButton("Update"); + // agHelper.AssertElementAbsence(locators._toastMsg); //Validating fix for Bug 14063 + // for (let i = 7; i <= 8; i++) { + // table.ReadTableRowColumnData(8, i, "v2").then(($cellData) => { + // expect($cellData).to.be.empty; + // }); + // } + // deployMode.EnterJSONInputValue( + // "Slogan", + // "Write Your Story with Elegance: The Pen of Choice!", + // ); + // agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //1 + // agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //2 + // agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //3 - agHelper.ClickButton("Update"); - agHelper.AssertElementAbsence(locators._toastMsg); //Validating fix for Bug 14063 - table.ReadTableRowColumnData(8, 8, "v2", 2000).then(($cellData) => { - expect($cellData).to.eq( - "Write Your Story with Elegance: The Pen of Choice!", - ); - }); - table.ReadTableRowColumnData(8, 5, "v2", 200).then(($cellData) => { - expect($cellData).to.eq("3"); - }); - }); + // agHelper.ClickButton("Update"); + // agHelper.AssertElementAbsence(locators._toastMsg); //Validating fix for Bug 14063 + // table.ReadTableRowColumnData(8, 8, "v2", 2000).then(($cellData) => { + // expect($cellData).to.eq( + // "Write Your Story with Elegance: The Pen of Choice!", + // ); + // }); + // table.ReadTableRowColumnData(8, 5, "v2", 200).then(($cellData) => { + // expect($cellData).to.eq("3"); + // }); + // }); - it("3. Verify Add/Insert from Deploy page - on MongoMart - new record - few validations", () => { - agHelper.GetNClick(dataSources._addIcon); - agHelper.Sleep(); - //agHelper.AssertElementVisibility(locators._jsonFormWidget, 1); //Insert Modal - agHelper.AssertElementVisibility( - locators._visibleTextDiv("Insert Document"), - ); + // it("3. Verify Add/Insert from Deploy page - on MongoMart - new record - few validations", () => { + // agHelper.GetNClick(dataSources._addIcon); + // agHelper.Sleep(); + // //agHelper.AssertElementVisibility(locators._jsonFormWidget, 1); //Insert Modal + // agHelper.AssertElementVisibility( + // locators._visibleTextDiv("Insert Document"), + // ); - agHelper.AssertElementEnabledDisabled( - locators._buttonByText("Submit") + "/parent::div", - 0, - false, - ); - agHelper.ClickButton("Submit"); - for (let i = 0; i <= 1; i++) { - table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { - expect($cellData).contains("Coffee Mug"); - }); - } - }); + // agHelper.AssertElementEnabledDisabled( + // locators._buttonByText("Submit") + "/parent::div", + // 0, + // false, + // ); + // agHelper.ClickButton("Submit"); + // for (let i = 0; i <= 1; i++) { + // table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { + // expect($cellData).contains("Coffee Mug"); + // }); + // } + // }); - it("4. Verify Delete from Deploy page - on MongoMart", () => { - agHelper.ClickButton("Delete", 0); - agHelper.AssertElementVisibility(locators._modal); - agHelper.AssertElementVisibility( - dataSources._visibleTextSpan( - "Are you sure you want to delete this document?", - ), - ); - agHelper.ClickButton("Confirm"); - assertHelper.AssertNetworkExecutionSuccess("@postExecute"); - assertHelper.AssertNetworkStatus("@postExecute", 200); - }); + // it("4. Verify Delete from Deploy page - on MongoMart", () => { + // agHelper.ClickButton("Delete", 0); + // agHelper.AssertElementVisibility(locators._modal); + // agHelper.AssertElementVisibility( + // dataSources._visibleTextSpan( + // "Are you sure you want to delete this document?", + // ), + // ); + // agHelper.ClickButton("Confirm"); + // assertHelper.AssertNetworkExecutionSuccess("@postExecute"); + // assertHelper.AssertNetworkStatus("@postExecute", 200); + // }); - it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => { - table.SearchTable("Swag"); - agHelper.Sleep(2500); //for search to load - for (let i = 0; i <= 1; i++) { - table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { - expect($cellData).to.eq("Swag"); - }); - } - table.ResetSearch(); + // it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => { + // table.SearchTable("Swag"); + // agHelper.Sleep(2500); //for search to load + // for (let i = 0; i <= 1; i++) { + // table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { + // expect($cellData).to.eq("Swag"); + // }); + // } + // table.ResetSearch(); - table.OpenNFilterTable("title", "contains", "USB"); - for (let i = 0; i < 3; i++) { - table.ReadTableRowColumnData(i, 5, "v2").then(($cellData) => { - expect($cellData).contains("USB"); - }); - } - table.CloseFilter(); + // table.OpenNFilterTable("title", "contains", "USB"); + // for (let i = 0; i < 3; i++) { + // table.ReadTableRowColumnData(i, 5, "v2").then(($cellData) => { + // expect($cellData).contains("USB"); + // }); + // } + // table.CloseFilter(); - table.DownloadFromTable("Download as CSV"); - table.ValidateDownloadNVerify("data_table.csv", "USB Stick (Green)"); + // table.DownloadFromTable("Download as CSV"); + // table.ValidateDownloadNVerify("data_table.csv", "USB Stick (Green)"); - table.DownloadFromTable("Download as Excel"); - table.ValidateDownloadNVerify("data_table.xlsx", "USB Stick (Leaf)"); - table.OpenFilter(); - table.RemoveFilter(); - agHelper - .GetText(table._filtersCount) - .then(($filters) => expect($filters).to.eq("Filters")); - }); + // table.DownloadFromTable("Download as Excel"); + // table.ValidateDownloadNVerify("data_table.xlsx", "USB Stick (Leaf)"); + // table.OpenFilter(); + // table.RemoveFilter(); + // agHelper + // .GetText(table._filtersCount) + // .then(($filters) => expect($filters).to.eq("Filters")); + // }); - it("6. Suggested Widget - Table", () => { - table.SelectTableRow(8, 0, true, "v2"); - agHelper.GetNClick( - deployMode._jsonFormNumberFieldByName("Stars", "down"), - ); //2 - agHelper.GetNClick( - deployMode._jsonFormNumberFieldByName("Stars", "down"), - ); //1 - agHelper.GetNClick( - deployMode._jsonFormNumberFieldByName("Stars", "down"), - ); //0 - agHelper.ClickButton("Update"); + // it("6. Suggested Widget - Table", () => { + // table.SelectTableRow(8, 0, true, "v2"); + // agHelper.GetNClick( + // deployMode._jsonFormNumberFieldByName("Stars", "down"), + // ); //2 + // agHelper.GetNClick( + // deployMode._jsonFormNumberFieldByName("Stars", "down"), + // ); //1 + // agHelper.GetNClick( + // deployMode._jsonFormNumberFieldByName("Stars", "down"), + // ); //0 + // agHelper.ClickButton("Update"); - deployMode.NavigateBacktoEditor(); - table.WaitUntilTableLoad(0, 0, "v2"); - PageList.AddNewPage(); - dataSources.CreateQueryForDS(dsName); - dataSources.ValidateNSelectDropdown( - "Collection", - "", - importDataCollectionName, - ); - dataSources.RunQuery({ toValidateResponse: false }); - dataSources.AddSuggestedWidget(Widgets.Table); - table.ReadTableRowColumnData(0, 3, "v2").then((cellData) => { - expect(cellData).to.eq("1"); - }); - }); + // deployMode.NavigateBacktoEditor(); + // table.WaitUntilTableLoad(0, 0, "v2"); + // PageList.AddNewPage(); + // dataSources.CreateQueryForDS(dsName); + // dataSources.ValidateNSelectDropdown( + // "Collection", + // "", + // importDataCollectionName, + // ); + // dataSources.RunQuery({ toValidateResponse: false }); + // dataSources.AddSuggestedWidget(Widgets.Table); + // table.ReadTableRowColumnData(0, 3, "v2").then((cellData) => { + // expect(cellData).to.eq("1"); + // }); + // }); }, ); From 16a69392f1291d2197f878008e5dec6b8e1f5774 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 17:24:51 +0530 Subject: [PATCH 42/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 5c845eec9e78..5d47bb435f5e 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -51,7 +51,7 @@ describe( agHelper.EnterValue(JSON.stringify(data), { propFieldName: "", directInput: false, - inputFieldName: "Query", + inputFieldName: "Documents", }); dataSources.RunQuery(); From 78d178510060aec0fd515bc91547ffe7fe34bd99 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 18:02:13 +0530 Subject: [PATCH 43/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 5d47bb435f5e..0aa1296930a0 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -55,8 +55,6 @@ describe( }); dataSources.RunQuery(); - EditorNavigation.NavigateToDatasource(dsName); - dataSources.RefreshDatasourceSchema(); PageList.AddNewPage("Generate page with data"); agHelper.GetNClick(dataSources._selectDatasourceDropdown); From 4370ab7b26efdb5f3c820a16614346ee46fbcc5a Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 18:47:05 +0530 Subject: [PATCH 44/50] fix: testing mongo spec fix --- .../ServerSide/GenerateCRUD/MongoURI_Spec.ts | 292 +++++++++--------- 1 file changed, 152 insertions(+), 140 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 0aa1296930a0..371b8d094a89 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -81,158 +81,162 @@ describe( }); }); - // it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { - // //Update documents query to handle the int _id data - // EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); - // agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { - // propFieldName: "", - // directInput: false, - // inputFieldName: "Query", - // }); - - // EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); - // agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { - // propFieldName: "", - // directInput: false, - // inputFieldName: "Query", - // }); - // deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - // agHelper.GetNAssertElementText( - // locators._textWidgetInDeployed, - // "mongomart Data", - // ); - // //Validating loaded table - // table.SelectTableRow(2, 0, true, "v2"); - // agHelper.AssertElementExist(dataSources._selectedRow); - // table.ReadTableRowColumnData(2, 0, "v2", 200).then(($cellData) => { - // expect($cellData).to.be.empty; - // }); + it("2. Verify Update data from Deploy page - on mongomart - existing record", () => { + //Update documents query to handle the int _id data + EditorNavigation.SelectEntityByName("DeleteQuery", EntityType.Query); + agHelper.EnterValue(`{ _id: {{data_table.triggeredRow._id}}}`, { + propFieldName: "", + directInput: false, + inputFieldName: "Query", + }); - // table.VerifyDataInRow(2, "v2", ["WiredTiger T-shirt", "Apparel"]); + EditorNavigation.SelectEntityByName("UpdateQuery", EntityType.Query); + agHelper.EnterValue(`{ _id: {{data_table.selectedRow._id}}}`, { + propFieldName: "", + directInput: false, + inputFieldName: "Query", + }); + deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); + agHelper.GetNAssertElementText( + locators._textWidgetInDeployed, + "mongomart Data", + ); + //Validating loaded table + table.SelectTableRow(2, 0, true, "v2"); + agHelper.AssertElementExist(dataSources._selectedRow); + table.ReadTableRowColumnData(2, 0, "v2", 200).then(($cellData) => { + expect($cellData).to.be.empty; + }); + table.ReadTableRowColumnData(2, 6, "v2", 2000).then(($cellData) => { + expect($cellData).to.eq("WiredTiger T-shirt"); + }); + table.ReadTableRowColumnData(2, 7, "v2", 200).then(($cellData) => { + expect($cellData).to.eq("Apparel"); + }); - // table.SelectTableRow(8, 0, true, "v2"); - // deployMode.ClearJSONFieldValue("Slogan"); - // deployMode.ClearJSONFieldValue("Category"); + table.SelectTableRow(8, 0, true, "v2"); + deployMode.ClearJSONFieldValue("Slogan"); + deployMode.ClearJSONFieldValue("Category"); - // agHelper.ClickButton("Update"); - // agHelper.AssertElementAbsence(locators._toastMsg); //Validating fix for Bug 14063 - // for (let i = 7; i <= 8; i++) { - // table.ReadTableRowColumnData(8, i, "v2").then(($cellData) => { - // expect($cellData).to.be.empty; - // }); - // } - // deployMode.EnterJSONInputValue( - // "Slogan", - // "Write Your Story with Elegance: The Pen of Choice!", - // ); - // agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //1 - // agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //2 - // agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //3 + agHelper.ClickButton("Update"); + agHelper.AssertElementAbsence(locators._toastMsg); //Validating fix for Bug 14063 + for (let i = 7; i <= 8; i++) { + table.ReadTableRowColumnData(8, i, "v2").then(($cellData) => { + expect($cellData).to.be.empty; + }); + } + deployMode.EnterJSONInputValue( + "Slogan", + "Write Your Story with Elegance: The Pen of Choice!", + ); + agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //1 + agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //2 + agHelper.GetNClick(deployMode._jsonFormNumberFieldByName("Stars", "up")); //3 - // agHelper.ClickButton("Update"); - // agHelper.AssertElementAbsence(locators._toastMsg); //Validating fix for Bug 14063 - // table.ReadTableRowColumnData(8, 8, "v2", 2000).then(($cellData) => { - // expect($cellData).to.eq( - // "Write Your Story with Elegance: The Pen of Choice!", - // ); - // }); - // table.ReadTableRowColumnData(8, 5, "v2", 200).then(($cellData) => { - // expect($cellData).to.eq("3"); - // }); - // }); + agHelper.ClickButton("Update"); + agHelper.AssertElementAbsence(locators._toastMsg); //Validating fix for Bug 14063 + table.ReadTableRowColumnData(8, 8, "v2", 2000).then(($cellData) => { + expect($cellData).to.eq( + "Write Your Story with Elegance: The Pen of Choice!", + ); + }); + table.ReadTableRowColumnData(8, 5, "v2", 200).then(($cellData) => { + expect($cellData).to.eq("3"); + }); + }); - // it("3. Verify Add/Insert from Deploy page - on MongoMart - new record - few validations", () => { - // agHelper.GetNClick(dataSources._addIcon); - // agHelper.Sleep(); - // //agHelper.AssertElementVisibility(locators._jsonFormWidget, 1); //Insert Modal - // agHelper.AssertElementVisibility( - // locators._visibleTextDiv("Insert Document"), - // ); + it("3. Verify Add/Insert from Deploy page - on MongoMart - new record - few validations", () => { + agHelper.GetNClick(dataSources._addIcon); + agHelper.Sleep(); + //agHelper.AssertElementVisibility(locators._jsonFormWidget, 1); //Insert Modal + agHelper.AssertElementVisibility( + locators._visibleTextDiv("Insert Document"), + ); - // agHelper.AssertElementEnabledDisabled( - // locators._buttonByText("Submit") + "/parent::div", - // 0, - // false, - // ); - // agHelper.ClickButton("Submit"); - // for (let i = 0; i <= 1; i++) { - // table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { - // expect($cellData).contains("Coffee Mug"); - // }); - // } - // }); + agHelper.AssertElementEnabledDisabled( + locators._buttonByText("Submit") + "/parent::div", + 0, + false, + ); + agHelper.ClickButton("Submit"); + for (let i = 0; i <= 1; i++) { + table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { + expect($cellData).contains("Coffee Mug"); + }); + } + }); - // it("4. Verify Delete from Deploy page - on MongoMart", () => { - // agHelper.ClickButton("Delete", 0); - // agHelper.AssertElementVisibility(locators._modal); - // agHelper.AssertElementVisibility( - // dataSources._visibleTextSpan( - // "Are you sure you want to delete this document?", - // ), - // ); - // agHelper.ClickButton("Confirm"); - // assertHelper.AssertNetworkExecutionSuccess("@postExecute"); - // assertHelper.AssertNetworkStatus("@postExecute", 200); - // }); + it("4. Verify Delete from Deploy page - on MongoMart", () => { + agHelper.ClickButton("Delete", 0); + agHelper.AssertElementVisibility(locators._modal); + agHelper.AssertElementVisibility( + dataSources._visibleTextSpan( + "Are you sure you want to delete this document?", + ), + ); + agHelper.ClickButton("Confirm"); + assertHelper.AssertNetworkExecutionSuccess("@postExecute"); + assertHelper.AssertNetworkStatus("@postExecute", 200); + }); - // it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => { - // table.SearchTable("Swag"); - // agHelper.Sleep(2500); //for search to load - // for (let i = 0; i <= 1; i++) { - // table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { - // expect($cellData).to.eq("Swag"); - // }); - // } - // table.ResetSearch(); + it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => { + table.SearchTable("Swag"); + agHelper.Sleep(2500); //for search to load + for (let i = 0; i <= 1; i++) { + table.ReadTableRowColumnData(i, 6, "v2").then(($cellData) => { + expect($cellData).to.eq("Swag"); + }); + } + table.ResetSearch(); - // table.OpenNFilterTable("title", "contains", "USB"); - // for (let i = 0; i < 3; i++) { - // table.ReadTableRowColumnData(i, 5, "v2").then(($cellData) => { - // expect($cellData).contains("USB"); - // }); - // } - // table.CloseFilter(); + table.OpenNFilterTable("title", "contains", "USB"); + for (let i = 0; i < 3; i++) { + table.ReadTableRowColumnData(i, 5, "v2").then(($cellData) => { + expect($cellData).contains("USB"); + }); + } + table.CloseFilter(); - // table.DownloadFromTable("Download as CSV"); - // table.ValidateDownloadNVerify("data_table.csv", "USB Stick (Green)"); + table.DownloadFromTable("Download as CSV"); + table.ValidateDownloadNVerify("data_table.csv", "USB Stick (Green)"); - // table.DownloadFromTable("Download as Excel"); - // table.ValidateDownloadNVerify("data_table.xlsx", "USB Stick (Leaf)"); - // table.OpenFilter(); - // table.RemoveFilter(); - // agHelper - // .GetText(table._filtersCount) - // .then(($filters) => expect($filters).to.eq("Filters")); - // }); + table.DownloadFromTable("Download as Excel"); + table.ValidateDownloadNVerify("data_table.xlsx", "USB Stick (Leaf)"); + table.OpenFilter(); + table.RemoveFilter(); + agHelper + .GetText(table._filtersCount) + .then(($filters) => expect($filters).to.eq("Filters")); + }); - // it("6. Suggested Widget - Table", () => { - // table.SelectTableRow(8, 0, true, "v2"); - // agHelper.GetNClick( - // deployMode._jsonFormNumberFieldByName("Stars", "down"), - // ); //2 - // agHelper.GetNClick( - // deployMode._jsonFormNumberFieldByName("Stars", "down"), - // ); //1 - // agHelper.GetNClick( - // deployMode._jsonFormNumberFieldByName("Stars", "down"), - // ); //0 - // agHelper.ClickButton("Update"); + it("6. Suggested Widget - Table", () => { + table.SelectTableRow(8, 0, true, "v2"); + agHelper.GetNClick( + deployMode._jsonFormNumberFieldByName("Stars", "down"), + ); //2 + agHelper.GetNClick( + deployMode._jsonFormNumberFieldByName("Stars", "down"), + ); //1 + agHelper.GetNClick( + deployMode._jsonFormNumberFieldByName("Stars", "down"), + ); //0 + agHelper.ClickButton("Update"); - // deployMode.NavigateBacktoEditor(); - // table.WaitUntilTableLoad(0, 0, "v2"); - // PageList.AddNewPage(); - // dataSources.CreateQueryForDS(dsName); - // dataSources.ValidateNSelectDropdown( - // "Collection", - // "", - // importDataCollectionName, - // ); - // dataSources.RunQuery({ toValidateResponse: false }); - // dataSources.AddSuggestedWidget(Widgets.Table); - // table.ReadTableRowColumnData(0, 3, "v2").then((cellData) => { - // expect(cellData).to.eq("1"); - // }); - // }); + deployMode.NavigateBacktoEditor(); + table.WaitUntilTableLoad(0, 0, "v2"); + PageList.AddNewPage(); + dataSources.CreateQueryForDS(dsName); + dataSources.ValidateNSelectDropdown( + "Collection", + "", + importDataCollectionName, + ); + dataSources.RunQuery({ toValidateResponse: false }); + dataSources.AddSuggestedWidget(Widgets.Table); + table.ReadTableRowColumnData(0, 3, "v2").then((cellData) => { + expect(cellData).to.eq("1"); + }); + }); }, ); @@ -254,7 +258,15 @@ function GenerateCRUDNValidateDeployPage( agHelper.AssertElementExist(dataSources._selectedRow); - table.VerifyDataInRow(0, "v2", [col1Text, col6Text, col7Text]); + table.ReadTableRowColumnData(0, 1, "v2", 2000).then(($cellData) => { + expect($cellData).to.eq(col1Text); + }); + table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { + expect($cellData).to.eq(col6Text); + }); + table.ReadTableRowColumnData(0, 7, "v2", 200).then(($cellData) => { + expect($cellData).to.eq(col7Text); + }); //Validating loaded JSON form cy.xpath(locators._buttonByText("Update")).then((selector) => { From e6816b5a6506419174d9b99faaf5fe607efe2e7f Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 19:09:22 +0530 Subject: [PATCH 45/50] fix: testing mongo spec fix --- .../e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index 371b8d094a89..e59f84d0a605 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -99,7 +99,7 @@ describe( deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); agHelper.GetNAssertElementText( locators._textWidgetInDeployed, - "mongomart Data", + `${importDataCollectionName} Data`, ); //Validating loaded table table.SelectTableRow(2, 0, true, "v2"); @@ -166,7 +166,7 @@ describe( } }); - it("4. Verify Delete from Deploy page - on MongoMart", () => { + it("4. Verify Delete from Deploy page - on mongo mart data - newly added record", () => { agHelper.ClickButton("Delete", 0); agHelper.AssertElementVisibility(locators._modal); agHelper.AssertElementVisibility( @@ -179,7 +179,7 @@ describe( assertHelper.AssertNetworkStatus("@postExecute", 200); }); - it("5 Verify Filter & Search & Download from Deploy page - on MongoMart - existing record", () => { + it("5 Verify Filter & Search & Download from Deploy page - on mongo mart data - existing record", () => { table.SearchTable("Swag"); agHelper.Sleep(2500); //for search to load for (let i = 0; i <= 1; i++) { From c0d5bf05edd990544c4e1771201dd15a1cabdfda Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 23:13:39 +0530 Subject: [PATCH 46/50] fix: removed extra function --- app/client/cypress/support/Pages/Table.ts | 26 ----------------------- 1 file changed, 26 deletions(-) diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index 02ea196f9ead..66d0b0f493e5 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -301,32 +301,6 @@ export class Table { .invoke("text"); } - public VerifyDataInRow( - rowNum: number, - tableVersion: "v1" | "v2" = "v1", - text: string[] | string, - ) { - this.agHelper - .GetElement(this._tableRowColumns(rowNum, tableVersion)) - .then(($elements: any) => { - const rowColumnTexts: string[] = []; - $elements.each((_: number, element: any) => { - const eleText = Cypress.$(element).text().trim(); - rowColumnTexts.push(eleText); - }); - cy.log( - `Array to look into : ${JSON.stringify(rowColumnTexts)} -- ${typeof text === "string" ? text : JSON.stringify(text)}`, - ); - if (typeof text === "string") { - expect(rowColumnTexts).to.include(text); - } else { - cy.wrap(text).each((textItem: string) => { - expect(rowColumnTexts).to.include(textItem); - }); - } - }); - } - public AssertTableRowImageColumnIsLoaded( rowNum: number, colNum: number, From c4b221a3cd7cab194157fe6d2a36231e388770c3 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 23:17:06 +0530 Subject: [PATCH 47/50] fix: reverting unnecessary changes --- .../Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts index e59f84d0a605..4b1d780a9ec5 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts @@ -177,6 +177,12 @@ describe( agHelper.ClickButton("Confirm"); assertHelper.AssertNetworkExecutionSuccess("@postExecute"); assertHelper.AssertNetworkStatus("@postExecute", 200); + table.ReadTableRowColumnData(0, 6, "v2", 200).then(($cellData) => { + expect($cellData).to.eq("Coffee Mug"); + }); + table.ReadTableRowColumnData(1, 6, "v2", 200).then(($cellData) => { + expect($cellData).to.eq("Track Jacket"); + }); }); it("5 Verify Filter & Search & Download from Deploy page - on mongo mart data - existing record", () => { @@ -255,9 +261,8 @@ function GenerateCRUDNValidateDeployPage( assertHelper.AssertNetworkStatus("@updateLayout", 200); appSettings.OpenPaneAndChangeTheme("Pacific"); deployMode.DeployApp(locators._widgetInDeployed(draggableWidgets.TABLE)); - + //Validating loaded table agHelper.AssertElementExist(dataSources._selectedRow); - table.ReadTableRowColumnData(0, 1, "v2", 2000).then(($cellData) => { expect($cellData).to.eq(col1Text); }); From 497fe6c19a4a11f1446afa954b36608b23f753b0 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 23:18:21 +0530 Subject: [PATCH 48/50] fix: reverting unnecessary changes --- app/client/cypress/support/Pages/Table.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/client/cypress/support/Pages/Table.ts b/app/client/cypress/support/Pages/Table.ts index 66d0b0f493e5..2f90efb052c7 100644 --- a/app/client/cypress/support/Pages/Table.ts +++ b/app/client/cypress/support/Pages/Table.ts @@ -68,8 +68,6 @@ export class Table { ` .tbody .td[data-colindex=${colNum}]` + this._tableRowColumnDataVersion(version) + ` div:contains("${columnText}")`; - _tableRowColumns = (rowNum: number, version: "v1" | "v2") => - this._tableWidgetVersion(version) + ` .tbody .td[data-rowindex=${rowNum}]`; _editCellIconDiv = ".t--editable-cell-icon"; _editCellEditor = ".t--inlined-cell-editor"; _editCellEditorInput = this._editCellEditor + " input"; From ad975410215b356d3a9b890ccb06a5b8b0475be6 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Mon, 16 Sep 2024 23:19:29 +0530 Subject: [PATCH 49/50] fix: minify json --- .../cypress/fixtures/mongouri_data_spec.json | 513 +----------------- 1 file changed, 1 insertion(+), 512 deletions(-) diff --git a/app/client/cypress/fixtures/mongouri_data_spec.json b/app/client/cypress/fixtures/mongouri_data_spec.json index 55305b4c1295..7687106464f8 100644 --- a/app/client/cypress/fixtures/mongouri_data_spec.json +++ b/app/client/cypress/fixtures/mongouri_data_spec.json @@ -1,512 +1 @@ -[ - { - "_id": { - "$numberInt": "1" - }, - "title": "Gray Hooded Sweatshirt", - "slogan": "The top hooded sweatshirt we offer", - "description": "Unless you live in a nudist colony, there are moments when the chill you feel demands that you put on something warm, and for those times, there's nothing better than this sharp MongoDB hoodie. Made of 100% cotton, this machine washable, mid-weight hoodie is all you need to stay comfortable when the temperature drops. And, since being able to keep your vital stuff with you is important, the hoodie features two roomy kangaroo pockets to ensure nothing you need ever gets lost.", - "stars": { - "$numberInt": "0" - }, - "category": "Apparel", - "img_url": "/img/products/hoodie.jpg", - "price": { - "$numberDouble": "29.99" - } - }, - { - "_id": { - "$numberInt": "5" - }, - "title": "Women's T-shirt", - "slogan": "MongoDB shirt in-style", - "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", - "stars": { - "$numberInt": "0" - }, - "category": "Apparel", - "img_url": "/img/products/white-mongo.jpg", - "price": { - "$numberDouble": "45.0" - } - }, - { - "_id": { - "$numberInt": "3" - }, - "title": "Stress Ball", - "slogan": "Squeeze your stress away", - "description": "The moment life piles more onto your already heaping plate and you start feeling hopelessly overwhelmed, take a stress ball in hand and squeeze as hard as you can. Take a deep breath and just let that tension go. Repeat as needed. It will all be OK! Having something small, portable and close at hand is a must for stress management.", - "stars": { - "$numberInt": "0" - }, - "category": "Swag", - "img_url": "/img/products/stress-ball.jpg", - "price": { - "$numberDouble": "5.0" - } - }, - { - "_id": { - "$numberInt": "6" - }, - "title": "Brown Carry-all Bag", - "slogan": "Keep extra items here", - "description": "Let your style speak for itself with this chic brown carry-all bag. Featuring a nylon exterior with solid contrast trim, brown in color, and MongoDB logo", - "stars": { - "$numberInt": "0" - }, - "category": "Swag", - "img_url": "/img/products/brown-bag.jpg", - "price": { - "$numberDouble": "5.0" - } - }, - { - "_id": { - "$numberInt": "7" - }, - "title": "Brown Tumbler", - "slogan": "Bring your coffee to go", - "description": "The MongoDB Insulated Travel Tumbler is smartly designed to maintain temperatures and go anywhere. Dual wall construction will keep your beverages hot or cold for hours and a slide lock lid helps minimize spills.", - "stars": { - "$numberInt": "0" - }, - "category": "Kitchen", - "img_url": "/img/products/brown-tumbler.jpg", - "price": { - "$numberDouble": "9.0" - } - }, - { - "_id": { - "$numberInt": "8" - }, - "title": "Pen (Green)", - "slogan": "The only pen you'll ever need", - "description": "Erase and rewrite repeatedly without damaging documents. The needlepoint tip creates clear precise lines and the thermo-sensitive gel ink formula disappears with erasing friction.", - "stars": { - "$numberInt": "0" - }, - "category": "Office", - "img_url": "/img/products/green-pen.jpg", - "price": { - "$numberDouble": "2.0" - } - }, - { - "_id": { - "$numberInt": "10" - }, - "title": "Green T-shirt", - "slogan": "MongoDB community shirt", - "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", - "stars": { - "$numberInt": "0" - }, - "category": "Apparel", - "img_url": "/img/products/green-tshirt.jpg", - "price": { - "$numberDouble": "20.0" - } - }, - { - "_id": { - "$numberInt": "11" - }, - "title": "MongoDB The Definitive Guide", - "slogan": "2nd Edition", - "description": "Manage the huMONGOus amount of data collected through your web application with MongoDB. This authoritative introduction—written by a core contributor to the project—shows you the many advantages of using document-oriented databases, and demonstrates how this reliable, high-performance system allows for almost infinite horizontal scalability.", - "stars": { - "$numberInt": "0" - }, - "category": "Books", - "img_url": "/img/products/guide-book.jpg", - "price": { - "$numberDouble": "20.0" - } - }, - { - "_id": { - "$numberInt": "2" - }, - "title": "Coffee Mug", - "slogan": "Keep your coffee hot!", - "description": "A mug is a type of cup used for drinking hot beverages, such as coffee, tea, hot chocolate or soup. Mugs usually have handles, and hold a larger amount of fluid than other types of cup. Usually a mug holds approximately 12 US fluid ounces (350 ml) of liquid; double a tea cup. A mug is a less formal style of drink container and is not usually used in formal place settings, where a teacup or coffee cup is preferred.", - "stars": { - "$numberInt": "0" - }, - "category": "Kitchen", - "img_url": "/img/products/mug.jpg", - "price": { - "$numberDouble": "12.5" - }, - "reviews": [ - { - "name": "", - "comment": "", - "stars": { - "$numberInt": "5" - }, - "date": { - "$numberDouble": "1.456067725049E+12" - } - }, - { - "name": "", - "comment": "When I drank coffee from this mug the coffee seemed somehow unstructured, as if the molecules weren't following a specific chemical structure. When I drink coffee from my Oracle mug it tastes like all the caffeine has the same atomic formula. Plus the leaf makes it taste funny. ", - "stars": { - "$numberInt": "1" - }, - "date": { - "$numberDouble": "1.471519691157E+12" - } - }, - { - "name": "", - "comment": "Much better than a datastax mug!!!!! And all my hipster web developer friends now think I'm terribly cool ", - "stars": { - "$numberInt": "5" - }, - "date": { - "$numberDouble": "1.471519744173E+12" - } - } - ] - }, - { - "_id": { - "$numberInt": "12" - }, - "title": "Leaf Sticker", - "slogan": "Add to your sticker collection", - "description": "Waterproof vinyl, will last 18 months outdoors. Ideal for smooth flat surfaces like laptops, journals, windows etc. Easy to remove. 50% discounts on all orders of any 6+", - "stars": { - "$numberInt": "0" - }, - "category": "Stickers", - "img_url": "/img/products/leaf-sticker.jpg", - "price": { - "$numberDouble": "1.0" - }, - "reviews": [ - { - "name": "r1", - "comment": "My First Review", - "stars": { - "$numberInt": "5" - }, - "date": { - "$numberDouble": "1.468800807077E+12" - } - }, - { - "name": "r 2", - "comment": "My Second review", - "stars": { - "$numberInt": "2" - }, - "date": { - "$numberDouble": "1.468800824493E+12" - } - } - ] - }, - { - "_id": { - "$numberInt": "4" - }, - "title": "Track Jacket", - "slogan": "Go to the track in style!", - "description": "Crafted from ultra-soft combed cotton, this essential jacket features sporty contrast tipping and MongoDB's signature embroidered leaf.", - "stars": { - "$numberInt": "0" - }, - "category": "Apparel", - "img_url": "/img/products/track-jacket.jpg", - "price": { - "$numberDouble": "45.0" - }, - "reviews": [ - { - "name": "Shannon", - "comment": "This is so warm and comfortable.", - "stars": { - "$numberInt": "2" - }, - "date": { - "$numberDouble": "1.455800194995E+12" - } - }, - { - "name": "Bob", - "comment": "Love this.", - "stars": { - "$numberInt": "5" - }, - "date": { - "$numberDouble": "1.455804800769E+12" - } - }, - { - "name": "Jorge", - "comment": "Brown. It's brown.", - "stars": { - "$numberInt": "4" - }, - "date": { - "$numberDouble": "1.455804825509E+12" - } - }, - { - "name": "Guy", - "comment": "My five star review", - "stars": { - "$numberInt": "5" - }, - "date": { - "$numberDouble": "1.46880086461E+12" - } - } - ] - }, - { - "_id": { - "$numberInt": "14" - }, - "title": "USB Stick (Leaf)", - "slogan": "1GB of space", - "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", - "stars": { - "$numberInt": "0" - }, - "category": "Electronics", - "img_url": "/img/products/leaf-usb.jpg", - "price": { - "$numberDouble": "20.0" - } - }, - { - "_id": { - "$numberInt": "16" - }, - "title": "Powered by MongoDB Sticker", - "slogan": "Add to your sticker collection", - "description": "Waterproof vinyl, will last 18 months outdoors. Ideal for smooth flat surfaces like laptops, journals, windows etc. Easy to remove. 50% discounts on all orders of any 6+", - "stars": { - "$numberInt": "0" - }, - "category": "Stickers", - "img_url": "/img/products/sticker.jpg", - "price": { - "$numberDouble": "1.0" - } - }, - { - "_id": { - "$numberInt": "15" - }, - "title": "Scaling MongoDB", - "slogan": "2nd Edition", - "description": "Create a MongoDB cluster that will grow to meet the needs of your application. With this short and concise book, you'll get guidelines for setting up and using clusters to store a large volume of data, and learn how to access the data efficiently. In the process, you'll understand how to make your application work with a distributed database system.", - "stars": { - "$numberInt": "0" - }, - "category": "Books", - "img_url": "/img/products/scaling-book.jpg", - "price": { - "$numberDouble": "29.0" - }, - "reviews": [ - { - "name": "Horatio", - "comment": "This is a pretty good book", - "stars": { - "$numberInt": "4" - }, - "date": { - "$numberDouble": "1.456086633854E+12" - } - } - ] - }, - { - "_id": { - "$numberInt": "9" - }, - "title": "Pen (Black)", - "slogan": "The only pen you'll ever need", - "description": "Erase and rewrite repeatedly without damaging documents. The needlepoint tip creates clear precise lines and the thermo-sensitive gel ink formula disappears with erasing friction.", - "stars": { - "$numberInt": "0" - }, - "category": "Office", - "img_url": "/img/products/pen.jpg", - "price": { - "$numberDouble": "2.0" - } - }, - { - "_id": { - "$numberInt": "18" - }, - "title": "MongoDB Umbrella (Gray)", - "slogan": "Premium Umbrella", - "description": "Our crook handle stick umbrella opens automatically with the push of a button. A traditional umbrella with classic appeal.", - "stars": { - "$numberInt": "0" - }, - "category": "Umbrellas", - "img_url": "/img/products/umbrella.jpg", - "price": { - "$numberDouble": "21.0" - } - }, - { - "_id": { - "$numberInt": "20" - }, - "title": "MongoDB University T-shirt", - "slogan": "Show Your MDBU Alumni Status", - "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", - "stars": { - "$numberInt": "0" - }, - "category": "Apparel", - "img_url": "/img/products/univ-tshirt.jpg", - "price": { - "$numberDouble": "45.0" - } - }, - { - "_id": { - "$numberInt": "21" - }, - "title": "USB Stick", - "slogan": "5GB of space", - "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", - "stars": { - "$numberInt": "0" - }, - "category": "Electronics", - "img_url": "/img/products/leaf-usb.jpg", - "price": { - "$numberDouble": "40.0" - } - }, - { - "_id": { - "$numberInt": "22" - }, - "title": "Water Bottle", - "slogan": "Glass water bottle", - "description": "High quality glass bottle provides a healthier way to drink. Silicone sleeve provides a good grip, a see-through window, and protects the glass vessel. Eliminates toxic leaching that plastic can cause. Innovative design holds 22-1/2 ounces. Dishwasher safe", - "stars": { - "$numberInt": "0" - }, - "category": "Kitchen", - "img_url": "/img/products/water-bottle.jpg", - "price": { - "$numberDouble": "23.0" - } - }, - { - "_id": { - "$numberInt": "17" - }, - "title": "MongoDB Umbrella (Brown)", - "slogan": "Premium Umbrella", - "description": "Our crook handle stick umbrella opens automatically with the push of a button. A traditional umbrella with classic appeal.", - "stars": { - "$numberInt": "0" - }, - "category": "Umbrellas", - "img_url": "/img/products/umbrella-brown.jpg", - "price": { - "$numberDouble": "21.0" - }, - "reviews": [ - { - "name": "Donald Trump", - "comment": "This is the best umbrella you will ever use.", - "stars": { - "$numberInt": "5" - }, - "date": { - "$numberDouble": "1.456270097364E+12" - } - }, - { - "name": "Shannon", - "comment": "Sturdy construction, but a little too big to fit in my bag for work.", - "stars": { - "$numberInt": "3" - }, - "date": { - "$numberDouble": "1.456270240382E+12" - } - } - ] - }, - { - "_id": { - "$numberInt": "19" - }, - "title": "MongoDB University Book", - "slogan": "A concise summary of MongoDB commands", - "description": "Keep the MongoDB commands you'll need at your fingertips with this concise book.", - "stars": { - "$numberInt": "0" - }, - "category": "Books", - "img_url": "/img/products/univ-book.jpg", - "price": { - "$numberDouble": "4.0" - } - }, - { - "_id": { - "$numberInt": "23" - }, - "title": "WiredTiger T-shirt", - "slogan": "Unleash the tiger", - "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", - "stars": { - "$numberInt": "0" - }, - "category": "Apparel", - "img_url": "/img/products/wt-shirt.jpg", - "price": { - "$numberDouble": "22.0" - } - }, - { - "_id": { - "$numberInt": "13" - }, - "title": "USB Stick (Green)", - "slogan": "1GB of space", - "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", - "stars": { - "$numberInt": "0" - }, - "category": "Electronics", - "img_url": "/img/products/greenusb.jpg", - "price": { - "$numberDouble": "20.0" - }, - "reviews": [ - { - "name": "Ringo", - "comment": "He's very green.", - "stars": { - "$numberInt": "4" - }, - "date": { - "$numberDouble": "1.45580490225E+12" - } - } - ] - } -] \ No newline at end of file +[ { "_id": { "$numberInt": "1" }, "title": "Gray Hooded Sweatshirt", "slogan": "The top hooded sweatshirt we offer", "description": "Unless you live in a nudist colony, there are moments when the chill you feel demands that you put on something warm, and for those times, there's nothing better than this sharp MongoDB hoodie. Made of 100% cotton, this machine washable, mid-weight hoodie is all you need to stay comfortable when the temperature drops. And, since being able to keep your vital stuff with you is important, the hoodie features two roomy kangaroo pockets to ensure nothing you need ever gets lost.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/hoodie.jpg", "price": { "$numberDouble": "29.99" } }, { "_id": { "$numberInt": "5" }, "title": "Women's T-shirt", "slogan": "MongoDB shirt in-style", "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/white-mongo.jpg", "price": { "$numberDouble": "45.0" } }, { "_id": { "$numberInt": "3" }, "title": "Stress Ball", "slogan": "Squeeze your stress away", "description": "The moment life piles more onto your already heaping plate and you start feeling hopelessly overwhelmed, take a stress ball in hand and squeeze as hard as you can. Take a deep breath and just let that tension go. Repeat as needed. It will all be OK! Having something small, portable and close at hand is a must for stress management.", "stars": { "$numberInt": "0" }, "category": "Swag", "img_url": "/img/products/stress-ball.jpg", "price": { "$numberDouble": "5.0" } }, { "_id": { "$numberInt": "6" }, "title": "Brown Carry-all Bag", "slogan": "Keep extra items here", "description": "Let your style speak for itself with this chic brown carry-all bag. Featuring a nylon exterior with solid contrast trim, brown in color, and MongoDB logo", "stars": { "$numberInt": "0" }, "category": "Swag", "img_url": "/img/products/brown-bag.jpg", "price": { "$numberDouble": "5.0" } }, { "_id": { "$numberInt": "7" }, "title": "Brown Tumbler", "slogan": "Bring your coffee to go", "description": "The MongoDB Insulated Travel Tumbler is smartly designed to maintain temperatures and go anywhere. Dual wall construction will keep your beverages hot or cold for hours and a slide lock lid helps minimize spills.", "stars": { "$numberInt": "0" }, "category": "Kitchen", "img_url": "/img/products/brown-tumbler.jpg", "price": { "$numberDouble": "9.0" } }, { "_id": { "$numberInt": "8" }, "title": "Pen (Green)", "slogan": "The only pen you'll ever need", "description": "Erase and rewrite repeatedly without damaging documents. The needlepoint tip creates clear precise lines and the thermo-sensitive gel ink formula disappears with erasing friction.", "stars": { "$numberInt": "0" }, "category": "Office", "img_url": "/img/products/green-pen.jpg", "price": { "$numberDouble": "2.0" } }, { "_id": { "$numberInt": "10" }, "title": "Green T-shirt", "slogan": "MongoDB community shirt", "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/green-tshirt.jpg", "price": { "$numberDouble": "20.0" } }, { "_id": { "$numberInt": "11" }, "title": "MongoDB The Definitive Guide", "slogan": "2nd Edition", "description": "Manage the huMONGOus amount of data collected through your web application with MongoDB. This authoritative introduction—written by a core contributor to the project—shows you the many advantages of using document-oriented databases, and demonstrates how this reliable, high-performance system allows for almost infinite horizontal scalability.", "stars": { "$numberInt": "0" }, "category": "Books", "img_url": "/img/products/guide-book.jpg", "price": { "$numberDouble": "20.0" } }, { "_id": { "$numberInt": "2" }, "title": "Coffee Mug", "slogan": "Keep your coffee hot!", "description": "A mug is a type of cup used for drinking hot beverages, such as coffee, tea, hot chocolate or soup. Mugs usually have handles, and hold a larger amount of fluid than other types of cup. Usually a mug holds approximately 12 US fluid ounces (350 ml) of liquid; double a tea cup. A mug is a less formal style of drink container and is not usually used in formal place settings, where a teacup or coffee cup is preferred.", "stars": { "$numberInt": "0" }, "category": "Kitchen", "img_url": "/img/products/mug.jpg", "price": { "$numberDouble": "12.5" }, "reviews": [ { "name": "", "comment": "", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.456067725049E+12" } }, { "name": "", "comment": "When I drank coffee from this mug the coffee seemed somehow unstructured, as if the molecules weren't following a specific chemical structure. When I drink coffee from my Oracle mug it tastes like all the caffeine has the same atomic formula. Plus the leaf makes it taste funny. ", "stars": { "$numberInt": "1" }, "date": { "$numberDouble": "1.471519691157E+12" } }, { "name": "", "comment": "Much better than a datastax mug!!!!! And all my hipster web developer friends now think I'm terribly cool ", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.471519744173E+12" } } ] }, { "_id": { "$numberInt": "12" }, "title": "Leaf Sticker", "slogan": "Add to your sticker collection", "description": "Waterproof vinyl, will last 18 months outdoors. Ideal for smooth flat surfaces like laptops, journals, windows etc. Easy to remove. 50% discounts on all orders of any 6+", "stars": { "$numberInt": "0" }, "category": "Stickers", "img_url": "/img/products/leaf-sticker.jpg", "price": { "$numberDouble": "1.0" }, "reviews": [ { "name": "r1", "comment": "My First Review", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.468800807077E+12" } }, { "name": "r 2", "comment": "My Second review", "stars": { "$numberInt": "2" }, "date": { "$numberDouble": "1.468800824493E+12" } } ] }, { "_id": { "$numberInt": "4" }, "title": "Track Jacket", "slogan": "Go to the track in style!", "description": "Crafted from ultra-soft combed cotton, this essential jacket features sporty contrast tipping and MongoDB's signature embroidered leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/track-jacket.jpg", "price": { "$numberDouble": "45.0" }, "reviews": [ { "name": "Shannon", "comment": "This is so warm and comfortable.", "stars": { "$numberInt": "2" }, "date": { "$numberDouble": "1.455800194995E+12" } }, { "name": "Bob", "comment": "Love this.", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.455804800769E+12" } }, { "name": "Jorge", "comment": "Brown. It's brown.", "stars": { "$numberInt": "4" }, "date": { "$numberDouble": "1.455804825509E+12" } }, { "name": "Guy", "comment": "My five star review", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.46880086461E+12" } } ] }, { "_id": { "$numberInt": "14" }, "title": "USB Stick (Leaf)", "slogan": "1GB of space", "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", "stars": { "$numberInt": "0" }, "category": "Electronics", "img_url": "/img/products/leaf-usb.jpg", "price": { "$numberDouble": "20.0" } }, { "_id": { "$numberInt": "16" }, "title": "Powered by MongoDB Sticker", "slogan": "Add to your sticker collection", "description": "Waterproof vinyl, will last 18 months outdoors. Ideal for smooth flat surfaces like laptops, journals, windows etc. Easy to remove. 50% discounts on all orders of any 6+", "stars": { "$numberInt": "0" }, "category": "Stickers", "img_url": "/img/products/sticker.jpg", "price": { "$numberDouble": "1.0" } }, { "_id": { "$numberInt": "15" }, "title": "Scaling MongoDB", "slogan": "2nd Edition", "description": "Create a MongoDB cluster that will grow to meet the needs of your application. With this short and concise book, you'll get guidelines for setting up and using clusters to store a large volume of data, and learn how to access the data efficiently. In the process, you'll understand how to make your application work with a distributed database system.", "stars": { "$numberInt": "0" }, "category": "Books", "img_url": "/img/products/scaling-book.jpg", "price": { "$numberDouble": "29.0" }, "reviews": [ { "name": "Horatio", "comment": "This is a pretty good book", "stars": { "$numberInt": "4" }, "date": { "$numberDouble": "1.456086633854E+12" } } ] }, { "_id": { "$numberInt": "9" }, "title": "Pen (Black)", "slogan": "The only pen you'll ever need", "description": "Erase and rewrite repeatedly without damaging documents. The needlepoint tip creates clear precise lines and the thermo-sensitive gel ink formula disappears with erasing friction.", "stars": { "$numberInt": "0" }, "category": "Office", "img_url": "/img/products/pen.jpg", "price": { "$numberDouble": "2.0" } }, { "_id": { "$numberInt": "18" }, "title": "MongoDB Umbrella (Gray)", "slogan": "Premium Umbrella", "description": "Our crook handle stick umbrella opens automatically with the push of a button. A traditional umbrella with classic appeal.", "stars": { "$numberInt": "0" }, "category": "Umbrellas", "img_url": "/img/products/umbrella.jpg", "price": { "$numberDouble": "21.0" } }, { "_id": { "$numberInt": "20" }, "title": "MongoDB University T-shirt", "slogan": "Show Your MDBU Alumni Status", "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/univ-tshirt.jpg", "price": { "$numberDouble": "45.0" } }, { "_id": { "$numberInt": "21" }, "title": "USB Stick", "slogan": "5GB of space", "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", "stars": { "$numberInt": "0" }, "category": "Electronics", "img_url": "/img/products/leaf-usb.jpg", "price": { "$numberDouble": "40.0" } }, { "_id": { "$numberInt": "22" }, "title": "Water Bottle", "slogan": "Glass water bottle", "description": "High quality glass bottle provides a healthier way to drink. Silicone sleeve provides a good grip, a see-through window, and protects the glass vessel. Eliminates toxic leaching that plastic can cause. Innovative design holds 22-1/2 ounces. Dishwasher safe", "stars": { "$numberInt": "0" }, "category": "Kitchen", "img_url": "/img/products/water-bottle.jpg", "price": { "$numberDouble": "23.0" } }, { "_id": { "$numberInt": "17" }, "title": "MongoDB Umbrella (Brown)", "slogan": "Premium Umbrella", "description": "Our crook handle stick umbrella opens automatically with the push of a button. A traditional umbrella with classic appeal.", "stars": { "$numberInt": "0" }, "category": "Umbrellas", "img_url": "/img/products/umbrella-brown.jpg", "price": { "$numberDouble": "21.0" }, "reviews": [ { "name": "Donald Trump", "comment": "This is the best umbrella you will ever use.", "stars": { "$numberInt": "5" }, "date": { "$numberDouble": "1.456270097364E+12" } }, { "name": "Shannon", "comment": "Sturdy construction, but a little too big to fit in my bag for work.", "stars": { "$numberInt": "3" }, "date": { "$numberDouble": "1.456270240382E+12" } } ] }, { "_id": { "$numberInt": "19" }, "title": "MongoDB University Book", "slogan": "A concise summary of MongoDB commands", "description": "Keep the MongoDB commands you'll need at your fingertips with this concise book.", "stars": { "$numberInt": "0" }, "category": "Books", "img_url": "/img/products/univ-book.jpg", "price": { "$numberDouble": "4.0" } }, { "_id": { "$numberInt": "23" }, "title": "WiredTiger T-shirt", "slogan": "Unleash the tiger", "description": "Crafted from ultra-soft combed cotton, this essential t-shirt features sporty contrast tipping and MongoDB's signature leaf.", "stars": { "$numberInt": "0" }, "category": "Apparel", "img_url": "/img/products/wt-shirt.jpg", "price": { "$numberDouble": "22.0" } }, { "_id": { "$numberInt": "13" }, "title": "USB Stick (Green)", "slogan": "1GB of space", "description": "MongoDB's Turbo USB 3.0 features lightning fast transfer speeds of up to 10X faster than standard MongoDB USB 2.0 drives. This ultra-fast USB allows for fast transfer of larger files such as movies and videos.", "stars": { "$numberInt": "0" }, "category": "Electronics", "img_url": "/img/products/greenusb.jpg", "price": { "$numberDouble": "20.0" }, "reviews": [ { "name": "Ringo", "comment": "He's very green.", "stars": { "$numberInt": "4" }, "date": { "$numberDouble": "1.45580490225E+12" } } ] } ] \ No newline at end of file From 3aef2d2fec56c6ff0efcc575444c04d805e561a0 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Tue, 17 Sep 2024 01:52:16 +0530 Subject: [PATCH 50/50] fix: reverting limited test file --- app/client/cypress/limited-tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index f3b9f2559d35..31c0c0253fef 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ServerSide/GenerateCRUD/MongoURI_Spec.ts +cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/*