diff --git a/app/client/cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Corner_Cases_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Corner_Cases_spec.ts index 3bcf39160b..f5b18c457e 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Corner_Cases_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Corner_Cases_spec.ts @@ -1,79 +1,85 @@ -import * as _ from "../../../../support/Objects/ObjectsCore"; +import { + entityExplorer, + draggableWidgets, + autoLayout, + homePage, + agHelper, +} from "../../../../support/Objects/ObjectsCore"; import template from "../../../../locators/TemplatesLocators.json"; import widgetLocators from "../../../../locators/Widgets.json"; describe("Handle Cases while conversion", () => { it("1. when snapshot is restored from a page created before Conversion, it should refresh in the same page", () => { - _.entityExplorer.DragDropWidgetNVerify( - _.draggableWidgets.CONTAINER, - 100, - 200, - ); + entityExplorer.DragDropWidgetNVerify(draggableWidgets.CONTAINER, 100, 200); - _.entityExplorer.AddNewPage("New blank page"); + entityExplorer.AddNewPage("New blank page"); - _.autoLayout.ConvertToAutoLayoutAndVerify(); + autoLayout.ConvertToAutoLayoutAndVerify(); - _.autoLayout.UseSnapshotFromBanner(); + autoLayout.UseSnapshotFromBanner(); - _.entityExplorer.VerifyIsCurrentPage("Page2"); + entityExplorer.VerifyIsCurrentPage("Page2"); - _.entityExplorer.SelectEntityByName("Page1", "Pages"); + entityExplorer.SelectEntityByName("Page1", "Pages"); cy.wait(1000); - _.entityExplorer.ActionContextMenuByEntityName("Page2"); + entityExplorer.ActionContextMenuByEntityName("Page2"); }); it("2. when snapshot is restored from a page created after Conversion, it should redirected to home page", () => { - _.autoLayout.ConvertToAutoLayoutAndVerify(); + autoLayout.ConvertToAutoLayoutAndVerify(); - _.entityExplorer.AddNewPage("New blank page"); + entityExplorer.AddNewPage("New blank page"); - _.autoLayout.UseSnapshotFromBanner(); + autoLayout.UseSnapshotFromBanner(); - _.entityExplorer.VerifyIsCurrentPage("Page1"); + entityExplorer.VerifyIsCurrentPage("Page1"); }); it("3. #21969 - when app has null values in some widget's property actions or bindings, it should still convert without errors", () => { - _.homePage.NavigateToHome(); - _.homePage.CreateNewApplication(); + homePage.NavigateToHome(); + homePage.CreateNewApplication(); cy.fixture("templatePageWithNullbindings").then((val) => { - _.agHelper.AddDsl(val); + agHelper.AddDsl(val); }); - _.autoLayout.ConvertToAutoLayoutAndVerify(); + autoLayout.ConvertToAutoLayoutAndVerify(); }); it("4. when app has widgets with dynamic Bindings, which have default values that are to be defined during conversion, it should convert without errors", () => { - _.homePage.NavigateToHome(); - _.homePage.CreateNewApplication(); + homePage.NavigateToHome(); + homePage.CreateNewApplication(); cy.fixture("conversionDslWithDynamicBindings").then((val) => { - _.agHelper.AddDsl(val); + agHelper.AddDsl(val); }); - _.autoLayout.ConvertToAutoLayoutAndVerify(); - _.autoLayout.UseSnapshotFromBanner(); + autoLayout.ConvertToAutoLayoutAndVerify(); + autoLayout.UseSnapshotFromBanner(); }); - it("5. #23367 when app imports pages from a template, it should convert without any errors before refreshing the page after load", () => { - _.entityExplorer.AddNewPage("Add page from template"); - _.agHelper.AssertElementVisible(template.templateDialogBox); - _.agHelper.GetNClick("//h1[text()='Marketing Dashboard']"); - cy.wait(10000); // for templates page to load fully - _.agHelper.GetNClick(template.selectCheckbox); - cy.wait(1000); - _.agHelper.GetNClick(template.selectCheckbox, 1); - _.agHelper.GetNClick(template.templateViewForkButton); - cy.wait(5000); - _.agHelper.AssertContains( - "template added successfully", - "exist", - widgetLocators.toastAction, - ); + it( + "excludeForAirgap", + "5. #23367 when app imports pages from a template, it should convert without any errors before refreshing the page after load", + () => { + entityExplorer.AddNewPage("Add page from template"); + agHelper.AssertElementVisible(template.templateDialogBox); + agHelper.GetNClick("//h1[text()='Marketing Dashboard']"); + cy.wait(10000); // for templates page to load fully + agHelper.GetNClick(template.selectCheckbox); + cy.wait(1000); + agHelper.GetNClick(template.selectCheckbox, 1); + agHelper.GetNClick(template.templateViewForkButton); + cy.wait(5000); + agHelper.AssertContains( + "template added successfully", + "exist", + widgetLocators.toastAction, + ); - _.autoLayout.ConvertToAutoLayoutAndVerify(); - }); + autoLayout.ConvertToAutoLayoutAndVerify(); + }, + ); }); diff --git a/app/client/cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Generated_App_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Generated_App_spec.ts index 1165d3cb73..d93f8e8fcc 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Generated_App_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/MobileResponsiveTests/ConversionFlow_Generated_App_spec.ts @@ -1,15 +1,23 @@ -import * as _ from "../../../../support/Objects/ObjectsCore"; +import { + dataSources, + autoLayout, + draggableWidgets, +} from "../../../../support/Objects/ObjectsCore"; -describe("Handle Conversion for Generated/Imported Pages", () => { - it("1. make sure the Generated CRUD apps is converted and all the canvases are converted to auto layout", () => { - _.dataSources.GeneratePageWithMockDB(); +describe( + "excludeForAirgap", + "Handle Conversion for Generated/Imported Pages", + () => { + it("1. make sure the Generated CRUD apps is converted and all the canvases are converted to auto layout", () => { + dataSources.GeneratePageWithMockDB(); - //Converting generated CRUD app to Auto Layout and verify the canvases - _.autoLayout.ConvertToAutoLayoutAndVerify(); - _.autoLayout.VerifyCurrentWidgetIsAutolayout(_.draggableWidgets.CONTAINER); + //Converting generated CRUD app to Auto Layout and verify the canvases + autoLayout.ConvertToAutoLayoutAndVerify(); + autoLayout.VerifyCurrentWidgetIsAutolayout(draggableWidgets.CONTAINER); - //Add Generated CRUD from within the Auto Layout and verify the canvases - _.dataSources.GeneratePageWithMockDB(); - _.autoLayout.VerifyCurrentWidgetIsAutolayout(_.draggableWidgets.CONTAINER); - }); -}); + //Add Generated CRUD from within the Auto Layout and verify the canvases + dataSources.GeneratePageWithMockDB(); + autoLayout.VerifyCurrentWidgetIsAutolayout(draggableWidgets.CONTAINER); + }); + }, +);