diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js index 5c2e78f3f952..292689983b6a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js @@ -31,7 +31,7 @@ describe( /** * @param{toggleButton Css} Assert to be checked */ - cy.togglebar(widgetsPage.defaultcheck); + _.agHelper.CheckUncheck(widgetsPage.defaultcheck); /** * @param{Show Alert} Css for InputChange */ @@ -45,7 +45,7 @@ describe( }); it("Checkbox Functionality To Check Disabled Widget", function () { cy.openPropertyPane("checkboxwidget"); - cy.togglebar(commonlocators.Disablejs + " " + "input"); + _.agHelper.CheckUncheck(commonlocators.Disablejs + " " + "input"); _.deployMode.DeployApp(); cy.get(publish.checkboxWidget + " " + "input").should("be.disabled"); }); @@ -63,7 +63,7 @@ describe( }); it("Checkbox Functionality To Check Visible Widget", function () { cy.openPropertyPane("checkboxwidget"); - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); cy.get(publish.checkboxWidget + " " + "input").should("be.checked"); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts index 31cae4013061..0e1f0798ccd3 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts @@ -51,7 +51,7 @@ describe( cy.moveToContentTab(); // Disable and publish - cy.togglebar(commonlocators.disableCheckbox); + _.agHelper.CheckUncheck(commonlocators.disableCheckbox); _.deployMode.DeployApp(); // Disabled icon should be there cy.get(codeScannerDisabledSVGIconOnPublishPage).should( @@ -124,7 +124,7 @@ describe( cy.moveToContentTab(); // Visibilty ON and publish - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); // Video should be streaming @@ -189,7 +189,7 @@ describe( cy.moveToContentTab(); // Disable and publish - cy.togglebar(commonlocators.disableCheckbox); + _.agHelper.CheckUncheck(commonlocators.disableCheckbox); _.deployMode.DeployApp(); // Button should be disabled @@ -246,7 +246,7 @@ describe( cy.moveToContentTab(); // Visibilty ON and publish - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); // Button should be visible diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js index 4b7abf1d70c1..ffb298164e73 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js @@ -1,4 +1,5 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); +const { agHelper } = require("../../../../../support/Objects/ObjectsCore"); const widgetName = "currencyinputwidget"; @@ -17,7 +18,7 @@ describe( it("2. Validate that currency input widget, stepArrows should be visible when showStepArrows is set to true", () => { // Enable showStepArrows to true - cy.togglebar(widgetsPage.showStepArrowsToggleCheckBox); + agHelper.CheckUncheck(widgetsPage.showStepArrowsToggleCheckBox); cy.get(widgetsPage.inputStepArrows).should("exist"); // step arrows should be visible }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js index 5d45f9305a5f..a120e800f977 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js @@ -23,7 +23,7 @@ describe( ); cy.testCodeMirror(this.dataSet.switchInputName); cy.get(widgetsPage.switchLabel).should("have.text", "Switch1"); - cy.togglebar(widgetsPage.defaultcheck); + _.agHelper.CheckUncheck(widgetsPage.defaultcheck); cy.getAlert("onChange"); cy.closePropertyPane(); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js index 442d3a58b293..30c86ec64139 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js @@ -163,7 +163,7 @@ describe( it("Dropdown Functionality To UnCheck disabled Widget", function () { cy.openPropertyPane("selectwidget"); // Check the visible JS - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); // Verify the checked visible JS cy.get(publish.selectwidget).should("exist"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js index 94a1db34368a..4b464a4a2a27 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js @@ -115,7 +115,7 @@ describe( // Open property pone cy.openPropertyPane("formwidget"); // Check the visible JS - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); // Verify the Checked Visible JS cy.get(publish.formWidget).should("be.visible"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js index 8f5c3d3aeab1..17d8f6b74a01 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js @@ -27,7 +27,7 @@ describe( // Verify widget label name is verified cy.get(widgetsPage.switchLabel).should("have.text", "Switch1"); // Check the toggler button - cy.togglebar(widgetsPage.defaultcheck); + _.agHelper.CheckUncheck(widgetsPage.defaultcheck); // Type in message field and verify cy.getAlert("onChange"); cy.closePropertyPane(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js index 216301cdd3df..d5ffd22fa129 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js @@ -13,7 +13,7 @@ describe( it("1. Checkbox Functionality To Check required toggle for form", function () { cy.openPropertyPane("checkboxwidget"); - cy.togglebar(commonlocators.requiredjs + " " + "input"); + _.agHelper.CheckUncheck(commonlocators.requiredjs + " " + "input"); _.deployMode.DeployApp(); cy.wait(2000); cy.get(publish.checkboxWidget).click(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js index 20074af74146..46f3b14b0a80 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js @@ -65,7 +65,7 @@ describe( deployMode.NavigateBacktoEditor(); //Image Widget Functionality To Check Visible Widget", function () { cy.openPropertyPane("imagewidget"); - cy.togglebar(commonlocators.visibleCheckbox); + agHelper.CheckUncheck(commonlocators.visibleCheckbox); deployMode.DeployApp(publish.imageWidget); deployMode.NavigateBacktoEditor(); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js index 2e8e0b2aea55..c0e43627d4bb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js @@ -82,7 +82,7 @@ describe( it("3. isSpellCheck: true", function () { cy.openPropertyPane("inputwidgetv2"); - cy.togglebar(commonlocators.spellCheck + " " + "input"); + _.agHelper.CheckUncheck(commonlocators.spellCheck + " " + "input"); _.deployMode.DeployApp(); cy.get(publish.inputWidget + " " + "input") .invoke("attr", "spellcheck") @@ -101,7 +101,7 @@ describe( it("4. Input Widget Functionality To Check Disabled Widget", function () { cy.openPropertyPane("inputwidgetv2"); - cy.togglebar(commonlocators.Disablejs + " " + "input"); + _.agHelper.CheckUncheck(commonlocators.Disablejs + " " + "input"); _.deployMode.DeployApp(); cy.get(publish.inputWidget + " " + "input").should("be.disabled"); _.deployMode.NavigateBacktoEditor(); @@ -122,7 +122,7 @@ describe( //Input Functionality To Check Visible Widget cy.openPropertyPane("inputwidgetv2"); - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); cy.get(publish.inputWidget + " " + "input").should("be.visible"); _.deployMode.NavigateBacktoEditor(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js index 65396ae41c3e..b29bd02cf410 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js @@ -1,4 +1,5 @@ const widgetsPage = require("../../../../../locators/Widgets.json"); +const { agHelper } = require("../../../../../support/Objects/ObjectsCore"); const widgetName = "inputwidgetv2"; @@ -17,7 +18,7 @@ describe( cy.get(widgetsPage.inputStepArrows).should("not.exist"); // This is the step arrows //Validate that dataType - NUMBER, stepArrows should be visible when showStepArrows is set to true // Enable showStepArrows to true - cy.togglebar(widgetsPage.showStepArrowsToggleCheckBox); + agHelper.CheckUncheck(widgetsPage.showStepArrowsToggleCheckBox); cy.get(widgetsPage.inputStepArrows).should("exist"); // step arrows should be visible //Toggle test case to validate that dataType - NUMBER, stepArrows should be hidden when toggle value is false diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js index feeae7d887c8..249fb2cf6118 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js @@ -191,7 +191,6 @@ describe( // Disable -> true propPane.TogglePropertyState("Disabled", "On"); - // cy.togglebar(".t--property-control-disabled input"); deployMode.DeployApp(); cy.get(education) .first() @@ -207,7 +206,6 @@ describe( EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); cy.openFieldConfiguration("education"); propPane.TogglePropertyState("Disabled", "Off"); - // cy.togglebarDisable(".t--property-control-disabled input"); cy.get(education).should("exist"); cy.get(education) .first() @@ -235,7 +233,6 @@ describe( // Disable -> true propPane.TogglePropertyState("Disabled", "On"); deployMode.DeployApp(); - // cy.togglebar(".t--property-control-disabled input"); cy.get(`${education} ${addButton}`).should("have.attr", "disabled"); cy.get(`${education} ${addButton}`).should("have.attr", "disabled"); @@ -339,9 +336,7 @@ describe( ); // Enable Allow Country Code Change - cy.togglebar( - ".t--property-control-allowcountrycodechange input[type='checkbox']", - ); + agHelper.CheckUncheck(commonlocators.allowcountrycodechangeInput); // Change the label of the field to Phone Number cy.testJsontext("text", "Phone Number"); @@ -375,9 +370,7 @@ describe( ); // Enable Allow Country Code Change - cy.togglebar( - ".t--property-control-allowcurrencychange input[type='checkbox']", - ); + agHelper.CheckUncheck(commonlocators.allowCurrencyChange); // Change the label of the field to Phone Number cy.testJsontext("text", "Currency"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js index 33eda06bf5f8..2fe47e9cd3b8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js @@ -3,6 +3,8 @@ import EditorNavigation, { } from "../../../../../support/Pages/EditorNavigation"; const commonlocators = require("../../../../../locators/commonlocators.json"); +const widgetsLocators = require("../../../../../locators/Widgets.json"); + import { agHelper, deployMode, @@ -125,7 +127,7 @@ describe( it("6. disables field when disabled switched on and when autofill is disabled we should see the autofill attribute in the input field", () => { EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); cy.openFieldConfiguration("name"); - cy.togglebar(`.t--property-control-disabled input`); + agHelper.CheckUncheck(widgetsLocators.selectWidgetDisabled); deployMode.DeployApp(); cy.get(`${fieldPrefix}-name input`).each(($el) => { cy.wrap($el).should("have.attr", "disabled"); @@ -134,7 +136,7 @@ describe( deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); cy.openFieldConfiguration("name"); - cy.togglebarDisable(`.t--property-control-disabled input`); + cy.togglebarDisable(widgetsLocators.selectWidgetDisabled); validateAutocompleteAttributeInJSONForm(); }); @@ -173,13 +175,13 @@ describe( cy.get(`${fieldPrefix}-check input`).should("be.checked"); // hides field when visible switched off - cy.togglebarDisable(`.t--property-control-visible input`); + cy.togglebarDisable(widgetsLocators.visible); deployMode.DeployApp(); cy.get(`${fieldPrefix}-check`).should("not.exist"); deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); cy.openFieldConfiguration("check"); - cy.togglebar(`.t--property-control-visible input`); + agHelper.CheckUncheck(widgetsLocators.visible); deployMode.DeployApp(); cy.get(`${fieldPrefix}-check`).should("exist"); deployMode.NavigateBacktoEditor(); @@ -187,7 +189,7 @@ describe( // disables field when disabled switched on EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); cy.openFieldConfiguration("check"); - cy.togglebar(`.t--property-control-disabled input`); + agHelper.CheckUncheck(widgetsLocators.selectWidgetDisabled); deployMode.DeployApp(); cy.get(`${fieldPrefix}-check input`).each(($el) => { cy.wrap($el).should("have.attr", "disabled"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js index af4d741ab97e..4d7c53744f19 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js @@ -3,6 +3,8 @@ import EditorNavigation, { } from "../../../../../support/Pages/EditorNavigation"; const commonlocators = require("../../../../../locators/commonlocators.json"); +const widgetsLocators = require("../../../../../locators/Widgets.json"); + import { agHelper, entityExplorer, @@ -113,7 +115,7 @@ describe( cy.get(`.bp3-select-popover .bp3-input-group`).should("not.exist"); // toggle filterable -> true in property pane - cy.togglebar(`.t--property-control-allowsearching input`); + agHelper.CheckUncheck(commonlocators.allowsearchingInput); deployMode.DeployApp(); @@ -192,10 +194,10 @@ describe( cy.get(`${fieldPrefix}-radio input`).should("have.value", "Y"); // hides field when visible switched off" - cy.togglebarDisable(`.t--property-control-visible input`); + cy.togglebarDisable(widgetsLocators.visible); cy.get(`${fieldPrefix}-radio`).should("not.exist"); cy.wait(500); - cy.togglebar(`.t--property-control-visible input`); + agHelper.CheckUncheck(widgetsLocators.visible); cy.get(`${fieldPrefix}-radio`).should("exist"); }); }, diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js index 51451ad33347..4e36df0fa3cc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js @@ -230,12 +230,12 @@ describe( // name.required -> true cy.openFieldConfiguration("name"); - cy.togglebar(`${propertyControlPrefix}-required input`); + agHelper.CheckUncheck(`${propertyControlPrefix}-required input`); cy.get(backBtn).click({ force: true }).wait(500); // age.disabled -> true cy.openFieldConfiguration("age"); - cy.togglebar(`${propertyControlPrefix}-disabled input`); + agHelper.CheckUncheck(`${propertyControlPrefix}-disabled input`); cy.get(backBtn).click({ force: true }).wait(500); // migrant.visible -> false @@ -246,7 +246,7 @@ describe( // address.street.required -> true cy.openFieldConfiguration("address", false); cy.openFieldConfiguration("street", false); - cy.togglebar(`${propertyControlPrefix}-required input`); + agHelper.CheckUncheck(`${propertyControlPrefix}-required input`); cy.get(backBtn).click({ force: true }).wait(500); cy.get(backBtn).click({ force: true }).wait(500); @@ -255,7 +255,7 @@ describe( cy.openFieldConfiguration("education"); cy.openFieldConfiguration("__array_item__", false); cy.openFieldConfiguration("college", false); - cy.togglebar(`${propertyControlPrefix}-required input`); + agHelper.CheckUncheck(`${propertyControlPrefix}-required input`); cy.get(backBtn).click({ force: true }).wait(500); cy.openFieldConfiguration("year", false); cy.togglebarDisable(`${propertyControlPrefix}-visible input`); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js index 6ac98e46e1da..1777b4158f80 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js @@ -132,7 +132,7 @@ describe( // make name field required cy.openFieldConfiguration("name"); - cy.togglebar(`${propertyControlPrefix}-required input`); + agHelper.CheckUncheck(`${propertyControlPrefix}-required input`); deployMode.DeployApp(); @@ -156,7 +156,7 @@ describe( // make name field required cy.openFieldConfiguration("name"); - cy.togglebar(`${propertyControlPrefix}-required input`); + agHelper.CheckUncheck(`${propertyControlPrefix}-required input`); deployMode.DeployApp(); @@ -188,7 +188,9 @@ describe( cy.openPropertyPane("jsonformwidget"); propPane.EnterJSContext("Source data", JSON.stringify(schema), true); - cy.togglebar(`${propertyControlPrefix}-hiddenfieldsindata input`); + agHelper.CheckUncheck( + `${propertyControlPrefix}-hiddenfieldsindata input`, + ); cy.openFieldConfiguration("age"); cy.togglebarDisable(`${propertyControlPrefix}-visible input`); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js index f6f086085e6e..1bf397baeb0c 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js @@ -45,7 +45,7 @@ function hideAndVerifyProperties(fieldName, fieldValue, resolveFieldValue) { }); // Show field - cy.togglebar(".t--property-control-visible input"); + agHelper.CheckUncheck(widgetsPage.visible); // Check if visible cy.get(`${fieldPrefix}-${fieldName}`).should("exist"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js index c9b83a82a67f..7ad70030f84d 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js @@ -45,7 +45,7 @@ function hideAndVerifyProperties(fieldName, fieldValue, resolveFieldValue) { }); // Show field - cy.togglebar(".t--property-control-visible input"); + agHelper.CheckUncheck(widgetsPage.visible); // Check if visible cy.get(`${fieldPrefix}-${fieldName}`).should("exist"); @@ -155,11 +155,11 @@ describe( // hide education field cy.openFieldConfiguration("education"); - cy.togglebarDisable(".t--property-control-visible input"); + cy.togglebarDisable(widgetsPage.visible); cy.get(backBtn).click({ force: true }).wait(500); // hide name field cy.openFieldConfiguration("name"); - cy.togglebarDisable(".t--property-control-visible input"); + cy.togglebarDisable(widgetsPage.visible); // publish the app deployMode.DeployApp(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js index de48670cea45..ca64ee4a05cb 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js @@ -20,7 +20,7 @@ describe("List v2- Tabs Widget", { tags: ["@tag.Widget", "@tag.List"] }, () => { cy.get(".t--page-switch-tab.is-active").contains("Tab 1"); // Enable Scroll Content - cy.togglebar(commonlocators.scrollView); + _.agHelper.CheckUncheck(commonlocators.scrollView); // Check if enabled cy.get(commonlocators.scrollView).should("be.checked"); // Check if Tab 1 still selected diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js index 4e3337a9a63c..8b102271250b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js @@ -115,9 +115,7 @@ describe( .should("have.text", "PageSize 4"); cy.openPropertyPane("textwidget"); - cy.wait(2000); cy.testJsontext("text", `Page Number {{List1.pageNo}}`); - cy.wait(2000); cy.wait("@updateLayout"); cy.get(commonlocators.bodyTextStyle) .first() @@ -142,9 +140,10 @@ describe( cy.openPropertyPane("listwidgetv2"); cy.openPropertyPane("textwidget"); - cy.testJsontextclear("text"); - cy.testJsontext("text", `PageSize {{List1.pageSize}}`); - cy.wait("@updateLayout"); + _.propPane.UpdatePropertyFieldValue( + "Text", + "PageSize {{List1.pageSize}}", + ); cy.get(commonlocators.bodyTextStyle) .first() @@ -152,17 +151,14 @@ describe( // toggle serversidepagination -> true cy.openPropertyPane("listwidgetv2"); - cy.togglebar(".t--property-control-serversidepagination input"); + _.agHelper.CheckUncheck(commonlocators.serverSidePaginationCheckbox); cy.get(commonlocators.bodyTextStyle) .first() .should("have.text", "PageSize 2"); - }); - it("3. should reset page no if higher than max when switched from server side to client side", () => { - _.agHelper.AddDsl("Listv2/listWithServerSideData"); + //should reset page no if higher than max when switched from server side to client side" // Open Datasource editor - cy.wait(2000); _.dataSources.CreateDataSource("Postgres"); _.dataSources.CreateQueryAfterDSSaved(); @@ -185,19 +181,13 @@ describe( EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - cy.wait(1000); - // Click next page in list widget - cy.get(".t--list-widget-next-page") - .find("button") - .click({ force: true }) - .wait(1000); + cy.get(".t--list-widget-next-page").find("button").click({ force: true }); // Change to client side pagination cy.openPropertyPane("listwidgetv2"); - cy.togglebarDisable(".t--property-control-serversidepagination input"); - - cy.wait(2000); + _.propPane.UpdatePropertyFieldValue("Items", "{{Query1.data}}"); + _.propPane.TogglePropertyState("Server side pagination", "Off"); cy.get(".t--widget-containerwidget").should("have.length", 2); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js index ffed4c0fb9c7..b6c2b7a72b46 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js @@ -139,7 +139,7 @@ describe( ); cy.openPropertyPane("listwidgetv2"); - cy.togglebar(commonlocators.serverSidePaginationCheckbox); + _.agHelper.CheckUncheck(commonlocators.serverSidePaginationCheckbox); // Page number resets cy.waitUntil(() => diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js index 8b076bd61bd0..7ed4c5744468 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js @@ -104,7 +104,7 @@ describe( cy.testJsontext("items", "{{Api1.data}}"); - cy.togglebar(commonlocators.serverSidePaginationCheckbox); + _.agHelper.CheckUncheck(commonlocators.serverSidePaginationCheckbox); cy.get(toggleJSButton("onpagechange")).click({ force: true }); cy.testJsontext("onpagechange", "{{Api1.run()}}"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js index 306c5285fc8c..24d832313dbd 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js @@ -69,9 +69,7 @@ describe( it("3. Clears the search field when widget is closed and serverSideFiltering is off", () => { // Turn on the filterable for the widget - cy.togglebar( - '.t--property-control-allowsearching input[type="checkbox"]', - ); + _.agHelper.CheckUncheck(commonlocators.allowsearchingInputTypeCheckbox); // open the widget cy.get(formWidgetsPage.multiselectwidgetv2) .find(".rc-select-selection-search-input") @@ -105,7 +103,7 @@ describe( it("4. Does not clear the search field when widget is closed and serverSideFiltering is on", () => { // Turn on server side filtering for the widget - cy.togglebar( + _.agHelper.CheckUncheck( '.t--property-control-serversidefiltering input[type="checkbox"]', ); // open the widget @@ -133,9 +131,7 @@ describe( .invoke("val") .should("not.be.empty"); // Turn off the filterable property for the widget - cy.togglebarDisable( - '.t--property-control-allowsearching input[type="checkbox"]', - ); + cy.togglebarDisable(commonlocators.allowsearchingInputTypeCheckbox); // Turn off server side filtering for the widget cy.togglebarDisable( '.t--property-control-serversidefiltering input[type="checkbox"]', @@ -153,7 +149,7 @@ describe( .should("not.have.text", "Select all"); // enable select all option from property pane cy.openPropertyPane("multiselectwidgetv2"); - cy.togglebar(commonlocators.allowSelectAllCheckbox); + _.agHelper.CheckUncheck(commonlocators.allowSelectAllCheckbox); // press select all option cy.get(formWidgetsPage.multiselectwidgetv2) @@ -311,7 +307,7 @@ describe( _.deployMode.NavigateBacktoEditor(); // Dropdown Functionality To Check Visible Widget", function () { cy.openPropertyPane("multiselectwidgetv2"); - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); cy.get(publish.multiselectwidgetv2 + " " + ".rc-select-selector").should( "be.visible", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js index b254a4df8343..03d203d0857b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js @@ -110,7 +110,7 @@ describe( it("6. To Check Visible Widget", function () { cy.openPropertyPane("multiselecttreewidget"); - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); cy.get( publish.multiselecttreewidget + " " + ".rc-tree-select-multiple", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js index e1a1fde18e1a..69dec8274f61 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js @@ -23,17 +23,13 @@ describe( it("1. Property: isIndeterminate, Toggle infinite loading", function () { cy.openPropertyPane("progresswidget"); // enable infinite loading - cy.togglebar( - ".t--property-control-infiniteloading input[type='checkbox']", - ); + agHelper.CheckUncheck(widgets.infiniteLoading); // show indeterminate linear progress cy.get("[data-testid='indeterminate-linear-progress']") .should("exist") .should("have.css", "animation"); // disable infinite loading - cy.togglebarDisable( - ".t--property-control-infiniteloading input[type='checkbox']", - ); + cy.togglebarDisable(widgets.infiniteLoading); // show determinate linear progress cy.get("[data-testid='50']").should("exist"); }); @@ -49,13 +45,11 @@ describe( }); it("3. Property: showResult, Toggle show result", function () { // enable show result - cy.togglebar(".t--property-control-showresult input[type='checkbox']"); + agHelper.CheckUncheck(widgets.showResult); // show label cy.get("[data-testid='60']").first().next().should("contain.text", "60"); // disable show result - cy.togglebarDisable( - ".t--property-control-showresult input[type='checkbox']", - ); + cy.togglebarDisable(widgets.showResult); // does not show any label cy.get("[data-testid='60']").first().next().should("not.exist"); }); @@ -77,17 +71,13 @@ describe( it("6. Property: isIndeterminate, Toggle infinite loading", function () { cy.openPropertyPane("progresswidget"); // enable infinite loading - cy.togglebar( - ".t--property-control-infiniteloading input[type='checkbox']", - ); + agHelper.CheckUncheck(widgets.infiniteLoading); // show indeterminate linear progress cy.get("[data-testid='circular']") .should("exist") .should("have.css", "animation"); // disable infinite loading - cy.togglebarDisable( - ".t--property-control-infiniteloading input[type='checkbox']", - ); + cy.togglebarDisable(widgets.infiniteLoading); cy.wait("@updateLayout").should( "have.nested.property", "response.body.responseMeta.status", @@ -106,13 +96,11 @@ describe( }); it("8. Property: showResult, Toggle show result", function () { // enable show result - cy.togglebar(".t--property-control-showresult input[type='checkbox']"); + agHelper.CheckUncheck(widgets.showResult); // show label cy.get("[data-testid='circular-label']").should("contain.text", "50"); // disable show result - cy.togglebarDisable( - ".t--property-control-showresult input[type='checkbox']", - ); + cy.togglebarDisable(widgets.showResult); // does not show any label cy.get("[data-testid='circular-label']").should("not.exist"); }); @@ -126,17 +114,13 @@ describe( }); it("10. Property: counterClockwise,Change counterclockwise", function () { // enable counterclockwise - cy.togglebar( - ".t--property-control-counterclockwise input[type='checkbox']", - ); + agHelper.CheckUncheck(widgets.counterclockwise); // show the progress in a counterclockwise cy.get("[data-testvalue='50']") .invoke("css", "stroke-dashoffset") .and("match", /-/); // disable counterclockwise - cy.togglebarDisable( - ".t--property-control-counterclockwise input[type='checkbox']", - ); + cy.togglebarDisable(widgets.counterclockwise); // show the progress in a clockwise cy.get("[data-testvalue='50']") .invoke("css", "stroke-dashoffset") diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js index bb59a8942e5b..1fd9e95ecb86 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js @@ -68,9 +68,7 @@ describe("Select widget", { tags: ["@tag.Widget", "@tag.Select"] }, () => { it("4. Does not clear the search field when widget is closed and serverSideFiltering is on", () => { // toggle the serversidefiltering option on - cy.togglebar( - '.t--property-control-serversidefiltering input[type="checkbox"]', - ); + agHelper.CheckUncheck(widgetLocators.serversideFilteringInput); // search for option Red in the search input cy.get(commonlocators.selectInputSearch).type("Red"); // Select the Red option from dropdown list diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js index 646e05b1ad5d..3b3541832c7b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js @@ -31,7 +31,7 @@ describe( /** * @param{toggleButton Css} Assert to be checked */ - cy.togglebar(widgetsPage.defaultcheck); + _.agHelper.CheckUncheck(widgetsPage.defaultcheck); /** * @param{Show Alert} Css for InputChange */ @@ -48,7 +48,7 @@ describe( //Switch Functionality To Check Disabled Widget cy.openPropertyPane("switchwidget"); - cy.togglebar(commonlocators.Disablejs + " " + "input"); + _.agHelper.CheckUncheck(commonlocators.Disablejs + " " + "input"); _.deployMode.DeployApp(); cy.get(publish.switchwidget + " " + "input").should("be.disabled"); _.deployMode.NavigateBacktoEditor(); @@ -69,7 +69,7 @@ describe( // Switch Functionality To Check Visible Widget cy.openPropertyPane("switchwidget"); - cy.togglebar(commonlocators.visibleCheckbox); + _.agHelper.CheckUncheck(commonlocators.visibleCheckbox); _.deployMode.DeployApp(); cy.get(publish.switchwidget + " " + "input").should("be.checked"); _.deployMode.NavigateBacktoEditor(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js index 3f0a0b956a66..fa368178f814 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js @@ -44,7 +44,7 @@ describe("Tab widget test", { tags: ["@tag.Widget", "@tag.Tab"] }, function () { /** * @param{toggleButton Css} Assert to be checked */ - cy.togglebar(widgetsPage.Scrollbutton); + agHelper.CheckUncheck(widgetsPage.Scrollbutton); cy.get(Layoutpage.tabContainer) .scrollIntoView({ easing: "linear" }) .should("be.visible"); @@ -71,7 +71,7 @@ describe("Tab widget test", { tags: ["@tag.Widget", "@tag.Tab"] }, function () { it("4. Tab Widget Functionality To Check Visible Widget", function () { cy.openPropertyPane("tabswidget"); - cy.togglebar(commonlocators.visibleCheckbox); + agHelper.CheckUncheck(commonlocators.visibleCheckbox); deployMode.DeployApp(); cy.get(publish.tabWidget).should("be.visible"); deployMode.NavigateBacktoEditor(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js index 22b5a347d220..e33a1a4d8bff 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js @@ -256,7 +256,7 @@ describe( cy.wait(1000); cy.moveToContentTab(); cy.wait(500); - cy.get(".t--property-control-disabled input").click({ + cy.get(widgetsPage.selectWidgetDisabled).click({ force: true, }); //cy.closePropertyPane(); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts index 34df3204805d..9745fdf5996a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts @@ -105,7 +105,7 @@ describe( it("6. To Check Visible Widget", function () { cy.openPropertyPane("singleselecttreewidget"); - cy.togglebar(commonlocators.visibleCheckbox); + agHelper.CheckUncheck(commonlocators.visibleCheckbox); deployMode.DeployApp(); cy.get( publish.singleselecttreewidget + " " + ".rc-tree-select-single", @@ -132,9 +132,8 @@ describe( `{{SingleSelectTree1.selectedOptionValue}}`, ); cy.openPropertyPane("singleselecttreewidget"); - cy.togglebar( - '.t--property-control-allowclearingvalue input[type="checkbox"]', - ); + agHelper.CheckUncheck(commonlocators.allowclearingValueInput); + cy.get(formWidgetsPage.treeSelectClearAll).last().click({ force: true }); cy.wait(100); cy.get(".t--widget-textwidget").should("contain", ""); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts index bb2feec7a47e..afee07282877 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts @@ -1,6 +1,7 @@ import * as _ from "../../../../../support/Objects/ObjectsCore"; import formWidgetsPage from "../../../../../locators/FormWidgets.json"; +import commonlocators from "../../../../../locators/commonlocators.json"; describe( "Tree Select Widget", @@ -18,9 +19,7 @@ describe( it("2. toggle on allow clear selection and clear the input", () => { cy.openPropertyPane("singleselecttreewidget"); // toggle on allow clear selection - cy.togglebar( - ".t--property-control-allowclearingvalue input[type='checkbox']", - ); + _.agHelper.CheckUncheck(commonlocators.allowclearingValueInput); // assert if cancel icon exists on the widget input cy.get(formWidgetsPage.singleselecttreeWidget) .find(".rc-tree-select-clear") @@ -54,9 +53,7 @@ describe( it("3. toggle of allow clear selection", () => { cy.openPropertyPane("singleselecttreewidget"); // toggle off allow clear selection - cy.togglebarDisable( - ".t--property-control-allowclearingvalue input[type='checkbox']", - ); + cy.togglebarDisable(commonlocators.allowclearingValueInput); // assert if cancel icon does not exists on the widget input cy.get(formWidgetsPage.singleselecttreeWidget) .find(".rc-tree-select-clear") diff --git a/app/client/cypress/locators/Widgets.json b/app/client/cypress/locators/Widgets.json index e44f23f3f22e..090de4f8a909 100644 --- a/app/client/cypress/locators/Widgets.json +++ b/app/client/cypress/locators/Widgets.json @@ -226,5 +226,9 @@ "codeScannerScanButton": "//*[text()='Scan a QR/Barcode']/parent::button", "codeScannerNewScanButton": "//*[text()='Scan Code']/parent::button", "codeScannerClose": ".code-scanner-close", - "codeScannerModal": ".code-scanner-content" + "codeScannerModal": ".code-scanner-content", + "showResult": ".t--property-control-showresult input[type='checkbox']", + "infiniteLoading": ".t--property-control-infiniteloading input[type='checkbox']", + "counterclockwise": ".t--property-control-counterclockwise input[type='checkbox']", + "serversideFilteringInput": ".t--property-control-serversidefiltering input[type='checkbox']" } diff --git a/app/client/cypress/locators/commonlocators.json b/app/client/cypress/locators/commonlocators.json index cd6f50d6e657..22c632e14a0b 100644 --- a/app/client/cypress/locators/commonlocators.json +++ b/app/client/cypress/locators/commonlocators.json @@ -233,5 +233,9 @@ "discard": "button:contains('Discard')", "heightProperty": ".rc-select-single input", "heightPropertyOption": ".rc-select-item-option-content span", - "filePickerMaxNoOfFiles": ".t--property-control-maxno\\.offiles .CodeMirror-code" + "filePickerMaxNoOfFiles": ".t--property-control-maxno\\.offiles .CodeMirror-code", + "allowclearingValueInput": ".t--property-control-allowclearingvalue input[type='checkbox']", + "allowcountrycodechangeInput": ".t--property-control-allowcountrycodechange input[type='checkbox']", + "allowsearchingInput": ".t--property-control-allowsearching input", + "allowsearchingInputTypeCheckbox": ".t--property-control-allowsearching input[type='checkbox']" } diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index 0414bcece065..27c1c7b8ad4b 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -121,7 +121,7 @@ Cypress.Commands.add("testSelfSignedCertificateSettingsInREST", (isOAuth2) => { cy.get(datasource.useCertInAuth).should("not.exist"); cy.get(datasource.certificateDetails).should("not.exist"); // cy.TargetDropdownAndSelectOption(datasource.useSelfSignedCert, "Yes"); - cy.togglebar(datasource.useSelfSignedCert); + agHelper.CheckUncheck(datasource.useSelfSignedCert); cy.get(datasource.useSelfSignedCert).should("be.checked"); if (isOAuth2) { cy.get(datasource.useCertInAuth).should("exist"); @@ -444,10 +444,6 @@ Cypress.Commands.add("DeleteWorkspaceByApi", () => { } }); -Cypress.Commands.add("togglebar", (value) => { - cy.get(value).check({ force: true }).should("be.checked"); -}); - Cypress.Commands.add("NavigateToJSEditor", () => { PageLeftPane.switchSegment(PagePaneSegment.JS); PageLeftPane.switchToAddNew();