diff --git a/app/client/cypress/e2e/Regression/ClientSide/CodeComment/PropertyPaneCodeComment_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/CodeComment/PropertyPaneCodeComment_spec.ts index 80cfff2a6a..cd3fd14d61 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/CodeComment/PropertyPaneCodeComment_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/CodeComment/PropertyPaneCodeComment_spec.ts @@ -3,7 +3,7 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Property Pane Code Commenting", () => { +describe("Property Pane Code Commenting", { tags: ["@tag.JS"] }, () => { before(() => { agHelper.AddDsl("buttondsl"); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Auto_Height_Limit_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Auto_Height_Limit_spec.ts index 8fcc507b44..ecd442fdb8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Auto_Height_Limit_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Auto_Height_Limit_spec.ts @@ -3,23 +3,27 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation with limits", function () { - it("1. Validate change in auto height with limits width for widgets and highlight section validation", function () { - agHelper.AddDsl("dynamicHeightContainerdsl"); +describe( + "Dynamic Height Width validation with limits", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change in auto height with limits width for widgets and highlight section validation", function () { + agHelper.AddDsl("dynamicHeightContainerdsl"); - EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); - propPane.SelectPropertiesDropDown("height", "Auto Height with limits"); - agHelper.HoverElement(propPane._autoHeightLimitMin); - agHelper.AssertContains("Min-Height: 10 rows"); - agHelper.AssertCSS( - propPane._autoHeightLimitMin_div, - "background-color", - "rgb(243, 43, 139)", - 0, - ); - agHelper.HoverElement(propPane._autoHeightLimitMax); - agHelper.AssertContains("Max-Height: 12 rows"); - propPane.SelectPropertiesDropDown("height", "Fixed"); - propPane.SelectPropertiesDropDown("height", "Auto Height with limits"); - }); -}); + EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); + propPane.SelectPropertiesDropDown("height", "Auto Height with limits"); + agHelper.HoverElement(propPane._autoHeightLimitMin); + agHelper.AssertContains("Min-Height: 10 rows"); + agHelper.AssertCSS( + propPane._autoHeightLimitMin_div, + "background-color", + "rgb(243, 43, 139)", + 0, + ); + agHelper.HoverElement(propPane._autoHeightLimitMax); + agHelper.AssertContains("Max-Height: 12 rows"); + propPane.SelectPropertiesDropDown("height", "Fixed"); + propPane.SelectPropertiesDropDown("height", "Auto Height with limits"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Auto_Height_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Auto_Height_spec.ts index 73fc865c9b..4ba99b83f1 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Auto_Height_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Auto_Height_spec.ts @@ -9,144 +9,150 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation", function () { - afterEach(() => { - agHelper.SaveLocalStorageCache(); - }); +describe( + "Dynamic Height Width validation", + { tags: ["@tag.AutoHeight"] }, + function () { + afterEach(() => { + agHelper.SaveLocalStorageCache(); + }); - beforeEach(() => { - agHelper.RestoreLocalStorageCache(); - }); + beforeEach(() => { + agHelper.RestoreLocalStorageCache(); + }); - it("1. Validate change with auto height width for widgets", function () { - agHelper.AddDsl("dynamicHeightContainerCheckboxdsl"); + it("1. Validate change with auto height width for widgets", function () { + agHelper.AddDsl("dynamicHeightContainerCheckboxdsl"); - EditorNavigation.SelectEntityByName( - "CheckboxGroup1", - EntityType.Widget, - {}, - ["Container1"], - ); - propPane.MoveToTab("Style"); - agHelper - .GetWidgetCSSFrAttribute( - `${locators._propertyControl}${locators._fontSelect}`, - "font-size", - ) - .then((dropdownFont) => { - agHelper - .GetElement(`${locators._propertyControl}${locators._fontInput}`) - .last() - .click({ - force: true, - }); - agHelper - .GetElement(propPane._optionContent) - .should("have.length.greaterThan", 2) - .its("length") - .then((n) => { - for (let i = 0; i < n; i++) { + EditorNavigation.SelectEntityByName( + "CheckboxGroup1", + EntityType.Widget, + {}, + ["Container1"], + ); + propPane.MoveToTab("Style"); + agHelper + .GetWidgetCSSFrAttribute( + `${locators._propertyControl}${locators._fontSelect}`, + "font-size", + ) + .then((dropdownFont) => { + agHelper + .GetElement(`${locators._propertyControl}${locators._fontInput}`) + .last() + .click({ + force: true, + }); + agHelper + .GetElement(propPane._optionContent) + .should("have.length.greaterThan", 2) + .its("length") + .then((n) => { + for (let i = 0; i < n; i++) { + agHelper + .GetWidgetCSSFrAttribute( + propPane._optionContent, + "font-size", + i, + ) + .then((selectedFont) => { + expect(dropdownFont).to.equal(selectedFont); + }); + } + }); + }); + agHelper + .GetWidgetCSSFrAttribute( + `${locators._propertyControl}${locators._fontSelect}`, + "font-family", + ) + .then((dropdownFont) => { + agHelper + .GetElement(propPane._dropdownOptionSpan) + .should("have.length.greaterThan", 2) + .its("length") + .then((n) => { + for (let i = 0; i < n; i++) { + agHelper + .GetWidgetCSSFrAttribute( + propPane._dropdownOptionSpan, + "font-family", + i, + ) + .then((selectedFont) => { + expect(dropdownFont).to.equal(selectedFont); + }); + } + }); + }); + propPane.MoveToTab("Content"); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((currentContainerHeight) => { + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), + ) + .then((currentCheckboxheight) => { + agHelper.GetNClick(propPane._addOptionProperty); + agHelper.Sleep(200); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + agHelper.Sleep(3000); agHelper - .GetWidgetCSSFrAttribute( - propPane._optionContent, - "font-size", - i, + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), ) - .then((selectedFont) => { - expect(dropdownFont).to.equal(selectedFont); + .then((updatedCheckboxheight) => { + expect(currentCheckboxheight).to.not.equal( + updatedCheckboxheight, + ); }); - } - }); - }); - agHelper - .GetWidgetCSSFrAttribute( - `${locators._propertyControl}${locators._fontSelect}`, - "font-family", - ) - .then((dropdownFont) => { - agHelper - .GetElement(propPane._dropdownOptionSpan) - .should("have.length.greaterThan", 2) - .its("length") - .then((n) => { - for (let i = 0; i < n; i++) { - agHelper - .GetWidgetCSSFrAttribute( - propPane._dropdownOptionSpan, - "font-family", - i, - ) - .then((selectedFont) => { - expect(dropdownFont).to.equal(selectedFont); - }); - } - }); - }); - propPane.MoveToTab("Content"); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((currentContainerHeight) => { - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), - ) - .then((currentCheckboxheight) => { - agHelper.GetNClick(propPane._addOptionProperty); - agHelper.Sleep(200); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - agHelper.Sleep(3000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), - ) - .then((updatedCheckboxheight) => { - expect(currentCheckboxheight).to.not.equal( - updatedCheckboxheight, - ); - }); - }); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((updatedContainerHeight) => { - expect(currentContainerHeight).to.not.equal(updatedContainerHeight); - }); - }); - }); + }); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((updatedContainerHeight) => { + expect(currentContainerHeight).to.not.equal( + updatedContainerHeight, + ); + }); + }); + }); - it("2. Validate container with auto height and child widgets with fixed height", function () { - agHelper.AddDsl("dynamicHeigthContainerFixedDsl"); + it("2. Validate container with auto height and child widgets with fixed height", function () { + agHelper.AddDsl("dynamicHeigthContainerFixedDsl"); - EditorNavigation.SelectEntityByName( - "CheckboxGroup1", - EntityType.Widget, - {}, - ["Container1"], - ); - agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - EditorNavigation.SelectEntityByName("Input1", EntityType.Widget); - agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((currentHeight: number) => { - EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper.Sleep(4000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((updatedHeight: number) => { - expect(currentHeight).to.not.equal(updatedHeight); - }); - }); - }); -}); + EditorNavigation.SelectEntityByName( + "CheckboxGroup1", + EntityType.Widget, + {}, + ["Container1"], + ); + agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + EditorNavigation.SelectEntityByName("Input1", EntityType.Widget); + agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((currentHeight: number) => { + EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper.Sleep(4000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((updatedHeight: number) => { + expect(currentHeight).to.not.equal(updatedHeight); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/CanvasHeight_resize_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/CanvasHeight_resize_spec.ts index ba6e4d7e78..9ec1b16722 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/CanvasHeight_resize_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/CanvasHeight_resize_spec.ts @@ -9,82 +9,90 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation with multiple containers and text widget", function () { - it("1. Validate change with auto height width for widgets", function () { - let textMsg = - "Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height"; - agHelper.AddDsl("dynamicHeightCanvasResizeDsl"); +describe( + "Dynamic Height Width validation with multiple containers and text widget", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change with auto height width for widgets", function () { + let textMsg = + "Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height Dynamic panel validation for text widget wrt height"; + agHelper.AddDsl("dynamicHeightCanvasResizeDsl"); - // Select the Outer container and capture initial height - EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((initialContainerHeight: number) => { - // Select the Text Widget and capture its initial height - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "Container1", - ]); - agHelper.Sleep(1000); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TEXT)) - .then((initialTextWidgetHeight: number) => { - // Change the text label based on the textMsg above - propPane.UpdatePropertyFieldValue("Text", textMsg); - propPane.MoveToTab("Style"); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - // Select the Text Widget and capture its updated height post change of text label - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.TEXT), - ) - .then((updatedTextWidgetHeight: number) => { - // Asserts the change in height from initial height of text widget wrt updated height - expect(initialTextWidgetHeight).to.not.equal( - updatedTextWidgetHeight, - ); - // Select the outer Container Widget and capture its updated height post change of text label - EditorNavigation.SelectEntityByName( - "Container1", - EntityType.Widget, - ); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((updatedContainerHeight: number) => { - // Asserts the change in height from initial height of container widget wrt updated height - expect(initialContainerHeight).to.not.equal( - updatedContainerHeight, - ); - EditorNavigation.SelectEntityByName( - "Text1", - EntityType.Widget, - ); - propPane.MoveToTab("Content"); - // Clear Text Label - propPane.RemoveText("Text"); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - EditorNavigation.SelectEntityByName( - "Container1", - EntityType.Widget, - ); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((revertedContainerHeight: number) => { - // Asserts the change in height from updated height of container widget wrt current height - // As the text label is cleared the reverted height should be equal to initial height - expect(initialContainerHeight).to.equal( - revertedContainerHeight, - ); - }); - }); - }); - }); - }); - }); -}); + // Select the Outer container and capture initial height + EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((initialContainerHeight: number) => { + // Select the Text Widget and capture its initial height + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "Container1", + ]); + agHelper.Sleep(1000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TEXT), + ) + .then((initialTextWidgetHeight: number) => { + // Change the text label based on the textMsg above + propPane.UpdatePropertyFieldValue("Text", textMsg); + propPane.MoveToTab("Style"); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + // Select the Text Widget and capture its updated height post change of text label + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TEXT), + ) + .then((updatedTextWidgetHeight: number) => { + // Asserts the change in height from initial height of text widget wrt updated height + expect(initialTextWidgetHeight).to.not.equal( + updatedTextWidgetHeight, + ); + // Select the outer Container Widget and capture its updated height post change of text label + EditorNavigation.SelectEntityByName( + "Container1", + EntityType.Widget, + ); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((updatedContainerHeight: number) => { + // Asserts the change in height from initial height of container widget wrt updated height + expect(initialContainerHeight).to.not.equal( + updatedContainerHeight, + ); + EditorNavigation.SelectEntityByName( + "Text1", + EntityType.Widget, + ); + propPane.MoveToTab("Content"); + // Clear Text Label + propPane.RemoveText("Text"); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + EditorNavigation.SelectEntityByName( + "Container1", + EntityType.Widget, + ); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed( + draggableWidgets.CONTAINER, + ), + ) + .then((revertedContainerHeight: number) => { + // Asserts the change in height from updated height of container widget wrt current height + // As the text label is cleared the reverted height should be equal to initial height + expect(initialContainerHeight).to.equal( + revertedContainerHeight, + ); + }); + }); + }); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Container_Scroll_spec.js b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Container_Scroll_spec.js index f4ce74b3c0..65edb48b04 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Container_Scroll_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Container_Scroll_spec.js @@ -3,15 +3,21 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation", function () { - it("1. Validate change with auto height width for widgets", function () { - agHelper.AddDsl("dynamicHeightContainerScrolldsl"); - EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); - cy.get(".t--widget-textwidget").trigger("mouseover", { force: true }); // Scroll 'sidebar' to its bottom - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "Container1", - ]); - deployMode.DeployApp(); - cy.get(".t--widget-containerwidget").trigger("mouseover", { force: true }); // Scroll 'sidebar' to its bottom - }); -}); +describe( + "Dynamic Height Width validation", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change with auto height width for widgets", function () { + agHelper.AddDsl("dynamicHeightContainerScrolldsl"); + EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); + cy.get(".t--widget-textwidget").trigger("mouseover", { force: true }); // Scroll 'sidebar' to its bottom + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "Container1", + ]); + deployMode.DeployApp(); + cy.get(".t--widget-containerwidget").trigger("mouseover", { + force: true, + }); // Scroll 'sidebar' to its bottom + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Container_collapse_undo_redoSpec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Container_collapse_undo_redoSpec.ts index 341ed14471..ff15990350 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Container_collapse_undo_redoSpec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Container_collapse_undo_redoSpec.ts @@ -8,44 +8,55 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation", function () { - it("1. Validate change with auto height width for widgets", function () { - const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - agHelper.AddDsl("DynamicHeightDefaultHeightdsl"); +describe( + "Dynamic Height Width validation", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change with auto height width for widgets", function () { + const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; + agHelper.AddDsl("DynamicHeightDefaultHeightdsl"); - EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((initialContainerHeight: number) => { - // Select the Text Widget and capture its initial height - EditorNavigation.SelectEntityByName("Button1", EntityType.Widget, {}, [ - "Container1", - ]); - agHelper.PressDelete(); - agHelper.WaitUntilAllToastsDisappear(); - assertHelper.AssertNetworkStatus("updateLayout"); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((updatedContainerHeight: number) => { - expect(initialContainerHeight).to.not.equal(updatedContainerHeight); - expect(updatedContainerHeight).to.equal("100px"); - agHelper.TypeText(locators._body, `{${modifierKey}}z`, { - parseSpecialCharSeq: true, - }); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((CurrentContainerHeight: number) => { - expect(CurrentContainerHeight).to.equal(initialContainerHeight); + EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((initialContainerHeight: number) => { + // Select the Text Widget and capture its initial height + EditorNavigation.SelectEntityByName( + "Button1", + EntityType.Widget, + {}, + ["Container1"], + ); + agHelper.PressDelete(); + agHelper.WaitUntilAllToastsDisappear(); + assertHelper.AssertNetworkStatus("updateLayout"); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((updatedContainerHeight: number) => { + expect(initialContainerHeight).to.not.equal( + updatedContainerHeight, + ); + expect(updatedContainerHeight).to.equal("100px"); + agHelper.TypeText(locators._body, `{${modifierKey}}z`, { + parseSpecialCharSeq: true, }); - }); - }); - }); -}); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((CurrentContainerHeight: number) => { + expect(CurrentContainerHeight).to.equal( + initialContainerHeight, + ); + }); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Content_Alignment_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Content_Alignment_spec.ts index 75ceba8596..8c6561ec55 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Content_Alignment_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Content_Alignment_spec.ts @@ -1,30 +1,34 @@ import { agHelper } from "../../../../support/Objects/ObjectsCore"; -describe("Auto height default widget content alignment", () => { - before(() => { - agHelper.AddDsl("autoHeightContentAlignmentDSL"); - }); +describe( + "Auto height default widget content alignment", + { tags: ["@tag.AutoHeight"] }, + () => { + before(() => { + agHelper.AddDsl("autoHeightContentAlignmentDSL"); + }); - it("1. Should have contents centered using align-items css", () => { - cy.get("[data-testid='t--centered-Text1-x2dmaguw7a']").should( - "have.css", - "align-items", - "center", - ); - cy.get("[data-testid='t--centered-Checkbox1-sio6hr58nk']").should( - "have.css", - "align-items", - "center", - ); - cy.get("[data-testid='t--centered-Switch1-4vy4pjyjat']").should( - "have.css", - "align-items", - "center", - ); - cy.get("[data-testid='t--centered-Text2-1k6r0gx5sd']").should( - "have.css", - "align-items", - "flex-start", - ); - }); -}); + it("1. Should have contents centered using align-items css", () => { + cy.get("[data-testid='t--centered-Text1-x2dmaguw7a']").should( + "have.css", + "align-items", + "center", + ); + cy.get("[data-testid='t--centered-Checkbox1-sio6hr58nk']").should( + "have.css", + "align-items", + "center", + ); + cy.get("[data-testid='t--centered-Switch1-4vy4pjyjat']").should( + "have.css", + "align-items", + "center", + ); + cy.get("[data-testid='t--centered-Text2-1k6r0gx5sd']").should( + "have.css", + "align-items", + "flex-start", + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/DynamicHeight_Visibility_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/DynamicHeight_Visibility_spec.ts index 7727694e36..3c090107ef 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/DynamicHeight_Visibility_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/DynamicHeight_Visibility_spec.ts @@ -10,73 +10,81 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation for Visibility", function () { - before(() => { - agHelper.AddDsl("invisibleWidgetdsl"); - }); - it("1. Validating visbility/invisiblity of widget with dynamic height feature", function () { - //changing the Text Name and verifying - EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - EditorNavigation.SelectEntityByName("Input1", EntityType.Widget, {}, [ - "Container1", - ]); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - EditorNavigation.SelectEntityByName("Input2", EntityType.Widget, {}, [ - "Container1", - ]); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((currentContainerHeight: number) => { - agHelper.GetNClick(locators._widgetInCanvas("checkboxwidget")); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((updatedContainerHeight: number) => { - expect(currentContainerHeight).to.equal(updatedContainerHeight); - agHelper - .GetElement(propPane._labelContains("On")) - .should("not.be.enabled"); - // agHelper.AssertElementEnabledDisabled( - // locators._labelContains("On"),0,true - //); - }); - }); - deployMode.DeployApp(); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((currentContainerHeight: number) => { - agHelper.GetNClick(pageSettings.locators._setHomePageToggle); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((updatedContainerHeight: number) => { - expect(currentContainerHeight).to.not.equal(updatedContainerHeight); - agHelper.AssertElementAbsence(propPane._labelContains("On")); - agHelper.AssertElementVisibility(propPane._labelContains("Off")); - agHelper.GetNClick(pageSettings.locators._setHomePageToggle); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((currentContainerHeight: number) => { - expect(currentContainerHeight).to.not.equal( - updatedContainerHeight, - ); - agHelper.AssertElementAbsence(propPane._labelContains("Off")); - agHelper.AssertElementVisibility(propPane._labelContains("On")); - }); - }); - }); - }); -}); +describe( + "Dynamic Height Width validation for Visibility", + { tags: ["@tag.AutoHeight"] }, + function () { + before(() => { + agHelper.AddDsl("invisibleWidgetdsl"); + }); + it("1. Validating visbility/invisiblity of widget with dynamic height feature", function () { + //changing the Text Name and verifying + EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + EditorNavigation.SelectEntityByName("Input1", EntityType.Widget, {}, [ + "Container1", + ]); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + EditorNavigation.SelectEntityByName("Input2", EntityType.Widget, {}, [ + "Container1", + ]); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((currentContainerHeight: number) => { + agHelper.GetNClick(locators._widgetInCanvas("checkboxwidget")); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((updatedContainerHeight: number) => { + expect(currentContainerHeight).to.equal(updatedContainerHeight); + agHelper + .GetElement(propPane._labelContains("On")) + .should("not.be.enabled"); + // agHelper.AssertElementEnabledDisabled( + // locators._labelContains("On"),0,true + //); + }); + }); + deployMode.DeployApp(); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((currentContainerHeight: number) => { + agHelper.GetNClick(pageSettings.locators._setHomePageToggle); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((updatedContainerHeight: number) => { + expect(currentContainerHeight).to.not.equal( + updatedContainerHeight, + ); + agHelper.AssertElementAbsence(propPane._labelContains("On")); + agHelper.AssertElementVisibility(propPane._labelContains("Off")); + agHelper.GetNClick(pageSettings.locators._setHomePageToggle); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((currentContainerHeight: number) => { + expect(currentContainerHeight).to.not.equal( + updatedContainerHeight, + ); + agHelper.AssertElementAbsence(propPane._labelContains("Off")); + agHelper.AssertElementVisibility( + propPane._labelContains("On"), + ); + }); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Form_With_SwitchGroup_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Form_With_SwitchGroup_spec.ts index 308e15eefb..6e97262a13 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Form_With_SwitchGroup_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Form_With_SwitchGroup_spec.ts @@ -9,35 +9,38 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation", function () { - it("1. Validate change with auto height width for Form/Switch", function () { - agHelper.AddDsl("dynamicHeightFormSwitchdsl"); +describe( + "Dynamic Height Width validation", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change with auto height width for Form/Switch", function () { + agHelper.AddDsl("dynamicHeightFormSwitchdsl"); - EditorNavigation.SelectEntityByName("Form1", EntityType.Widget); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.FORM)) - .then((formheight) => { - propPane.SelectPropertiesDropDown("height", "Auto Height"); - EditorNavigation.SelectEntityByName( - "SwitchGroup1", - EntityType.Widget, - {}, - ["Form1"], - ); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.SWITCHGROUP), - ) - .then((CurrentSwitchHeight) => { - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.FORM), - ) - .then((CurrentFormHeight) => { - agHelper.UpdateCodeInput( - locators._controlOption, - `[ + EditorNavigation.SelectEntityByName("Form1", EntityType.Widget); + agHelper + .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.FORM)) + .then((formheight) => { + propPane.SelectPropertiesDropDown("height", "Auto Height"); + EditorNavigation.SelectEntityByName( + "SwitchGroup1", + EntityType.Widget, + {}, + ["Form1"], + ); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.SWITCHGROUP), + ) + .then((CurrentSwitchHeight) => { + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.FORM), + ) + .then((CurrentFormHeight) => { + agHelper.UpdateCodeInput( + locators._controlOption, + `[ {"label": "Blue","value": "BLUE"}, { "label": "Green","value": "GREEN"}, {"label": "Red","value": "RED"}, @@ -49,38 +52,39 @@ describe("Dynamic Height Width validation", function () { {"label": "Orange","value": "ORANGE"}, {"label": "Cream","value": "CREAM"} ]`, - ); - agHelper.Sleep(3000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.SWITCHGROUP), - ) - .then((UpdatedSwitchHeight: number) => { - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.FORM), - ) - .then((UpdatedFormHeight: number) => { - expect(CurrentFormHeight).to.not.equal( - UpdatedFormHeight, - ); - expect(CurrentSwitchHeight).to.not.equal( - UpdatedSwitchHeight, - ); - }); - }); - }); - }); - }); - agHelper.GetNClick( - `${locators._widgetInDeployed(draggableWidgets.SWITCHGROUP)} ${ - pageSettings.locators._setHomePageToggle - }`, - ); - agHelper.AssertElementLength(locators._modal, 1); - //propPane.TogglePropertyState("Switch","On"); - EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper.GetNClick(locators._closeModal, 0, true); - }); -}); + ); + agHelper.Sleep(3000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.SWITCHGROUP), + ) + .then((UpdatedSwitchHeight: number) => { + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.FORM), + ) + .then((UpdatedFormHeight: number) => { + expect(CurrentFormHeight).to.not.equal( + UpdatedFormHeight, + ); + expect(CurrentSwitchHeight).to.not.equal( + UpdatedSwitchHeight, + ); + }); + }); + }); + }); + }); + agHelper.GetNClick( + `${locators._widgetInDeployed(draggableWidgets.SWITCHGROUP)} ${ + pageSettings.locators._setHomePageToggle + }`, + ); + agHelper.AssertElementLength(locators._modal, 1); + //propPane.TogglePropertyState("Switch","On"); + EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper.GetNClick(locators._closeModal, 0, true); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Invisible_Widgets_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Invisible_Widgets_spec.ts index 6b91928866..b3310df272 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Invisible_Widgets_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Invisible_Widgets_spec.ts @@ -5,75 +5,79 @@ import { draggableWidgets, } from "../../../../support/Objects/ObjectsCore"; -describe("Fixed Invisible widgets and auto height containers", () => { - before(() => { - // Create a page with a divider below a button widget and a checkbox widget below a filepicker widget - // Button widget and filepicker widgets are fixed height widgets - agHelper.AddDsl("autoHeightInvisibleWidgetsDSL"); - }); +describe( + "Fixed Invisible widgets and auto height containers", + { tags: ["@tag.AutoHeight"] }, + () => { + before(() => { + // Create a page with a divider below a button widget and a checkbox widget below a filepicker widget + // Button widget and filepicker widgets are fixed height widgets + agHelper.AddDsl("autoHeightInvisibleWidgetsDSL"); + }); - it("1. Divider should be below Button Widget in edit mode", () => { - // This test checks for the height of the button widget and the filepicker widget - // As well as the top value for the widgets below button and filepicker (divider and checkbox respectively) - agHelper.AssertCSS( - locators._widgetInDeployed(draggableWidgets.BUTTON), - "height", - "230px", - 0, - ); - agHelper.AssertCSS( - locators._widgetInDeployed(draggableWidgets.FILEPICKER), - "height", - "90px", - 0, - ); - agHelper.AssertCSS( - locators._widgetInDeployed(draggableWidgets.DIVIDER), - "top", - "246px", - 0, - ); - agHelper.AssertCSS( - locators._widgetInDeployed(draggableWidgets.CHECKBOX), - "top", - "96px", - 0, - ); - }); + it("1. Divider should be below Button Widget in edit mode", () => { + // This test checks for the height of the button widget and the filepicker widget + // As well as the top value for the widgets below button and filepicker (divider and checkbox respectively) + agHelper.AssertCSS( + locators._widgetInDeployed(draggableWidgets.BUTTON), + "height", + "230px", + 0, + ); + agHelper.AssertCSS( + locators._widgetInDeployed(draggableWidgets.FILEPICKER), + "height", + "90px", + 0, + ); + agHelper.AssertCSS( + locators._widgetInDeployed(draggableWidgets.DIVIDER), + "top", + "246px", + 0, + ); + agHelper.AssertCSS( + locators._widgetInDeployed(draggableWidgets.CHECKBOX), + "top", + "96px", + 0, + ); + }); - it("2. Divider should move up by the height of the button widget in preview mode", () => { - // This tests if the divider and checkbox widget move up by an appropriate amount in preview mode. - agHelper.AssertElementVisibility(locators._previewModeToggle("edit")); - agHelper.GetNClick(locators._previewModeToggle("edit")); + it("2. Divider should move up by the height of the button widget in preview mode", () => { + // This tests if the divider and checkbox widget move up by an appropriate amount in preview mode. + agHelper.AssertElementVisibility(locators._previewModeToggle("edit")); + agHelper.GetNClick(locators._previewModeToggle("edit")); - agHelper.AssertCSS( - locators._widgetInDeployed(draggableWidgets.DIVIDER), - "top", - "16px", - 0, - ); - agHelper.AssertCSS( - locators._widgetInDeployed(draggableWidgets.CHECKBOX), - "top", - "6px", - 0, - ); - }); + agHelper.AssertCSS( + locators._widgetInDeployed(draggableWidgets.DIVIDER), + "top", + "16px", + 0, + ); + agHelper.AssertCSS( + locators._widgetInDeployed(draggableWidgets.CHECKBOX), + "top", + "6px", + 0, + ); + }); - it("3. Divider should move up by the height of the button widget in view mode", () => { - // This tests if the divider and checkbox widget move up by an appropriate amount in view mode. - deployMode.DeployApp(); - agHelper.AssertCSS( - locators._widgetInDeployed(draggableWidgets.DIVIDER), - "top", - "16px", - 0, - ); - agHelper.AssertCSS( - locators._widgetInDeployed(draggableWidgets.CHECKBOX), - "top", - "6px", - 0, - ); - }); -}); + it("3. Divider should move up by the height of the button widget in view mode", () => { + // This tests if the divider and checkbox widget move up by an appropriate amount in view mode. + deployMode.DeployApp(); + agHelper.AssertCSS( + locators._widgetInDeployed(draggableWidgets.DIVIDER), + "top", + "16px", + 0, + ); + agHelper.AssertCSS( + locators._widgetInDeployed(draggableWidgets.CHECKBOX), + "top", + "6px", + 0, + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts index 2c9a7819ff..6ecade6134 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/JsonForm_spec.ts @@ -9,46 +9,54 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation", function () { - it("1. Validate change with auto height width for JsonForm", function () { - agHelper.AddDsl("jsonFormDynamicHeightDsl"); +describe( + "Dynamic Height Width validation", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change with auto height width for JsonForm", function () { + agHelper.AddDsl("jsonFormDynamicHeightDsl"); - EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.JSONFORM)) - .then((initialFormheight: number) => { - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper.Sleep(5000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.JSONFORM), - ) - .then((updatedFormheight: number) => { - expect(initialFormheight).to.not.equal(updatedFormheight); - agHelper.GetNClick(propPane._showColumnButton, 0); - agHelper.GetNClick(propPane._showColumnButton, 1); - agHelper.GetNClick(propPane._showColumnButton, 2); - propPane.SelectPropertiesDropDown("height", "Fixed"); - agHelper.Sleep(5000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.JSONFORM), - ) - .then((reUpdatedFormheight: number) => { - expect(updatedFormheight).to.not.equal(reUpdatedFormheight); - agHelper.GetNClick(propPane._showColumnButton, 2); - agHelper.GetNClick(propPane._showColumnButton, 1); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper.Sleep(5000); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.JSONFORM), - ) - .then((currentformheight: number) => { - expect(reUpdatedFormheight).to.not.equal(currentformheight); - }); - }); - }); - }); - }); -}); + EditorNavigation.SelectEntityByName("JSONForm1", EntityType.Widget); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.JSONFORM), + ) + .then((initialFormheight: number) => { + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper.Sleep(5000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.JSONFORM), + ) + .then((updatedFormheight: number) => { + expect(initialFormheight).to.not.equal(updatedFormheight); + agHelper.GetNClick(propPane._showColumnButton, 0); + agHelper.GetNClick(propPane._showColumnButton, 1); + agHelper.GetNClick(propPane._showColumnButton, 2); + propPane.SelectPropertiesDropDown("height", "Fixed"); + agHelper.Sleep(5000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.JSONFORM), + ) + .then((reUpdatedFormheight: number) => { + expect(updatedFormheight).to.not.equal(reUpdatedFormheight); + agHelper.GetNClick(propPane._showColumnButton, 2); + agHelper.GetNClick(propPane._showColumnButton, 1); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper.Sleep(5000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.JSONFORM), + ) + .then((currentformheight: number) => { + expect(reUpdatedFormheight).to.not.equal( + currentformheight, + ); + }); + }); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_Resizing_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_Resizing_spec.ts index 6b7e78a00d..3d64ab4864 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_Resizing_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_Resizing_spec.ts @@ -8,26 +8,32 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation", function () { - it("1. Validate change with auto height width for List widgets", function () { - agHelper.AddDsl("ResizeListDsl"); - EditorNavigation.SelectEntityByName("List1", EntityType.Widget, {}, [ - "Tabs1", - "Tab 1", - ]); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST_V2)) - .then((currentListHeight: number) => { - propPane.MoveToTab("Style"); - propPane.UpdatePropertyFieldValue("Item Spacing (px)", "16"); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.LIST_V2), - ) - .then((updatedListHeight: number) => { - expect(currentListHeight).to.equal(updatedListHeight); - agHelper.GetNAssertContains(locators._pagination, "5"); - }); - }); - }); -}); +describe( + "Dynamic Height Width validation", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change with auto height width for List widgets", function () { + agHelper.AddDsl("ResizeListDsl"); + EditorNavigation.SelectEntityByName("List1", EntityType.Widget, {}, [ + "Tabs1", + "Tab 1", + ]); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.LIST_V2), + ) + .then((currentListHeight: number) => { + propPane.MoveToTab("Style"); + propPane.UpdatePropertyFieldValue("Item Spacing (px)", "16"); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.LIST_V2), + ) + .then((updatedListHeight: number) => { + expect(currentListHeight).to.equal(updatedListHeight); + agHelper.GetNAssertContains(locators._pagination, "5"); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_TextWidget_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_TextWidget_Spec.ts index 52cf5d173f..94fc164c66 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_TextWidget_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_TextWidget_Spec.ts @@ -10,130 +10,150 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation list widget", function () { - it("1. Validate change with auto height width for list widgets", function () { - const textMsg = "Dynamic panel validation for text widget wrt height"; - agHelper.AddDsl("DynamicHeightListTextDsl"); +describe( + "Dynamic Height Width validation list widget", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change with auto height width for list widgets", function () { + const textMsg = "Dynamic panel validation for text widget wrt height"; + agHelper.AddDsl("DynamicHeightListTextDsl"); - entityExplorer.DragDropWidgetNVerify("multiselecttreewidget", 300, 500); - EditorNavigation.SelectEntityByName("List1", EntityType.Widget); - //Widgets which were not possible to be added to list widget cannot be pasted/moved into the list widget with multitreeselect - EditorNavigation.SelectEntityByName( - "MultiTreeSelect1", - EntityType.Widget, - {}, - ["List1"], - ); - agHelper.SimulateCopyPaste("copy"); - agHelper.WaitUntilAllToastsDisappear(); - agHelper.Sleep(2000); - EditorNavigation.SelectEntityByName("List1", EntityType.Widget); - propPane.MoveToTab("Style"); - agHelper.SimulateCopyPaste("paste"); - agHelper.ValidateToastMessage( - "This widget cannot be used inside the list widget.", - 0, - 1, - ); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST)) - .then((currentListHeight: any) => { - //Widgets within list widget have no dynamic height - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - //Widgets within list widget in existing applications have no dynamic height - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "List1", - "Container1", - ]); + entityExplorer.DragDropWidgetNVerify("multiselecttreewidget", 300, 500); + EditorNavigation.SelectEntityByName("List1", EntityType.Widget); + //Widgets which were not possible to be added to list widget cannot be pasted/moved into the list widget with multitreeselect + EditorNavigation.SelectEntityByName( + "MultiTreeSelect1", + EntityType.Widget, + {}, + ["List1"], + ); + agHelper.SimulateCopyPaste("copy"); + agHelper.WaitUntilAllToastsDisappear(); + agHelper.Sleep(2000); + EditorNavigation.SelectEntityByName("List1", EntityType.Widget); + propPane.MoveToTab("Style"); + agHelper.SimulateCopyPaste("paste"); + agHelper.ValidateToastMessage( + "This widget cannot be used inside the list widget.", + 0, + 1, + ); + agHelper + .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST)) + .then((currentListHeight: any) => { + //Widgets within list widget have no dynamic height + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + //Widgets within list widget in existing applications have no dynamic height + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "List1", + "Container1", + ]); - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - propPane.UpdatePropertyFieldValue("Text", textMsg, true); - EditorNavigation.SelectEntityByName("Text2", EntityType.Widget, {}, [ - "Container1", - "List1", - ]); - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - propPane.UpdatePropertyFieldValue("Text", textMsg, true); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST)) - .then((updatedListHeight: any) => { - expect(currentListHeight).to.equal(updatedListHeight); - }); - EditorNavigation.SelectEntityByName( - "Container1", - EntityType.Widget, - {}, - ["List1"], - ); + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + propPane.UpdatePropertyFieldValue("Text", textMsg, true); + EditorNavigation.SelectEntityByName("Text2", EntityType.Widget, {}, [ + "Container1", + "List1", + ]); + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + propPane.UpdatePropertyFieldValue("Text", textMsg, true); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.LIST), + ) + .then((updatedListHeight: any) => { + expect(currentListHeight).to.equal(updatedListHeight); + }); + EditorNavigation.SelectEntityByName( + "Container1", + EntityType.Widget, + {}, + ["List1"], + ); - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - //Widgets when moved into the list widget have no dynamic height - EditorNavigation.SelectEntityByName("Text3", EntityType.Widget); - propPane.MoveToTab("Style"); - agHelper.SimulateCopyPaste("copy"); + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + //Widgets when moved into the list widget have no dynamic height + EditorNavigation.SelectEntityByName("Text3", EntityType.Widget); + propPane.MoveToTab("Style"); + agHelper.SimulateCopyPaste("copy"); - EditorNavigation.SelectEntityByName("List1", EntityType.Widget); - propPane.MoveToTab("Style"); - agHelper.SimulateCopyPaste("paste"); - assertHelper.AssertNetworkStatus("@updateLayout", 200); + EditorNavigation.SelectEntityByName("List1", EntityType.Widget); + propPane.MoveToTab("Style"); + agHelper.SimulateCopyPaste("paste"); + assertHelper.AssertNetworkStatus("@updateLayout", 200); - EditorNavigation.SelectEntityByName("Text3Copy", EntityType.Widget); - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - agHelper.SimulateCopyPaste("copy"); - agHelper.WaitUntilAllToastsDisappear(); - agHelper.Sleep(2000); - agHelper.GetNClick(locators._canvasBody); - agHelper.SimulateCopyPaste("paste"); - assertHelper.AssertNetworkStatus("@updateLayout"); - //Widgets when moved out of the list widget have dynamic height in property pane - EditorNavigation.SelectEntityByName("Text3CopyCopy", EntityType.Widget); - agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); + EditorNavigation.SelectEntityByName("Text3Copy", EntityType.Widget); + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + agHelper.SimulateCopyPaste("copy"); + agHelper.WaitUntilAllToastsDisappear(); + agHelper.Sleep(2000); + agHelper.GetNClick(locators._canvasBody); + agHelper.SimulateCopyPaste("paste"); + assertHelper.AssertNetworkStatus("@updateLayout"); + //Widgets when moved out of the list widget have dynamic height in property pane + EditorNavigation.SelectEntityByName( + "Text3CopyCopy", + EntityType.Widget, + ); + agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); - agHelper.GetNClick(locators._widgetInDeployed(draggableWidgets.TEXT)); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TEXT)) - .then((height: any) => { - propPane.SelectPropertiesDropDown("height", "Auto Height"); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - agHelper.GetNClick( + agHelper.GetNClick(locators._widgetInDeployed(draggableWidgets.TEXT)); + agHelper + .GetWidgetCSSHeight( locators._widgetInDeployed(draggableWidgets.TEXT), - ); - agHelper - .GetWidgetCSSHeight( + ) + .then((height: any) => { + propPane.SelectPropertiesDropDown("height", "Auto Height"); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + agHelper.GetNClick( locators._widgetInDeployed(draggableWidgets.TEXT), - ) - .wait(1000) - .then((updatedListHeight: any) => { - expect(height).to.not.equal(updatedListHeight); - }); - }); - EditorNavigation.SelectEntityByName("Text3CopyCopy", EntityType.Widget); - agHelper.SimulateCopyPaste("copy"); + ); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TEXT), + ) + .wait(1000) + .then((updatedListHeight: any) => { + expect(height).to.not.equal(updatedListHeight); + }); + }); + EditorNavigation.SelectEntityByName( + "Text3CopyCopy", + EntityType.Widget, + ); + agHelper.SimulateCopyPaste("copy"); - EditorNavigation.SelectEntityByName("List1", EntityType.Widget); - propPane.MoveToTab("Style"); - agHelper.SimulateCopyPaste("paste"); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - //Widgets when copied and pasted into the list widget no longer have dynamic height - EditorNavigation.SelectEntityByName( - "Text3CopyCopyCopy", - EntityType.Widget, - {}, - ["Container1"], - ); - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - agHelper.Sleep(2000); //wait a bit to ensure that the 'Text3CopyCopy' is selected for cut + EditorNavigation.SelectEntityByName("List1", EntityType.Widget); + propPane.MoveToTab("Style"); + agHelper.SimulateCopyPaste("paste"); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + //Widgets when copied and pasted into the list widget no longer have dynamic height + EditorNavigation.SelectEntityByName( + "Text3CopyCopyCopy", + EntityType.Widget, + {}, + ["Container1"], + ); + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + agHelper.Sleep(2000); //wait a bit to ensure that the 'Text3CopyCopy' is selected for cut - EditorNavigation.SelectEntityByName("Text3CopyCopy", EntityType.Widget); - agHelper.SimulateCopyPaste("cut"); - EditorNavigation.SelectEntityByName("List1", EntityType.Widget); - propPane.MoveToTab("Style"); - agHelper.Sleep(500); - agHelper.SimulateCopyPaste("paste"); + EditorNavigation.SelectEntityByName( + "Text3CopyCopy", + EntityType.Widget, + ); + agHelper.SimulateCopyPaste("cut"); + EditorNavigation.SelectEntityByName("List1", EntityType.Widget); + propPane.MoveToTab("Style"); + agHelper.Sleep(500); + agHelper.SimulateCopyPaste("paste"); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - EditorNavigation.SelectEntityByName("Text3CopyCopy", EntityType.Widget); - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - }); - }); -}); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + EditorNavigation.SelectEntityByName( + "Text3CopyCopy", + EntityType.Widget, + ); + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_spec.ts index 497751393e..82143f9c76 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/List_spec.ts @@ -8,30 +8,36 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation", function () { - it("1. Validate change with auto height width for widgets", function () { - const textMsg = "Dynamic panel validation for text widget wrt height"; - agHelper.AddDsl("dynamicHeightListDsl"); +describe( + "Dynamic Height Width validation", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change with auto height width for widgets", function () { + const textMsg = "Dynamic panel validation for text widget wrt height"; + agHelper.AddDsl("dynamicHeightListDsl"); - EditorNavigation.SelectEntityByName("List1", EntityType.Widget); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST)) - .then((currentListHeight: number) => { - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "List1", - "Container1", - ]); - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - propPane.UpdatePropertyFieldValue("Text", textMsg, true); - EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); - agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); - propPane.UpdatePropertyFieldValue("Text", textMsg, true); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST)) - .then((updatedListHeight: number) => { - expect(currentListHeight).to.equal(updatedListHeight); - }); - }); - }); -}); + EditorNavigation.SelectEntityByName("List1", EntityType.Widget); + agHelper + .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.LIST)) + .then((currentListHeight: number) => { + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "List1", + "Container1", + ]); + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + propPane.UpdatePropertyFieldValue("Text", textMsg, true); + EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); + agHelper.AssertElementAbsence(propPane._propertyPaneHeightLabel); + propPane.UpdatePropertyFieldValue("Text", textMsg, true); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.LIST), + ) + .then((updatedListHeight: number) => { + expect(currentListHeight).to.equal(updatedListHeight); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Modal_Widget_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Modal_Widget_spec.ts index 60892f54eb..6d96fbb488 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Modal_Widget_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Modal_Widget_spec.ts @@ -9,48 +9,54 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation with limits", function () { - it("1. Validate change in auto height with limits width for widgets and highlight section validation", function () { - const textMsg = - "Dynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt height Dynamic panel validation for text widget Dynamic panel validation for text widget Dynamic panel validation for text widget"; - agHelper.AddDsl("DynamicHeightModalDsl"); +describe( + "Dynamic Height Width validation with limits", + { tags: ["@tag.AutoHeight"] }, + function () { + it("1. Validate change in auto height with limits width for widgets and highlight section validation", function () { + const textMsg = + "Dynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt heightDynamic panel validation for text widget wrt height Dynamic panel validation for text widget Dynamic panel validation for text widget Dynamic panel validation for text widget"; + agHelper.AddDsl("DynamicHeightModalDsl"); - EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget); + EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget); - agHelper - .GetWidgetCSSFrAttribute(locators._modal, "height") + agHelper + .GetWidgetCSSFrAttribute(locators._modal, "height") - // agHelper.GetWidgetCSSHeight(locators._widgetInDeployed("modal")) - .then((currentModalHeight: number) => { - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "Modal1", - ]); - agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TEXT)) - .then((currentTextWidgetHeight: number) => { - propPane.UpdatePropertyFieldValue("Text", textMsg, true); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.TEXT), - ) - .then((updatedTextWidgetHeight: number) => { - expect(currentTextWidgetHeight).to.not.equal( - updatedTextWidgetHeight, - ); - }); - EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper - .GetWidgetCSSFrAttribute(locators._modal, "height") - // agHelper.GetWidgetCSSHeight(locators._widgetInDeployed("widget")) - .then((updatedModalHeight: number) => { - expect(currentModalHeight).to.not.equal(updatedModalHeight); - }); - }); - }); - }); -}); + // agHelper.GetWidgetCSSHeight(locators._widgetInDeployed("modal")) + .then((currentModalHeight: number) => { + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "Modal1", + ]); + agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TEXT), + ) + .then((currentTextWidgetHeight: number) => { + propPane.UpdatePropertyFieldValue("Text", textMsg, true); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TEXT), + ) + .then((updatedTextWidgetHeight: number) => { + expect(currentTextWidgetHeight).to.not.equal( + updatedTextWidgetHeight, + ); + }); + EditorNavigation.SelectEntityByName("Modal1", EntityType.Widget); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper + .GetWidgetCSSFrAttribute(locators._modal, "height") + // agHelper.GetWidgetCSSHeight(locators._widgetInDeployed("widget")) + .then((updatedModalHeight: number) => { + expect(currentModalHeight).to.not.equal(updatedModalHeight); + }); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Multiple_Container_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Multiple_Container_spec.ts index c3c72e892a..7afde17e65 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Multiple_Container_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Multiple_Container_spec.ts @@ -9,96 +9,104 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation for multiple container", function () { - before(() => { - agHelper.AddDsl("multipleContainerdsl"); - }); - it("1. Validate change in auto height width with multiple containers", function () { - EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); - propPane.SelectPropertiesDropDown("height", "Fixed"); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - EditorNavigation.SelectEntityByName("Container2", EntityType.Widget, {}, [ - "Container1", - ]); - propPane.SelectPropertiesDropDown("height", "Fixed"); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - EditorNavigation.SelectEntityByName("Container3", EntityType.Widget, {}, [ - "Container2", - ]); - EditorNavigation.SelectEntityByName( - "CheckboxGroup1", - EntityType.Widget, - {}, - ["Container3"], - ); - propPane.SelectPropertiesDropDown("height", "Fixed"); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((outerContainerHeight: number) => { - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - 1, - ) - .then((middleContainerHeight: number) => { - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - 2, - ) - .then((innerContainerHeight: number) => { - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CHECKBOXGROUP), - ) - .then((checkboxheight: number) => { - agHelper.GetNClick(propPane._addOptionProperty); - agHelper.GetNClick(propPane._addOptionProperty); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed( - draggableWidgets.CHECKBOXGROUP, - ), - ) - .then((newcheckboxheight: number) => { - expect(checkboxheight).to.not.equal(newcheckboxheight); - }); - }); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - ) - .then((outerContainerUpdatedHeight: number) => { - expect(outerContainerHeight).to.not.equal( - outerContainerUpdatedHeight, - ); - }); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - 1, - ) - .then((middleContainerUpdatedHeight: number) => { - expect(middleContainerHeight).to.not.equal( - middleContainerUpdatedHeight, - ); - }); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.CONTAINER), - 2, - ) - .then((innerContainerUpdatedHeight: number) => { - expect(innerContainerHeight).to.not.equal( - innerContainerUpdatedHeight, - ); - }); - }); - }); - }); - }); -}); +describe( + "Dynamic Height Width validation for multiple container", + { tags: ["@tag.AutoHeight"] }, + function () { + before(() => { + agHelper.AddDsl("multipleContainerdsl"); + }); + it("1. Validate change in auto height width with multiple containers", function () { + EditorNavigation.SelectEntityByName("Container1", EntityType.Widget); + propPane.SelectPropertiesDropDown("height", "Fixed"); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + EditorNavigation.SelectEntityByName("Container2", EntityType.Widget, {}, [ + "Container1", + ]); + propPane.SelectPropertiesDropDown("height", "Fixed"); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + EditorNavigation.SelectEntityByName("Container3", EntityType.Widget, {}, [ + "Container2", + ]); + EditorNavigation.SelectEntityByName( + "CheckboxGroup1", + EntityType.Widget, + {}, + ["Container3"], + ); + propPane.SelectPropertiesDropDown("height", "Fixed"); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((outerContainerHeight: number) => { + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + 1, + ) + .then((middleContainerHeight: number) => { + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + 2, + ) + .then((innerContainerHeight: number) => { + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed( + draggableWidgets.CHECKBOXGROUP, + ), + ) + .then((checkboxheight: number) => { + agHelper.GetNClick(propPane._addOptionProperty); + agHelper.GetNClick(propPane._addOptionProperty); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed( + draggableWidgets.CHECKBOXGROUP, + ), + ) + .then((newcheckboxheight: number) => { + expect(checkboxheight).to.not.equal( + newcheckboxheight, + ); + }); + }); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + ) + .then((outerContainerUpdatedHeight: number) => { + expect(outerContainerHeight).to.not.equal( + outerContainerUpdatedHeight, + ); + }); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + 1, + ) + .then((middleContainerUpdatedHeight: number) => { + expect(middleContainerHeight).to.not.equal( + middleContainerUpdatedHeight, + ); + }); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.CONTAINER), + 2, + ) + .then((innerContainerUpdatedHeight: number) => { + expect(innerContainerHeight).to.not.equal( + innerContainerUpdatedHeight, + ); + }); + }); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Overlap_Test_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Overlap_Test_spec.ts index 789ce6161a..e126d48fe6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Overlap_Test_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Overlap_Test_spec.ts @@ -1,24 +1,28 @@ import { agHelper, locators } from "../../../../support/Objects/ObjectsCore"; -describe("Fixed Invisible widgets and auto height containers", () => { - before(() => { - // Create a page with a divider below a button widget and a checkbox widget below a filepicker widget - // Button widget and filepicker widgets are fixed height widgets - agHelper.AddDsl("autoHeightOverlapDSL"); - }); +describe( + "Fixed Invisible widgets and auto height containers", + { tags: ["@tag.AutoHeight"] }, + () => { + before(() => { + // Create a page with a divider below a button widget and a checkbox widget below a filepicker widget + // Button widget and filepicker widgets are fixed height widgets + agHelper.AddDsl("autoHeightOverlapDSL"); + }); - it("1. Invisible widgets should not overlap when returning from preview mode to edit mode", () => { - cy.get(locators._widgetInDeployed("textwidget")); - agHelper.AssertContains("anything", "exist", "#ryq5qy60cg"); + it("1. Invisible widgets should not overlap when returning from preview mode to edit mode", () => { + cy.get(locators._widgetInDeployed("textwidget")); + agHelper.AssertContains("anything", "exist", "#ryq5qy60cg"); - agHelper.AssertElementVisibility(locators._previewModeToggle("edit")); - agHelper.GetNClick(locators._previewModeToggle("edit")); + agHelper.AssertElementVisibility(locators._previewModeToggle("edit")); + agHelper.GetNClick(locators._previewModeToggle("edit")); - agHelper.AssertElementVisibility(locators._previewModeToggle("preview")); - agHelper.GetNClick(locators._previewModeToggle("preview")); + agHelper.AssertElementVisibility(locators._previewModeToggle("preview")); + agHelper.GetNClick(locators._previewModeToggle("preview")); - cy.get("#ryq5qy60cg").should("have.css", "top", "136px"); - cy.get("#kx7mvoopqu").should("have.css", "top", "96px"); - cy.get("#m4doxmviiu").should("have.css", "top", "56px"); - }); -}); + cy.get("#ryq5qy60cg").should("have.css", "top", "136px"); + cy.get("#kx7mvoopqu").should("have.css", "top", "96px"); + cy.get("#m4doxmviiu").should("have.css", "top", "56px"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Tab_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Tab_spec.ts index e8ac6e1d99..60e5b4c8aa 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Tab_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Tab_spec.ts @@ -11,93 +11,105 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation for Tab widget", function () { - before(() => { - agHelper.AddDsl("dynamicTabWidgetdsl"); - }); +describe( + "Dynamic Height Width validation for Tab widget", + { tags: ["@tag.AutoHeight"] }, + function () { + before(() => { + agHelper.AddDsl("dynamicTabWidgetdsl"); + }); - function validateHeight() { - agHelper.GetNClick(propPane._tabId1); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) - .then((currentHeight: number) => { - agHelper.GetNClick(propPane._tabId2); - agHelper.Sleep(1000); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) - .then((updatedHeight: number) => { - expect(currentHeight).to.not.equal(updatedHeight); - }); - }); - } - it("1. Tab widget validation of height with dynamic height feature with publish mode", function () { - //changing the Text Name and verifying - EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper.GetNClick(propPane._tabId1); - validateHeight(); - deployMode.DeployApp(); - validateHeight(); - deployMode.NavigateBacktoEditor(); - agHelper.AssertElementVisibility(locators._previewModeToggle("edit")); - agHelper.GetNClick(locators._previewModeToggle("edit")); - agHelper.GetNClick(propPane._tabId1); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) - .then((currentHeight) => { - agHelper.GetNClick(propPane._tabId2); - agHelper.Sleep(1000); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) - .then((updatedHeight: number) => { - expect(currentHeight).to.not.equal(updatedHeight); - }); - }); - // it("Tab widget validation of height with preview mode", function() { - agHelper.AssertElementVisibility(locators._previewModeToggle("preview")); - agHelper.GetNClick(locators._previewModeToggle("preview")); - EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); - propPane.SelectPropertiesDropDown("height", "Fixed"); - agHelper.GetNClick(propPane._tabId1); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) - .then((currentHeight: number) => { - agHelper.GetNClick(propPane._tabId2); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) - .then((updatedHeight: number) => { - expect(currentHeight).to.equal(updatedHeight); - agHelper.GetNClick(propPane._showTabsProperty); - assertHelper.AssertNetworkStatus("@updateLayout", 200); - agHelper - .GetWidgetCSSHeight( - locators._widgetInDeployed(draggableWidgets.TAB), - ) - .then((upheight: number) => { - expect(updatedHeight).to.equal(upheight); - agHelper.AssertElementAbsence(propPane._tabId1); - agHelper.AssertElementAbsence(propPane._tabId2); - }); - }); - }); - //it("Tab widget validation of height with reload", function() { - EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); - agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); - agHelper.GetNClick(propPane._showTabsProperty); - propPane.SelectPropertiesDropDown("height", "Auto Height"); - agHelper.GetNClick(propPane._tabId1); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) - .then((currentHeight: number) => { - agHelper.GetNClick(propPane._tabId2); - propPane.SelectPropertiesDropDown("height", "Fixed"); - agHelper.RefreshPage(); - EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); - agHelper - .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) - .then((updatedHeight: number) => { - expect(currentHeight).to.not.equal(updatedHeight); - }); - }); - }); -}); + function validateHeight() { + agHelper.GetNClick(propPane._tabId1); + agHelper + .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) + .then((currentHeight: number) => { + agHelper.GetNClick(propPane._tabId2); + agHelper.Sleep(1000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TAB), + ) + .then((updatedHeight: number) => { + expect(currentHeight).to.not.equal(updatedHeight); + }); + }); + } + it("1. Tab widget validation of height with dynamic height feature with publish mode", function () { + //changing the Text Name and verifying + EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper.GetNClick(propPane._tabId1); + validateHeight(); + deployMode.DeployApp(); + validateHeight(); + deployMode.NavigateBacktoEditor(); + agHelper.AssertElementVisibility(locators._previewModeToggle("edit")); + agHelper.GetNClick(locators._previewModeToggle("edit")); + agHelper.GetNClick(propPane._tabId1); + agHelper + .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) + .then((currentHeight) => { + agHelper.GetNClick(propPane._tabId2); + agHelper.Sleep(1000); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TAB), + ) + .then((updatedHeight: number) => { + expect(currentHeight).to.not.equal(updatedHeight); + }); + }); + // it("Tab widget validation of height with preview mode", function() { + agHelper.AssertElementVisibility(locators._previewModeToggle("preview")); + agHelper.GetNClick(locators._previewModeToggle("preview")); + EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); + propPane.SelectPropertiesDropDown("height", "Fixed"); + agHelper.GetNClick(propPane._tabId1); + agHelper + .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) + .then((currentHeight: number) => { + agHelper.GetNClick(propPane._tabId2); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TAB), + ) + .then((updatedHeight: number) => { + expect(currentHeight).to.equal(updatedHeight); + agHelper.GetNClick(propPane._showTabsProperty); + assertHelper.AssertNetworkStatus("@updateLayout", 200); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TAB), + ) + .then((upheight: number) => { + expect(updatedHeight).to.equal(upheight); + agHelper.AssertElementAbsence(propPane._tabId1); + agHelper.AssertElementAbsence(propPane._tabId2); + }); + }); + }); + //it("Tab widget validation of height with reload", function() { + EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); + agHelper.AssertElementVisibility(propPane._propertyPaneHeightLabel); + agHelper.GetNClick(propPane._showTabsProperty); + propPane.SelectPropertiesDropDown("height", "Auto Height"); + agHelper.GetNClick(propPane._tabId1); + agHelper + .GetWidgetCSSHeight(locators._widgetInDeployed(draggableWidgets.TAB)) + .then((currentHeight: number) => { + agHelper.GetNClick(propPane._tabId2); + propPane.SelectPropertiesDropDown("height", "Fixed"); + agHelper.RefreshPage(); + EditorNavigation.SelectEntityByName("Tabs1", EntityType.Widget); + agHelper + .GetWidgetCSSHeight( + locators._widgetInDeployed(draggableWidgets.TAB), + ) + .then((updatedHeight: number) => { + expect(currentHeight).to.not.equal(updatedHeight); + }); + }); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/TextWidget_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/TextWidget_Spec.ts index 3cabf4ef83..56201df693 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/TextWidget_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/TextWidget_Spec.ts @@ -8,48 +8,54 @@ import { assertHelper, } from "../../../../support/Objects/ObjectsCore"; -describe("Dynamic Height Width validation for text widget", function () { - before(() => { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT); - }); +describe( + "Dynamic Height Width validation for text widget", + { tags: ["@tag.AutoHeight"] }, + function () { + before(() => { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.TEXT); + }); - it("1. Text widget validation of height with dynamic height feature", function () { - const textMsg = - "Dynamic height validation for text widget validation with respect to Auto height"; - //changing the Text and verifying - propPane.AssertPropertiesDropDownCurrentValue("Height", "Auto Height"); + it("1. Text widget validation of height with dynamic height feature", function () { + const textMsg = + "Dynamic height validation for text widget validation with respect to Auto height"; + //changing the Text and verifying + propPane.AssertPropertiesDropDownCurrentValue("Height", "Auto Height"); - propPane.AssertPropertiesDropDownValues("Height", [ - "Auto Height", - "Auto Height with limits", - "Fixed", - ]); + propPane.AssertPropertiesDropDownValues("Height", [ + "Auto Height", + "Auto Height with limits", + "Fixed", + ]); - agHelper.GetHeight(locators._widgetInDeployed(draggableWidgets.TEXT)); - cy.get("@eleHeight").then(($initalHeight) => { - propPane.UpdatePropertyFieldValue("Text", textMsg); - propPane.MoveToTab("Style"); - propPane.SelectPropertiesDropDown("Font size", "L"); - assertHelper.AssertNetworkStatus("@updateLayout", 200); //for textMsg update agHelper.GetHeight(locators._widgetInDeployed(draggableWidgets.TEXT)); - cy.get("@eleHeight").then(($addedtextHeight) => { - expect($addedtextHeight).to.not.equal($initalHeight); - deployMode.DeployApp(locators._textWidgetInDeployed); - agHelper.GetText(locators._textWidgetInDeployed).then(($text: any) => { - expect($text).to.eq(textMsg); - }); - - agHelper.AssertAttribute( - locators._textWidgetStyleInDeployed, - "font-size", - "1.25rem", //for Font size 'L' - ); - + cy.get("@eleHeight").then(($initalHeight) => { + propPane.UpdatePropertyFieldValue("Text", textMsg); + propPane.MoveToTab("Style"); + propPane.SelectPropertiesDropDown("Font size", "L"); + assertHelper.AssertNetworkStatus("@updateLayout", 200); //for textMsg update agHelper.GetHeight(locators._widgetInDeployed(draggableWidgets.TEXT)); - cy.get("@eleHeight").then(($deployedAutoHeight) => { - expect($deployedAutoHeight).not.eq($initalHeight); + cy.get("@eleHeight").then(($addedtextHeight) => { + expect($addedtextHeight).to.not.equal($initalHeight); + deployMode.DeployApp(locators._textWidgetInDeployed); + agHelper + .GetText(locators._textWidgetInDeployed) + .then(($text: any) => { + expect($text).to.eq(textMsg); + }); + + agHelper.AssertAttribute( + locators._textWidgetStyleInDeployed, + "font-size", + "1.25rem", //for Font size 'L' + ); + + agHelper.GetHeight(locators._widgetInDeployed(draggableWidgets.TEXT)); + cy.get("@eleHeight").then(($deployedAutoHeight) => { + expect($deployedAutoHeight).not.eq($initalHeight); + }); }); }); }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Text_With_Different_Size_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Text_With_Different_Size_spec.ts index d18c4c85c2..9a0d4e0b15 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Text_With_Different_Size_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/DynamicHeight/Text_With_Different_Size_spec.ts @@ -7,238 +7,257 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Dynamic Height Width validation", function () { - function validateCssProperties(property) { - agHelper.GetNClickByContains("button", "Small", 0, true); - agHelper.Sleep(2000); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed(draggableWidgets.TEXT), - property, - 0, - ) - .then((CurrentValueOfFirstText) => { - EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed(draggableWidgets.TEXT), - property, - 1, - ) - .then((CurrentValueOfSecondText) => { - EditorNavigation.SelectEntityByName("Text3", EntityType.Widget); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed(draggableWidgets.TEXT), - property, - 2, - ) - .then((CurrentValueOfThirdText) => { - EditorNavigation.SelectEntityByName("Text4", EntityType.Widget); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed(draggableWidgets.TEXT), - property, - 3, - ) - .then((CurrentValueOfFourthText) => { - agHelper.GetNClickByContains("button", "Large", 0, true); - agHelper.Sleep(3000); - EditorNavigation.SelectEntityByName( - "Text1", - EntityType.Widget, - ); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed(draggableWidgets.TEXT), - property, - 0, - ) - .then((UpdatedLargeValueOfFirstText) => { - EditorNavigation.SelectEntityByName( - "Text2", - EntityType.Widget, - ); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed(draggableWidgets.TEXT), - property, - 1, - ) - .then((UpdatedLargeValueOfSecondText) => { - EditorNavigation.SelectEntityByName( - "Text3", - EntityType.Widget, - ); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed( - draggableWidgets.TEXT, - ), - property, - 2, - ) - .then((UpdatedLargeValueOfThirdText) => { - EditorNavigation.SelectEntityByName( - "Text4", - EntityType.Widget, - ); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed( - draggableWidgets.TEXT, - ), - property, - 3, - ) - .then((UpdatedLargeValueOfFourthText) => { - if (property == "left") { - expect(CurrentValueOfFirstText).to.equal( - UpdatedLargeValueOfFirstText, - ); - expect(CurrentValueOfSecondText).to.equal( - UpdatedLargeValueOfSecondText, - ); - expect(CurrentValueOfThirdText).to.equal( - UpdatedLargeValueOfThirdText, - ); - expect(CurrentValueOfFourthText).to.equal( - UpdatedLargeValueOfFourthText, - ); - } else { - expect( - CurrentValueOfFirstText, - ).to.not.equal( - UpdatedLargeValueOfFirstText, - ); - expect( - CurrentValueOfSecondText, - ).to.not.equal( - UpdatedLargeValueOfSecondText, - ); - expect( - CurrentValueOfThirdText, - ).to.not.equal( - UpdatedLargeValueOfThirdText, - ); - expect( - CurrentValueOfFourthText, - ).to.not.equal( - UpdatedLargeValueOfFourthText, - ); - } - agHelper.GetNClickByContains( - "button", - "Small", - 0, - true, - ); - agHelper.Sleep(2000); - EditorNavigation.SelectEntityByName( - "Text1", - EntityType.Widget, - ); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed( - draggableWidgets.TEXT, - ), - property, - 0, - ) - .then((UpdatedSmallValueOfFirstText) => { - EditorNavigation.SelectEntityByName( - "Text2", - EntityType.Widget, +describe( + "Dynamic Height Width validation", + { tags: ["@tag.AutoHeight"] }, + function () { + function validateCssProperties(property) { + agHelper.GetNClickByContains("button", "Small", 0, true); + agHelper.Sleep(2000); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed(draggableWidgets.TEXT), + property, + 0, + ) + .then((CurrentValueOfFirstText) => { + EditorNavigation.SelectEntityByName("Text2", EntityType.Widget); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed(draggableWidgets.TEXT), + property, + 1, + ) + .then((CurrentValueOfSecondText) => { + EditorNavigation.SelectEntityByName("Text3", EntityType.Widget); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed(draggableWidgets.TEXT), + property, + 2, + ) + .then((CurrentValueOfThirdText) => { + EditorNavigation.SelectEntityByName( + "Text4", + EntityType.Widget, + ); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed(draggableWidgets.TEXT), + property, + 3, + ) + .then((CurrentValueOfFourthText) => { + agHelper.GetNClickByContains("button", "Large", 0, true); + agHelper.Sleep(3000); + EditorNavigation.SelectEntityByName( + "Text1", + EntityType.Widget, + ); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed(draggableWidgets.TEXT), + property, + 0, + ) + .then((UpdatedLargeValueOfFirstText) => { + EditorNavigation.SelectEntityByName( + "Text2", + EntityType.Widget, + ); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed(draggableWidgets.TEXT), + property, + 1, + ) + .then((UpdatedLargeValueOfSecondText) => { + EditorNavigation.SelectEntityByName( + "Text3", + EntityType.Widget, + ); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed( + draggableWidgets.TEXT, + ), + property, + 2, + ) + .then((UpdatedLargeValueOfThirdText) => { + EditorNavigation.SelectEntityByName( + "Text4", + EntityType.Widget, + ); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed( + draggableWidgets.TEXT, + ), + property, + 3, + ) + .then((UpdatedLargeValueOfFourthText) => { + if (property == "left") { + expect( + CurrentValueOfFirstText, + ).to.equal( + UpdatedLargeValueOfFirstText, ); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed( - draggableWidgets.TEXT, - ), - property, - 1, - ) - .then( - (UpdatedSmallValueOfSecondText) => { - EditorNavigation.SelectEntityByName( - "Text3", - EntityType.Widget, - ); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed( - draggableWidgets.TEXT, - ), - property, - 2, - ) - .then( - ( - UpdatedSmallValueOfThirdText, - ) => { - EditorNavigation.SelectEntityByName( - "Text4", - EntityType.Widget, + expect( + CurrentValueOfSecondText, + ).to.equal( + UpdatedLargeValueOfSecondText, + ); + expect( + CurrentValueOfThirdText, + ).to.equal( + UpdatedLargeValueOfThirdText, + ); + expect( + CurrentValueOfFourthText, + ).to.equal( + UpdatedLargeValueOfFourthText, + ); + } else { + expect( + CurrentValueOfFirstText, + ).to.not.equal( + UpdatedLargeValueOfFirstText, + ); + expect( + CurrentValueOfSecondText, + ).to.not.equal( + UpdatedLargeValueOfSecondText, + ); + expect( + CurrentValueOfThirdText, + ).to.not.equal( + UpdatedLargeValueOfThirdText, + ); + expect( + CurrentValueOfFourthText, + ).to.not.equal( + UpdatedLargeValueOfFourthText, + ); + } + agHelper.GetNClickByContains( + "button", + "Small", + 0, + true, + ); + agHelper.Sleep(2000); + EditorNavigation.SelectEntityByName( + "Text1", + EntityType.Widget, + ); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed( + draggableWidgets.TEXT, + ), + property, + 0, + ) + .then( + (UpdatedSmallValueOfFirstText) => { + EditorNavigation.SelectEntityByName( + "Text2", + EntityType.Widget, + ); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed( + draggableWidgets.TEXT, + ), + property, + 1, + ) + .then( + ( + UpdatedSmallValueOfSecondText, + ) => { + EditorNavigation.SelectEntityByName( + "Text3", + EntityType.Widget, + ); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed( + draggableWidgets.TEXT, + ), + property, + 2, + ) + .then( + ( + UpdatedSmallValueOfThirdText, + ) => { + EditorNavigation.SelectEntityByName( + "Text4", + EntityType.Widget, + ); + agHelper.Sleep(2000); + agHelper + .GetWidgetCSSFrAttribute( + locators._widgetInDeployed( + draggableWidgets.TEXT, + ), + property, + 3, + ) + .then( + ( + UpdatedSmallValueOfFourthText, + ) => { + expect( + CurrentValueOfFirstText, + ).to.equal( + UpdatedSmallValueOfFirstText, + ); + expect( + CurrentValueOfSecondText, + ).to.equal( + UpdatedSmallValueOfSecondText, + ); + expect( + CurrentValueOfThirdText, + ).to.equal( + UpdatedSmallValueOfThirdText, + ); + expect( + CurrentValueOfFourthText, + ).to.equal( + UpdatedSmallValueOfFourthText, + ); + }, + ); + }, ); - agHelper.Sleep(2000); - agHelper - .GetWidgetCSSFrAttribute( - locators._widgetInDeployed( - draggableWidgets.TEXT, - ), - property, - 3, - ) - .then( - ( - UpdatedSmallValueOfFourthText, - ) => { - expect( - CurrentValueOfFirstText, - ).to.equal( - UpdatedSmallValueOfFirstText, - ); - expect( - CurrentValueOfSecondText, - ).to.equal( - UpdatedSmallValueOfSecondText, - ); - expect( - CurrentValueOfThirdText, - ).to.equal( - UpdatedSmallValueOfThirdText, - ); - expect( - CurrentValueOfFourthText, - ).to.equal( - UpdatedSmallValueOfFourthText, - ); - }, - ); - }, - ); - }, - ); - }); - }); - }); - }); - }); - }); - }); - }); - }); - } - it("1. Validate change with auto height width for text widgets", function () { - agHelper.AddDsl("alignmentWithDynamicHeightDsl"); - validateCssProperties("height"); - validateCssProperties("left"); - }); -}); + }, + ); + }, + ); + }); + }); + }); + }); + }); + }); + }); + }); + } + it("1. Validate change with auto height width for text widgets", function () { + agHelper.AddDsl("alignmentWithDynamicHeightDsl"); + validateCssProperties("height"); + validateCssProperties("left"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/EmbedSettings/EmbedSettings_spec.js b/app/client/cypress/e2e/Regression/ClientSide/EmbedSettings/EmbedSettings_spec.js index 5768935aa2..3a5abfde7f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/EmbedSettings/EmbedSettings_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/EmbedSettings/EmbedSettings_spec.js @@ -2,7 +2,7 @@ import * as _ from "../../../../support/Objects/ObjectsCore"; import adminSettings from "../../../../locators/AdminsSettings"; const appNavigationLocators = require("../../../../locators/AppNavigation.json"); -describe("Embed settings options", function () { +describe("Embed settings options", { tags: ["@tag.Settings"] }, function () { const getIframeBody = () => { // get the iframe > document > body // and retry until the body element is not empty diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js index 8ebd059161..b82a7de48b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/API_Pane_spec.js @@ -14,82 +14,88 @@ let ee = ObjectsRegistry.EntityExplorer, locator = ObjectsRegistry.CommonLocators, homePage = ObjectsRegistry.HomePage; -describe("Entity explorer API pane related testcases", function () { - it("1. Empty Message validation for Widgets/API/Queries", function () { - homePage.CreateNewWorkspace("EmptyMsgCheck", true); - homePage.CreateAppInWorkspace("EmptyMsgCheck"); - PageLeftPane.expandCollapseItem("Widgets"); - agHelper.AssertElementVisibility( - locator._visibleTextSpan("No widget to display"), - ); - agHelper.AssertElementVisibility(locator._visibleTextSpan("New widget")); +describe( + "Entity explorer API pane related testcases", + { tags: ["@tag.IDE"] }, + function () { + it("1. Empty Message validation for Widgets/API/Queries", function () { + homePage.CreateNewWorkspace("EmptyMsgCheck", true); + homePage.CreateAppInWorkspace("EmptyMsgCheck"); + PageLeftPane.expandCollapseItem("Widgets"); + agHelper.AssertElementVisibility( + locator._visibleTextSpan("No widget to display"), + ); + agHelper.AssertElementVisibility(locator._visibleTextSpan("New widget")); - PageLeftPane.expandCollapseItem("Queries/JS"); - agHelper.AssertElementVisibility( - locator._visibleTextSpan("No query/JS to display"), - ); - agHelper.AssertElementVisibility(locator._visibleTextSpan("New query/JS")); - }); + PageLeftPane.expandCollapseItem("Queries/JS"); + agHelper.AssertElementVisibility( + locator._visibleTextSpan("No query/JS to display"), + ); + agHelper.AssertElementVisibility( + locator._visibleTextSpan("New query/JS"), + ); + }); - it("2. Move to page / edit API name /properties validation", function () { - cy.CreateAPI("FirstAPI"); - cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); - cy.SaveAndRunAPI(); - cy.validateRequest( - "FirstAPI", - testdata.baseUrl, - testdata.methods, - testdata.Get, - ); - cy.ResponseStatusCheck(testdata.successStatusCode); - PageLeftPane.expandCollapseItem("Queries/JS"); - ee.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "FirstAPI", - action: "Show bindings", + it("2. Move to page / edit API name /properties validation", function () { + cy.CreateAPI("FirstAPI"); + cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods); + cy.SaveAndRunAPI(); + cy.validateRequest( + "FirstAPI", + testdata.baseUrl, + testdata.methods, + testdata.Get, + ); + cy.ResponseStatusCheck(testdata.successStatusCode); + PageLeftPane.expandCollapseItem("Queries/JS"); + ee.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "FirstAPI", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(5); + expect($lis.eq(0)).to.contain("{{FirstAPI.isLoading}}"); + expect($lis.eq(1)).to.contain("{{FirstAPI.data}}"); + expect($lis.eq(2)).to.contain("{{FirstAPI.responseMeta}}"); + expect($lis.eq(3)).to.contain("{{FirstAPI.run()}}"); + expect($lis.eq(4)).to.contain("{{FirstAPI.clear()}}"); + }); + cy.get(apiwidget.actionlist).contains(testdata.Get).should("be.visible"); + cy.Createpage(pageid); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + agHelper.Sleep(); //for the selected entity to settle loading! + PageLeftPane.expandCollapseItem("Queries/JS"); + ee.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "FirstAPI", + action: "Edit name", + }); + cy.EditApiNameFromExplorer("SecondAPI"); + cy.xpath(apiwidget.popover) + .last() + .should("be.hidden") + .invoke("show") + .click({ force: true }); + ee.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "SecondAPI", + action: "Move to page", + subAction: pageid, + toastToValidate: "action moved to page", + }); + cy.wait(500); + PageLeftPane.expandCollapseItem("Queries/JS"); + PageLeftPane.assertPresence("SecondAPI"); + ee.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "SecondAPI", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(5); + expect($lis.eq(0)).to.contain("{{SecondAPI.isLoading}}"); + expect($lis.eq(1)).to.contain("{{SecondAPI.data}}"); + expect($lis.eq(2)).to.contain("{{SecondAPI.responseMeta}}"); + expect($lis.eq(3)).to.contain("{{SecondAPI.run()}}"); + expect($lis.eq(4)).to.contain("{{SecondAPI.clear()}}"); + }); }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(5); - expect($lis.eq(0)).to.contain("{{FirstAPI.isLoading}}"); - expect($lis.eq(1)).to.contain("{{FirstAPI.data}}"); - expect($lis.eq(2)).to.contain("{{FirstAPI.responseMeta}}"); - expect($lis.eq(3)).to.contain("{{FirstAPI.run()}}"); - expect($lis.eq(4)).to.contain("{{FirstAPI.clear()}}"); - }); - cy.get(apiwidget.actionlist).contains(testdata.Get).should("be.visible"); - cy.Createpage(pageid); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - agHelper.Sleep(); //for the selected entity to settle loading! - PageLeftPane.expandCollapseItem("Queries/JS"); - ee.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "FirstAPI", - action: "Edit name", - }); - cy.EditApiNameFromExplorer("SecondAPI"); - cy.xpath(apiwidget.popover) - .last() - .should("be.hidden") - .invoke("show") - .click({ force: true }); - ee.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "SecondAPI", - action: "Move to page", - subAction: pageid, - toastToValidate: "action moved to page", - }); - cy.wait(500); - PageLeftPane.expandCollapseItem("Queries/JS"); - PageLeftPane.assertPresence("SecondAPI"); - ee.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "SecondAPI", - action: "Show bindings", - }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(5); - expect($lis.eq(0)).to.contain("{{SecondAPI.isLoading}}"); - expect($lis.eq(1)).to.contain("{{SecondAPI.data}}"); - expect($lis.eq(2)).to.contain("{{SecondAPI.responseMeta}}"); - expect($lis.eq(3)).to.contain("{{SecondAPI.run()}}"); - expect($lis.eq(4)).to.contain("{{SecondAPI.clear()}}"); - }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_1_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_1_spec.js index 2e5524d998..dfa88716c9 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_1_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_1_spec.js @@ -21,7 +21,7 @@ const routes = { VERSION: "/settings/version", }; -describe("Admin settings page", function () { +describe("Admin settings page", { tags: ["@tag.IDE"] }, function () { beforeEach(() => { cy.intercept("GET", "/api/v1/admin/env", { body: { responseMeta: { status: 200, success: true }, data: {} }, diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js index 86695fa129..6f13dc628f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Admin_settings_2_spec.js @@ -21,7 +21,7 @@ const routes = { VERSION: "/settings/version", }; -describe("Admin settings page", function () { +describe("Admin settings page", { tags: ["@tag.IDE"] }, function () { it("1. should test that configure link redirects to google maps setup doc", () => { cy.visit(routes.DEVELOPER_SETTINGS, { timeout: 60000 }); cy.get(adminsSettings.readMoreLink).within(() => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Bindings_Widgets_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Bindings_Widgets_spec.ts index 0ab9077173..a4635ca226 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Bindings_Widgets_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Bindings_Widgets_spec.ts @@ -9,72 +9,76 @@ import EditorNavigation, { } from "../../../../support/Pages/EditorNavigation"; import PageList from "../../../../support/Pages/PageList"; -describe("Entity explorer tests related to widgets and validation", function () { - beforeEach(() => { - agHelper.RestoreLocalStorageCache(); - }); +describe( + "Entity explorer tests related to widgets and validation", + { tags: ["@tag.IDE"] }, + function () { + beforeEach(() => { + agHelper.RestoreLocalStorageCache(); + }); - afterEach(() => { - agHelper.SaveLocalStorageCache(); - }); + afterEach(() => { + agHelper.SaveLocalStorageCache(); + }); - it("1. Add a widget to default page and verify the properties", function () { - agHelper.AddDsl("displayWidgetDsl"); - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "Container4", - ]); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Text1", - action: "Show bindings", + it("1. Add a widget to default page and verify the properties", function () { + agHelper.AddDsl("displayWidgetDsl"); + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "Container4", + ]); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Text1", + action: "Show bindings", + }); + cy.get(jsEditor._propertyList).then(function ($lis) { + expect($lis).to.have.length(2); + expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); + expect($lis.eq(1)).to.contain("{{Text1.text}}"); + }); }); - cy.get(jsEditor._propertyList).then(function ($lis) { - expect($lis).to.have.length(2); - expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); - expect($lis.eq(1)).to.contain("{{Text1.text}}"); - }); - }); - it("2. Create another page and add another widget and verify properties", function () { - PageList.AddNewPage("New blank page"); - agHelper.AddDsl("tableWidgetDsl"); + it("2. Create another page and add another widget and verify properties", function () { + PageList.AddNewPage("New blank page"); + agHelper.AddDsl("tableWidgetDsl"); - EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [ - "Container3", - ]); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Table1", - action: "Show bindings", + EditorNavigation.SelectEntityByName("Table1", EntityType.Widget, {}, [ + "Container3", + ]); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Table1", + action: "Show bindings", + }); + cy.get(jsEditor._propertyList).then(function ($lis) { + expect($lis).to.have.length(13); + expect($lis.eq(0)).to.contain("{{Table1.selectedRow}}"); + expect($lis.eq(1)).to.contain("{{Table1.selectedRows}}"); + expect($lis.eq(2)).to.contain("{{Table1.selectedRowIndices}}"); + expect($lis.eq(3)).to.contain("{{Table1.triggeredRow}}"); + expect($lis.eq(4)).to.contain("{{Table1.selectedRowIndex}}"); + expect($lis.eq(5)).to.contain("{{Table1.tableData}}"); + expect($lis.eq(6)).to.contain("{{Table1.filteredTableData}}"); + expect($lis.eq(7)).to.contain("{{Table1.pageNo}}"); + expect($lis.eq(8)).to.contain("{{Table1.pageSize}}"); + expect($lis.eq(9)).to.contain("{{Table1.isVisible}}"); + expect($lis.eq(10)).to.contain("{{Table1.searchText}}"); + expect($lis.eq(11)).to.contain("{{Table1.totalRecordsCount}}"); + expect($lis.eq(12)).to.contain("{{Table1.sortOrder}}"); + }); }); - cy.get(jsEditor._propertyList).then(function ($lis) { - expect($lis).to.have.length(13); - expect($lis.eq(0)).to.contain("{{Table1.selectedRow}}"); - expect($lis.eq(1)).to.contain("{{Table1.selectedRows}}"); - expect($lis.eq(2)).to.contain("{{Table1.selectedRowIndices}}"); - expect($lis.eq(3)).to.contain("{{Table1.triggeredRow}}"); - expect($lis.eq(4)).to.contain("{{Table1.selectedRowIndex}}"); - expect($lis.eq(5)).to.contain("{{Table1.tableData}}"); - expect($lis.eq(6)).to.contain("{{Table1.filteredTableData}}"); - expect($lis.eq(7)).to.contain("{{Table1.pageNo}}"); - expect($lis.eq(8)).to.contain("{{Table1.pageSize}}"); - expect($lis.eq(9)).to.contain("{{Table1.isVisible}}"); - expect($lis.eq(10)).to.contain("{{Table1.searchText}}"); - expect($lis.eq(11)).to.contain("{{Table1.totalRecordsCount}}"); - expect($lis.eq(12)).to.contain("{{Table1.sortOrder}}"); - }); - }); - it("3. Toggle between widgets in different pages using search functionality", function () { - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - PageLeftPane.expandCollapseItem("Widgets"); - PageLeftPane.expandCollapseItem("Container4"); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Text1", - action: "Show bindings", + it("3. Toggle between widgets in different pages using search functionality", function () { + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + PageLeftPane.expandCollapseItem("Widgets"); + PageLeftPane.expandCollapseItem("Container4"); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Text1", + action: "Show bindings", + }); + cy.get(jsEditor._propertyList).then(function ($lis) { + expect($lis).to.have.length(2); + expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); + expect($lis.eq(1)).to.contain("{{Text1.text}}"); + }); }); - cy.get(jsEditor._propertyList).then(function ($lis) { - expect($lis).to.have.length(2); - expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); - expect($lis.eq(1)).to.contain("{{Text1.text}}"); - }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/CopyQuery_RenameDatasource_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/CopyQuery_RenameDatasource_spec.js index c55f84cbc7..d178e1386b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/CopyQuery_RenameDatasource_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/CopyQuery_RenameDatasource_spec.js @@ -13,46 +13,73 @@ const pageid = "MyPage"; let updatedName; let datasourceName; -describe("Entity explorer tests related to copy query", function () { - beforeEach(() => { - cy.startRoutesForDatasource(); - }); - - // afterEach(function() { - // if (this.currentTest.state === "failed") { - // Cypress.runner.stop(); - // } - // }); - - it("1. Create a query with dataSource in explorer, Create new Page", function () { - cy.Createpage(pageid); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - dataSources.CreateDataSource("Postgres"); - - cy.get("@saveDatasource").then((httpResponse) => { - datasourceName = httpResponse.response.body.data.name; - dataSources.CreateQueryAfterDSSaved(datasourceName); +describe( + "Entity explorer tests related to copy query", + { tags: ["@tag.IDE"] }, + function () { + beforeEach(() => { + cy.startRoutesForDatasource(); }); - cy.get("@getPluginForm").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); + // afterEach(function() { + // if (this.currentTest.state === "failed") { + // Cypress.runner.stop(); + // } + // }); - dataSources.EnterQuery("select * from users"); + it("1. Create a query with dataSource in explorer, Create new Page", function () { + cy.Createpage(pageid); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + dataSources.CreateDataSource("Postgres"); - cy.EvaluateCurrentValue("select * from users"); - cy.get(".t--action-name-edit-field").click({ force: true }); - cy.get("@saveDatasource").then((httpResponse) => { - datasourceName = httpResponse.response.body.data.name; - PageLeftPane.expandCollapseItem("Queries/JS"); + cy.get("@saveDatasource").then((httpResponse) => { + datasourceName = httpResponse.response.body.data.name; + dataSources.CreateQueryAfterDSSaved(datasourceName); + }); + + cy.get("@getPluginForm").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + + dataSources.EnterQuery("select * from users"); + + cy.EvaluateCurrentValue("select * from users"); + cy.get(".t--action-name-edit-field").click({ force: true }); + cy.get("@saveDatasource").then((httpResponse) => { + datasourceName = httpResponse.response.body.data.name; + PageLeftPane.expandCollapseItem("Queries/JS"); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Query1", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(5); + expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); + expect($lis.eq(1)).to.contain("{{Query1.data}}"); + expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}"); + expect($lis.eq(3)).to.contain("{{Query1.run()}}"); + expect($lis.eq(4)).to.contain("{{Query1.clear()}}"); + }); + }); + }); + + it("2. Copy query in explorer to new page & verify Bindings are copied too", function () { + EditorNavigation.SelectEntityByName("Query1", EntityType.Query); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Query1", + action: "Copy to page", + subAction: pageid, + toastToValidate: "copied to page", + }); + EditorNavigation.SelectEntityByName("Query1", EntityType.Query); + cy.runQuery(); entityExplorer.ActionContextMenuByEntityName({ entityNameinLeftSidebar: "Query1", action: "Show bindings", }); cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(5); expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(1)).to.contain("{{Query1.data}}"); expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}"); @@ -60,28 +87,5 @@ describe("Entity explorer tests related to copy query", function () { expect($lis.eq(4)).to.contain("{{Query1.clear()}}"); }); }); - }); - - it("2. Copy query in explorer to new page & verify Bindings are copied too", function () { - EditorNavigation.SelectEntityByName("Query1", EntityType.Query); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Query1", - action: "Copy to page", - subAction: pageid, - toastToValidate: "copied to page", - }); - EditorNavigation.SelectEntityByName("Query1", EntityType.Query); - cy.runQuery(); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Query1", - action: "Show bindings", - }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); - expect($lis.eq(1)).to.contain("{{Query1.data}}"); - expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}"); - expect($lis.eq(3)).to.contain("{{Query1.run()}}"); - expect($lis.eq(4)).to.contain("{{Query1.clear()}}"); - }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/DragAndDropWidget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/DragAndDropWidget_spec.js index 24bb24dd00..e68c77fea5 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/DragAndDropWidget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/DragAndDropWidget_spec.js @@ -10,51 +10,55 @@ const formWidgetsPage = require("../../../../locators/FormWidgets.json"); const widgetsPage = require("../../../../locators/Widgets.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Entity explorer Drag and Drop widgets testcases", function () { - it("1. Drag and drop form widget and validate", function () { - cy.get(explorer.addWidget).click({ force: true }); - cy.get(commonlocators.entityExplorersearch).should("be.visible"); - cy.get(commonlocators.entityExplorersearch).clear().type("form"); - cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 }); - cy.get(formWidgetsPage.formD).click(); - /** - * @param{Text} Random Text - * @param{FormWidget}Mouseover - * @param{FormPre Css} Assertion - */ - cy.widgetText( - "FormTest", - formWidgetsPage.formWidget, - widgetsPage.widgetNameSpan, - ); - /** - * @param{Text} Random Colour - */ - cy.moveToStyleTab(); - cy.selectColor("backgroundcolor"); - cy.get(formWidgetsPage.formD) - .should("have.css", "background-color") - .and("eq", "rgb(219, 234, 254)"); - /** - * @param{toggleButton Css} Assert to be checked - */ - cy.moveToContentTab(); - cy.get(formWidgetsPage.formD) - .scrollTo("bottom", { ensureScrollable: false }) - .should("be.visible"); - PageLeftPane.switchSegment(PagePaneSegment.Explorer); - _.deployMode.DeployApp(); - _.deployMode.NavigateBacktoEditor(); - cy.CheckAndUnfoldEntityItem("Widgets"); - _.entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "FormTest", - action: "Show bindings", +describe( + "Entity explorer Drag and Drop widgets testcases", + { tags: ["@tag.IDE"] }, + function () { + it("1. Drag and drop form widget and validate", function () { + cy.get(explorer.addWidget).click({ force: true }); + cy.get(commonlocators.entityExplorersearch).should("be.visible"); + cy.get(commonlocators.entityExplorersearch).clear().type("form"); + cy.dragAndDropToCanvas("formwidget", { x: 300, y: 80 }); + cy.get(formWidgetsPage.formD).click(); + /** + * @param{Text} Random Text + * @param{FormWidget}Mouseover + * @param{FormPre Css} Assertion + */ + cy.widgetText( + "FormTest", + formWidgetsPage.formWidget, + widgetsPage.widgetNameSpan, + ); + /** + * @param{Text} Random Colour + */ + cy.moveToStyleTab(); + cy.selectColor("backgroundcolor"); + cy.get(formWidgetsPage.formD) + .should("have.css", "background-color") + .and("eq", "rgb(219, 234, 254)"); + /** + * @param{toggleButton Css} Assert to be checked + */ + cy.moveToContentTab(); + cy.get(formWidgetsPage.formD) + .scrollTo("bottom", { ensureScrollable: false }) + .should("be.visible"); + PageLeftPane.switchSegment(PagePaneSegment.Explorer); + _.deployMode.DeployApp(); + _.deployMode.NavigateBacktoEditor(); + cy.CheckAndUnfoldEntityItem("Widgets"); + _.entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "FormTest", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(3); + expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); + expect($lis.eq(1)).to.contain("{{FormTest.data}}"); + expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}"); + }); }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(3); - expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); - expect($lis.eq(1)).to.contain("{{FormTest.data}}"); - expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}"); - }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Entity_Naming_conflict_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Entity_Naming_conflict_spec.js index 47130d76de..14a41d53e8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Entity_Naming_conflict_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Entity_Naming_conflict_spec.js @@ -4,7 +4,7 @@ const apiwidget = require("../../../../locators/apiWidgetslocator.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Tab widget test", function () { +describe("Tab widget test", { tags: ["@tag.IDE"] }, function () { const apiName = "Table1"; const tableName = "Table1"; before(() => { diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js index b6d8f405e9..68af153851 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Hide_Page_spec.js @@ -4,26 +4,30 @@ import EditorNavigation, { import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Hide / Show page test functionality", function () { - it("1. Hide/Show page test ", function () { - cy.CreatePage(); // Page2 - cy.CreatePage(); // Page3 - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - _.entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Page2", - action: "Hide", +describe( + "Hide / Show page test functionality", + { tags: ["@tag.IDE"] }, + function () { + it("1. Hide/Show page test ", function () { + cy.CreatePage(); // Page2 + cy.CreatePage(); // Page3 + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + _.entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Page2", + action: "Hide", + }); + cy.ClearSearch(); + _.deployMode.DeployApp(); + cy.get(".t--page-switch-tab").should("have.length", 2); + //Show page test + _.deployMode.NavigateBacktoEditor(); + _.entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Page2", + action: "Show", + }); + cy.ClearSearch(); + _.deployMode.DeployApp(); + cy.get(".t--page-switch-tab").should("have.length", 3); }); - cy.ClearSearch(); - _.deployMode.DeployApp(); - cy.get(".t--page-switch-tab").should("have.length", 2); - //Show page test - _.deployMode.NavigateBacktoEditor(); - _.entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Page2", - action: "Show", - }); - cy.ClearSearch(); - _.deployMode.DeployApp(); - cy.get(".t--page-switch-tab").should("have.length", 3); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/JSEditorContextMenu_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/JSEditorContextMenu_Spec.ts index a430c3f760..1f1a71a3d0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/JSEditorContextMenu_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/JSEditorContextMenu_Spec.ts @@ -9,65 +9,69 @@ import EditorNavigation, { } from "../../../../support/Pages/EditorNavigation"; import PageList from "../../../../support/Pages/PageList"; -describe("Validate basic operations on Entity explorer JSEditor structure", () => { - const pageId = "Page1"; +describe( + "Validate basic operations on Entity explorer JSEditor structure", + { tags: ["@tag.IDE"] }, + () => { + const pageId = "Page1"; - it("1. Validate JSObject creation & Run", () => { - jsEditor.CreateJSObject('return "Hello World";'); - PageLeftPane.expandCollapseItem("Queries/JS"); - PageLeftPane.assertPresence("JSObject1"); - jsEditor.ValidateDefaultJSObjProperties("JSObject1"); + it("1. Validate JSObject creation & Run", () => { + jsEditor.CreateJSObject('return "Hello World";'); + PageLeftPane.expandCollapseItem("Queries/JS"); + PageLeftPane.assertPresence("JSObject1"); + jsEditor.ValidateDefaultJSObjProperties("JSObject1"); - //Validate Rename JSObject from Form Header - jsEditor.RenameJSObjFromPane("RenamedJSObject"); - PageLeftPane.assertPresence("RenamedJSObject"); - jsEditor.ValidateDefaultJSObjProperties("RenamedJSObject"); + //Validate Rename JSObject from Form Header + jsEditor.RenameJSObjFromPane("RenamedJSObject"); + PageLeftPane.assertPresence("RenamedJSObject"); + jsEditor.ValidateDefaultJSObjProperties("RenamedJSObject"); - // Validate Copy JSObject - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "RenamedJSObject", - action: "Copy to page", - subAction: pageId, - toastToValidate: "copied to page", + // Validate Copy JSObject + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "RenamedJSObject", + action: "Copy to page", + subAction: pageId, + toastToValidate: "copied to page", + }); + cy.wait("@createNewJSCollection").should( + "have.nested.property", + "response.body.responseMeta.status", + 201, + ); + PageLeftPane.assertPresence("RenamedJSObjectCopy"); + jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); + + //Validate Rename JSObject from Entity Explorer + jsEditor.RenameJSObjFromExplorer("RenamedJSObject", "ExplorerRenamed"); + PageLeftPane.assertPresence("ExplorerRenamed"); + jsEditor.ValidateDefaultJSObjProperties("ExplorerRenamed"); }); - cy.wait("@createNewJSCollection").should( - "have.nested.property", - "response.body.responseMeta.status", - 201, - ); - PageLeftPane.assertPresence("RenamedJSObjectCopy"); - jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); - //Validate Rename JSObject from Entity Explorer - jsEditor.RenameJSObjFromExplorer("RenamedJSObject", "ExplorerRenamed"); - PageLeftPane.assertPresence("ExplorerRenamed"); - jsEditor.ValidateDefaultJSObjProperties("ExplorerRenamed"); - }); - - it("2. Validate Move JSObject", function () { - const newPageId = "Page2"; - PageList.AddNewPage(); - PageLeftPane.assertPresence(newPageId); - EditorNavigation.SelectEntityByName(pageId, EntityType.Page); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "RenamedJSObjectCopy", - action: "Move to page", - subAction: newPageId, - toastToValidate: "moved to page", + it("2. Validate Move JSObject", function () { + const newPageId = "Page2"; + PageList.AddNewPage(); + PageLeftPane.assertPresence(newPageId); + EditorNavigation.SelectEntityByName(pageId, EntityType.Page); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "RenamedJSObjectCopy", + action: "Move to page", + subAction: newPageId, + toastToValidate: "moved to page", + }); + EditorNavigation.SelectEntityByName(newPageId, EntityType.Page); + PageLeftPane.expandCollapseItem("Queries/JS"); + PageLeftPane.assertPresence("RenamedJSObjectCopy"); + jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); }); - EditorNavigation.SelectEntityByName(newPageId, EntityType.Page); - PageLeftPane.expandCollapseItem("Queries/JS"); - PageLeftPane.assertPresence("RenamedJSObjectCopy"); - jsEditor.ValidateDefaultJSObjProperties("RenamedJSObjectCopy"); - }); - it("3. Validate Deletion of JSObject", function () { - EditorNavigation.SelectEntityByName(pageId, EntityType.Page); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "ExplorerRenamed", - action: "Delete", - entityType: entityItems.JSObject, + it("3. Validate Deletion of JSObject", function () { + EditorNavigation.SelectEntityByName(pageId, EntityType.Page); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "ExplorerRenamed", + action: "Delete", + entityType: entityItems.JSObject, + }); + PageLeftPane.assertAbsence("ExplorerRenamed"); }); - PageLeftPane.assertAbsence("ExplorerRenamed"); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Long_Name_Tooltip_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Long_Name_Tooltip_spec.js index bec2a2878d..7543cf9cd8 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Long_Name_Tooltip_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Long_Name_Tooltip_spec.js @@ -7,31 +7,35 @@ const shortName = "shortName"; const longName = "AVeryLongNameThatOverflows"; const alternateName = "AlternateName"; const tooltTipQuery = `.rc-tooltip.ads-v2-tooltip:not(.rc-tooltip-hidden) > .rc-tooltip-content > .rc-tooltip-inner > .ads-v2-text`; -describe("Entity Explorer showing tooltips on long names", function () { - it("1. Expect tooltip on long names only", function () { - // create an API with a short name - cy.CreateAPI(shortName); - PageLeftPane.expandCollapseItem("Queries/JS", true); - // assert that a tooltip does not show up during hover - cy.get(`.t--entity-item:contains(${shortName})`).realHover(); - cy.get(tooltTipQuery).should("not.exist"); - // reset the hover - cy.get("body").realHover({ position: "topLeft" }); +describe( + "Entity Explorer showing tooltips on long names", + { tags: ["@tag.IDE"] }, + function () { + it("1. Expect tooltip on long names only", function () { + // create an API with a short name + cy.CreateAPI(shortName); + PageLeftPane.expandCollapseItem("Queries/JS", true); + // assert that a tooltip does not show up during hover + cy.get(`.t--entity-item:contains(${shortName})`).realHover(); + cy.get(tooltTipQuery).should("not.exist"); + // reset the hover + cy.get("body").realHover({ position: "topLeft" }); - // create another API with a long name - cy.CreateAPI(longName); + // create another API with a long name + cy.CreateAPI(longName); - // assert that a tooltip does show up during hover - cy.get(`.t--entity-item:contains(${longName})`).realHover(); - cy.get(tooltTipQuery).should("have.text", longName); - // reset the hover - cy.get("body").realHover({ position: "topLeft" }); + // assert that a tooltip does show up during hover + cy.get(`.t--entity-item:contains(${longName})`).realHover(); + cy.get(tooltTipQuery).should("have.text", longName); + // reset the hover + cy.get("body").realHover({ position: "topLeft" }); - // rename it and ensure the tooltip does not show again - ee.RenameEntityFromExplorer(longName, alternateName); - cy.wait("@saveAction"); + // rename it and ensure the tooltip does not show again + ee.RenameEntityFromExplorer(longName, alternateName); + cy.wait("@saveAction"); - cy.get(`.t--entity-item:contains(${alternateName})`).realHover(); - cy.get(tooltTipQuery).should("not.exist"); - }); -}); + cy.get(`.t--entity-item:contains(${alternateName})`).realHover(); + cy.get(tooltTipQuery).should("not.exist"); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js index a20f1cf6fc..99ee6fe669 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js @@ -9,7 +9,7 @@ import { entityExplorer, } from "../../../../support/Objects/ObjectsCore"; -describe("Page Load tests", () => { +describe("Page Load tests", { tags: ["@tag.IDE"] }, () => { afterEach(() => { agHelper.SaveLocalStorageCache(); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Pages_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Pages_spec.js index 9be17b3ab4..ed8b405620 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Pages_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Pages_spec.js @@ -7,7 +7,7 @@ const locators = { errorPageTitle: ".t--error-page-title", }; -describe("Pages", function () { +describe("Pages", { tags: ["@tag.IDE"] }, function () { let veryLongPageName = `abcdefghijklmnopqrstuvwxyz1234`; let apiName = "someApi"; diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Query_Datasource_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Query_Datasource_spec.js index 3692d6c79e..02f93dd9cf 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Query_Datasource_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Query_Datasource_spec.js @@ -15,98 +15,105 @@ import { const pageid = "MyPage"; let datasourceName; -describe("Entity explorer tests related to query and datasource", function () { - before(() => { - cy.generateUUID().then((uid) => { - datasourceName = uid; +describe( + "Entity explorer tests related to query and datasource", + { tags: ["@tag.IDE"] }, + function () { + before(() => { + cy.generateUUID().then((uid) => { + datasourceName = uid; + }); }); - }); - beforeEach(() => { - cy.startRoutesForDatasource(); - }); - - it("1. Create a page/moveQuery/rename/delete in explorer", function () { - cy.Createpage(pageid); - cy.wait(2000); - EditorNavigation.SelectEntityByName("Page1", EntityType.Page); - cy.wait(2000); - dataSources.NavigateToDSCreateNew(); - dataSources.CreatePlugIn("PostgreSQL"); - dataSources.FillPostgresDSForm(); - // checking that conflicting names are not allowed - cy.get(".t--edit-datasource-name").click(); - cy.get(".t--edit-datasource-name input") - .clear() - .type("download", { force: true }) - .blur(); - cy.get(".Toastify").should("contain", "Invalid name"); - - // checking a valid name - cy.get(".t--edit-datasource-name").click(); - cy.get(".t--edit-datasource-name input") - .clear() - .type(datasourceName, { force: true }) - .should("have.value", datasourceName) - .blur(); - - cy.testSaveDatasource(); - dataSources.CreateQueryAfterDSSaved(datasourceName); - - EditorNavigation.SelectEntityByName(datasourceName, EntityType.Datasource); - agHelper.RenameWithInPane(`${datasourceName}new`, false); - cy.contains(dataSources._datasourceCard, `${datasourceName}new`); - - // reverting the name - agHelper.RenameWithInPane(datasourceName, false); - - // going to the query create page - EditorNavigation.SelectEntityByName("Query1", EntityType.Query); - - cy.wait("@getPluginForm").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - - dataSources.EnterQuery("select * from users"); - - cy.EvaluateCurrentValue("select * from users"); - cy.get(".t--action-name-edit-field").click({ force: true }); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Query1", - action: "Show bindings", + beforeEach(() => { + cy.startRoutesForDatasource(); }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(5); - expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); - expect($lis.eq(1)).to.contain("{{Query1.data}}"); - expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}"); - expect($lis.eq(3)).to.contain("{{Query1.run()}}"); - expect($lis.eq(4)).to.contain("{{Query1.clear()}}"); - }); - cy.get(".t--entity-property-close").click(); //closing Bindings overlay - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Query1", - action: "Edit name", - }); - cy.EditApiNameFromExplorer("MyQuery"); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "MyQuery", - action: "Move to page", - subAction: pageid, - toastToValidate: "action moved to page", - }); - cy.wait(2000); - EditorNavigation.SelectEntityByName("MyQuery", EntityType.Query); - cy.wait(2000); - cy.runQuery(); - //deleteQuery & DS - agHelper.ActionContextMenuWithInPane({ - action: "Delete", - entityType: entityItems.Query, + it("1. Create a page/moveQuery/rename/delete in explorer", function () { + cy.Createpage(pageid); + cy.wait(2000); + EditorNavigation.SelectEntityByName("Page1", EntityType.Page); + cy.wait(2000); + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("PostgreSQL"); + dataSources.FillPostgresDSForm(); + // checking that conflicting names are not allowed + cy.get(".t--edit-datasource-name").click(); + cy.get(".t--edit-datasource-name input") + .clear() + .type("download", { force: true }) + .blur(); + cy.get(".Toastify").should("contain", "Invalid name"); + + // checking a valid name + cy.get(".t--edit-datasource-name").click(); + cy.get(".t--edit-datasource-name input") + .clear() + .type(datasourceName, { force: true }) + .should("have.value", datasourceName) + .blur(); + + cy.testSaveDatasource(); + dataSources.CreateQueryAfterDSSaved(datasourceName); + + EditorNavigation.SelectEntityByName( + datasourceName, + EntityType.Datasource, + ); + agHelper.RenameWithInPane(`${datasourceName}new`, false); + cy.contains(dataSources._datasourceCard, `${datasourceName}new`); + + // reverting the name + agHelper.RenameWithInPane(datasourceName, false); + + // going to the query create page + EditorNavigation.SelectEntityByName("Query1", EntityType.Query); + + cy.wait("@getPluginForm").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + + dataSources.EnterQuery("select * from users"); + + cy.EvaluateCurrentValue("select * from users"); + cy.get(".t--action-name-edit-field").click({ force: true }); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Query1", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(5); + expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); + expect($lis.eq(1)).to.contain("{{Query1.data}}"); + expect($lis.eq(2)).to.contain("{{Query1.responseMeta}}"); + expect($lis.eq(3)).to.contain("{{Query1.run()}}"); + expect($lis.eq(4)).to.contain("{{Query1.clear()}}"); + }); + cy.get(".t--entity-property-close").click(); //closing Bindings overlay + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Query1", + action: "Edit name", + }); + cy.EditApiNameFromExplorer("MyQuery"); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "MyQuery", + action: "Move to page", + subAction: pageid, + toastToValidate: "action moved to page", + }); + cy.wait(2000); + EditorNavigation.SelectEntityByName("MyQuery", EntityType.Query); + cy.wait(2000); + cy.runQuery(); + + //deleteQuery & DS + agHelper.ActionContextMenuWithInPane({ + action: "Delete", + entityType: entityItems.Query, + }); + dataSources.DeleteDatasourceFromWithinDS(datasourceName); }); - dataSources.DeleteDatasourceFromWithinDS(datasourceName); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Renaming_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Renaming_spec.js index dd09e6213a..10c06b7243 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Renaming_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Renaming_spec.js @@ -13,62 +13,70 @@ import { PageLeftPane } from "../../../../support/Pages/EditorNavigation"; const firstApiName = "First"; const secondApiName = "Second"; -describe("Api Naming conflict on a page test", function () { - it("1. Expects actions on the same page cannot have identical names", function () { - // create an API - apiPage.CreateApi(firstApiName); - // create another API - apiPage.CreateApi(secondApiName); - PageLeftPane.expandCollapseItem("Queries/JS"); - // try to rename one of the APIs with an existing API name - cy.get(`.t--entity-item:contains(${secondApiName})`).within(() => { - cy.get(".t--context-menu").click({ force: true }); +describe( + "Api Naming conflict on a page test", + { tags: ["@tag.IDE"] }, + function () { + it("1. Expects actions on the same page cannot have identical names", function () { + // create an API + apiPage.CreateApi(firstApiName); + // create another API + apiPage.CreateApi(secondApiName); + PageLeftPane.expandCollapseItem("Queries/JS"); + // try to rename one of the APIs with an existing API name + cy.get(`.t--entity-item:contains(${secondApiName})`).within(() => { + cy.get(".t--context-menu").click({ force: true }); + }); + cy.selectAction("Edit name"); + cy.get(explorer.editEntity).last().type(firstApiName, { force: true }); + cy.validateMessage(firstApiName); + agHelper.PressEnter(); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: secondApiName, + action: "Delete", + entityType: entityItems.Api, + }); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: firstApiName, + action: "Delete", + entityType: entityItems.Api, + }); }); - cy.selectAction("Edit name"); - cy.get(explorer.editEntity).last().type(firstApiName, { force: true }); - cy.validateMessage(firstApiName); - agHelper.PressEnter(); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: secondApiName, - action: "Delete", - entityType: entityItems.Api, - }); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: firstApiName, - action: "Delete", - entityType: entityItems.Api, - }); - }); -}); + }, +); -describe("Api Naming conflict on different pages test", function () { - it("2. It expects actions on different pages can have identical names", function () { - // create a new API - cy.CreateAPI(firstApiName); - PageLeftPane.expandCollapseItem("Queries/JS", true); +describe( + "Api Naming conflict on different pages test", + { tags: ["@tag.IDE"] }, + function () { + it("2. It expects actions on different pages can have identical names", function () { + // create a new API + cy.CreateAPI(firstApiName); + PageLeftPane.expandCollapseItem("Queries/JS", true); - // create a new page and an API on that page - PageList.AddNewPage(); - cy.CreateAPI(firstApiName); - PageLeftPane.expandCollapseItem("Queries/JS", true); - PageLeftPane.assertPresence(firstApiName); - cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => { - cy.get(".t--context-menu").click({ force: true }); + // create a new page and an API on that page + PageList.AddNewPage(); + cy.CreateAPI(firstApiName); + PageLeftPane.expandCollapseItem("Queries/JS", true); + PageLeftPane.assertPresence(firstApiName); + cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => { + cy.get(".t--context-menu").click({ force: true }); + }); + cy.deleteActionAndConfirm(); + cy.get(`.t--entity-item:contains(Page2)`).within(() => { + cy.get(".t--context-menu").click({ force: true }); + }); + cy.deleteActionAndConfirm(); + cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => { + cy.get(".t--context-menu").click({ force: true }); + }); + cy.deleteActionAndConfirm(); + cy.wait(1000); }); - cy.deleteActionAndConfirm(); - cy.get(`.t--entity-item:contains(Page2)`).within(() => { - cy.get(".t--context-menu").click({ force: true }); - }); - cy.deleteActionAndConfirm(); - cy.get(`.t--entity-item:contains(${firstApiName})`).within(() => { - cy.get(".t--context-menu").click({ force: true }); - }); - cy.deleteActionAndConfirm(); - cy.wait(1000); - }); -}); + }, +); -describe("Entity Naming conflict test", function () { +describe("Entity Naming conflict test", { tags: ["@tag.IDE"] }, function () { it("3. Expects JS objects and actions to not have identical names on the same page.", function () { PageLeftPane.expandCollapseItem("Queries/JS", true); // create JS object and name it diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Scrolling_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Scrolling_Spec.ts index 58845a208a..89b57ae30e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Scrolling_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Scrolling_Spec.ts @@ -11,104 +11,108 @@ import { } from "../../../../support/Pages/EditorNavigation"; let mockDBNameUsers: string, mockDBNameMovies: string; -describe("Entity explorer context menu should hide on scrolling", function () { - it( - "excludeForAirgap", - "1. Bug #15474 - Entity explorer menu must close on scroll", - function () { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - PageLeftPane.switchSegment(PagePaneSegment.Explorer); - PageLeftPane.expandCollapseItem("Modal1"); - PageLeftPane.expandCollapseItem("Modal2"); - PageLeftPane.expandCollapseItem("Modal3"); - PageLeftPane.expandCollapseItem("Modal4"); - PageLeftPane.expandCollapseItem("Modal5"); - PageLeftPane.expandCollapseItem("Modal6"); +describe( + "Entity explorer context menu should hide on scrolling", + { tags: ["@tag.IDE"] }, + function () { + it( + "excludeForAirgap", + "1. Bug #15474 - Entity explorer menu must close on scroll", + function () { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + PageLeftPane.switchSegment(PagePaneSegment.Explorer); + PageLeftPane.expandCollapseItem("Modal1"); + PageLeftPane.expandCollapseItem("Modal2"); + PageLeftPane.expandCollapseItem("Modal3"); + PageLeftPane.expandCollapseItem("Modal4"); + PageLeftPane.expandCollapseItem("Modal5"); + PageLeftPane.expandCollapseItem("Modal6"); - // Setup to make the explorer scrollable - PageLeftPane.expandCollapseItem("Queries/JS"); - dataSources.CreateMockDB("Users").then(($createdMockUsers) => { - cy.log("Users DB created is " + $createdMockUsers); - mockDBNameUsers = $createdMockUsers; - dataSources.CreateQueryAfterDSSaved(); - entityExplorer.CreateNewDsQuery(mockDBNameUsers); - entityExplorer.CreateNewDsQuery(mockDBNameUsers); - entityExplorer.CreateNewDsQuery(mockDBNameUsers); - - dataSources.CreateMockDB("Movies").then(($createdMockMovies) => { - cy.log("Movies DB created is " + $createdMockMovies); - mockDBNameMovies = $createdMockMovies; + // Setup to make the explorer scrollable + PageLeftPane.expandCollapseItem("Queries/JS"); + dataSources.CreateMockDB("Users").then(($createdMockUsers) => { + cy.log("Users DB created is " + $createdMockUsers); + mockDBNameUsers = $createdMockUsers; dataSources.CreateQueryAfterDSSaved(); - entityExplorer.CreateNewDsQuery(mockDBNameMovies); - entityExplorer.CreateNewDsQuery(mockDBNameMovies); - entityExplorer.CreateNewDsQuery(mockDBNameMovies); + entityExplorer.CreateNewDsQuery(mockDBNameUsers); + entityExplorer.CreateNewDsQuery(mockDBNameUsers); + entityExplorer.CreateNewDsQuery(mockDBNameUsers); - agHelper.GetNClick(locators._createNew); - agHelper.AssertElementVisibility(entityExplorer._adsPopup); - agHelper.ScrollTo(entityExplorer._entityExplorerWrapper, "top"); - agHelper.AssertElementAbsence(entityExplorer._adsPopup); + dataSources.CreateMockDB("Movies").then(($createdMockMovies) => { + cy.log("Movies DB created is " + $createdMockMovies); + mockDBNameMovies = $createdMockMovies; + dataSources.CreateQueryAfterDSSaved(); + entityExplorer.CreateNewDsQuery(mockDBNameMovies); + entityExplorer.CreateNewDsQuery(mockDBNameMovies); + entityExplorer.CreateNewDsQuery(mockDBNameMovies); + + agHelper.GetNClick(locators._createNew); + agHelper.AssertElementVisibility(entityExplorer._adsPopup); + agHelper.ScrollTo(entityExplorer._entityExplorerWrapper, "top"); + agHelper.AssertElementAbsence(entityExplorer._adsPopup); + }); }); - }); - }, - ); + }, + ); - it( - "airgap", - "1. Bug #15474 - Entity explorer menu must close on scroll - airgap", - function () { - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - agHelper.GetNClick(locators._closeModal, 0, true, 0); - entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); - PageLeftPane.switchSegment(PagePaneSegment.Explorer); - PageLeftPane.expandCollapseItem("Modal1"); - PageLeftPane.expandCollapseItem("Modal2"); - PageLeftPane.expandCollapseItem("Modal3"); - PageLeftPane.expandCollapseItem("Modal4"); - PageLeftPane.expandCollapseItem("Modal5"); - PageLeftPane.expandCollapseItem("Modal6"); + it( + "airgap", + "1. Bug #15474 - Entity explorer menu must close on scroll - airgap", + function () { + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + agHelper.GetNClick(locators._closeModal, 0, true, 0); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.MODAL); + PageLeftPane.switchSegment(PagePaneSegment.Explorer); + PageLeftPane.expandCollapseItem("Modal1"); + PageLeftPane.expandCollapseItem("Modal2"); + PageLeftPane.expandCollapseItem("Modal3"); + PageLeftPane.expandCollapseItem("Modal4"); + PageLeftPane.expandCollapseItem("Modal5"); + PageLeftPane.expandCollapseItem("Modal6"); - // Setup to make the explorer scrollable - PageLeftPane.expandCollapseItem("Queries/JS"); - dataSources.CreateDataSource("Postgres"); - cy.get("@dsName").then(($createdMockUsers: any) => { - mockDBNameUsers = $createdMockUsers; - dataSources.CreateQueryAfterDSSaved(); - entityExplorer.CreateNewDsQuery(mockDBNameUsers); - entityExplorer.CreateNewDsQuery(mockDBNameUsers); - entityExplorer.CreateNewDsQuery(mockDBNameUsers); - - dataSources.CreateDataSource("Mongo"); - cy.get("@dsName").then(($createdMockMovies: any) => { - mockDBNameMovies = $createdMockMovies; + // Setup to make the explorer scrollable + PageLeftPane.expandCollapseItem("Queries/JS"); + dataSources.CreateDataSource("Postgres"); + cy.get("@dsName").then(($createdMockUsers: any) => { + mockDBNameUsers = $createdMockUsers; dataSources.CreateQueryAfterDSSaved(); - entityExplorer.CreateNewDsQuery(mockDBNameMovies); - entityExplorer.CreateNewDsQuery(mockDBNameMovies); - entityExplorer.CreateNewDsQuery(mockDBNameMovies); + entityExplorer.CreateNewDsQuery(mockDBNameUsers); + entityExplorer.CreateNewDsQuery(mockDBNameUsers); + entityExplorer.CreateNewDsQuery(mockDBNameUsers); - agHelper.GetNClick(locators._createNew); - agHelper.AssertElementVisibility(entityExplorer._adsPopup); - agHelper.ScrollTo(entityExplorer._entityExplorerWrapper, "top"); - agHelper.AssertElementAbsence(entityExplorer._adsPopup); + dataSources.CreateDataSource("Mongo"); + cy.get("@dsName").then(($createdMockMovies: any) => { + mockDBNameMovies = $createdMockMovies; + dataSources.CreateQueryAfterDSSaved(); + entityExplorer.CreateNewDsQuery(mockDBNameMovies); + entityExplorer.CreateNewDsQuery(mockDBNameMovies); + entityExplorer.CreateNewDsQuery(mockDBNameMovies); + + agHelper.GetNClick(locators._createNew); + agHelper.AssertElementVisibility(entityExplorer._adsPopup); + agHelper.ScrollTo(entityExplorer._entityExplorerWrapper, "top"); + agHelper.AssertElementAbsence(entityExplorer._adsPopup); + }); }); - }); - }, - ); -}); + }, + ); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Select_Widget_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Select_Widget_spec.js index f0ccb55dd9..193f72ce28 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Select_Widget_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Select_Widget_spec.js @@ -6,7 +6,7 @@ import EditorNavigation, { EntityType, } from "../../../../support/Pages/EditorNavigation"; -describe("Explorer hidden widget Selection", () => { +describe("Explorer hidden widget Selection", { tags: ["@tag.IDE"] }, () => { before(() => { _.agHelper.AddDsl("explorerHiddenWidgets"); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Tab_rename_Delete_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Tab_rename_Delete_spec.ts index 45dfa2e0de..7e9ea1a7ad 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Tab_rename_Delete_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Tab_rename_Delete_spec.ts @@ -6,7 +6,7 @@ import { } from "../../../../support/Objects/ObjectsCore"; import { PageLeftPane } from "../../../../support/Pages/EditorNavigation"; -describe("Tab widget test", function () { +describe("Tab widget test", { tags: ["@tag.IDE"] }, function () { const tabname = "UpdatedTab"; before(() => { agHelper.AddDsl("tabdsl"); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Delete_Undo_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Delete_Undo_spec.js index b439b28f31..38e1ebd5ee 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Delete_Undo_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Delete_Undo_spec.js @@ -15,52 +15,56 @@ before(() => { agHelper.AddDsl("formWidgetdsl"); }); -describe("Test Suite to validate copy/delete/undo functionalites", function () { - const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; +describe( + "Test Suite to validate copy/delete/undo functionalites", + { tags: ["@tag.IDE"] }, + function () { + const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - it("1. Drag and drop form widget and validate copy widget via toast message", function () { - EditorNavigation.SelectEntityByName("Form1", EntityType.Widget); - propPane.RenameWidget("Form1", "FormTest"); - cy.get(commonlocators.copyWidget).click(); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); - cy.get(commonlocators.toastBody).first().contains("Copied"); - }); - - it("2. Delete Widget from sidebar and Undo action validation", function () { - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "FormTest", - action: "Show bindings", - }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(3); - expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); - expect($lis.eq(1)).to.contain("{{FormTest.data}}"); - expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}"); - }); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "FormTest", - action: "Delete", - entityType: EntityItems.Widget, + it("1. Drag and drop form widget and validate copy widget via toast message", function () { + EditorNavigation.SelectEntityByName("Form1", EntityType.Widget); + propPane.RenameWidget("Form1", "FormTest"); + cy.get(commonlocators.copyWidget).click(); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(500); + cy.get(commonlocators.toastBody).first().contains("Copied"); }); - cy.get("body").type(`{${modifierKey}}z`, { force: true }); - cy.wait("@updateLayout").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "FormTest", - action: "Show bindings", + it("2. Delete Widget from sidebar and Undo action validation", function () { + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "FormTest", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(3); + expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); + expect($lis.eq(1)).to.contain("{{FormTest.data}}"); + expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}"); + }); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "FormTest", + action: "Delete", + entityType: EntityItems.Widget, + }); + + cy.get("body").type(`{${modifierKey}}z`, { force: true }); + cy.wait("@updateLayout").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(500); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "FormTest", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(3); + expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); + expect($lis.eq(1)).to.contain("{{FormTest.data}}"); + expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}"); + }); }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(3); - expect($lis.eq(0)).to.contain("{{FormTest.isVisible}}"); - expect($lis.eq(1)).to.contain("{{FormTest.data}}"); - expect($lis.eq(2)).to.contain("{{FormTest.hasChanges}}"); - }); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js index 656d4b40e4..dab2b9f5b0 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js @@ -14,56 +14,66 @@ before(() => { agHelper.AddDsl("formWithInputdsl"); }); -describe("Test Suite to validate copy/delete/undo functionalites", function () { - it("1. Drag and drop form widget and validate copy widget via toast message", function () { - const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; - EditorNavigation.SelectEntityByName("Form1", EntityType.Widget); - propPane.RenameWidget("Form1", "FormTest"); - EditorNavigation.SelectEntityByName("FormTest", EntityType.Widget); - cy.get("body").type(`{${modifierKey}}c`); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(500); - cy.get(commonlocators.toastBody) - .first() - .contains("Copied FormTest") - .click(); - cy.get("body").type(`{${modifierKey}}v`, { force: true }); - cy.wait("@updateLayout").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - cy.wait(1000); - EditorNavigation.SelectEntityByName("FormTestCopy", EntityType.Widget, {}, [ - "FormTest", - ]); - cy.get("body").type("{del}", { force: true }); - cy.wait("@updateLayout").should( - "have.nested.property", - "response.body.responseMeta.status", - 200, - ); - agHelper.Sleep(); - cy.get("body").type(`{${modifierKey}}z`, { force: true }); - EditorNavigation.SelectEntityByName("FormTestCopy", EntityType.Widget, {}, [ - "FormTest", - ]); - entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "FormTestCopy", - action: "Show bindings", +describe( + "Test Suite to validate copy/delete/undo functionalites", + { tags: ["@tag.IDE"] }, + function () { + it("1. Drag and drop form widget and validate copy widget via toast message", function () { + const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl"; + EditorNavigation.SelectEntityByName("Form1", EntityType.Widget); + propPane.RenameWidget("Form1", "FormTest"); + EditorNavigation.SelectEntityByName("FormTest", EntityType.Widget); + cy.get("body").type(`{${modifierKey}}c`); + // eslint-disable-next-line cypress/no-unnecessary-waiting + cy.wait(500); + cy.get(commonlocators.toastBody) + .first() + .contains("Copied FormTest") + .click(); + cy.get("body").type(`{${modifierKey}}v`, { force: true }); + cy.wait("@updateLayout").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + cy.wait(1000); + EditorNavigation.SelectEntityByName( + "FormTestCopy", + EntityType.Widget, + {}, + ["FormTest"], + ); + cy.get("body").type("{del}", { force: true }); + cy.wait("@updateLayout").should( + "have.nested.property", + "response.body.responseMeta.status", + 200, + ); + agHelper.Sleep(); + cy.get("body").type(`{${modifierKey}}z`, { force: true }); + EditorNavigation.SelectEntityByName( + "FormTestCopy", + EntityType.Widget, + {}, + ["FormTest"], + ); + entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "FormTestCopy", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(3); + expect($lis.eq(0)).to.contain("{{FormTestCopy.isVisible}}"); + expect($lis.eq(1)).to.contain("{{FormTestCopy.data}}"); + expect($lis.eq(2)).to.contain("{{FormTestCopy.hasChanges}}"); + cy.contains("FormTestCopy"); + cy.get($lis.eq(1)) + .contains("{{FormTestCopy.data}}") + .click({ force: true }); + cy.get(".bp3-input").first().click({ force: true }); + cy.get(".bp3-input").first().type(`{${modifierKey}}v`, { force: true }); + }); + agHelper.RemoveUIElement("Toast", "7 widgets are added back."); }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(3); - expect($lis.eq(0)).to.contain("{{FormTestCopy.isVisible}}"); - expect($lis.eq(1)).to.contain("{{FormTestCopy.data}}"); - expect($lis.eq(2)).to.contain("{{FormTestCopy.hasChanges}}"); - cy.contains("FormTestCopy"); - cy.get($lis.eq(1)) - .contains("{{FormTestCopy.data}}") - .click({ force: true }); - cy.get(".bp3-input").first().click({ force: true }); - cy.get(".bp3-input").first().type(`{${modifierKey}}v`, { force: true }); - }); - agHelper.RemoveUIElement("Toast", "7 widgets are added back."); - }); -}); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts index f9b9324ac3..243b8c638a 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts @@ -8,132 +8,104 @@ import { PagePaneSegment, } from "../../../../support/Pages/EditorNavigation"; -describe("Entity explorer tests related to widgets and validation", function () { - // Taken from here appsmith/app/client/src/constants/WidgetConstants.tsx - const WIDGET_TAGS: Record = { - SUGGESTED_WIDGETS: "Suggested", - INPUTS: "Inputs", - BUTTONS: "Buttons", - SELECT: "Select", - DISPLAY: "Display", - LAYOUT: "Layout", - MEDIA: "Media", - TOGGLES: "Toggles", - SLIDERS: "Sliders", - CONTENT: "Content", - EXTERNAL: "External", - }; +describe( + "Entity explorer tests related to widgets and validation", + { tags: ["@tag.IDE"] }, + function () { + // Taken from here appsmith/app/client/src/constants/WidgetConstants.tsx + const WIDGET_TAGS: Record = { + SUGGESTED_WIDGETS: "Suggested", + INPUTS: "Inputs", + BUTTONS: "Buttons", + SELECT: "Select", + DISPLAY: "Display", + LAYOUT: "Layout", + MEDIA: "Media", + TOGGLES: "Toggles", + SLIDERS: "Sliders", + CONTENT: "Content", + EXTERNAL: "External", + }; - // Taken from here appsmith/app/client/src/constants/WidgetConstants.tsx - const SUGGESTED_WIDGETS_ORDER: Record = { - TABLE_WIDGET_V2: 1, - JSON_FORM_WIDGET: 2, - INPUT_WIDGET_V2: 3, - TEXT_WIDGET: 4, - SELECT_WIDGET: 5, - LIST_WIDGET_V2: 6, - }; + // Taken from here appsmith/app/client/src/constants/WidgetConstants.tsx + const SUGGESTED_WIDGETS_ORDER: Record = { + TABLE_WIDGET_V2: 1, + JSON_FORM_WIDGET: 2, + INPUT_WIDGET_V2: 3, + TEXT_WIDGET: 4, + SELECT_WIDGET: 5, + LIST_WIDGET_V2: 6, + }; - // When adding a new widget or tag, we need to manually add it to this list. - const WIDGETS_CATALOG: Record = { - Suggested: ["Input", "JSON Form", "List", "Select", "Table", "Text"], - Inputs: [ - "Currency Input", - "DatePicker", - "FilePicker", - "Input", - "Phone Input", - "Rich Text Editor", - ], - Buttons: ["Button", "Button Group", "Icon button", "Menu button"], - Select: ["Multi TreeSelect", "MultiSelect", "Select", "TreeSelect"], - Display: ["Chart", "Iframe", "List", "Map Chart", "Stats Box", "Table"], - Layout: ["Container", "Divider", "Form", "JSON Form", "Modal", "Tabs"], - Media: ["Audio", "Document Viewer", "Image", "Video"], - Toggles: [ - "Checkbox", - "Checkbox Group", - "Radio Group", - "Switch", - "Switch Group", - ], - Sliders: ["Category Slider", "Number Slider", "Range Slider"], - Content: ["Map", "Progress", "Rating", "Text"], - External: ["Audio Recorder", "Camera", "Code Scanner"], - }; + // When adding a new widget or tag, we need to manually add it to this list. + const WIDGETS_CATALOG: Record = { + Suggested: ["Input", "JSON Form", "List", "Select", "Table", "Text"], + Inputs: [ + "Currency Input", + "DatePicker", + "FilePicker", + "Input", + "Phone Input", + "Rich Text Editor", + ], + Buttons: ["Button", "Button Group", "Icon button", "Menu button"], + Select: ["Multi TreeSelect", "MultiSelect", "Select", "TreeSelect"], + Display: ["Chart", "Iframe", "List", "Map Chart", "Stats Box", "Table"], + Layout: ["Container", "Divider", "Form", "JSON Form", "Modal", "Tabs"], + Media: ["Audio", "Document Viewer", "Image", "Video"], + Toggles: [ + "Checkbox", + "Checkbox Group", + "Radio Group", + "Switch", + "Switch Group", + ], + Sliders: ["Category Slider", "Number Slider", "Range Slider"], + Content: ["Map", "Progress", "Rating", "Text"], + External: ["Audio Recorder", "Camera", "Code Scanner"], + }; - if (Cypress.env("AIRGAPPED")) { - // Remove map widget in case of airgap - WIDGETS_CATALOG.Content = ["Progress", "Rating", "Text"]; - } + if (Cypress.env("AIRGAPPED")) { + // Remove map widget in case of airgap + WIDGETS_CATALOG.Content = ["Progress", "Rating", "Text"]; + } - const getTotalNumberOfWidgets = () => { - return Object.values(WIDGETS_CATALOG).reduce( - (totalLength, widgets) => totalLength + widgets.length, - 0, - ); - }; + const getTotalNumberOfWidgets = () => { + return Object.values(WIDGETS_CATALOG).reduce( + (totalLength, widgets) => totalLength + widgets.length, + 0, + ); + }; - it("1. All widget tags should be visible and open by default.", () => { - PageLeftPane.switchSegment(PagePaneSegment.Widgets); + it("1. All widget tags should be visible and open by default.", () => { + PageLeftPane.switchSegment(PagePaneSegment.Widgets); - agHelper.AssertElementLength( - entityExplorer._widgetTagsList, - Object.keys(WIDGET_TAGS).length, - ); + agHelper.AssertElementLength( + entityExplorer._widgetTagsList, + Object.keys(WIDGET_TAGS).length, + ); - agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => { - cy.wrap($widgetTag) - .find(locators._adsV2Content) - .should("have.css", "display", "flex"); + agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => { + cy.wrap($widgetTag) + .find(locators._adsV2Content) + .should("have.css", "display", "flex"); + }); }); - }); - it("2. All widgets should be present within their tags and these tags should be collapsible", () => { - agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => { - // check that tags are collapsible - cy.wrap($widgetTag).find(locators._adsV2CollapsibleHeader).click({ - force: true, - }); - cy.wrap($widgetTag) - .find(locators._adsV2Content) - .should("have.css", "display", "none"); - cy.wrap($widgetTag).find(locators._adsV2CollapsibleHeader).click({ - force: true, - }); - - // check that all widgets are present within their tags - const widgetsInThisTag: string[] = []; - - cy.wrap($widgetTag) - .find(entityExplorer._widgetCardTitle) - .each(($widgetName) => { - const value = $widgetName.text(); - - widgetsInThisTag.push(value); - }) - .then(() => { - cy.wrap($widgetTag) - .find( - `${locators._adsV2CollapsibleHeader} span${locators._adsV2Text}`, - ) - .then(($widgetTagTitle) => { - const expectedWidgetsInThisTag = - WIDGETS_CATALOG[$widgetTagTitle.text()].sort(); - widgetsInThisTag.sort(); - - expect(widgetsInThisTag).to.deep.eq(expectedWidgetsInThisTag); - }); + it("2. All widgets should be present within their tags and these tags should be collapsible", () => { + agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => { + // check that tags are collapsible + cy.wrap($widgetTag).find(locators._adsV2CollapsibleHeader).click({ + force: true, + }); + cy.wrap($widgetTag) + .find(locators._adsV2Content) + .should("have.css", "display", "none"); + cy.wrap($widgetTag).find(locators._adsV2CollapsibleHeader).click({ + force: true, }); - }); - }); - it("3. All widgets should be ordered alphabetically within their tags, except Essential widgets, which should be sorted by their static rank.", () => { - agHelper - .GetElement( - `${entityExplorer._widgetTagsList}:not(${entityExplorer._widgetTagSuggestedWidgets})`, - ) - .each(($widgetTag) => { + // check that all widgets are present within their tags const widgetsInThisTag: string[] = []; cy.wrap($widgetTag) @@ -144,51 +116,83 @@ describe("Entity explorer tests related to widgets and validation", function () widgetsInThisTag.push(value); }) .then(() => { - const sortedWidgetsInThisTag = [...widgetsInThisTag].sort(); + cy.wrap($widgetTag) + .find( + `${locators._adsV2CollapsibleHeader} span${locators._adsV2Text}`, + ) + .then(($widgetTagTitle) => { + const expectedWidgetsInThisTag = + WIDGETS_CATALOG[$widgetTagTitle.text()].sort(); + widgetsInThisTag.sort(); - expect(widgetsInThisTag).to.deep.eq(sortedWidgetsInThisTag); + expect(widgetsInThisTag).to.deep.eq(expectedWidgetsInThisTag); + }); }); }); + }); - const widgetsInEssentialWidgetsTag: string[] = []; - agHelper - .GetElement( - `${entityExplorer._widgetTagsList}${entityExplorer._widgetTagSuggestedWidgets}`, - ) - .find(entityExplorer._widgetCardTitle) - .each(($widgetName) => { - const value = $widgetName.text(); + it("3. All widgets should be ordered alphabetically within their tags, except Essential widgets, which should be sorted by their static rank.", () => { + agHelper + .GetElement( + `${entityExplorer._widgetTagsList}:not(${entityExplorer._widgetTagSuggestedWidgets})`, + ) + .each(($widgetTag) => { + const widgetsInThisTag: string[] = []; - widgetsInEssentialWidgetsTag.push(value); - }) - .then(() => { - const sortedWidgetsInEssentialWidgetsTag = [ - ...widgetsInEssentialWidgetsTag, - ].sort( - (a, b) => SUGGESTED_WIDGETS_ORDER[a] - SUGGESTED_WIDGETS_ORDER[b], - ); + cy.wrap($widgetTag) + .find(entityExplorer._widgetCardTitle) + .each(($widgetName) => { + const value = $widgetName.text(); - expect(widgetsInEssentialWidgetsTag).to.deep.eq( - sortedWidgetsInEssentialWidgetsTag, - ); - }); - }); + widgetsInThisTag.push(value); + }) + .then(() => { + const sortedWidgetsInThisTag = [...widgetsInThisTag].sort(); - it("4. Widget search should work", () => { - agHelper.TypeText(entityExplorer._widgetSearchInput, "text"); - agHelper.AssertElementLength(entityExplorer._widgetCards, 3); + expect(widgetsInThisTag).to.deep.eq(sortedWidgetsInThisTag); + }); + }); - agHelper.TypeText(entityExplorer._widgetSearchInput, "p"); - agHelper.AssertElementLength(entityExplorer._widgetCards, 2); + const widgetsInEssentialWidgetsTag: string[] = []; + agHelper + .GetElement( + `${entityExplorer._widgetTagsList}${entityExplorer._widgetTagSuggestedWidgets}`, + ) + .find(entityExplorer._widgetCardTitle) + .each(($widgetName) => { + const value = $widgetName.text(); - agHelper.ClearNType(entityExplorer._widgetSearchInput, "cypress"); - agHelper.AssertElementLength(entityExplorer._widgetCards, 0); + widgetsInEssentialWidgetsTag.push(value); + }) + .then(() => { + const sortedWidgetsInEssentialWidgetsTag = [ + ...widgetsInEssentialWidgetsTag, + ].sort( + (a, b) => SUGGESTED_WIDGETS_ORDER[a] - SUGGESTED_WIDGETS_ORDER[b], + ); - agHelper.ClearTextField(entityExplorer._widgetSearchInput); + expect(widgetsInEssentialWidgetsTag).to.deep.eq( + sortedWidgetsInEssentialWidgetsTag, + ); + }); + }); - agHelper.AssertElementLength( - entityExplorer._widgetCards, - getTotalNumberOfWidgets(), - ); - }); -}); + it("4. Widget search should work", () => { + agHelper.TypeText(entityExplorer._widgetSearchInput, "text"); + agHelper.AssertElementLength(entityExplorer._widgetCards, 3); + + agHelper.TypeText(entityExplorer._widgetSearchInput, "p"); + agHelper.AssertElementLength(entityExplorer._widgetCards, 2); + + agHelper.ClearNType(entityExplorer._widgetSearchInput, "cypress"); + agHelper.AssertElementLength(entityExplorer._widgetCards, 0); + + agHelper.ClearTextField(entityExplorer._widgetSearchInput); + + agHelper.AssertElementLength( + entityExplorer._widgetCards, + getTotalNumberOfWidgets(), + ); + }); + }, +); diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_spec.js b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_spec.js index d7901d9f0f..3de48fa014 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_spec.js @@ -5,38 +5,42 @@ import EditorNavigation, { const apiwidget = require("../../../../locators/apiWidgetslocator.json"); import * as _ from "../../../../support/Objects/ObjectsCore"; -describe("Entity explorer tests related to widgets and validation", function () { - before(() => { - _.agHelper.AddDsl("displayWidgetDsl"); - }); +describe( + "Entity explorer tests related to widgets and validation", + { tags: ["@tag.IDE"] }, + function () { + before(() => { + _.agHelper.AddDsl("displayWidgetDsl"); + }); - it("1. Widget edit/delete/copy to clipboard validation", function () { - EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ - "Container4", - ]); - _.entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Text1", - action: "Show bindings", + it("1. Widget edit/delete/copy to clipboard validation", function () { + EditorNavigation.SelectEntityByName("Text1", EntityType.Widget, {}, [ + "Container4", + ]); + _.entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Text1", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(2); + expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); + expect($lis.eq(1)).to.contain("{{Text1.text}}"); + }); + _.entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "Text1", + action: "Edit name", + }); + cy.EditApiNameFromExplorer("TextUpdated"); + _.entityExplorer.ActionContextMenuByEntityName({ + entityNameinLeftSidebar: "TextUpdated", + action: "Show bindings", + }); + cy.get(apiwidget.propertyList).then(function ($lis) { + expect($lis).to.have.length(2); + expect($lis.eq(0)).to.contain("{{TextUpdated.isVisible}}"); + expect($lis.eq(1)).to.contain("{{TextUpdated.text}}"); + }); + cy.DeleteWidgetFromSideBar(); }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(2); - expect($lis.eq(0)).to.contain("{{Text1.isVisible}}"); - expect($lis.eq(1)).to.contain("{{Text1.text}}"); - }); - _.entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "Text1", - action: "Edit name", - }); - cy.EditApiNameFromExplorer("TextUpdated"); - _.entityExplorer.ActionContextMenuByEntityName({ - entityNameinLeftSidebar: "TextUpdated", - action: "Show bindings", - }); - cy.get(apiwidget.propertyList).then(function ($lis) { - expect($lis).to.have.length(2); - expect($lis.eq(0)).to.contain("{{TextUpdated.isVisible}}"); - expect($lis.eq(1)).to.contain("{{TextUpdated.text}}"); - }); - cy.DeleteWidgetFromSideBar(); - }); -}); + }, +);