chore: Exclude failing auto-layout test cases for air gapped instances (#24329)

## Description
This PR is to exclude failing auto-layout test cases for air gapped
instances and some housekeeping cleanup

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
#### How Has This Been Tested?
- [ ] Cypress


#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
This commit is contained in:
rahulramesha 2023-06-11 20:59:30 +05:30 committed by GitHub
parent c2edc8a37a
commit de9eeb0857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 68 additions and 54 deletions

View File

@ -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 template from "../../../../locators/TemplatesLocators.json";
import widgetLocators from "../../../../locators/Widgets.json"; import widgetLocators from "../../../../locators/Widgets.json";
describe("Handle Cases while conversion", () => { describe("Handle Cases while conversion", () => {
it("1. when snapshot is restored from a page created before Conversion, it should refresh in the same page", () => { it("1. when snapshot is restored from a page created before Conversion, it should refresh in the same page", () => {
_.entityExplorer.DragDropWidgetNVerify( entityExplorer.DragDropWidgetNVerify(draggableWidgets.CONTAINER, 100, 200);
_.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); 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", () => { 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", () => { 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.NavigateToHome();
_.homePage.CreateNewApplication(); homePage.CreateNewApplication();
cy.fixture("templatePageWithNullbindings").then((val) => { 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", () => { 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.NavigateToHome();
_.homePage.CreateNewApplication(); homePage.CreateNewApplication();
cy.fixture("conversionDslWithDynamicBindings").then((val) => { cy.fixture("conversionDslWithDynamicBindings").then((val) => {
_.agHelper.AddDsl(val); agHelper.AddDsl(val);
}); });
_.autoLayout.ConvertToAutoLayoutAndVerify(); autoLayout.ConvertToAutoLayoutAndVerify();
_.autoLayout.UseSnapshotFromBanner(); autoLayout.UseSnapshotFromBanner();
}); });
it("5. #23367 when app imports pages from a template, it should convert without any errors before refreshing the page after load", () => { it(
_.entityExplorer.AddNewPage("Add page from template"); "excludeForAirgap",
_.agHelper.AssertElementVisible(template.templateDialogBox); "5. #23367 when app imports pages from a template, it should convert without any errors before refreshing the page after load",
_.agHelper.GetNClick("//h1[text()='Marketing Dashboard']"); () => {
cy.wait(10000); // for templates page to load fully entityExplorer.AddNewPage("Add page from template");
_.agHelper.GetNClick(template.selectCheckbox); agHelper.AssertElementVisible(template.templateDialogBox);
cy.wait(1000); agHelper.GetNClick("//h1[text()='Marketing Dashboard']");
_.agHelper.GetNClick(template.selectCheckbox, 1); cy.wait(10000); // for templates page to load fully
_.agHelper.GetNClick(template.templateViewForkButton); agHelper.GetNClick(template.selectCheckbox);
cy.wait(5000); cy.wait(1000);
_.agHelper.AssertContains( agHelper.GetNClick(template.selectCheckbox, 1);
"template added successfully", agHelper.GetNClick(template.templateViewForkButton);
"exist", cy.wait(5000);
widgetLocators.toastAction, agHelper.AssertContains(
); "template added successfully",
"exist",
widgetLocators.toastAction,
);
_.autoLayout.ConvertToAutoLayoutAndVerify(); autoLayout.ConvertToAutoLayoutAndVerify();
}); },
);
}); });

View File

@ -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", () => { describe(
it("1. make sure the Generated CRUD apps is converted and all the canvases are converted to auto layout", () => { "excludeForAirgap",
_.dataSources.GeneratePageWithMockDB(); "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 //Converting generated CRUD app to Auto Layout and verify the canvases
_.autoLayout.ConvertToAutoLayoutAndVerify(); autoLayout.ConvertToAutoLayoutAndVerify();
_.autoLayout.VerifyCurrentWidgetIsAutolayout(_.draggableWidgets.CONTAINER); autoLayout.VerifyCurrentWidgetIsAutolayout(draggableWidgets.CONTAINER);
//Add Generated CRUD from within the Auto Layout and verify the canvases //Add Generated CRUD from within the Auto Layout and verify the canvases
_.dataSources.GeneratePageWithMockDB(); dataSources.GeneratePageWithMockDB();
_.autoLayout.VerifyCurrentWidgetIsAutolayout(_.draggableWidgets.CONTAINER); autoLayout.VerifyCurrentWidgetIsAutolayout(draggableWidgets.CONTAINER);
}); });
}); },
);