diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/MultiSelect_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/MultiSelect_spec.js index 1253f5dcbc3..64647cec7cb 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/MultiSelect_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/MultiSelect_spec.js @@ -31,37 +31,7 @@ describe("MultiSelect Widget Functionality", function() { .first() .should("have.text", "Option 3"); }); - it("Selects value with enter in default value", () => { - cy.testJsontext( - "defaultvalue", - '[\n {\n "label": "Option 3",\n "value": "3"\n }\n]', - ); - cy.get(formWidgetsPage.multiselectwidgetv2) - .find(".rc-select-selection-item-content") - .first() - .should("have.text", "Option 3"); - }); - it("Dropdown Functionality To Validate Options", function() { - cy.get(".rc-select-selector").click({ force: true }); - cy.dropdownMultiSelectDynamic("Option 2"); - }); - it("Dropdown Functionality To Unchecked Visible Widget", function() { - cy.togglebarDisable(commonlocators.visibleCheckbox); - cy.PublishtheApp(); - cy.get(publish.multiselectwidgetv2 + " " + ".rc-select-selector").should( - "not.exist", - ); - cy.get(publish.backToEditor).click(); - }); - it("Dropdown Functionality To Check Visible Widget", function() { - cy.openPropertyPane("multiselectwidgetv2"); - cy.togglebar(commonlocators.visibleCheckbox); - cy.PublishtheApp(); - cy.get(publish.multiselectwidgetv2 + " " + ".rc-select-selector").should( - "be.visible", - ); - cy.get(publish.backToEditor).click(); - }); + it("Dropdown Functionality To Check Allow select all option", function() { // select all option is not enable cy.get(formWidgetsPage.multiselectwidgetv2) @@ -114,6 +84,37 @@ describe("MultiSelect Widget Functionality", function() { // Check if isDirty is set to false cy.get(".t--widget-textwidget").should("contain", "false"); }); + it("Selects value with enter in default value", () => { + cy.testJsontext( + "defaultvalue", + '[\n {\n "label": "Option 3",\n "value": "3"\n }\n]', + ); + cy.get(formWidgetsPage.multiselectwidgetv2) + .find(".rc-select-selection-item-content") + .first() + .should("have.text", "Option 3"); + }); + it("Dropdown Functionality To Validate Options", function() { + cy.get(".rc-select-selector").click({ force: true }); + cy.dropdownMultiSelectDynamic("Option 2"); + }); + it("Dropdown Functionality To Unchecked Visible Widget", function() { + cy.togglebarDisable(commonlocators.visibleCheckbox); + cy.PublishtheApp(); + cy.get(publish.multiselectwidgetv2 + " " + ".rc-select-selector").should( + "not.exist", + ); + cy.get(publish.backToEditor).click(); + }); + it("Dropdown Functionality To Check Visible Widget", function() { + cy.openPropertyPane("multiselectwidgetv2"); + cy.togglebar(commonlocators.visibleCheckbox); + cy.PublishtheApp(); + cy.get(publish.multiselectwidgetv2 + " " + ".rc-select-selector").should( + "be.visible", + ); + cy.get(publish.backToEditor).click(); + }); }); afterEach(() => { // put your clean up code if any diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Multi_Select_Tree_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Multi_Select_Tree_spec.js index 0627ee03ca6..8d53c111936 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Multi_Select_Tree_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Multi_Select_Tree_spec.js @@ -9,6 +9,32 @@ describe("MultiSelectTree Widget Functionality", function() { cy.addDsl(dsl); }); + it("Check isDirty meta property", function() { + cy.get(explorer.addWidget).click(); + cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); + cy.openPropertyPane("textwidget"); + cy.updateCodeInput( + ".t--property-control-text", + `{{MultiSelectTree1.isDirty}}`, + ); + // Change defaultValue + cy.openPropertyPane("multiselecttreewidget"); + cy.testJsontext("defaultvalue", "GREEN\n"); + // Check if isDirty is set to false + cy.get(".t--widget-textwidget").should("contain", "false"); + // Interact with UI + cy.get(formWidgetsPage.treeSelectInput) + .first() + .click({ force: true }); + cy.treeMultiSelectDropdown("Red"); + // Check if isDirty is set to true + cy.get(".t--widget-textwidget").should("contain", "true"); + // Reset isDirty by changing defaultValue + cy.testJsontext("defaultvalue", "BLUE\n"); + // Check if isDirty is set to false + cy.get(".t--widget-textwidget").should("contain", "false"); + }); + it("Selects value with enter in default value", () => { cy.openPropertyPane("multiselecttreewidget"); cy.testJsontext("defaultvalue", "RED\n"); @@ -43,32 +69,6 @@ describe("MultiSelectTree Widget Functionality", function() { ).should("be.visible"); cy.get(publish.backToEditor).click(); }); - - it("Check isDirty meta property", function() { - cy.get(explorer.addWidget).click(); - cy.dragAndDropToCanvas("textwidget", { x: 300, y: 500 }); - cy.openPropertyPane("textwidget"); - cy.updateCodeInput( - ".t--property-control-text", - `{{MultiSelectTree1.isDirty}}`, - ); - // Change defaultValue - cy.openPropertyPane("multiselecttreewidget"); - cy.testJsontext("defaultvalue", "GREEN\n"); - // Check if isDirty is set to false - cy.get(".t--widget-textwidget").should("contain", "false"); - // Interact with UI - cy.get(formWidgetsPage.treeSelectInput) - .first() - .click({ force: true }); - cy.treeMultiSelectDropdown("Red"); - // Check if isDirty is set to true - cy.get(".t--widget-textwidget").should("contain", "true"); - // Reset isDirty by changing defaultValue - cy.testJsontext("defaultvalue", "BLUE\n"); - // Check if isDirty is set to false - cy.get(".t--widget-textwidget").should("contain", "false"); - }); }); afterEach(() => { // put your clean up code if any diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Single_Select_Tree_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Single_Select_Tree_spec.js index a4de78b0db0..f126e4d75c6 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Single_Select_Tree_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Single_Select_Tree_spec.js @@ -7,6 +7,34 @@ describe("Single Select Widget Functionality", function() { before(() => { cy.addDsl(dsl); }); + + it("Check isDirty meta property", function() { + cy.openPropertyPane("textwidget"); + cy.updateCodeInput( + ".t--property-control-text", + `{{SingleSelectTree1.isDirty}}`, + ); + // Change defaultText + cy.openPropertyPane("singleselecttreewidget"); + cy.updateCodeInput(".t--property-control-defaultvalue", "GREEN"); + // Check if isDirty is reset to false + cy.get(".t--widget-textwidget").should("contain", "false"); + // Interact with UI + cy.get(formWidgetsPage.treeSelectInput) + .last() + .click({ force: true }); + cy.get(formWidgetsPage.treeSelectFilterInput) + .click() + .type("light"); + cy.treeSelectDropdown("Light Blue"); + // Check if isDirty is set to true + cy.get(".t--widget-textwidget").should("contain", "true"); + // Change defaultText + cy.openPropertyPane("singleselecttreewidget"); + cy.updateCodeInput(".t--property-control-defaultvalue", "RED"); + // Check if isDirty is reset to false + cy.get(".t--widget-textwidget").should("contain", "false"); + }); it("Selects value with enter in default value", () => { cy.openPropertyPane("singleselecttreewidget"); cy.testJsontext("defaultvalue", "RED\n"); @@ -41,35 +69,6 @@ describe("Single Select Widget Functionality", function() { ).should("be.visible"); cy.get(publish.backToEditor).click(); }); - - it("Check isDirty meta property", function() { - cy.openPropertyPane("textwidget"); - cy.updateCodeInput( - ".t--property-control-text", - `{{SingleSelectTree1.isDirty}}`, - ); - // Change defaultText - cy.openPropertyPane("singleselecttreewidget"); - cy.updateCodeInput(".t--property-control-defaultvalue", "GREEN"); - cy.closePropertyPane(); - // Check if isDirty is reset to false - cy.get(".t--widget-textwidget").should("contain", "false"); - // Interact with UI - cy.get(formWidgetsPage.treeSelectInput) - .last() - .click({ force: true }); - cy.get(formWidgetsPage.treeSelectFilterInput) - .click() - .type("light"); - cy.treeSelectDropdown("Light Blue"); - // Check if isDirty is set to true - cy.get(".t--widget-textwidget").should("contain", "true"); - // Change defaultText - cy.openPropertyPane("singleselecttreewidget"); - cy.updateCodeInput(".t--property-control-defaultvalue", "RED"); - // Check if isDirty is reset to false - cy.get(".t--widget-textwidget").should("contain", "false"); - }); }); afterEach(() => { // put your clean up code if any