From cab645a63ff851bacea12fb689289c1e63b39269 Mon Sep 17 00:00:00 2001 From: Nandan Date: Wed, 29 May 2024 21:17:37 +0530 Subject: [PATCH 01/11] test: removed toggleBar command and replaced with ts helper --- .../Widgets/Checkbox/CheckBox_spec.js | 6 ++-- .../Widgets/CodeScanner/CodeScanner1_spec.ts | 8 ++--- .../CurrencyInput_ShowStepArrows_spec.js | 3 +- .../Datepicker/DatePicker_With_Switch_spec.js | 2 +- .../Widgets/Dropdown/Dropdown_spec.js | 2 +- .../Widgets/Form/FormWidget_spec.js | 2 +- .../Widgets/Form/FormWithSwitch_spec.js | 2 +- .../Widgets/Form/Form_With_CheckBox_spec.js | 2 +- .../ClientSide/Widgets/Image/Image_spec.js | 2 +- .../ClientSide/Widgets/Input/Input_spec.js | 6 ++-- .../Input/Inputv2_ShowStepArrows_spec.js | 3 +- .../JSONForm/JSONForm_ArrayField_spec.js | 6 ++-- .../JSONForm_FieldProperties_1_spec.js | 6 ++-- .../JSONForm_FieldProperties_2_spec.js | 4 +-- .../JSONForm/JSONForm_FormBindings_spec.js | 8 ++--- .../JSONForm/JSONForm_FormProperties_spec.js | 8 +++-- .../JSONForm/JSONForm_HiddenFields_1_spec.js | 2 +- .../JSONForm/JSONForm_HiddenFields_2_spec.js | 2 +- .../Childwigets/Listv2_Tabs_Widget_spec.js | 2 +- .../ListV2/ListV2_PageNo_PageSize_spec.js | 30 +++++++---------- .../ListV2/Listv2_BasicClientSideData_spec.js | 2 +- .../Listv2_Meta_Hydration_ServerSide_spec.js | 2 +- .../Widgets/Multiselect/MultiSelect2_spec.js | 8 ++--- .../Multiselect/Multi_Select_Tree_spec.js | 2 +- .../Widgets/Others/Progress_spec.js | 14 +++++--- .../ClientSide/Widgets/Select/Select_spec.js | 4 +-- .../ClientSide/Widgets/Switch/Switch_spec.js | 6 ++-- .../ClientSide/Widgets/Tab/Tab_spec.js | 4 +-- .../TreeSelect/Single_Select_Tree_spec.ts | 5 +-- .../Widgets/TreeSelect/Tree_Select_spec.ts | 4 +-- app/client/cypress/limited-tests.txt | 32 ++++++++++++++++++- 31 files changed, 109 insertions(+), 80 deletions(-) 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..49935dc73d2f 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() @@ -235,7 +234,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,7 +337,7 @@ describe( ); // Enable Allow Country Code Change - cy.togglebar( + agHelper.CheckUncheck( ".t--property-control-allowcountrycodechange input[type='checkbox']", ); // Change the label of the field to Phone Number @@ -375,7 +373,7 @@ describe( ); // Enable Allow Country Code Change - cy.togglebar( + agHelper.CheckUncheck( ".t--property-control-allowcurrencychange input[type='checkbox']", ); // Change the label of the field to Phone Number 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..4cbaab214a41 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 @@ -125,7 +125,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(".t--property-control-disabled input"); deployMode.DeployApp(); cy.get(`${fieldPrefix}-name input`).each(($el) => { cy.wrap($el).should("have.attr", "disabled"); @@ -179,7 +179,7 @@ describe( deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); cy.openFieldConfiguration("check"); - cy.togglebar(`.t--property-control-visible input`); + agHelper.CheckUncheck(".t--property-control-visible input"); deployMode.DeployApp(); cy.get(`${fieldPrefix}-check`).should("exist"); deployMode.NavigateBacktoEditor(); @@ -187,7 +187,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(".t--property-control-disabled input"); 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..fced4b46785b 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 @@ -113,7 +113,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(".t--property-control-allowsearching input"); deployMode.DeployApp(); @@ -195,7 +195,7 @@ describe( cy.togglebarDisable(`.t--property-control-visible input`); cy.get(`${fieldPrefix}-radio`).should("not.exist"); cy.wait(500); - cy.togglebar(`.t--property-control-visible input`); + agHelper.CheckUncheck(".t--property-control-visible input"); 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..7d884bf84f52 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(".t--property-control-visible input"); // 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..c2742393cb60 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(".t--property-control-visible input"); // Check if visible cy.get(`${fieldPrefix}-${fieldName}`).should("exist"); 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..6e0a2909d20c 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,16 @@ describe( // toggle serversidepagination -> true cy.openPropertyPane("listwidgetv2"); - cy.togglebar(".t--property-control-serversidepagination input"); + _.agHelper.CheckUncheck( + ".t--property-control-serversidepagination input", + ); 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 +183,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..5013af4d98ef 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,7 +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( + _.agHelper.CheckUncheck( '.t--property-control-allowsearching input[type="checkbox"]', ); // open the widget @@ -105,7 +105,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 @@ -153,7 +153,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 +311,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..fd276311c1e4 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,7 +23,7 @@ describe( it("1. Property: isIndeterminate, Toggle infinite loading", function () { cy.openPropertyPane("progresswidget"); // enable infinite loading - cy.togglebar( + agHelper.CheckUncheck( ".t--property-control-infiniteloading input[type='checkbox']", ); // show indeterminate linear progress @@ -49,7 +49,9 @@ describe( }); it("3. Property: showResult, Toggle show result", function () { // enable show result - cy.togglebar(".t--property-control-showresult input[type='checkbox']"); + agHelper.CheckUncheck( + ".t--property-control-showresult input[type='checkbox']", + ); // show label cy.get("[data-testid='60']").first().next().should("contain.text", "60"); // disable show result @@ -77,7 +79,7 @@ describe( it("6. Property: isIndeterminate, Toggle infinite loading", function () { cy.openPropertyPane("progresswidget"); // enable infinite loading - cy.togglebar( + agHelper.CheckUncheck( ".t--property-control-infiniteloading input[type='checkbox']", ); // show indeterminate linear progress @@ -106,7 +108,9 @@ describe( }); it("8. Property: showResult, Toggle show result", function () { // enable show result - cy.togglebar(".t--property-control-showresult input[type='checkbox']"); + agHelper.CheckUncheck( + ".t--property-control-showresult input[type='checkbox']", + ); // show label cy.get("[data-testid='circular-label']").should("contain.text", "50"); // disable show result @@ -126,7 +130,7 @@ describe( }); it("10. Property: counterClockwise,Change counterclockwise", function () { // enable counterclockwise - cy.togglebar( + agHelper.CheckUncheck( ".t--property-control-counterclockwise input[type='checkbox']", ); // show the progress in a counterclockwise 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..8a93513b9e56 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,8 +68,8 @@ 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( + ".t--property-control-serversidefiltering input[type='checkbox']", ); // search for option Red in the search input cy.get(commonlocators.selectInputSearch).type("Red"); 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 cbb5dc08c72a..b221b584ded5 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/TreeSelect/Single_Select_Tree_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts index 34df3204805d..78261465342c 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,10 @@ describe( `{{SingleSelectTree1.selectedOptionValue}}`, ); cy.openPropertyPane("singleselecttreewidget"); - cy.togglebar( + agHelper.CheckUncheck( '.t--property-control-allowclearingvalue input[type="checkbox"]', ); + 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..a4f8ad598921 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 @@ -18,8 +18,8 @@ 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( + '.t--property-control-allowclearingvalue input[type="checkbox"]', ); // assert if cancel icon exists on the widget input cy.get(formWidgetsPage.singleselecttreeWidget) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 31c0c0253fef..8605ce92034d 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,35 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js +cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts +cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js +cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js +cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js +cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts +cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts + # For running all specs - uncomment below: #cypress/e2e/**/**/* From b62916c27d01a21bd333747212b5f7552bb5ce6d Mon Sep 17 00:00:00 2001 From: Nandan Date: Wed, 29 May 2024 21:21:18 +0530 Subject: [PATCH 02/11] updated commands file --- app/client/cypress/support/commands.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index daa944b198fc..2b4d421fe5a6 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -120,7 +120,6 @@ 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); cy.get(datasource.useSelfSignedCert).should("be.checked"); if (isOAuth2) { cy.get(datasource.useCertInAuth).should("exist"); @@ -443,10 +442,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(); From d184cfe9dd01b112076c365d6e398908d1b7593d Mon Sep 17 00:00:00 2001 From: Nandan Date: Wed, 29 May 2024 21:25:12 +0530 Subject: [PATCH 03/11] updated commands --- app/client/cypress/support/commands.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index 2b4d421fe5a6..778eca712890 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -120,6 +120,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"); + agHelper.CheckUncheck(datasource.useSelfSignedCert); cy.get(datasource.useSelfSignedCert).should("be.checked"); if (isOAuth2) { cy.get(datasource.useCertInAuth).should("exist"); From 04e2bdf96a95c1fb5706321200d03facbbb6a019 Mon Sep 17 00:00:00 2001 From: Nandan Date: Thu, 30 May 2024 22:24:01 +0530 Subject: [PATCH 04/11] reverted limited run file --- app/client/cypress/limited-tests.txt | 32 +--------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 8605ce92034d..31c0c0253fef 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,35 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Widgets/Checkbox/CheckBox_spec.js -cypress/e2e/Regression/ClientSide/Widgets/CodeScanner/CodeScanner1_spec.ts -cypress/e2e/Regression/ClientSide/Widgets/CurrencyInput/CurrencyInput_ShowStepArrows_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Datepicker/DatePicker_With_Switch_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Dropdown/Dropdown_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Form/FormWidget_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Form/FormWithSwitch_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Form/Form_With_CheckBox_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Image/Image_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Input/Input_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_ShowStepArrows_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormBindings_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FormProperties_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/ListV2/Childwigets/Listv2_Tabs_Widget_spec.js -cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js -cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicClientSideData_spec.js -cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_Meta_Hydration_ServerSide_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Multiselect/Multi_Select_Tree_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Switch/Switch_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts -cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts - +cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/* From 8699ffc9426f02b0c90df5280a01c6edd36fdbfb Mon Sep 17 00:00:00 2001 From: Nandan Date: Fri, 31 May 2024 20:50:02 +0530 Subject: [PATCH 05/11] replaced direct locators --- .../Widgets/ListV2/ListV2_PageNo_PageSize_spec.js | 4 +--- .../Widgets/TreeSelect/Single_Select_Tree_spec.ts | 4 +--- .../ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts | 9 +++------ app/client/cypress/locators/commonlocators.json | 3 ++- 4 files changed, 7 insertions(+), 13 deletions(-) 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 6e0a2909d20c..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 @@ -151,9 +151,7 @@ describe( // toggle serversidepagination -> true cy.openPropertyPane("listwidgetv2"); - _.agHelper.CheckUncheck( - ".t--property-control-serversidepagination input", - ); + _.agHelper.CheckUncheck(commonlocators.serverSidePaginationCheckbox); cy.get(commonlocators.bodyTextStyle) .first() 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 78261465342c..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 @@ -132,9 +132,7 @@ describe( `{{SingleSelectTree1.selectedOptionValue}}`, ); cy.openPropertyPane("singleselecttreewidget"); - agHelper.CheckUncheck( - '.t--property-control-allowclearingvalue input[type="checkbox"]', - ); + agHelper.CheckUncheck(commonlocators.allowclearingValueInput); cy.get(formWidgetsPage.treeSelectClearAll).last().click({ force: true }); cy.wait(100); 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 a4f8ad598921..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 - _.agHelper.CheckUncheck( - '.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/commonlocators.json b/app/client/cypress/locators/commonlocators.json index cd6f50d6e657..1472bb8e07ab 100644 --- a/app/client/cypress/locators/commonlocators.json +++ b/app/client/cypress/locators/commonlocators.json @@ -233,5 +233,6 @@ "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']" } From ca742da20b1bbe215099228d1a703de474645981 Mon Sep 17 00:00:00 2001 From: Nandan Date: Fri, 31 May 2024 21:11:06 +0530 Subject: [PATCH 06/11] udpated limited run file --- app/client/cypress/limited-tests.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 31c0c0253fef..3f822a718dc2 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,7 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts +cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts # For running all specs - uncomment below: #cypress/e2e/**/**/* From 43d9643e7f08e4744d33fe3ef94a2d7f02685791 Mon Sep 17 00:00:00 2001 From: Nandan Date: Sat, 1 Jun 2024 14:09:37 +0530 Subject: [PATCH 07/11] reverted limited run file --- app/client/cypress/limited-tests.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 3f822a718dc2..31c0c0253fef 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,7 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Widgets/ListV2/ListV2_PageNo_PageSize_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Single_Select_Tree_spec.ts -cypress/e2e/Regression/ClientSide/Widgets/TreeSelect/Tree_Select_spec.ts +cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/* From d9a666051fc60a9c507dd2c6c2a7236499bb3afc Mon Sep 17 00:00:00 2001 From: Nandan Date: Tue, 4 Jun 2024 15:39:12 +0530 Subject: [PATCH 08/11] replaced direct locators --- .../JSONForm/JSONForm_ArrayField_spec.js | 5 +-- .../JSONForm_FieldProperties_1_spec.js | 12 +++--- .../JSONForm_FieldProperties_2_spec.js | 8 ++-- .../JSONForm/JSONForm_HiddenFields_1_spec.js | 2 +- .../JSONForm/JSONForm_HiddenFields_2_spec.js | 6 +-- .../Widgets/Multiselect/MultiSelect2_spec.js | 8 +--- .../Widgets/Others/Progress_spec.js | 40 +++++-------------- .../ClientSide/Widgets/Select/Select_spec.js | 4 +- .../TableV2/TableV2_Widget_Add_button_spec.js | 2 +- app/client/cypress/locators/Widgets.json | 6 ++- .../cypress/locators/commonlocators.json | 5 ++- 11 files changed, 40 insertions(+), 58 deletions(-) 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 49935dc73d2f..47aae832ce20 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 @@ -206,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() @@ -337,9 +336,7 @@ describe( ); // Enable Allow Country Code Change - agHelper.CheckUncheck( - ".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"); 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 4cbaab214a41..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"); - agHelper.CheckUncheck(".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"); - agHelper.CheckUncheck(".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"); - agHelper.CheckUncheck(".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 fced4b46785b..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 - agHelper.CheckUncheck(".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); - agHelper.CheckUncheck(".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_HiddenFields_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js index 7d884bf84f52..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 - agHelper.CheckUncheck(".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 c2742393cb60..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 - agHelper.CheckUncheck(".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/Multiselect/MultiSelect2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js index 5013af4d98ef..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 - _.agHelper.CheckUncheck( - '.t--property-control-allowsearching input[type="checkbox"]', - ); + _.agHelper.CheckUncheck(commonlocators.allowsearchingInputTypeCheckbox); // open the widget cy.get(formWidgetsPage.multiselectwidgetv2) .find(".rc-select-selection-search-input") @@ -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"]', 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 fd276311c1e4..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 - agHelper.CheckUncheck( - ".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,15 +45,11 @@ describe( }); it("3. Property: showResult, Toggle show result", function () { // enable show result - agHelper.CheckUncheck( - ".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"); }); @@ -79,17 +71,13 @@ describe( it("6. Property: isIndeterminate, Toggle infinite loading", function () { cy.openPropertyPane("progresswidget"); // enable infinite loading - agHelper.CheckUncheck( - ".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", @@ -108,15 +96,11 @@ describe( }); it("8. Property: showResult, Toggle show result", function () { // enable show result - agHelper.CheckUncheck( - ".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"); }); @@ -130,17 +114,13 @@ describe( }); it("10. Property: counterClockwise,Change counterclockwise", function () { // enable counterclockwise - agHelper.CheckUncheck( - ".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 8a93513b9e56..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 - agHelper.CheckUncheck( - ".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/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/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 1472bb8e07ab..22c632e14a0b 100644 --- a/app/client/cypress/locators/commonlocators.json +++ b/app/client/cypress/locators/commonlocators.json @@ -234,5 +234,8 @@ "heightProperty": ".rc-select-single input", "heightPropertyOption": ".rc-select-item-option-content span", "filePickerMaxNoOfFiles": ".t--property-control-maxno\\.offiles .CodeMirror-code", - "allowclearingValueInput": ".t--property-control-allowclearingvalue input[type='checkbox']" + "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']" } From 1ab2f24a787dff9403643d346cf2279aecb0819b Mon Sep 17 00:00:00 2001 From: Nandan Date: Tue, 4 Jun 2024 15:40:59 +0530 Subject: [PATCH 09/11] limited run file updated --- app/client/cypress/limited-tests.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 31c0c0253fef..543ee42a8241 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,5 +1,13 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js +cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js +cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js +cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/* From 65d46d5ac8aab16b979ac3cb116a44392dd5394a Mon Sep 17 00:00:00 2001 From: Nandan Date: Wed, 5 Jun 2024 18:10:54 +0530 Subject: [PATCH 10/11] reverted the file --- app/client/cypress/limited-tests.txt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/client/cypress/limited-tests.txt b/app/client/cypress/limited-tests.txt index 543ee42a8241..31c0c0253fef 100644 --- a/app/client/cypress/limited-tests.txt +++ b/app/client/cypress/limited-tests.txt @@ -1,13 +1,5 @@ # To run only limited tests - give the spec names in below format: -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_1_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_FieldProperties_2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_1_spec.js -cypress/e2e/Regression/ClientSide/Widgets/JSONForm/JSONForm_HiddenFields_2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Multiselect/MultiSelect2_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Others/Progress_spec.js -cypress/e2e/Regression/ClientSide/Widgets/Select/Select_spec.js -cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Widget_Add_button_spec.js +cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js # For running all specs - uncomment below: #cypress/e2e/**/**/* From 0db1d0ae28ca4d6dfb0068853308a7df6cbeefcb Mon Sep 17 00:00:00 2001 From: Nandan Date: Thu, 6 Jun 2024 13:29:16 +0530 Subject: [PATCH 11/11] updated the missed locator --- .../ClientSide/Widgets/JSONForm/JSONForm_ArrayField_spec.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 47aae832ce20..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 @@ -370,9 +370,7 @@ describe( ); // Enable Allow Country Code Change - agHelper.CheckUncheck( - ".t--property-control-allowcurrencychange input[type='checkbox']", - ); + agHelper.CheckUncheck(commonlocators.allowCurrencyChange); // Change the label of the field to Phone Number cy.testJsontext("text", "Currency");