diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableBugs_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableBugs_Spec.ts deleted file mode 100644 index 37b6c2e9081f..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableBugs_Spec.ts +++ /dev/null @@ -1,182 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -describe( - "Verify various Table property bugs", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tablev1NewDsl"); - }); - - it("1. Adding Data to Table Widget", function () { - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.propPane.UpdatePropertyFieldValue( - "Table data", - JSON.stringify(this.dataSet.TableURLColumnType), - ); - _.assertHelper.AssertNetworkStatus("@updateLayout", 200); - _.agHelper.PressEscape(); - //Bug 13299 - Verify Display Text does not contain garbage value for URL column type when empty - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.table.ChangeColumnType("image", "URL"); - _.propPane.UpdatePropertyFieldValue( - "Display text", - `{{currentRow.image.toString().includes('7') ? currentRow.image.toString().split('full/')[1] : "" }}`, - ); - - _.deployMode.DeployApp(); - - //_.table.SelectTableRow(1) - _.table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).contains("cube-logo_S50__hLNq.jpeg"); - }); - - _.table.ReadTableRowColumnData(1, 0).then(($cellData) => { - expect($cellData).to.eq( - "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", - ); - }); - - _.table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg"); - }); - - _.table.ReadTableRowColumnData(3, 0).then(($cellData) => { - expect($cellData).to.eq( - "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg", - ); - }); - - _.table.AssertURLColumnNavigation( - 0, - 0, - "https://docs.appsmith.com/img/cube-logo_S50__hLNq.jpeg", - ); - - _.deployMode.NavigateBacktoEditor(); - }); - - it("2. Bug 13299 - Verify Display Text does not contain garbage value for URL column type when null", function () { - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.agHelper.GetNClick(_.table._columnSettings("image", "Edit")); - - _.propPane.UpdatePropertyFieldValue( - "Display text", - `{{currentRow.image.toString().includes('7') ? currentRow.image.toString().split('full/')[1] : null }}`, - ); - - _.deployMode.DeployApp(); - - _.table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).contains("cube-logo_S50__hLNq.jpeg"); - }); - - _.table.ReadTableRowColumnData(1, 0).then(($cellData) => { - expect($cellData).to.eq( - "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", - ); - }); - - _.table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg"); - }); - - _.table.ReadTableRowColumnData(3, 0).then(($cellData) => { - expect($cellData).to.eq( - "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg", - ); - }); - - _.table.AssertURLColumnNavigation( - 1, - 0, - "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", - ); - - _.deployMode.NavigateBacktoEditor(); - }); - - it("3. Bug 13299 - Verify Display Text does not contain garbage value for URL column type when undefined", function () { - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.agHelper.GetNClick(_.table._columnSettings("image", "Edit")); - - _.propPane.UpdatePropertyFieldValue( - "Display text", - `{{currentRow.image.toString().includes('7') ? currentRow.image.toString().split('full/')[1] : undefined }}`, - ); - - _.deployMode.DeployApp(); - - _.table.ReadTableRowColumnData(0, 0).then(($cellData) => { - expect($cellData).contains("cube-logo_S50__hLNq.jpeg"); - }); - - _.table.ReadTableRowColumnData(1, 0).then(($cellData) => { - expect($cellData).to.eq( - "https://docs.appsmith.com/img/Appsmith-Login-Screen-Shows-SAML.jpg", - ); - }); - - _.table.ReadTableRowColumnData(2, 0).then(($cellData) => { - expect($cellData).contains("zapier-logo_odZ9wZQ3vY.jpeg"); - }); - - _.table.ReadTableRowColumnData(3, 0).then(($cellData) => { - expect($cellData).to.eq( - "https://docs.appsmith.com/img/replyto-logo_6yaZHFIeU.jpeg", - ); - }); - - _.table.AssertURLColumnNavigation( - 0, - 0, - "https://docs.appsmith.com/img/cube-logo_S50__hLNq.jpeg", - ); - - _.deployMode.NavigateBacktoEditor(); - }); - - it("4. should allow ISO 8601 format date and not throw a disallowed validation error", () => { - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.propPane.UpdatePropertyFieldValue( - "Table data", - '[{ "dateValue": "2023-02-02T13:39:38.367857Z" }]', - ); - cy.wait(500); - - _.propPane.OpenTableColumnSettings("dateValue"); - // select date option from column type setting field - - _.propPane.SelectPropertiesDropDown("Column type", "Date"); - - // select ISO 8601 date format - cy.get(".t--property-control-originaldateformat").click(); - cy.contains("ISO 8601").click(); - - cy.get(".t--property-control-originaldateformat") - .find(".t--js-toggle") - .click(); - // we should not see an error after ISO 8061 is selected - cy.get( - ".t--property-control-originaldateformat .t--codemirror-has-error", - ).should("not.exist"); - //check the selected format value - cy.get(".t--property-control-originaldateformat").contains( - "YYYY-MM-DDTHH:mm:ss.SSSZ", - ); - //give a corrupted date format - - _.propPane.UpdatePropertyFieldValue( - "Original Date Format", - "YYYY-MM-DDTHH:mm:ss.SSSsZ", - ); - //we should now see an error with an incorrect date format - cy.get( - ".t--property-control-originaldateformat .t--codemirror-has-error", - ).should("exist"); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_1_Spec.ts deleted file mode 100644 index 6c31e1130c47..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_1_Spec.ts +++ /dev/null @@ -1,123 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -describe( - "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tablev1NewDsl"); - }); - - it("1. Adding Data to Table Widget", function () { - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.propPane.UpdatePropertyFieldValue( - "Table data", - JSON.stringify(this.dataSet.TableInput), - ); - _.assertHelper.AssertNetworkStatus("@updateLayout", 200); - _.agHelper.PressEscape(); - _.deployMode.DeployApp(); - }); - - it("2. Table Widget Search Functionality", function () { - _.table.ReadTableRowColumnData(1, 3, "v1", 2000).then((cellData) => { - expect(cellData).to.eq("Lindsay Ferguson"); - _.table.SearchTable(cellData); - _.table.ReadTableRowColumnData(0, 3).then((afterSearch) => { - expect(afterSearch).to.eq("Lindsay Ferguson"); - }); - }); - _.table.RemoveSearchTextNVerify("2381224"); - - _.table.SearchTable("7434532"); - _.table.ReadTableRowColumnData(0, 3).then((afterSearch) => { - expect(afterSearch).to.eq("Byron Fields"); - }); - _.table.RemoveSearchTextNVerify("2381224"); - }); - - it("3. Verify Table Filter for 'contain'", function () { - _.table.OpenNFilterTable("userName", "contains", "Lindsay"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Lindsay Ferguson"); - }); - _.table.RemoveFilterNVerify("2381224"); - }); - - it("4. Verify Table Filter for 'does not contain'", function () { - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Tuna Salad"); - }); - _.table.OpenNFilterTable("productName", "does not contain", "Tuna"); - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Beef steak"); - }); - _.table.RemoveFilterNVerify("2381224"); - }); - - it("5. Verify Table Filter for 'starts with'", function () { - _.table.ReadTableRowColumnData(4, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - _.table.OpenNFilterTable("productName", "starts with", "Avo"); - _.table.ReadTableRowColumnData(0, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - _.table.RemoveFilterNVerify("2381224"); - }); - - it("6. Verify Table Filter for 'ends with' - case sensitive", function () { - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Tuna Salad"); - }); - _.table.OpenNFilterTable("productName", "ends with", "wich"); - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Chicken Sandwich"); - }); - _.table.RemoveFilterNVerify("2381224"); - }); - - it("7. Verify Table Filter for 'ends with' - case insenstive", function () { - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Tuna Salad"); - }); - _.table.OpenNFilterTable("productName", "ends with", "WICH"); - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Chicken Sandwich"); - }); - _.table.RemoveFilterNVerify("2381224"); - }); - - it("8. Verify Table Filter for 'ends with' - on wrong column", function () { - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Tuna Salad"); - }); - _.table.OpenNFilterTable("userName", "ends with", "WICH"); - _.table.WaitForTableEmpty(); - _.table.RemoveFilterNVerify("2381224"); - }); - - it("9. Verify Table Filter for 'is exactly' - case sensitive", function () { - _.table.ReadTableRowColumnData(2, 4).then(($cellData) => { - expect($cellData).to.eq("Beef steak"); - }); - _.table.OpenNFilterTable("productName", "is exactly", "Beef steak"); - _.table.ReadTableRowColumnData(0, 4).then(($cellData) => { - expect($cellData).to.eq("Beef steak"); - }); - _.table.RemoveFilterNVerify("2381224", true); - }); - - it("10. Verify Table Filter for 'is exactly' - case insensitive", function () { - _.table.ReadTableRowColumnData(2, 4).then(($cellData) => { - expect($cellData).to.eq("Beef steak"); - }); - _.table.OpenNFilterTable("productName", "is exactly", "Beef STEAK"); - _.table.WaitForTableEmpty(); - _.table.RemoveFilterNVerify("2381224", true); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_2_Spec.ts deleted file mode 100644 index 45d0400c73aa..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter1_2_Spec.ts +++ /dev/null @@ -1,224 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -describe( - "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tablev1NewDsl"); - }); - - it("1. Verify Table Filter for 'empty'", function () { - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.propPane.UpdatePropertyFieldValue( - "Table data", - JSON.stringify(this.dataSet.TableInput), - ); - _.assertHelper.AssertNetworkStatus("@updateLayout", 200); - _.agHelper.PressEscape(); - _.deployMode.DeployApp(); - - _.table.OpenNFilterTable("email", "empty"); - _.table.WaitForTableEmpty(); - _.table.RemoveFilterNVerify("2381224"); - }); - - it("2. Verify Table Filter for 'not empty'", function () { - _.table.ReadTableRowColumnData(4, 5).then(($cellData) => { - expect($cellData).to.eq("7.99"); - }); - _.table.OpenNFilterTable("orderAmount", "not empty"); - _.table.ReadTableRowColumnData(4, 5).then(($cellData) => { - expect($cellData).to.eq("7.99"); - }); - _.table.RemoveFilterNVerify("2381224"); - }); - - it("3. Verify Table Filter - Where Edit - Change condition along with input value", function () { - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - - _.table.OpenNFilterTable("orderAmount", "is exactly", "4.99"); - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - - //Change condition - 1st time - _.agHelper.GetNClick(_.table._filterConditionDropdown); - cy.get(_.table._dropdownText).contains("empty").click(); - _.agHelper.ClickButton("APPLY"); - _.table.WaitForTableEmpty(); - - //Change condition - 2nd time - _.agHelper.GetNClick(_.table._filterConditionDropdown); - cy.get(_.table._dropdownText).contains("contains").click(); - _.agHelper.GetNClick(_.table._filterInputValue, 0).type("19").wait(500); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Tobias Funke"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("4. Verify Table Filter - Where Edit - Single Column, Condition & input value", function () { - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - - _.table.OpenNFilterTable("productName", "contains", "e"); - _.table.ReadTableRowColumnData(0, 4).then(($cellData) => { - expect($cellData).to.eq("Chicken Sandwich"); - }); - _.table.ReadTableRowColumnData(1, 4, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Beef steak"); - }); - _.table.ReadTableRowColumnData(2, 4, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Chicken Sandwich"); - }); - - //Change condition - 1st time - _.agHelper.GetNClick(_.table._filterConditionDropdown); - cy.get(_.table._dropdownText).contains("does not contain").click(); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 4).then(($cellData) => { - expect($cellData).to.eq("Tuna Salad"); - }); - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - - //Change condition - column value - _.agHelper.GetNClick(_.table._filterColumnsDropdown); - cy.get(_.table._dropdownText).contains("userName").click(); - _.agHelper.GetNClick(_.table._filterConditionDropdown); - cy.get(_.table._dropdownText).contains("does not contain").click(); - _.agHelper.ClickButton("APPLY"); - _.table.WaitForTableEmpty(); - - //Change input value - _.agHelper - .GetNClick(_.table._filterInputValue, 0) - .clear() - .type("i") - .wait(500); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("5. Verify Table Filter for OR operator - different row match", function () { - _.table.ReadTableRowColumnData(2, 3).then(($cellData) => { - expect($cellData).to.eq("Tobias Funke"); - }); - - _.table.OpenNFilterTable("email", "contains", "on"); - _.table.ReadTableRowColumnData(2, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.OpenNFilterTable("productName", "ends with", "steak", "OR", 1); - _.table.ReadTableRowColumnData(2, 3).then(($cellData) => { - expect($cellData).to.eq("Tobias Funke"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("6. Verify Table Filter for OR operator - same row match", function () { - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.OpenNFilterTable("email", "contains", "hol"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.OpenNFilterTable("userName", "starts with", "ry", "OR", 1); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("7. Verify Table Filter for OR operator - two 'ORs'", function () { - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.OpenNFilterTable("email", "starts with", "by"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.OpenNFilterTable("productName", "ends with", "ni", "OR", 1); - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.OpenNFilterTable("userName", "contains", "law", "OR", 2); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("8. Verify Table Filter for AND operator - different row match", function () { - _.table.ReadTableRowColumnData(3, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.OpenNFilterTable("userName", "starts with", "b"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.OpenNFilterTable( - "productName", - "does not contain", - "WICH", - "AND", - 1, - ); - _.table.WaitForTableEmpty(); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("9. Verify Table Filter for AND operator - same row match", function () { - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.OpenNFilterTable("userName", "ends with", "s"); - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.OpenNFilterTable("orderAmount", "is exactly", "4.99", "AND", 1); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("10. Verify Table Filter for AND operator - same row match - edit input text value", function () { - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.OpenNFilterTable("userName", "ends with", "s"); - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.OpenNFilterTable("orderAmount", "is exactly", "4.99", "AND", 1); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.agHelper - .GetNClick(_.table._filterInputValue, 1) - .clear() - .type("7.99") - .wait(500); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_1_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_1_Spec.ts deleted file mode 100644 index 3d56cdaa62ed..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_1_Spec.ts +++ /dev/null @@ -1,257 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -describe( - "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tablev1NewDsl"); - }); - - it("1. Adding Data to Table Widget", function () { - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.propPane.UpdatePropertyFieldValue( - "Table data", - JSON.stringify(this.dataSet.TableInput), - ); - _.assertHelper.AssertNetworkStatus("@updateLayout", 200); - _.agHelper.PressEscape(); - _.deployMode.DeployApp(); - }); - - it("2. Verify Table Filter for AND operator - same row match - Where Edit - input value", function () { - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.OpenNFilterTable("userName", "ends with", "s"); - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.OpenNFilterTable("orderAmount", "is exactly", "4.99", "AND", 1); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.agHelper - .GetNClick(_.table._filterInputValue, 1) - .clear() - .type("7.99") - .wait(500); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("3. Verify Table Filter for AND operator - two 'ANDs' - clearAll", function () { - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.OpenNFilterTable("id", "contains", "7434532"); - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.OpenNFilterTable("productName", "contains", "i", "AND", 1); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.OpenNFilterTable("orderAmount", "starts with", "7", "AND", 2); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("4. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter condition + Bug 12638", function () { - _.table.OpenNFilterTable("id", "contains", "2"); - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Lindsay Ferguson"); - }); - _.table.OpenNFilterTable("productName", "ends with", "WICH", "AND", 1); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.OpenNFilterTable("userName", "does not contain", "son", "AND", 2); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.RemoveFilterNVerify("7434532", false, true, 1); - //Bug 12638 - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("5. Verify Table Filter for AND operator - two 'ANDs' - removeOne filter twice + Bug 12638", function () { - _.table.OpenNFilterTable("id", "starts with", "2"); - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Lindsay Ferguson"); - }); - _.table.OpenNFilterTable("productName", "ends with", "WICH", "AND", 1); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.OpenNFilterTable("userName", "contains", "on", "AND", 2); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.RemoveFilterNVerify("2381224", false, true, 1); - _.table.RemoveFilterNVerify("2381224", false, true, 0); - - //Bug 12638 - verification to add here - once closed - - _.table.ReadTableRowColumnData(1, 3).then(($cellData) => { - expect($cellData).to.eq("Lindsay Ferguson"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("6. Verify Table Filter for changing from AND -> OR -> AND", function () { - _.table.OpenNFilterTable("id", "contains", "7"); - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Beef steak"); - }); - _.table.OpenNFilterTable("productName", "contains", "I", "AND", 1); - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - _.table.OpenNFilterTable("userName", "starts with", "r", "AND", 2); - _.table.ReadTableRowColumnData(0, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - - _.agHelper.GetNClick(_.table._filterOperatorDropdown); - cy.get(_.table._dropdownText).contains("OR").click(); - _.agHelper.ClickButton("APPLY"); - - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Tuna Salad"); - }); - - _.agHelper.GetNClick(_.table._filterOperatorDropdown); - cy.get(_.table._dropdownText).contains("AND").click(); - _.agHelper.ClickButton("APPLY"); - - _.table.ReadTableRowColumnData(0, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("7. Verify Table Filter for changing from AND -> OR -> along with changing Where clause condions", function () { - _.table.OpenNFilterTable("id", "starts with", "2"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Lindsay Ferguson"); - }); - - _.table.OpenNFilterTable("orderAmount", "contains", "19", "OR", 1); - _.table.ReadTableRowColumnData(2, 3).then(($cellData) => { - expect($cellData).to.eq("Tobias Funke"); - }); - - //Changing filter conditions of both where rows - 1st row - _.agHelper - .GetNClick(_.table._filterInputValue, 0) - .clear() - .type("7") - .wait(500); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Tobias Funke"); - }); - _.table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - - //Changing filter conditions of both where rows - 2nd row - _.agHelper.GetNClick(_.table._filterConditionDropdown, 1); - cy.get(_.table._dropdownText).contains("does not contain").click(); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Michael Lawson"); - }); - _.table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Lindsay Ferguson"); - }); - _.table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.ReadTableRowColumnData(3, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - - //Changing OR to AND - _.agHelper.GetNClick(_.table._filterOperatorDropdown); - cy.get(_.table._dropdownText).contains("AND").click(); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - - //Changing AND to OR - _.agHelper.GetNClick(_.table._filterOperatorDropdown); - cy.get(_.table._dropdownText).contains("OR").click(); - _.agHelper.GetNClick(_.table._filterConditionDropdown, 1); - cy.get(_.table._dropdownText).contains("starts with").click(); - _.agHelper - .GetNClick(_.table._filterInputValue, 1) - .clear() - .type("9") - .wait(500); - _.agHelper.ClickButton("APPLY"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Lindsay Ferguson"); - }); - _.table.ReadTableRowColumnData(1, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Byron Fields"); - }); - _.table.ReadTableRowColumnData(2, 3, "v1", 200).then(($cellData) => { - expect($cellData).to.eq("Ryan Holmes"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - - it("8. Verify Table Filter for changing from AND -> OR [Remove a filter] -> AND + Bug 12642", function () { - _.table.OpenNFilterTable("id", "contains", "7"); - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Beef steak"); - }); - _.table.OpenNFilterTable("productName", "contains", "I", "AND", 1); - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - _.table.OpenNFilterTable("userName", "starts with", "r", "AND", 2); - _.table.ReadTableRowColumnData(0, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - - _.agHelper.GetNClick(_.table._filterOperatorDropdown); - cy.get(_.table._dropdownText).contains("OR").click(); - _.agHelper.ClickButton("APPLY"); - - _.table.ReadTableRowColumnData(1, 4).then(($cellData) => { - expect($cellData).to.eq("Tuna Salad"); - }); - - _.table.RemoveFilterNVerify("7434532", false, true, 0); //Since TableV1 - revertion of operator upon removal of filter is not supported - - _.table.ReadTableRowColumnData(0, 4).then(($cellData) => { - expect($cellData).to.eq("Avocado Panini"); - }); - _.table.RemoveFilterNVerify("2381224", true, false); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_2_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_2_Spec.ts deleted file mode 100644 index 3b281a846e46..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/TableFilter2_2_Spec.ts +++ /dev/null @@ -1,178 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -describe( - "Verify various Table_Filter combinations", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tablev1NewDsl"); - }); - - it("1. Verify Full table data - download csv and download Excel", function () { - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - _.propPane.UpdatePropertyFieldValue( - "Table data", - JSON.stringify(this.dataSet.TableInput), - ); - _.assertHelper.AssertNetworkStatus("@updateLayout", 200); - _.agHelper.PressEscape(); - _.deployMode.DeployApp(); - - _.table.DownloadFromTable("Download as CSV"); - //This plugin works only from cypress ^9.2 - //cy.verifyDownload("Table1.csv") - _.table.ValidateDownloadNVerify("Table1.csv", "Michael Lawson"); - - _.table.DownloadFromTable("Download as Excel"); - _.table.ValidateDownloadNVerify("Table1.xlsx", "Michael Lawson"); - }); - - it("2. Verify Searched data - download csv and download Excel", function () { - _.table.SearchTable("7434532"); - _.table.ReadTableRowColumnData(0, 3).then((afterSearch) => { - expect(afterSearch).to.eq("Byron Fields"); - }); - - _.table.DownloadFromTable("Download as CSV"); - //This plugin works only from cypress ^9.2 - //cy.verifyDownload("Table1.csv") - _.table.ValidateDownloadNVerify("Table1.csv", "byron.fields@reqres.in"); - - _.table.DownloadFromTable("Download as Excel"); - _.table.ValidateDownloadNVerify("Table1.xlsx", "Ryan Holmes"); - - _.table.RemoveSearchTextNVerify("2381224"); - - _.table.DownloadFromTable("Download as CSV"); - _.table.ValidateDownloadNVerify("Table1.csv", "2736212"); - - _.table.DownloadFromTable("Download as Excel"); - _.table.ValidateDownloadNVerify("Table1.xlsx", "Beef steak"); - }); - - it("3. Verify Filtered data - download csv and download Excel", function () { - _.table.OpenNFilterTable("id", "starts with", "6"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Tobias Funke"); - }); - _.table.CloseFilter(); - - _.table.DownloadFromTable("Download as CSV"); - //This plugin works only from cypress ^9.2 - //cy.verifyDownload("Table1.csv") - _.table.ValidateDownloadNVerify("Table1.csv", "Beef steak"); - - _.table.DownloadFromTable("Download as Excel"); - _.table.ValidateDownloadNVerify("Table1.xlsx", "tobias.funke@reqres.in"); - - _.agHelper.GetNClick(_.table._filterBtn); - _.table.RemoveFilterNVerify("2381224", true, false); - - _.table.DownloadFromTable("Download as CSV"); - _.table.ValidateDownloadNVerify("Table1.csv", "Tuna Salad"); - - _.table.DownloadFromTable("Download as Excel"); - _.table.ValidateDownloadNVerify("Table1.xlsx", "Avocado Panini"); - }); - - it("4. Import TableFilter application & verify all filters for same FirstName (one word column) + Bug 13334", () => { - _.deployMode.NavigateBacktoEditor(); - _.table.WaitUntilTableLoad(); - _.homePage.NavigateToHome(); - _.homePage.ImportApp("TableFilterImportApp.json"); - _.homePage.AssertImportToast(); - _.deployMode.DeployApp(); - _.table.WaitUntilTableLoad(); - - //Contains - _.table.OpenNFilterTable("FirstName", "contains", "Della"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Alvarado"); - }); - - filterOnlyCondition("does not contain", "49"); - filterOnlyCondition("starts with", "1"); - - //Ends with - Open Bug 13334 - filterOnlyCondition("ends with", "1"); - - filterOnlyCondition("is exactly", "1"); - filterOnlyCondition("empty", "0"); - filterOnlyCondition("not empty", "50"); - filterOnlyCondition("starts with", "3", "ge"); - _.table.ReadTableRowColumnData(0, 3).then(($cellData) => { - expect($cellData).to.eq("Chandler"); - }); - - _.table.OpenNFilterTable("FullName", "ends with", "ross", "OR", 1); - _.agHelper - .GetText(_.table._showPageItemsCount) - .then(($count) => expect($count).contain("4")); - _.table.CloseFilter(); - _.agHelper - .GetText(_.table._filtersCount) - .then(($count) => expect($count).contain("2")); - - _.table.OpenFilter(); - _.table.RemoveFilterNVerify("1", true, false); - }); - - it("5. Verify all filters for same FullName (two word column) + Bug 13334", () => { - //Contains - _.table.OpenNFilterTable("FullName", "contains", "torres"); - _.table.ReadTableRowColumnData(0, 2).then(($cellData) => { - expect($cellData).to.eq("Virgie"); - }); - - filterOnlyCondition("does not contain", "49"); - filterOnlyCondition("starts with", "0"); - filterOnlyCondition("ends with", "1"); - filterOnlyCondition("is exactly", "0"); - filterOnlyCondition("empty", "0"); - filterOnlyCondition("not empty", "50"); - filterOnlyCondition("contains", "1", "wolf"); - _.table.ReadTableRowColumnData(0, 2).then(($cellData) => { - expect($cellData).to.eq("Teresa"); - }); - - _.table.OpenNFilterTable("FirstName", "starts with", "wa", "OR", 1); - _.agHelper.Sleep(); - _.agHelper - .GetText(_.table._showPageItemsCount) - .then(($count) => expect($count).contain("3")); - - _.table.OpenNFilterTable("LastName", "ends with", "son", "OR", 2); - _.agHelper - .GetText(_.table._showPageItemsCount) - .then(($count) => expect($count).contain("10")); - _.table.CloseFilter(); - _.agHelper - .GetText(_.table._filtersCount) - .then(($count) => expect($count).contain("3")); - - _.table.OpenFilter(); - _.table.RemoveFilterNVerify("1", true, false); - }); - - function filterOnlyCondition( - condition: string, - expectedCount: string, - input: string | "" = "", - ) { - _.agHelper.GetNClick(_.table._filterConditionDropdown); - cy.get(_.table._dropdownText).contains(condition).click(); - if (input) - _.agHelper - .GetNClick(_.table._filterInputValue, 0) - .type(input) - .wait(500); - _.agHelper.ClickButton("APPLY"); - _.agHelper - .GetText(_.table._showPageItemsCount) - .then(($count) => expect($count).contain(expectedCount)); - } - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Button_Icon_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Button_Icon_validation_spec.js deleted file mode 100644 index e222542518fc..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Button_Icon_validation_spec.js +++ /dev/null @@ -1,104 +0,0 @@ -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -const testdata = require("../../../../../fixtures/testdata.json"); -const color = "rgb(151, 0, 0)"; -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDsl"); - }); - - it("1. Table widget with with modal popup", function () { - cy.openPropertyPane("tablewidget"); - //update Table name with _ - cy.widgetText( - "Table_1", - widgetsPage.tableWidget, - widgetsPage.widgetNameSpan, - ); - cy.createModal("Modal", "onRowSelected"); - _.table.SelectTableRow(1); - cy.get(".bp3-overlay-backdrop").click({ force: true }); - _.table.SelectTableRow(2); - cy.get(".bp3-overlay-backdrop").click({ force: true }); - }); - - it("2. Table widget with button colour change validation", function () { - cy.openPropertyPane("tablewidget"); - // Open column details of "id". - cy.editColumn("id"); - cy.get(widgetsPage.tableBtn).should("not.exist"); - // Changing column data type to "Button" - cy.changeColumnType("Button", false); - // Changing the computed value (data) to "orderAmount" - cy.updateComputedValue(testdata.currentRowOrderAmt); - cy.changeColumnType("Button", false); - cy.get(widgetsPage.buttonColor) - .click({ force: true }) - .clear() - .type(color, { delay: 0 }); - cy.get(widgetsPage.tableBtn).should( - "have.css", - "background-color", - color, - ); - cy.readTabledataPublish("2", "2").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Tobias Funke"); - }); - }); - - it("3. Table widget icon type and colour validation", function () { - cy.openPropertyPane("tablewidget"); - // Open column details of "id". - cy.get(commonlocators.editPropBackButton).click({ force: true }); - cy.editColumn("id"); - // Change Column type to icon Button - cy.changeColumnType("Icon button", false); - // Select Icon from Icon Control - cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ - force: true, - }); - cy.get(".bp3-icon-add").first().click({ - force: true, - }); - cy.get(".t--widget-tablewidget .tbody .bp3-icon-add").should( - "be.visible", - ); - cy.get(".bp3-overlay-backdrop").click({ force: true }); - }); - - it("4. Table widget validation of a field without js ", function () { - cy.openPropertyPane("tablewidget"); - cy.editColumn("email"); - cy.clearPropertyValue(0); - //toggle js for visiblity - cy.get(".t--property-control-visible .t--js-toggle").click({ - force: true, - }); - cy.EnableAllCodeEditors(); - cy.clearPropertyValue(1); - }); - - it("5. Table widget column reorder and reload function", function () { - cy.openPropertyPane("tablewidget"); - cy.get(commonlocators.editPropBackButton).click({ force: true }); - cy.hideColumn("email"); - cy.hideColumn("userName"); - cy.hideColumn("productName"); - cy.hideColumn("orderAmount"); - cy.readTabledataPublish("2", "2").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Tobias Funke"); - _.agHelper.RefreshPage(); - cy.readTabledataPublish("2", "2").then((tabDataNew) => { - expect(tabDataNew).to.be.equal("Tobias Funke"); - }); - }); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js deleted file mode 100644 index 5d16abf07734..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js +++ /dev/null @@ -1,72 +0,0 @@ -const widgetsPage = require("../../../../../locators/Widgets.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDsl"); - }); - - it("1. Test to validate text color and text background", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - //cy.moveToStyleTab(); - // Click on text color input field - cy.selectColor("textcolor"); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); - cy.wait("@updateLayout"); - // Verify the text color is green - cy.readTabledataValidateCSS("1", "0", "color", "rgb(219, 234, 254)"); - // Change the text color and enter purple in input field - cy.get(widgetsPage.textColor) - .scrollIntoView() - .clear({ force: true }) - .type("purple", { force: true, delay: 0 }); - cy.wait("@updateLayout"); - // Verify the text color is purple - cy.readTabledataValidateCSS("1", "0", "color", "rgb(128, 0, 128)"); - // Click on cell background color - cy.selectColor("cellbackgroundcolor"); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); - // select the green color - - cy.wait("@updateLayout"); - _.agHelper.AssertAutoSave(); - _.deployMode.DeployApp(); - cy.wait(4000); - - // Verify the cell background color is green - cy.readTabledataValidateCSS( - "1", - "1", - "background-color", - "rgb(219, 234, 254)", - ); - _.deployMode.NavigateBacktoEditor(); - cy.openPropertyPane("tablewidget"); - - // Change the cell background color and enter purple in input field - cy.get( - `${widgetsPage.cellBackground_tablev1} [data-testid='t--color-picker-input']`, - ) - .clear({ force: true }) - .type("purple", { force: true, delay: 0 }); - cy.wait("@updateLayout"); - _.agHelper.AssertAutoSave(); - _.deployMode.DeployApp(); - cy.wait(4000); - - // Verify the cell background color is purple - cy.readTabledataValidateCSS( - "1", - "1", - "background-color", - "rgb(128, 0, 128)", - ); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Column_Resize_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Column_Resize_spec.js deleted file mode 100644 index 4bae6884bf66..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Column_Resize_spec.js +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable cypress/no-unnecessary-waiting */ -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget Functionality with Hidden and Resized Columns", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableResizedColumnsDsl"); - }); - - it("Table Widget Functionality with Hidden and Resized Columns", function () { - _.deployMode.DeployApp(); - // Verify column header width should be equal to table width - cy.get(".t--widget-tablewidget") - .invoke("outerWidth") - .then((tableWidth) => { - cy.get(".t--widget-tablewidget .thead .tr") - .invoke("outerWidth") - .then((columnHeaderWidth) => { - expect(columnHeaderWidth).to.be.at.least(tableWidth); - }); - }); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js deleted file mode 100644 index 8ca5779f33ba..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Derived_Column_Data_validation_spec.js +++ /dev/null @@ -1,115 +0,0 @@ -/* eslint-disable cypress/no-unnecessary-waiting */ -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -const commonlocators = require("../../../../../locators/commonlocators.json"); -import { - agHelper, - apiPage, - entityExplorer, - propPane, -} from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Test Create Api and Bind to Table widget", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - agHelper.AddDsl("tableTextPaginationDsl"); - }); - - it("1. Create an API and Execute the API and bind with Table", function () { - // Create and execute an API and bind with table - apiPage.CreateAndFillApi( - this.dataSet.paginationUrl + this.dataSet.paginationParam, - ); - agHelper.VerifyEvaluatedValue( - this.dataSet.paginationUrl + "mock-api?records=20&page=1&size=10", - ); - apiPage.RunAPI(); - //Test: Validate Table with API data and then add a column - // Open property pane - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - // Clear Table data and enter Apil data into table data - cy.testJsontext("tabledata", "{{Api1.data}}"); - // Check Widget properties - cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); - // Open Text1 in propert pane - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - propPane.UpdatePropertyFieldValue("Text", "{{Table1.selectedRow.url}}"); - // Open Table1 propert pane - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - // Compare table 1st index data with itself - cy.readTabledata("0", "0").then((tabData) => { - const tableData = tabData; - localStorage.setItem("tableDataPage1", tableData); - }); - // Verify 1st index data - cy.readTabledata("0", "4").then((tabData) => { - const tableData = tabData; - expect(tableData).to.equal("1"); - }); - // add new column - cy.addColumn("CustomColumn"); - //Test:Table widget toggle test for background color - // Open id property pane - cy.editColumn("id"); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(1000); - // Click on cell background JS button - propPane.EnterJSContext("Cell Background", "Green"); - cy.get("[data-testid='t--property-pane-back-btn']").click({ - force: true, - }); - cy.wait("@updateLayout"); - // verify the cell background color - cy.readTabledataValidateCSS( - "1", - "4", - "background-color", - "rgb(0, 128, 0)", - ); - }); - - it("2. Edit column name and validate test for computed value based on column type selected", function () { - // opoen customColumn1 property pane - cy.editColumn("customColumn1"); - // Enter Apil 1st user email data into customColumn1 - cy.readTabledataPublish("1", "7").then((tabData) => { - const tabValue = tabData; - cy.updateComputedValue("{{Api1.data[0].email}}"); - cy.readTabledataPublish("1", "7").then((tabData) => { - expect(tabData).not.to.be.equal(tabValue); - cy.log("computed value of plain text " + tabData); - }); - }); - cy.closePropertyPane(); - //Test: Update table json data and check the column names updated - // Open table propert pane - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - cy.backFromPropertyPanel(); - // Change the table data - cy.testJsontext( - "tabledata", - JSON.stringify(this.dataSet.TableInputUpdate), - ); - cy.wait("@updateLayout"); - // verify columns are visible or not in the propert pane - cy.tableColumnDataValidation("id"); - cy.tableColumnDataValidation("email"); - cy.tableColumnDataValidation("userName"); - cy.tableColumnDataValidation("productName"); - cy.tableColumnDataValidation("orderAmount"); - cy.tableColumnDataValidation("customColumn1"); - // Hide the columns in property pane - cy.hideColumn("email"); - cy.hideColumn("userName"); - cy.hideColumn("productName"); - cy.hideColumn("orderAmount"); - // verify customColumn is visible in the table - cy.get(".draggable-header:contains('CustomColumn')").should("be.visible"); - cy.closePropertyPane(); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_EmptyRow_Color_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_EmptyRow_Color_spec.js deleted file mode 100644 index 4e618fee9009..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_EmptyRow_Color_spec.js +++ /dev/null @@ -1,54 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -const commonlocators = require("../../../../../locators/commonlocators.json"); - -describe( - "Table Widget empty row color validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDsl"); - }); - - it("1. Validate cell background of columns", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - // give general color to all table row - cy.selectColor("cellbackgroundcolor", -17); - - cy.editColumn("id"); - // Click on cell background color - cy.selectColor("cellbackground", -27); - cy.wait("@updateLayout"); - cy.get(commonlocators.editPropBackButton).click({ force: true }); - cy.wait(1000); - cy.editColumn("email"); - cy.selectColor("cellbackground", -33); - cy.wait("@updateLayout"); - cy.get(commonlocators.editPropBackButton).click({ force: true }); - - // Verify the cell background color of first column - cy.readTabledataValidateCSS( - "1", - "0", - "background-color", - "rgb(185, 28, 28)", - ); - // Verify the cell background color of second column - cy.readTabledataValidateCSS( - "1", - "1", - "background-color", - "rgb(113, 113, 122)", - ); - //Test 2. Validate empty row background - // first cell of first row should be transparent - cy.get( - ".t--widget-tablewidget .tbody div[data-testid='empty-row-0-cell-0']", - ).should("have.css", "background-color", "rgb(185, 28, 28)"); - // second cell of first row should be transparent - cy.get( - ".t--widget-tablewidget .tbody div[data-testid='empty-row-0-cell-1']", - ).should("have.css", "background-color", "rgb(113, 113, 122)"); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js deleted file mode 100644 index 6d5898c59c7c..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_FilteredTableData_spec.js +++ /dev/null @@ -1,56 +0,0 @@ -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../.././../../../locators/commonlocators.json"); -const publish = require("../../../../../locators/publishWidgetspage.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; -const dsl = require("../../../../../fixtures/tableAndTextDsl.json"); - -describe( - "Table Widget Filtered Table data in autocomplete", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableAndTextDsl"); - }); - - it("Table Widget Functionality To Filter and search data", function () { - cy.openPropertyPane("tablewidget"); - cy.get(publish.searchInput).first().type("query"); - cy.get(publish.filterBtn).click(); - cy.get(publish.attributeDropdown).click(); - cy.get(publish.attributeValue).contains("task").click(); - cy.get(publish.conditionDropdown).click(); - cy.get(publish.attributeValue).contains("contains").click(); - cy.get(publish.inputValue).type("bind"); - cy.wait(500); - cy.get(widgetsPage.filterApplyBtn).click({ force: true }); - cy.wait(500); - cy.get(".t--close-filter-btn").click({ force: true }); - }); - - it("Table Widget Functionality to validate filtered table data", function () { - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - cy.testJsontext("text", "{{Table1.filteredTableData[0].task}}"); - cy.readTabledata("0", "1").then((tabData) => { - const tableData = tabData; - cy.get(commonlocators.labelTextStyle).should("have.text", tableData); - }); - - //Table Widget Functionality to validate filtered table data with actual table data - cy.readTabledata("0", "1").then((tabData) => { - const tableData = JSON.parse(dsl.dsl.children[0].tableData); - cy.get(commonlocators.labelTextStyle).should( - "have.text", - tableData[2].task, - ); - }); - }); - - afterEach(() => { - // put your clean up code if any - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_GeneralProperty_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_GeneralProperty_spec.js deleted file mode 100644 index c12a994ef63e..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_GeneralProperty_spec.js +++ /dev/null @@ -1,187 +0,0 @@ -/* eslint-disable cypress/no-unnecessary-waiting */ - -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -const testdata = require("../../../../../fixtures/testdata.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDsl"); - }); - - it("1. Test to validate table pagination is disabled", function () { - // Verify pagination is disabled - cy.get(".t--table-widget-prev-page").should("have.attr", "disabled"); - cy.get(".t--table-widget-next-page").should("have.attr", "disabled"); - cy.get(".t--table-widget-page-input input").should( - "have.attr", - "disabled", - ); - }); - - it("2. Test to validate text allignment", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - // Change the text align to center - cy.xpath(widgetsPage.textCenterAlign).first().click({ force: true }); - // Verify the center text alignment - cy.readTabledataValidateCSS("1", "0", "justify-content", "center"); - // Change the text align to right - cy.xpath(widgetsPage.rightAlign).first().click({ force: true }); - // Verify the right text alignment - cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-end"); - // Change the text align to left - cy.xpath(widgetsPage.leftAlign).first().click({ force: true }); - // verify the left text alignment - cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-start"); - }); - - it("3. Test to validate column heading allignment", function () { - // cy.openPropertyPane("tablewidget"); - // Change the text align to center - cy.xpath(widgetsPage.textCenterAlign).first().click({ force: true }); - // Verify the column headings are center aligned - cy.get(".draggable-header") - .first() - .should("have.css", "text-align", "center"); - // Change the text align to right - cy.xpath(widgetsPage.rightAlign).first().click({ force: true }); - // Verify the column headings are right aligned - cy.get(".draggable-header") - .first() - .should("have.css", "text-align", "right"); - // Change the text align to left - cy.xpath(widgetsPage.leftAlign).first().click({ force: true }); - // Verify the column headings are left aligned - cy.get(".draggable-header") - .first() - .should("have.css", "text-align", "left"); - }); - - it("4. Test to validate text format", function () { - // Select the bold font style - cy.get(widgetsPage.bold).click({ force: true }); - // Varify the font style is bold - cy.readTabledataValidateCSS("1", "0", "font-weight", "700"); - // Change the font style to italic - cy.get(widgetsPage.italics).click({ force: true }); - // Verify the font style is italic - cy.readTabledataValidateCSS("1", "0", "font-style", "italic"); - // Change the font style to underline - cy.editColumn("id"); - cy.get(widgetsPage.underline).click({ force: true }); - // Verify the font style is underline - cy.readTabledataValidateCSS( - "1", - "0", - "text-decoration-line", - "underline", - ); - }); - - it("5. Test to validate vertical allignment", function () { - cy.openPropertyPane("tablewidget"); - // Select the top vertical alignment - cy.get(widgetsPage.verticalTop).click({ force: true }); - // verify vertical alignment is top - cy.readTabledataValidateCSS("1", "0", "align-items", "flex-start"); - // Change the vertical alignment to center - cy.get(widgetsPage.verticalCenter).last().click({ force: true }); - // Verify the vertical alignment is centered - cy.readTabledataValidateCSS("1", "0", "align-items", "center"); - // Change the vertical alignment to bottom - cy.get(widgetsPage.verticalBottom).last().click({ force: true }); - // Verify the vertical alignment is bottom - cy.readTabledataValidateCSS("1", "0", "align-items", "flex-end"); - }); - - it("6. Table widget toggle test for text alignment", function () { - // Click on text align JS - cy.get(widgetsPage.toggleTextAlign).first().click({ force: true }); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(1000); - // Change the text align value to right for michael and left for others - cy.toggleJsAndUpdate("tabledata", testdata.bindingGenAlign); - // Close propert pane - - // Verify the text michael id is right aligned - cy.readTabledataValidateCSS("0", "0", "justify-content", "flex-end"); - // Verify the 2nd id is left aligned - cy.readTabledataValidateCSS("1", "0", "justify-content", "flex-start"); - }); - - it("7. Table widget change text size and validate", function () { - // Verify font size is 14px - cy.readTabledataValidateCSS("0", "0", "font-size", "14px"); - - // Click on text size JS - cy.get(widgetsPage.toggleTextAlign).first().click({ force: true }); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(1000); - // Open txe size dropdown options - cy.get(widgetsPage.textSize).last().click({ force: true }); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(1000); - // Select Heading 1 text size - cy.selectTxtSize("L"); - // Verify the font size is 24px - cy.readTabledataValidateCSS("0", "0", "font-size", "20px"); - // close propert pane - - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(1000); - // Verify the font size is 24px - cy.readTabledataValidateCSS("0", "0", "font-size", "20px"); - }); - - it("8. Test to validate open new tab icon shows when URL type data validate link text ", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - - // go back to 1st - cy.get(commonlocators.editPropBackButton).click({ force: true }); - // Open email property pane - cy.editColumn("email"); - // Change column type to url - cy.changeColumnType("URL", false); - //Check all the occurance - cy.get(".link-text").should("have.length", "3"); - /* - cy.get( - `.t--widget-tablewidget .tbody .td[data-rowindex=1][data-colindex=1] .hidden-icon`, - ) - .should("be.hidden") - .invoke("show"); - cy.get( - `.t--widget-tablewidget .tbody .td[data-rowindex=1][data-colindex=1] .hidden-icon`, - ).should("be.visible"); - */ - }); - - it("9. Edit column name and test for table header changes", function () { - cy.get(commonlocators.editPropBackButton).click({ force: true }); - // Open email property pane - cy.editColumn("email"); - // CHange the Column email name to Email Address - cy.editColName("Email Address"); - // verify changed email name is visible - cy.get(".draggable-header:contains('Email Address')").should( - "be.visible", - ); - cy.get(commonlocators.editPropBackButton).click({ force: true }); - }); - - it("10. Edit Row height and test table for changes", function () { - cy.openPropertyPane("tablewidget"); - cy.get(widgetsPage.rowHeight).last().click({ force: true }); - cy.get(".t--dropdown-option").contains("Short").click({ force: true }); - cy.wait(2000); - _.deployMode.DeployApp(); - cy.readTabledataValidateCSS("0", "1", "height", "19px", true); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js deleted file mode 100644 index 2515463b6c58..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_dataUpdation_spec.js +++ /dev/null @@ -1,40 +0,0 @@ -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -const widgetsPage = require("../../../../../locators/Widgets.json"); -import { - agHelper, - deployMode, - entityExplorer, - propPane, - table, -} from "../../../../../support/Objects/ObjectsCore"; - -/* -Selected row stays selected after data updation -if the primary column value isn't updated. -*/ -describe( - "Table Widget row multi select validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - agHelper.AddDsl("multiSelectedRowUpdationDsl"); - }); - - it("Test multi select column shows when enableMultirowselection is true and not when enableMultirowselection is off", function () { - agHelper.GetNClick(widgetsPage.buttonWidget); - cy.get(widgetsPage.buttonWidget).last().click(); - deployMode.DeployApp(); - agHelper.GetNClick(table._multirowselect, 1); - agHelper.GetNClick(table._multirowselect, 2); - agHelper.AssertElementLength(table._selectedrow, 2); - deployMode.NavigateBacktoEditor(); - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - propPane.TogglePropertyState("Enable multi row selection", "Off"); - deployMode.DeployApp(); - agHelper.AssertElementAbsence(table._multirowselect); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_spec.js deleted file mode 100644 index ba640223c233..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_MultiRowSelect_spec.js +++ /dev/null @@ -1,66 +0,0 @@ -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget row multi select validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDsl"); - }); - - it("1. Test multi select column shows when enable Multirowselection is true", function () { - cy.openPropertyPane("tablewidget"); - cy.get(widgetsPage.toggleEnableMultirowselection_tablev1) - .first() - .click({ force: true }); - cy.closePropertyPane("tablewidget"); - cy.get(".t--table-multiselect-header").should("be.visible"); - cy.get(".t--table-multiselect").should("be.visible"); - //Test click on header cell selects all row - // click on header check cell - cy.get(".t--table-multiselect-header").first().click({ force: true }); - // check if rows selected - cy.get(".tr").should("have.class", "selected-row"); - //Test click on single row cell changes header select cell state - // un-select all rows - cy.get(".t--table-multiselect-header").first().click({ force: true }); - // click on first row select box - cy.get(".t--table-multiselect").first().click({ force: true }).wait(500); - // check if header cell is in half check state - cy.get(".t--table-multiselect-header-half-check-svg").should( - "be.visible", - ); - }); - it("2. Test action configured on onRowSelected get triggered whenever a table row is selected", function () { - cy.openPropertyPane("tablewidget"); - cy.getAlert("onRowSelected", "Row Selected"); - // un select first row - cy.get(".t--table-multiselect").first().click({ force: true }); - cy.get(commonlocators.toastmsg).should("not.exist"); - // click on first row select box - cy.get(".t--table-multiselect").first().click({ force: true }); - cy.get(commonlocators.toastmsg).contains("Row Selected"); - }); - - it("3. It should deselected default Selected Row when the header cell is clicked", () => { - cy.openPropertyPane("tablewidget"); - cy.testJsontext("defaultselectedrow", 0); - - // click on header check cell - cy.get(".t--table-multiselect-header").first().click({ - force: true, - }); - // check if rows selected - cy.get(".tr").should("not.have.class", "selected-row"); - - // click on header check cell - cy.get(".t--table-multiselect-header").first().click({ - force: true, - }); - // check if rows is not selected - cy.get(".tr").should("have.class", "selected-row"); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Number_column_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Number_column_spec.js deleted file mode 100644 index 05da815adf2c..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Number_column_spec.js +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-disable cypress/no-unnecessary-waiting */ -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Validate Table Widget Table data", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("basicNumberDataTableDsl"); - }); - - it("Check number key in table data convert table binding and header properly", function () { - cy.openPropertyPane("tablewidget"); - - // numeric table data - const tableData = [ - { - 1: "abc", - 2: "bcd", - 3: "cde", - Dec: "mon", - demo: "3", - demo_1: "1", - "test one": "1", - "test 3 4 9": "4", - rowIndex: "0", - }, - { - 1: "asd", - 2: "dfg", - 3: "jkl", - Dec: "mon2", - demo: "2", - demo_1: "1", - "test one": "2", - "test 3 4 9": "3", - rowIndex: "1", - }, - ]; - // add data manually - cy.testJsontext("tabledata", JSON.stringify(tableData)); - - cy.contains('[role="columnheader"]', "_1").should("exist"); - cy.contains('[role="columnheader"]', "_2").should("exist"); - }); - - afterEach(() => { - // put your clean up code if any - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_1_spec.js deleted file mode 100644 index 444225153534..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_1_spec.js +++ /dev/null @@ -1,229 +0,0 @@ -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -const testdata = require("../../../../../fixtures/testdata.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDslWithPagination"); - }); - - // To be done: - // Column Data type: Video - it("1. Check open section and column data in property pane", function () { - cy.openPropertyPane("tablewidget"); - - // Validate the columns are visible in the property pane - cy.tableColumnDataValidation("id"); - cy.tableColumnDataValidation("email"); - cy.tableColumnDataValidation("userName"); - cy.tableColumnDataValidation("productName"); - cy.tableColumnDataValidation("orderAmount"); - - // Updating the column name ; "id" > "TestUpdated" - cy.tableColumnPopertyUpdate("id", "TestUpdated"); - - // Add new column in the table with name "CustomColumn" - cy.addColumn("CustomColumn"); - - cy.tableColumnDataValidation("customColumn1"); //To be updated later - - // Hide all other columns - cy.hideColumn("email"); - cy.hideColumn("userName"); - cy.hideColumn("productName"); - cy.hideColumn("orderAmount"); - - // Verifying the newly added column - cy.get(".draggable-header:contains('CustomColumn')").should("be.visible"); - }); - - it("2. Column Detail - Edit column name and validate test for computed value based on column type selected (Email, Number, Date)", function () { - cy.wait(1000); - cy.makeColumnVisible("email"); - cy.makeColumnVisible("userName"); - cy.makeColumnVisible("productName"); - cy.makeColumnVisible("orderAmount"); - cy.openPropertyPane("tablewidget"); - - // Open column detail to be edited by draggable id - cy.editColumn("id"); - // Change the column name - cy.editColName("updatedId"); - // Reading single cell value of the table and verify it's value. - cy.readTabledataPublish("1", "1").then((tabData) => { - const tabValue = tabData; - cy.log(tabData); - expect(tabData).to.not.equal("2736212"); - // Changing the Computed value from "id" to "Email" - cy.updateComputedValue(testdata.currentRowEmail); - // Reading single cell value of the table and verify it's value. - cy.readTabledataPublish("1", "0").then((tabData2) => { - cy.log(tabData2); - expect(tabData2).to.be.equal(tabValue); - cy.log("computed value of plain text " + tabData2); - }); - }); - - // Changing Column data type from "Plain text" to "Number" - cy.changeColumnType("Number", false); - cy.readTabledataPublish("1", "4").then((tabData) => { - cy.log(tabData); - expect(tabData).to.not.equal("lindsay.ferguson@reqres.in"); - // Email to "orderAmount" - cy.updateComputedValue(testdata.currentRowOrderAmt); - cy.readTabledataPublish("1", "0").then((tabData2) => { - cy.log(tabData2); - expect(tabData2).to.be.equal(tabData); - cy.log("computed value of number is " + tabData2); - }); - }); - - // Changing Column data type from "Number" to "Date" - cy.changeColumnType("Date", false); - // orderAmout to "Moment Date" - cy.updateComputedValue(testdata.momentDate); - cy.readTabledataPublish("1", "1").then((tabData) => { - expect(tabData).to.not.equal("9.99"); - cy.log("computed value of Date is " + tabData); - }); - - // Changing Column data type from "URL" to "Video" - /* const videoVal = 'https://youtu.be/Sc-m3ceZyfk'; - cy.changeColumnType("Video", false); - // "Moement "date" to "Video" - cy.updateComputedValue(videoVal); - // cy.testJson text("computedvalue", videoVal, ) - // Verifying the href of the Video added. - cy.readTableLinkPublish("1", "1").then((hrefVal) => { - expect(hrefVal).to.be.equal(videoVal); - });*/ - }); - - it("3. Column Detail - Edit column name and validate test for computed value based on column type selected (image, button , url)", function () { - // Changing Column data type from "Date" to "Image" - const imageVal = "http://host.docker.internal:4200/453-200x300.jpg"; - - cy.changeColumnType("Image", false); - // "Moement "date" to "Image" - cy.updateComputedValue(imageVal); - // Verifying the href of the image added. - cy.readTableLinkPublish("1", "0").then((hrefVal) => { - expect(hrefVal).to.be.contains(imageVal); - }); - - // change column data type to "icon button" - cy.changeColumnType("Icon button", false); - cy.wait(400); - cy.get(commonlocators.selectedIcon).should("have.text", "add"); - - cy.getTableDataSelector("0", "0").then((selector) => { - cy.get(selector + " button.bp3-button [data-icon=add]").should("exist"); - }); - - // Changing Column data type from "Date" to "URl" - cy.readTabledataPublish("1", "1").then((actualEmail) => { - cy.changeColumnType("URL", false); - // "Image" to "url" - cy.updateComputedValue(testdata.currentRowEmail); - cy.readTabledataPublish("1", "0").then((tabData2) => { - expect(tabData2) - .to.equal("lindsay.ferguson@reqres.in") - .to.eq(actualEmail); - cy.log("computed value of URL is " + tabData2); - }); - }); - }); - - it("4. Test to validate text alignment", function () { - // Verifying Center Alignment - cy.xpath(widgetsPage.textCenterAlign).first().click({ force: true }); - cy.readTabledataValidateCSS("1", "0", "justify-content", "center", true); - - // Verifying Right Alignment - cy.xpath(widgetsPage.rightAlign).first().click({ force: true }); - cy.readTabledataValidateCSS( - "1", - "0", - "justify-content", - "flex-end", - true, - ); - - // Verifying Left Alignment - cy.xpath(widgetsPage.leftAlign).first().click({ force: true }); - cy.readTabledataValidateCSS( - "0", - "0", - "justify-content", - "flex-start", - true, - ); - }); - - it("5. Test to validate vertical alignment", function () { - // Validate vertical alignemnt of Cell text to TOP - cy.get(widgetsPage.verticalTop).click({ force: true }); - cy.readTabledataValidateCSS("1", "0", "align-items", "flex-start", true); - // Validate vertical alignemnt of Cell text to Center - cy.get(widgetsPage.verticalCenter).last().click({ force: true }); - cy.readTabledataValidateCSS("1", "0", "align-items", "center", true); - // Validate vertical alignemnt of Cell text to Bottom - cy.get(widgetsPage.verticalBottom).last().click({ force: true }); - cy.readTabledataValidateCSS("0", "0", "align-items", "flex-end", true); - }); - - it("6. Test to validate text color and text background", function () { - cy.openPropertyPane("tablewidget"); - - // Changing text color to rgb(219, 234, 254) and validate - cy.selectColor("textcolor"); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(5000); - cy.wait("@updateLayout"); - cy.readTabledataValidateCSS("1", "0", "color", "rgb(219, 234, 254)"); - - // Changing text color to PURPLE and validate using JS - cy.get(widgetsPage.toggleJsColor).click({ force: true }); - cy.wait(500); - cy.testCodeMirrorLast("purple"); - cy.wait("@updateLayout"); - cy.readTabledataValidateCSS("1", "0", "color", "rgb(128, 0, 128)"); - cy.get(commonlocators.editPropBackButton).click(); - // Changing Cell backgroud color to rgb(219, 234, 254) and validate - cy.selectColor("cellbackgroundcolor"); - cy.readTabledataValidateCSS( - "0", - "0", - "background", - "rgb(219, 234, 254) none repeat scroll 0% 0% / auto padding-box border-box", - true, - ); - // Changing Cell backgroud color to PURPLE and validate using JS - _.propPane.EnterJSContext("Cell background color", "purple"); - cy.wait("@updateLayout"); - cy.readTabledataValidateCSS( - "0", - "0", - "background", - "rgb(128, 0, 128) none repeat scroll 0% 0% / auto padding-box border-box", - true, - ); - // close property pane - cy.closePropertyPane(); - }); - - it("7. Table-Delete Verification", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - // Delete the Table widget - cy.deleteWidget(widgetsPage.tableWidget); - _.deployMode.DeployApp(); - // Verify the Table widget is deleted - cy.get(widgetsPage.tableWidget).should("not.exist"); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_2_spec.js deleted file mode 100644 index 30f565309753..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_2_spec.js +++ /dev/null @@ -1,189 +0,0 @@ -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -import { - agHelper, - deployMode, - locators, - table, -} from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - agHelper.AddDsl("tableNewDslWithPagination"); - }); - - // To be done: - // Column Data type: Video - - it("1. Verify On Row Selected Action", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - // Select show message in the "on selected row" dropdown - cy.getAlert("onRowSelected", "Row is selected"); - deployMode.DeployApp(locators._widgetInDeployed("tablewidget")); - table.WaitUntilTableLoad(0, 0, "v1"); - // Select 1st row - table.SelectTableRow(1); - // Verify Row is selected by showing the message - agHelper.ValidateToastMessage("Row is selected"); - deployMode.NavigateBacktoEditor(); - }); - - it("2. Check On Page Change Action", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - // Select show message in the "on selected row" dropdown - cy.getAlert("onPageChange", "Page Changed"); - deployMode.DeployApp(locators._widgetInDeployed("tablewidget")); - table.WaitUntilTableLoad(0, 0, "v1"); - cy.wait(2000); - // Change the page - cy.get(widgetsPage.nextPageButton).click({ force: true }); - // Verify the page is changed - agHelper.ValidateToastMessage("Page Changed"); - deployMode.NavigateBacktoEditor(); - }); - - it("3. Verify On Search Text Change Action", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - // Show Message on Search text change Action - cy.getAlert("onSearchTextChanged", "Search Text Changed"); - deployMode.DeployApp(locators._widgetInDeployed("tablewidget")); - table.WaitUntilTableLoad(0, 0, "v1"); - // Change the Search text - cy.get(widgetsPage.searchField).first().type("Hello"); - // Verify the search text is changed - cy.get(commonlocators.toastmsg).contains("Search Text Changed"); - deployMode.NavigateBacktoEditor(); - }); - - it("4. Test to validate text format", function () { - cy.openPropertyPane("tablewidget"); - cy.editColumn("id"); - // Validate Bold text - cy.get(widgetsPage.bold).click({ force: true }); - cy.wait(2000); - cy.reload(); - cy.readTabledataValidateCSS("1", "0", "font-weight", "700"); - // Validate Italic text - cy.get(widgetsPage.italics).click({ force: true }); - cy.readTabledataValidateCSS("0", "0", "font-style", "italic"); - }); - - it("5. Verify default search text", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - cy.backFromPropertyPanel(); - // Chage deat search text value to "data" - cy.testJsontext("defaultsearchtext", "data"); - deployMode.DeployApp(locators._widgetInDeployed("tablewidget")); - table.WaitUntilTableLoad(0, 0, "v1"); - // Verify the deaullt search text - cy.get(widgetsPage.searchField).should("have.value", "data"); - deployMode.NavigateBacktoEditor(); - }); - - it("6. Verify default selected row", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - cy.backFromPropertyPanel(); - cy.testJsontext("defaultsearchtext", ""); - // Change default selected row value to 1 - cy.get(widgetsPage.defaultSelectedRowField).type("1"); - cy.wait(2000); - deployMode.DeployApp(locators._widgetInDeployed("tablewidget")); - table.WaitUntilTableLoad(0, 0, "v1"); - // Verify the default selected row - cy.get(widgetsPage.selectedRow).should( - "have.css", - "background-color", - "rgb(227, 223, 251)", - ); - deployMode.NavigateBacktoEditor(); - }); - - it("7. Verify table column type button with button variant", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - // Add new column in the table with name "CustomColumn" - cy.addColumn("CustomColumn"); - - cy.tableColumnDataValidation("customColumn1"); //To be updated later - - cy.editColumn("customColumn1"); - cy.changeColumnType("Button", false); - // default selected opts - cy.get(commonlocators.tableButtonVariant + " span span").should( - "have.text", - "Primary", - ); - cy.getTableDataSelector("1", "5").then((selector) => { - cy.get(selector + " button").should( - "have.css", - "background-color", - "rgb(85, 61, 233)", - ); - cy.get(selector + " button > span").should( - "have.css", - "color", - "rgb(255, 255, 255)", - ); - }); - cy.selectDropdownValue( - commonlocators.tableButtonVariant + " input", - "Secondary", - ); - cy.get(commonlocators.tableButtonVariant + " span span").should( - "have.text", - "Secondary", - ); - cy.getTableDataSelector("1", "5").then((selector) => { - cy.get(selector + " button").should( - "have.css", - "background-color", - "rgba(0, 0, 0, 0)", - ); - cy.get(selector + " button > span").should( - "have.css", - "color", - "rgb(85, 61, 233)", - ); - cy.get(selector + " button").should( - "have.css", - "border", - `1px solid rgb(85, 61, 233)`, - ); - }); - cy.selectDropdownValue( - commonlocators.tableButtonVariant + " input", - "Tertiary", - ); - cy.get(commonlocators.tableButtonVariant + " span span").should( - "have.text", - "Tertiary", - ); - cy.getTableDataSelector("1", "5").then((selector) => { - cy.get(selector + " button").should( - "have.css", - "background-color", - "rgba(0, 0, 0, 0)", - ); - cy.get(selector + " button > span").should( - "have.css", - "color", - "rgb(85, 61, 233)", - ); - cy.get(selector + " button").should( - "have.css", - "border", - "0px none rgb(24, 32, 38)", - ); - }); - cy.closePropertyPane(); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_IconName_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_IconName_spec.js deleted file mode 100644 index d8297951f0fe..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_PropertyPane_IconName_spec.js +++ /dev/null @@ -1,41 +0,0 @@ -const commonlocators = require("../../../../../locators/commonlocators.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDslWithPagination"); - }); - - it("Verify table column type changes effect on menuButton and iconButton", function () { - cy.openPropertyPane("tablewidget"); - cy.addColumn("CustomColumn"); - cy.editColumn("customColumn1"); - - cy.changeColumnType("Menu button", false); - cy.wait(400); - cy.get(commonlocators.selectedIcon).should("have.text", "(none)"); - cy.getTableDataSelector("1", "5").then((selector) => { - cy.get(selector + " button span.bp3-icon").should("not.exist"); - }); - - cy.changeColumnType("Icon button", false); - cy.wait(400); - cy.get(commonlocators.selectedIcon).should("have.text", "add"); - cy.getTableDataSelector("1", "5").then((selector) => { - cy.get(selector + " button span.bp3-icon-add").should("exist"); - }); - - cy.changeColumnType("Menu button", false); - cy.wait(500); - cy.get(commonlocators.selectedIcon).should("have.text", "(none)"); - cy.getTableDataSelector("1", "5").then((selector) => { - cy.get(selector + " button span.bp3-icon").should("not.exist"); - }); - - cy.closePropertyPane(); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js deleted file mode 100644 index e20ef0227328..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Property_JsonUpdate_spec.js +++ /dev/null @@ -1,105 +0,0 @@ -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -const commonlocators = require("../../../../../locators/commonlocators.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Test Create Api and Bind to Table widget", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableTextPaginationDsl"); - }); - - it("1. Create an API and Execute the API and bind with Table", function () { - cy.createAndFillApi( - this.dataSet.paginationUrl, - this.dataSet.paginationParam, - ); - _.agHelper.VerifyEvaluatedValue( - this.dataSet.paginationUrl + "mock-api?records=20&page=1&size=10", - ); - cy.RunAPI(); - }); - - it("2. Validate Table with API data and then add a column", function () { - // Open property pane - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - // Change the table data to Apil data users - cy.testJsontext("tabledata", "{{Api1.data}}"); - // Check server sided pagination - cy.CheckWidgetProperties(commonlocators.serverSidePaginationCheckbox); - // Open property pane of Text1 - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - // Change the text value to selected url - cy.testJsontext("text", "{{Table1.selectedRow.url}}"); - // Open property pane - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - // Copmre the table 1st index with itself - cy.readTabledata("0", "0").then((tabData) => { - const tableData = tabData; - localStorage.setItem("tableDataPage1", tableData); - }); - cy.readTabledata("0", "4").then((tabData) => { - const tableData = tabData; - expect(tableData).to.equal("1"); - }); - // Add new column - cy.addColumn("CustomColumn"); - }); - - it("3. Update table json data and check the column names updated and validate empty value", function () { - // Open property pane - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - // Change the table data - cy.testJsontext( - "tabledata", - JSON.stringify(this.dataSet.TableInputWithNull), - ); - cy.wait("@updateLayout"); - // Verify the columns are visible in property pane - cy.tableColumnDataValidation("id"); - cy.tableColumnDataValidation("email"); - cy.tableColumnDataValidation("userName"); - cy.tableColumnDataValidation("productName"); - cy.tableColumnDataValidation("orderAmount"); - cy.tableColumnDataValidation("customColumn1"); - // Hide the columns in the table from property pane - cy.hideColumn("id"); - cy.hideColumn("email"); - cy.hideColumn("userName"); - cy.hideColumn("productName"); - // Verify CustomColumn is visible - cy.get(".draggable-header:contains('CustomColumn')").should("be.visible"); - // close property pane - cy.closePropertyPane(); - // Validate the empty values - cy.readTabledataPublish("0", "0").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal(""); - }); - }); - - it("4. Check Selected Row(s) Resets When Table data Changes", function () { - // Select 1st row - _.table.SelectTableRow(1); - cy.openPropertyPane("tablewidget"); - // Empty first row - cy.testJsontext("tabledata", "[]"); - cy.wait("@updateLayout"); - const newTableData = [...this.dataSet.TableInput]; - newTableData[0].userName = ""; - // Change table data from empty to some - cy.testJsontext("tabledata", JSON.stringify(newTableData)); - cy.wait("@updateLayout"); - const selectedRowsSelector = `.t--widget-tablewidget .tbody .tr.selected-row`; - // Verify selected row resets on table data changes - cy.get(selectedRowsSelector).should(($p) => { - // should found 0 rows - expect($p).to.have.length(0); - }); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Switch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Switch_spec.js deleted file mode 100644 index c76445ff7f1c..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Switch_spec.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable cypress/no-unnecessary-waiting */ -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget and Switch binding Functionality", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("swtchTableDsl"); - }); - - it("Table Widget Data validation with Switch ON", function () { - cy.openPropertyPane("tablewidget"); - cy.readTabledataPublish("1", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("30"); - cy.log("the value is" + tabValue); - }); - cy.get(".t--switch-widget-active .bp3-control-indicator").click({ - force: true, - }); - cy.wait(5000); - cy.readTabledataPublish("1", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("9"); - cy.log("the value is" + tabValue); - }); - cy.get(".t--switch-widget-inactive .bp3-control-indicator").click({ - force: true, - }); - cy.wait(5000); - - cy.readTabledataPublish("1", "1").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("30"); - cy.log("the value is" + tabValue); - }); - }); - - it("Selected row and binding with Text widget", function () { - cy.wait(5000); - cy.get(".t--table-multiselect").eq(1).click({ force: true }); - cy.get(".t--draggable-textwidget .bp3-ui-text span").should( - "contain.text", - "30", - ); - cy.get(".t--table-multiselect").eq(0).click({ force: true }); - cy.get(".t--draggable-textwidget .bp3-ui-text span").should( - "contain.text", - "29", - ); - }); - - afterEach(() => { - // put your clean up code if any - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js deleted file mode 100644 index ad7030e17bd5..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Add_button_spec.js +++ /dev/null @@ -1,365 +0,0 @@ -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -import { agHelper, propPane } from "../../../../../support/Objects/ObjectsCore"; -const testdata = require("../../../../../fixtures/testdata.json"); - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - agHelper.AddDsl("tableNewDsl"); - }); - - it("1. Table widget with Add button test and validation", function () { - cy.openPropertyPane("tablewidget"); - // Open column details of "id". - cy.editColumn("id"); - cy.get(widgetsPage.tableBtn).should("not.exist"); - // Changing column data type to "Button" - cy.changeColumnType("Button", false); - // Changing the computed value (data) to "orderAmount" - cy.updateComputedValue(testdata.currentRowOrderAmt); - // Selecting button action to show message - cy.getAlert("onClick", "Successful ".concat(testdata.currentRowEmail)); - // Close Property pane - cy.get(commonlocators.editPropBackButton).click({ - force: true, - }); - agHelper.Sleep(); - // Validating the button action by clicking - cy.get(widgetsPage.tableBtn).last().click({ force: true }); - // eslint-disable-next-line cypress/no-unnecessary-waiting - agHelper.Sleep(); - // Validating the toast message - cy.get(widgetsPage.toastAction).should("be.visible"); - cy.get(widgetsPage.toastActionText) - .last() - .invoke("text") - .then((text) => { - expect(text).to.equal("Successful tobias.funke@reqres.in"); - }); - - // Open column details of "id". - cy.editColumn("id"); - - cy.get(widgetsPage.toggleOnClick).click({ force: true }); - cy.get(".t--property-control-onclick").then(($el) => { - cy.updateCodeInput( - $el, - "{{showAlert('Successful' + currentRow.email).then(() => showAlert('second alert')) }}", - ); - }); - - cy.get(commonlocators.editPropBackButton).click({ - force: true, - }); - - // Validating the button action by clicking - cy.get(widgetsPage.tableBtn).last().click({ force: true }); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(3000); - - cy.get(widgetsPage.toastActionText) - .last() - .invoke("text") - .then((text) => { - expect(text).to.equal("second alert"); - }); - }); - - it("2. Table Button color validation", function () { - cy.openPropertyPane("tablewidget"); - // Open column details of "id". - cy.editColumn("id"); - // Changing column data type to "Button" - /* cy.get(commonlocators.changeColType) - .last() - .click(); - cy.get(".t--dropdown-option") - .children() - .contains("Plain text") - .click(); - cy.changeColumnType("Button", false); */ - const color1 = "rgb(255, 0, 0)"; - cy.get(widgetsPage.buttonColor) - .click({ force: true }) - .clear() - .type(color1, { force: true, delay: 0 }); - cy.get(widgetsPage.tableBtn).should( - "have.css", - "background-color", - color1, - ); - - // Changing the color again to reproduce issue #9526 - const color2 = "rgb(255, 255, 0)"; - cy.get(widgetsPage.buttonColor) - .click({ force: true }) - .clear() - // following wait is required to reproduce #9526 - .wait(600) - .type(color2, { delay: 0 }); - cy.get(widgetsPage.tableBtn).should( - "have.css", - "background-color", - color2, - ); - }); - - it("3. Table widget triggeredRow property should be accessible", function () { - cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); - // Table widget triggeredRow property should be same even after sorting the table", function () { - //sort table date on second column - cy.get(".draggable-header ").first().click({ force: true }); - cy.wait(1000); - cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); - }); - - it("4. Table widget add new icon button column", function () { - cy.get("[data-testid='t--property-pane-back-btn']").click({ - force: true, - }); - // hide id column - cy.makeColumnVisible("id"); - cy.wait(1000); - // click on Add new Column. - //cy.get("[data-testid='t--property-pane-back-btn']").click({ force: true }); - cy.get(".t--add-column-btn").click(); - //Open New Custom Column - cy.editColumn("customColumn1"); - // Change Column type to icon Button - cy.changeColumnType("Icon button", false); - // Select Icon from Icon Control - cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ - force: true, - }); - cy.get(".bp3-icon-add").first().click({ - force: true, - }); - cy.get(".t--widget-tablewidget .tbody .bp3-icon-add").should("exist"); - - // disabled icon btn - cy.CheckWidgetProperties(commonlocators.disableCheckbox); - cy.getTableDataSelector("0", "4").then((selector) => { - cy.get(selector + " button.bp3-disabled").should("exist"); - }); - cy.UncheckWidgetProperties(commonlocators.disableCheckbox); - - //Delete Column - cy.get("[data-testid='t--property-pane-back-btn']").click({ - force: true, - }); - cy.deleteColumn("customColumn1"); - // Close Property pane - /* - cy.get(commonlocators.editPropCrossButton).click({ - force: true, - }); - */ - }); - - it("5. Table widget add new menu button column", function () { - cy.openPropertyPane("tablewidget"); - // click on Add new Column. - cy.get(".t--add-column-btn").click(); - //Open New Custom Column - cy.editColumn("customColumn1"); - // Change Column type to icon Button - cy.changeColumnType("Menu button", false); - //Changing the text on the Menu button - cy.testJsontext("label", "Menu button"); - // Select Icon from Icon Control - cy.get(".t--property-control-icon .bp3-icon-caret-down").click({ - force: true, - }); - cy.get(".bp3-icon-airplane").first().click({ - force: true, - }); - // validate icon - cy.get(".t--widget-tablewidget .tbody .bp3-icon-airplane").should( - "exist", - ); - //cy.get(".editable-text-container").eq(1).click(); - // validate label - cy.contains("Menu button").should("exist"); - - const color1 = "rgb(255, 255, 0)"; - cy.get(widgetsPage.menuColor) - .click() - .clear() - .click({ force: true }) - .type(color1, { delay: 0 }); - - cy.get(widgetsPage.tableBtn).should( - "have.css", - "background-color", - color1, - ); - - // Changing the color again to reproduce issue #9526 - const color2 = "rgb(255, 0, 0)"; - cy.get(widgetsPage.menuColor) - .clear() - .click({ force: true }) - // following wait is required to reproduce #9526 - .wait(500) - .type(color2, { delay: 0 }); - cy.get(widgetsPage.tableBtn).should( - "have.css", - "background-color", - color2, - ); - - // Add a Menu item 1 - cy.get(".t--add-menu-item-btn") - .click({ - force: true, - }) - .wait(500); - // Edit a Menu item - cy.get(".t--property-pane-section-menuitems .t--edit-column-btn") - .first() - .click({ - force: true, - }); - cy.wait(1000); - // update menu item background color - cy.get(widgetsPage.backgroundcolorPickerNew) - .type("#03b365", { - force: true, - }) - .wait(500); - // Add action to the menu Item - cy.getAlert( - "onItemClick", - "Successful ".concat(testdata.currentRowEmail), - ); - // Go back to table property pane - cy.get("[data-testid='t--property-pane-back-btn']").click({ - force: true, - }); - - // Add a Menu item 2 - cy.get(".t--add-menu-item-btn").click({ - force: true, - }); - // Edit a Menu item - cy.get(".t--property-pane-section-menuitems .t--edit-column-btn") - .last() - .click({ - force: true, - }); - // update menu item background color - cy.get(widgetsPage.backgroundcolorPickerNew) - .clear() - .type("#FFC13D", { - force: true, - }) - .wait(500); - // Go back to table property pane - cy.get("[data-testid='t--property-pane-back-btn']").click({ - force: true, - }); - - // Add a Menu item 3 - cy.get(".t--add-menu-item-btn").click({ - force: true, - }); - // Edit a Menu item - cy.get(".t--property-pane-section-menuitems .t--edit-column-btn") - .last() - .click({ - force: true, - }); - // update menu item background color - cy.get(widgetsPage.backgroundcolorPickerNew) - .clear() - .type("#3366FF", { - force: true, - }) - .wait(500); - // Go back to table property pane - cy.get("[data-testid='t--property-pane-back-btn']").click({ - force: true, - }); - - // Close Property pane - cy.openPropertyPane("tablewidget"); - // Click on the Menu button - cy.contains("Menu button").click({ - force: true, - }); - cy.wait(1000); - - //Commenting below verification until fixed to overide flakiness - // // verify menu items background color - // cy.get(".bp3-menu-item") - // .eq(0) - // .should("have.css", "background-color", "rgb(3, 179, 101)"); - // cy.get(".bp3-menu-item") - // .eq(1) - // .should("have.css", "background-color", "rgb(51, 102, 255)"); //"rgb(255, 193, 61)"); - // cy.get(".bp3-menu-item") - // .eq(2) - // .should("have.css", "background-color", "rgb(255, 255, 255)");//"rgb(51, 102, 255)"); - - //cy.closePropertyPane(); - - cy.closePropertyPane(); - - // disable menu item 3 - //cy.openPropertyPane("tablewidget"); - - //cy.editColumn("customColumn1"); - // Edit a Menu item - cy.get(".t--property-pane-section-menuitems .t--edit-column-btn") - .last() - .click({ - force: true, - }); - cy.wait(1000); - cy.get(".t--property-control-disabled label input").click({ - force: true, - }); - //cy.closePropertyPane(); - - // Click on the Menu button - cy.clickButton("Menu button").wait(1000); - // check Menu Item 3 is disable - cy.get(".bp3-menu-item") - .eq(2) - .should("have.css", "background-color", "rgb(250, 250, 250)"); - cy.get(".bp3-menu-item").eq(2).should("have.class", "bp3-disabled"); - - // Click on the Menu Item - cy.get(".bp3-menu-item").eq(0).click({ - force: true, - }); - // Validating the toast message - cy.get(widgetsPage.toastAction).should("be.visible"); - cy.get(widgetsPage.toastActionText) - .last() - .invoke("text") - .then((text) => { - const someText = text; - expect(someText).to.equal("Successful tobias.funke@reqres.in"); - }); - }); - - it("6. Table widget test on button icon click, row should not get deselected", () => { - cy.get(widgetsPage.tableIconBtn).last().click({ force: true }); - cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); - //click icon button again - cy.get(widgetsPage.tableIconBtn).last().click({ force: true }); - cy.get(commonlocators.TextInside).should("have.text", "Tobias Funke"); - cy.get("[data-testid='t--property-pane-back-btn']").click({ - force: true, - }); - cy.wait(500); - cy.get("[data-testid='t--property-pane-back-btn']").click({ - force: true, - }); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js deleted file mode 100644 index eb520e19fb6f..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Copy_Paste_spec.js +++ /dev/null @@ -1,62 +0,0 @@ -import { - PageLeftPane, - PagePaneSegment, -} from "../../../../../support/Pages/EditorNavigation"; - -const apiwidget = require("../../../../../locators/apiWidgetslocator.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -const widgetsPage = require("../../../../../locators/Widgets.json"); -import { - agHelper, - entityExplorer, -} from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Test Suite to validate copy/paste table Widget", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - agHelper.AddDsl("tableNewDsl"); - }); - - it("Copy paste table widget and valdiate application status", function () { - const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - cy.openPropertyPane("tablewidget"); - cy.widgetText( - "Table1", - widgetsPage.tableWidget, - widgetsPage.widgetNameSpan, - ); - cy.get("body").type(`{${modifierKey}}c`); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); - cy.get(commonlocators.toastBody).first().contains("Copied"); - cy.get("body").click(); - cy.get("body").type(`{${modifierKey}}v`, { force: true }); - cy.wait("@updateLayout").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.get(commonlocators.toastAction).should("be.visible"); - - //Check after copying new table widget should not have any warnings - cy.get('.t--widget-propertypane-toggle [name="warning"]').should( - "not.exist", - ); - cy.get(commonlocators.toastAction).should("not.be.visible"); - cy.wait(2000); - PageLeftPane.switchSegment(PagePaneSegment.UI); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Table1Copy", - action: "Show bindings", - }); - cy.wait(200); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(13); - expect($lis.eq(0)).to.contain("{{Table1Copy.selectedRow}}"); - expect($lis.eq(1)).to.contain("{{Table1Copy.selectedRows}}"); - }); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Default_Row_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Default_Row_spec.js deleted file mode 100644 index 7a73959022fa..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Default_Row_spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -import EditorNavigation, { - EntityType, -} from "../../../../../support/Pages/EditorNavigation"; - -describe( - "Table Widget property pane deafult feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("defaultTableDsl"); - }); - - it("Verify default table row Data", function () { - // Open property pane - cy.openPropertyPane("tablewidget"); - cy.wait(2000); - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget); - - cy.wait(2000); - cy.readTabledataFromSpecificIndex("2", "0", 1).then((tabData) => { - const tabValue = tabData; - cy.log("the table is" + tabValue); - cy.get(".bp3-ui-text span").eq(0).should("have.text", tabData); - }); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js deleted file mode 100644 index 6bc2f08ebf7a..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Derived_Column_Computed_value_spec.js +++ /dev/null @@ -1,39 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -const testdata = require("../../../../../fixtures/testdata.json"); - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDsl"); - }); - - it("Test to add column", function () { - cy.openPropertyPane("tablewidget"); - // Adding new column - cy.addColumn("CustomColumn"); - cy.tableColumnDataValidation("customColumn1"); //To be updated later - // Hiding all other columns in the table from property pane - cy.hideColumn("email"); - cy.hideColumn("userName"); - cy.hideColumn("productName"); - cy.hideColumn("orderAmount"); - // Validating the newly added column - cy.get(".draggable-header:contains('CustomColumn')").should("be.visible"); - //Test: Edit column name and validate test for computed value - // Open column detail by draggable id of the column - cy.editColumn("customColumn1"); - // Validating single cell value - cy.readTabledataPublish("1", "2").then(() => { - // Chaging the computed value to "Emails" - cy.updateComputedValue(testdata.currentRowWithIdOutside); - // Validating single cell value - cy.readTabledataPublish("1", "1").then((tabData) => { - expect(tabData).to.be.equal("#lindsay.ferguson@reqres.in"); - cy.log("computed value of plain text " + tabData); - }); - }); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Selected_row_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Selected_row_spec.js deleted file mode 100644 index 8d3c2ccc5d3f..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Widget_Selected_row_spec.js +++ /dev/null @@ -1,21 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget property pane feature validation", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableAndTextDsl"); - }); - it("Table widget new menu button column should not deselect row", function () { - cy.openPropertyPane("tablewidget"); - - cy.get(".t--widget-textwidget").should("have.text", "0"); - cy.contains("Open Menu").click({ - force: true, - }); - cy.wait(1000); - cy.get(".t--widget-textwidget").should("have.text", "0"); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_spec.js deleted file mode 100644 index 3ecac68fe13f..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_spec.js +++ /dev/null @@ -1,168 +0,0 @@ -/* eslint-disable cypress/no-unnecessary-waiting */ -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget Functionality", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableWidgetDsl"); - }); - - it("Table Widget Functionality", function () { - cy.openPropertyPane("tablewidget"); - - /** - * @param{Text} Random Text - * @param{ChartWidget}Mouseover - * @param{ChartPre Css} Assertion - */ - cy.widgetText( - "Table1", - widgetsPage.tableWidget, - widgetsPage.widgetNameSpan, - ); - cy.testJsontext("tabledata", JSON.stringify(this.dataSet.TableInput)); - cy.wait("@updateLayout"); - //cy.get(widgetsPage.ColumnAction).click({ force: true }); - // cy.get(widgetsPage.tableOnRowSelected) - // .get(commonlocators.dropdownSelectButton) - // .first() - // .click({ force: true }) - // .get(commonlocators.dropdownmenu) - // .children() - // .contains("Navigate to") - // .click(); - // cy.wait("@updateLayout"); - // cy.get(widgetsPage.tableOnRowSelected) - // .get(commonlocators.dropdownSelectButton) - // .first() - // .find("> .bp3-button-text") - // .should("have.text", "{{navigateTo()}}"); - }); - - it("Table Widget Functionality To Verify The Data", function () { - cy.readTabledataPublish("1", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Lindsay Ferguson"); - cy.log("the value is" + tabValue); - }); - }); - - it("Table Widget Functionality To Show a Base64 Image", function () { - cy.openPropertyPane("tablewidget"); - cy.editColumn("image"); - cy.changeColumnType("Image", false); - _.table.SelectTableRow(1); - - const index = 1; - const imageVal = this.dataSet.TableInput[index].image; - cy.readTableLinkPublish(index, "1").then((hrefVal) => { - expect(hrefVal).to.contain(imageVal); - }); - }); - - it("Table Widget Functionality To Check if Table is Sortable", function () { - cy.get(commonlocators.editPropBackButton).click(); - cy.openPropertyPane("tablewidget"); - // Confirm if isSortable is true - cy.get(commonlocators.isSortable_tablev1).should("be.checked"); - // Publish App - _.deployMode.DeployApp(); - // Confirm Current order - cy.readTabledataPublish("1", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Lindsay Ferguson"); - }); - cy.readTabledataPublish("0", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Michael Lawson"); - }); - // Sort Username Column - cy.contains('[role="columnheader"]', "userName").first().click({ - force: true, - }); - cy.wait(1000); - // Confirm order after sort - cy.readTabledataPublish("1", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Ryan Holmes"); - }); - cy.readTabledataPublish("0", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Tobias Funke"); - }); - // Back to edit page - _.deployMode.NavigateBacktoEditor(); - - cy.openPropertyPane("tablewidget"); - // Disable isSortable - // Confirm if isSortable is false - _.agHelper.CheckUncheck(commonlocators.isSortable_tablev1, false); - - // Publish App - _.deployMode.DeployApp(); - // Confirm Current order - cy.readTabledataPublish("1", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Lindsay Ferguson"); - }); - cy.readTabledataPublish("0", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Michael Lawson"); - }); - // Confirm Sort is disable on Username Column - cy.contains('[role="columnheader"]', "userName").first().click({ - force: true, - }); - cy.wait(1000); - // Confirm order after sort - cy.readTabledataPublish("1", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).not.to.be.equal("Ryan Holmes"); - }); - cy.readTabledataPublish("0", "3").then((tabData) => { - const tabValue = tabData; - expect(tabValue).not.to.be.equal("Tobias Funke"); - }); - }); - - /* - To enabled later - - it("Table Widget Functionality To Verify The Visiblity mode functionality", function() { - _.deployMode.NavigateBacktoEditor(); - _.table.SelectTableRow(1); - cy.readTabledataPublish("1", "3").then(tabData => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Lindsay Ferguson"); - cy.log("the value is" + tabValue); - cy.get(publish.visibilityMode).click(); - cy.get(publish.visibilityOpt) - .contains("userName") - .click(); - cy.get(publish.containerWidget).click(); - cy.readTabledataPublish("1", "3").then(tabData => { - const tabValue = tabData; - expect(tabValue).to.not.equal("Lindsay Ferguson"); - }); - cy.get(publish.visibilityMode).click(); - cy.get(publish.visibilityOpt) - .contains("userName") - .click(); - cy.get(publish.containerWidget).click(); - cy.readTabledataPublish("1", "3").then(tabData => { - const tabValue = tabData; - expect(tabValue).to.be.equal("Lindsay Ferguson"); - }); - }); - }); -*/ - - afterEach(() => { - // put your clean up code if any - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_tabledata_schema_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_tabledata_schema_spec.js deleted file mode 100644 index f91d34a5317f..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_tabledata_schema_spec.js +++ /dev/null @@ -1,55 +0,0 @@ -import { - PageLeftPane, - PagePaneSegment, -} from "../../../../../support/Pages/EditorNavigation"; - -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table Widget", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableNewDsl"); - }); - it("1. Table Widget Functionality To Check with changing schema of tabledata", () => { - let jsContext = `{{Switch1.isSwitchedOn?[{name: "joe"}]:[{employee_name: "john"}];}}`; - cy.wait(5000); - cy.dragAndDropToCanvas("switchwidget", { x: 200, y: 200 }); - cy.wait(2000); - cy.openPropertyPane("tablewidget"); - cy.get(".t--property-control-tabledata").then(($el) => { - cy.updateCodeInput($el, jsContext); - }); - _.deployMode.DeployApp(); - cy.getTableDataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); - }); - cy.readTabledataPublish("0", "0").then((value) => { - expect(value).to.be.equal("joe"); - }); - cy.get(".t--switch-widget-active").first().click(); - cy.get(".t--widget-tablewidget").scrollIntoView(); - cy.wait(1000); - cy.getTableDataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); - }); - cy.readTabledataPublish("0", "0").then((value) => { - expect(value).to.be.equal("john"); - }); - cy.get(".t--switch-widget-inactive").first().click(); - cy.wait(1000); - cy.get(".t--widget-tablewidget").scrollIntoView(); - cy.getTableDataSelector("0", "0").then((element) => { - cy.get(element).should("be.visible"); - }); - cy.readTabledataPublish("0", "0").then((value) => { - expect(value).to.be.equal("joe"); - }); - _.deployMode.NavigateBacktoEditor(); - PageLeftPane.switchSegment(PagePaneSegment.UI); - _.entityExplorer.DeleteWidgetFromEntityExplorer("Switch1"); - _.entityExplorer.DeleteWidgetFromEntityExplorer("Table1"); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_no_2dArray_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_no_2dArray_spec.js deleted file mode 100644 index 67c03653ff71..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_no_2dArray_spec.js +++ /dev/null @@ -1,62 +0,0 @@ -import * as _ from "../../../../../support/Objects/ObjectsCore"; -const widgetsPage = require("../../../../../locators/Widgets.json"); -import { seconds, testTimeout } from "../../../../../support/timeout"; - -describe( - "Table widget edge case scenario testing", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableWithTextWidgetDsl"); - }); - - it("Check if the selectedRowIndices does not contain 2d array", function () { - testTimeout(seconds(120)); //2mins - - cy.openPropertyPane("tablewidget"); - - //Enable Multi row select - cy.get(widgetsPage.toggleEnableMultirowselection_tablev1) - .first() - .click({ force: true }); - - //Change the value of default selected row - cy.updateCodeInput(".t--property-control-defaultselectedrow", "1"); - - //Disable Multi row select - cy.get(widgetsPage.toggleEnableMultirowselection_tablev1) - .first() - .click({ force: true }); - - cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).should( - "have.text", - "[]", - ); - - //Enable Multi row select - cy.get(widgetsPage.toggleEnableMultirowselection_tablev1) - .first() - .click({ force: true }); - - cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).should( - "have.text", - "[ 1]", - ); - - //Disable Multi row select - cy.get(widgetsPage.toggleEnableMultirowselection_tablev1) - .first() - .click({ force: true }); - - //Enable Multi row select - cy.get(widgetsPage.toggleEnableMultirowselection_tablev1) - .first() - .click({ force: true }); - - cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).should( - "have.text", - "[ 1]", - ); - }); - }, -); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_selRowIndices_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_selRowIndices_spec.js deleted file mode 100644 index f79c2e83490f..000000000000 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/table_with_text_selRowIndices_spec.js +++ /dev/null @@ -1,49 +0,0 @@ -const widgetsPage = require("../../../../../locators/Widgets.json"); -const commonlocators = require("../../../../../locators/commonlocators.json"); -import * as _ from "../../../../../support/Objects/ObjectsCore"; - -describe( - "Table widget edge case scenario testing", - { tags: ["@tag.Widget", "@tag.Table", "@tag.Binding"] }, - function () { - before(() => { - _.agHelper.AddDsl("tableWithTextWidgetDsl"); - }); - - it("Check if the selectedRowIndices does not contain -1", function () { - cy.openPropertyPane("tablewidget"); - - //Update the property default selected row to blank - cy.updateCodeInput(".t--property-control-defaultselectedrow", ""); - - // ensure evaluated value popup does not show up - cy.get(commonlocators.evaluatedCurrentValue).should("not.exist"); - - //Check the value present in the textfield which is selectedRowIndices is blank - cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).should("have.text", ""); - - //Enable the "Enable Multi Row selection" - cy.get(widgetsPage.toggleEnableMultirowselection_tablev1) - .first() - .click({ force: true }); - - //Check the value present in the textfield which is selectedRowIndices is [] - cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).should( - "have.text", - "[]", - ); - - //Select the 1st, 2nd and 3rd row - _.table.SelectTableRow(0); - _.table.SelectTableRow(1); - _.table.SelectTableRow(2); - - //Check the value present in the textfield which is selectedRowIndices is [0,1,2] - cy.get(`${widgetsPage.textWidget} .bp3-ui-text`).should( - "have.text", - "[ 0, 1, 2]", - ); - }); - }, -); -//