Skip to content

Commit f922220

Browse files
nadiacamilaMarkLogic Builder
authored andcommitted
DHFPROD-8680-e2eWinFailures
1 parent bf48bb7 commit f922220

File tree

6 files changed

+27
-24
lines changed

6 files changed

+27
-24
lines changed

marklogic-data-hub-central/ui/e2e/cypress/integration/explore/graphGroupNodes.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ describe("Group Nodes", () => {
7474

7575
cy.log("**Click Product node '50' to open side panel and validate productID**");
7676
graphExplore.focusNode(ExploreGraphNodes.PRODUCT_50);
77+
cy.wait(1000);
7778
graphExplore.getPositionsOfNodes(ExploreGraphNodes.PRODUCT_50).then((nodePositions: any) => {
7879
let orderCoordinates: any = nodePositions[ExploreGraphNodes.PRODUCT_50];
7980
const canvas = graphExplore.getGraphVisCanvas();

marklogic-data-hub-central/ui/e2e/cypress/integration/explore/graphLeafNodes.spec.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("Leaf Nodes", () => {
3838
entitiesSidebar.openBaseEntityDropdown();
3939
entitiesSidebar.selectBaseEntityOption("Customer");
4040
entitiesSidebar.getBaseEntityOption("Customer").should("be.visible");
41-
cy.wait(2000);
41+
cy.wait(5000);
4242

4343
cy.log("**Clicking Show related on '101' leaf node to expand**");
4444
graphExplore.focusNode(ExploreGraphNodes.OFFICE_101);
@@ -76,6 +76,7 @@ describe("Leaf Nodes", () => {
7676

7777
cy.log("**Clicking collapse all records**");
7878
graphExplore.focusNode(ExploreGraphNodes.OFFICE_101);
79+
cy.wait(2000);
7980
graphExplore.getPositionsOfNodes(ExploreGraphNodes.OFFICE_101).then((nodePositions: any) => {
8081
let orderCoordinates: any = nodePositions[ExploreGraphNodes.OFFICE_101];
8182
const canvas = graphExplore.getGraphVisCanvas();
@@ -84,7 +85,7 @@ describe("Leaf Nodes", () => {
8485
canvas.rightclick(orderCoordinates.x, orderCoordinates.y, {force: true});
8586
graphExplore.stopStabilization();
8687
//On windows it takes longer for the graph to get stabilized
87-
cy.wait(5000);
88+
cy.wait(4000);
8889
graphExplore.clickCollapseLeafNode();
8990
graphExplore.stopStabilization();
9091

marklogic-data-hub-central/ui/e2e/cypress/integration/explore/jsonTableViewValidations.spec.tsx

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import detailPage from "../../support/pages/detail";
55
import entitiesSidebar from "../../support/pages/entitiesSidebar";
66
import {BaseEntityTypes} from "../../support/types/base-entity-types";
77
import {Application} from "../../support/application.config";
8-
import {toolbar} from "../../support/components/common";
98
import "cypress-wait-until";
109
// import detailPageNonEntity from "../../support/pages/detail-nonEntity";
1110
import LoginPage from "../../support/pages/login";
@@ -20,25 +19,24 @@ describe("json scenario for table on browse documents page", () => {
2019
cy.contains(Application.title);
2120
cy.loginAsDeveloper().withRequest();
2221
LoginPage.postLogin();
23-
cy.waitForAsyncRequest();
22+
//Saving Local Storage to preserve session
23+
cy.saveLocalStorage();
2424
});
2525
beforeEach(() => {
26-
cy.loginAsDeveloper().withRequest();
27-
cy.waitForAsyncRequest();
28-
cy.waitUntil(() => toolbar.getExploreToolbarIcon()).click();
29-
browsePage.getTableView().click();
30-
browsePage.waitForSpinnerToDisappear();
31-
browsePage.waitForHCTableToLoad();
32-
});
33-
afterEach(() => {
34-
cy.resetTestUser();
35-
cy.waitForAsyncRequest();
26+
//Restoring Local Storage to Preserve Session
27+
cy.restoreLocalStorage();
3628
});
3729
after(() => {
3830
cy.resetTestUser();
3931
cy.waitForAsyncRequest();
4032
});
4133
it("select \"all entities\" and verify table default columns", () => {
34+
cy.visit("/tiles/explore");
35+
cy.wait(5000);
36+
browsePage.getTableView().click();
37+
browsePage.waitForSpinnerToDisappear();
38+
browsePage.waitForHCTableToLoad();
39+
4240
entitiesSidebar.getBaseEntityOption("All Entities").should("be.visible");
4341
browsePage.getTotalDocuments().should("be.greaterThan", 25);
4442
browsePage.getColumnTitle(2).should("contain", "Identifier");
@@ -83,7 +81,6 @@ describe("json scenario for table on browse documents page", () => {
8381
});
8482

8583
it("verify instance view of the document without pk", () => {
86-
entitiesSidebar.showMoreEntities().click({force: true});
8784
entitiesSidebar.openBaseEntityFacets(BaseEntityTypes.PERSON);
8885
browsePage.getFacetItemCheckbox("fname", "Alice").click();
8986
browsePage.getGreySelectedFacets("Alice").should("exist");
@@ -117,6 +114,7 @@ describe("json scenario for table on browse documents page", () => {
117114
entitiesSidebar.selectBaseEntityOption("All Entities");
118115
entitiesSidebar.getBaseEntityOption("All Entities").should("be.visible");
119116
entitiesSidebar.getApplyFacetsButton().click();
117+
cy.wait(1000);
120118
browsePage.waitForSpinnerToDisappear();
121119
browsePage.getTotalDocuments().should("be.equal", 1);
122120
browsePage.getTableViewInstanceIcon().click();
@@ -130,13 +128,15 @@ describe("json scenario for table on browse documents page", () => {
130128
});
131129

132130
it("verify source view of the document", () => {
131+
cy.visit("/tiles/explore");
132+
cy.wait(5000);
133133
entitiesSidebar.openBaseEntityDropdown();
134134
entitiesSidebar.selectBaseEntityOption("Customer");
135-
entitiesSidebar.getBaseEntityOption("Customer").should("be.visible");
135+
entitiesSidebar.getBaseEntityOption("Customer").scrollIntoView().should("be.visible");
136136
browsePage.waitForSpinnerToDisappear();
137137
browsePage.getFinalDatabaseButton();
138-
browsePage.getClearAllFacetsButton().click();
139-
entitiesSidebar.getMainPanelSearchInput().type("Adams Cole");
138+
browsePage.getClearAllFacetsButton().click({force: true});
139+
entitiesSidebar.getMainPanelSearchInput().scrollIntoView().type("Adams Cole");
140140
entitiesSidebar.getApplyFacetsButton().click();
141141
browsePage.waitForSpinnerToDisappear();
142142
entitiesSidebar.openBaseEntityFacets(BaseEntityTypes.CUSTOMER);
@@ -149,6 +149,7 @@ describe("json scenario for table on browse documents page", () => {
149149
browsePage.getFacetItemCheckbox("collection", "mapCustomersJSON").click({force: true});
150150
browsePage.getGreySelectedFacets("mapCustomersJSON").should("exist");
151151
browsePage.getFacetApplyButton().click();
152+
browsePage.getTableView().click();
152153
browsePage.getTotalDocuments().should("be.equal", 2);
153154

154155
//Refresh the browser page at Browse table view.
@@ -299,6 +300,7 @@ describe("json scenario for table on browse documents page", () => {
299300
});
300301

301302
it("apply multiple facets, deselect them, apply changes, apply multiple, clear them, verify no facets checked", () => {
303+
entitiesSidebar.backToMainSidebar();
302304
entitiesSidebar.openBaseEntityDropdown();
303305
entitiesSidebar.selectBaseEntityOption("Customer");
304306
entitiesSidebar.getBaseEntityOption("Customer").should("be.visible");
@@ -337,6 +339,7 @@ describe("json scenario for table on browse documents page", () => {
337339

338340

339341
it("Verify facets can be selected, applied and cleared using clear text", () => {
342+
entitiesSidebar.backToMainSidebar();
340343
entitiesSidebar.openBaseEntityDropdown();
341344
entitiesSidebar.selectBaseEntityOption("Person");
342345
entitiesSidebar.getBaseEntityOption("Person").should("be.visible");
@@ -355,6 +358,7 @@ describe("json scenario for table on browse documents page", () => {
355358
});
356359

357360
it("Apply facets, unchecking them should not recheck original facets", () => {
361+
entitiesSidebar.backToMainSidebar();
358362
entitiesSidebar.openBaseEntityDropdown();
359363
entitiesSidebar.selectBaseEntityOption("Customer");
360364
entitiesSidebar.getBaseEntityOption("Customer").should("be.visible");

marklogic-data-hub-central/ui/e2e/cypress/integration/login/authorization.spec.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,15 @@ describe("login", () => {
1313

1414
before(() => {
1515
cy.visit("/");
16-
cy.waitForAsyncRequest();
1716
});
1817

1918
afterEach(() => {
2019
cy.logout();
21-
cy.waitForAsyncRequest();
2220
});
2321

2422
after(() => {
2523
//resetting the test user back to only have 'hub-central-user' role
2624
cy.resetTestUser();
27-
cy.waitForAsyncRequest();
2825
});
2926

3027
it("greets with Data Hub Central title and footer links", () => {

marklogic-data-hub-central/ui/e2e/cypress/support/pages/browse.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,11 +661,11 @@ class BrowsePage {
661661
}
662662

663663
getFinalDatabaseButton() {
664-
cy.findByText("Final").click();
664+
cy.findByText("Final").scrollIntoView().click({force: true});
665665
// cy.intercept("POST", "/api/entitySearch?database=final").as("entitySearchFinal");
666666
// cy.wait("@entitySearchFinal");
667667
//tried intercept + wait on request but didn't work. Leaving comment as reference
668-
cy.wait(3000);
668+
cy.wait(5000);
669669
}
670670

671671
getStagingDatabaseButton() {

marklogic-data-hub-central/ui/e2e/cypress/support/pages/run.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class RunPage {
134134
}
135135

136136
openStepsSelectDropdown(flowName: string) {
137-
cy.findByLabelText(`stepSettings-${flowName}`).first().should("be.visible").click();
137+
cy.findByLabelText(`stepSettings-${flowName}`).first().should("be.visible").click({force: true});
138138
}
139139

140140
clickSuccessCircleIcon(stepName: string, flowName: string) {

0 commit comments

Comments
 (0)