diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/CheckBox_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/CheckBox_spec.js index f3503292c7..166d31f5b5 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/CheckBox_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/CheckBox_spec.js @@ -72,42 +72,8 @@ describe("Checkbox Widget Functionality", function() { cy.get(publish.checkboxWidget + " " + "input").should("be.checked"); cy.get(publish.backToEditor).click(); }); - - it("Checkbox Functionality To Check required toggle for form", function() { - cy.addDsl(formWidgetDsl); - cy.openPropertyPane("checkboxwidget"); - cy.togglebar(commonlocators.requiredjs + " " + "input"); - cy.PublishtheApp(); - cy.get(publish.checkboxWidget).click(); - cy.get(widgetsPage.formButtonWidget) - .contains("Submit") - .should("have.class", "bp3-disabled"); - - cy.get(publish.checkboxWidget).click(); - cy.get(widgetsPage.formButtonWidget) - .contains("Submit") - .should("not.have.attr", "disabled"); - - cy.get(publish.backToEditor).click(); - }); - it("Checkbox Functionality To swap label placement of checkbox", function() { - cy.openPropertyPane("checkboxwidget"); - cy.get(publish.checkboxWidget + " " + ".bp3-align-right").should( - "not.exist", - ); - cy.get(publish.checkboxWidget + " " + ".bp3-align-left").should("exist"); - cy.get(commonlocators.optionalignment) - .last() - .click(); - cy.dropdownDynamicUpdated("Right"); - cy.PublishtheApp(); - cy.get(publish.checkboxWidget + " " + ".bp3-align-right").should("exist"); - cy.get(publish.checkboxWidget + " " + ".bp3-align-left").should( - "not.exist", - ); - cy.get(publish.backToEditor).click(); - }); }); + afterEach(() => { // put your clean up code if any }); diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Form_With_CheckBox_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Form_With_CheckBox_spec.js new file mode 100644 index 0000000000..cf985b26ca --- /dev/null +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/FormWidgets/Form_With_CheckBox_spec.js @@ -0,0 +1,49 @@ +const commonlocators = require("../../../../locators/commonlocators.json"); +const formWidgetsPage = require("../../../../locators/FormWidgets.json"); +const widgetsPage = require("../../../../locators/Widgets.json"); +const publish = require("../../../../locators/publishWidgetspage.json"); +const dsl = require("../../../../fixtures/formWidgetdsl.json"); +const pages = require("../../../../locators/Pages.json"); + +describe("Checkbox Widget Functionality", function() { + before(() => { + cy.addDsl(dsl); + }); + + it("Checkbox Functionality To Check required toggle for form", function() { + cy.openPropertyPane("checkboxwidget"); + cy.togglebar(commonlocators.requiredjs + " " + "input"); + cy.PublishtheApp(); + cy.get(publish.checkboxWidget).click(); + cy.get(widgetsPage.formButtonWidget) + .contains("Submit") + .should("have.class", "bp3-disabled"); + + cy.get(publish.checkboxWidget).click(); + cy.get(widgetsPage.formButtonWidget) + .contains("Submit") + .should("not.have.attr", "disabled"); + + cy.get(publish.backToEditor).click(); + }); + it("Checkbox Functionality To swap label placement of checkbox", function() { + cy.openPropertyPane("checkboxwidget"); + cy.get(publish.checkboxWidget + " " + ".bp3-align-right").should( + "not.exist", + ); + cy.get(publish.checkboxWidget + " " + ".bp3-align-left").should("exist"); + cy.get(commonlocators.optionalignment) + .last() + .click(); + cy.dropdownDynamicUpdated("Right"); + cy.PublishtheApp(); + cy.get(publish.checkboxWidget + " " + ".bp3-align-right").should("exist"); + cy.get(publish.checkboxWidget + " " + ".bp3-align-left").should( + "not.exist", + ); + cy.get(publish.backToEditor).click(); + }); +}); +afterEach(() => { + // put your clean up code if any +});