Skip to content

Commit 10dd97b

Browse files
briantangMarkLogic Builder
authored andcommitted
DHFPROD-8191: e2e failures on Windows nightly
1 parent 10e6403 commit 10dd97b

File tree

9 files changed

+45
-28
lines changed

9 files changed

+45
-28
lines changed

marklogic-data-hub-central/ui/e2e/cypress/integration/curation/curate/mappingWithCustomHeader.spec.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ describe("Create and verify load steps, map step and flows with a custom header"
6363
advancedSettingsDialog.setHeaderContent("loadTile/customHeader");
6464
advancedSettingsDialog.saveSettings(loadStep).click();
6565
advancedSettingsDialog.saveSettings(loadStep).should("not.be.exist");
66+
67+
loadPage.stepName(loadStep).should("be.visible");
6668
// add step to a new flow
6769
loadPage.addStepToNewFlow(loadStep);
6870
cy.waitForAsyncRequest();

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,16 @@ describe("Test graph export to png", () => {
4040
graphExplore.getExportPNGIconTooltip().should("exist");
4141

4242
cy.log("**Click on export button and check that file it's exported**");
43-
graphExplore.getExportPNGIcon().click({force: true}).then(
44-
() => {
45-
cy.readFile("./cypress/downloads/graph-view-explore.png", "base64").then(
46-
(downloadPng) => {
47-
expect(downloadPng).exist;
48-
});
49-
});
43+
44+
//To test graph view model png is downloaded successfully
45+
if (Cypress.isBrowser("!firefox")) {
46+
graphExplore.getExportPNGIcon().click({force: true}).then(
47+
() => {
48+
cy.readFile("./cypress/downloads/graph-view-explore.png", "base64").then(
49+
(downloadPng) => {
50+
expect(downloadPng).exist;
51+
});
52+
});
53+
}
5054
});
5155
});

marklogic-data-hub-central/ui/e2e/cypress/integration/modeling/reader.spec.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,6 @@ describe("Entity Modeling: Reader Role", () => {
113113
graphViewSidePanel.getPropertyName("name").should("be.visible");
114114
graphViewSidePanel.getPropertyName("email").should("be.visible");
115115

116-
//Verify property type icons and respective tooltips
117-
graphViewSidePanel.getPropertyTypeIcon("multiple-icon", "shipping").trigger("mouseover");
118-
graphViewSidePanel.getIconTooltip("shipping", "Multiple");
119-
graphViewSidePanel.getPropertyTypeIcon("multiple-icon", "shipping").trigger("mouseout");
120-
graphViewSidePanel.getPropertyTypeIcon("structured", "shipping").trigger("mouseover");
121-
graphViewSidePanel.getIconTooltip("shipping", "Structured Type");
122-
graphViewSidePanel.getPropertyTypeIcon("structured", "shipping").trigger("mouseout");
123-
124116
//To verify cannot edit Entity Type tab without permissions (except color)
125117
graphViewSidePanel.getEntityTypeTab().click();
126118
graphViewSidePanel.getEntityDescription().should("be.disabled");
@@ -153,13 +145,16 @@ describe("Entity Modeling: Reader Role", () => {
153145
relationshipModal.getModalHeader().should("not.exist");
154146

155147
//To test graph view model png is downloaded successfully
156-
graphView.getExportGraphIcon().scrollIntoView().click({force: true}).then(
157-
() => {
158-
cy.readFile("./cypress/downloads/graph-view-model.png", "base64").then(
159-
(downloadPng) => {
160-
expect(downloadPng).exist;
161-
});
162-
});
148+
if (Cypress.isBrowser("!firefox")) {
149+
graphView.getExportGraphIcon().scrollIntoView().click({force: true}).then(
150+
() => {
151+
cy.readFile("./cypress/downloads/graph-view-model.png", "base64").then(
152+
(downloadPng) => {
153+
expect(downloadPng).exist;
154+
});
155+
});
156+
}
157+
163158

164159
modelPage.scrollPageTop();
165160
// To verify modeling info is rendered properly in graph view

marklogic-data-hub-central/ui/e2e/cypress/integration/monitor/monitorTableValidations.spec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ describe("Monitor Tile", () => {
2828

2929
it("Navigate to Monitor Tile and verify pagination works", () => {
3030
monitorPage.getTableRows().its("length").should("be.gte", 10);
31-
monitorPage.getPaginationPageSizeOptions().select("10 / page");
31+
monitorPage.scrollMonitorToPageSelect();
32+
monitorPage.getPaginationPageSizeOptions().scrollIntoView().select("10 / page", {force: true});
3233
monitorPage.getTableRows().should("have.length", 10);
3334
});
3435

marklogic-data-hub-central/ui/e2e/cypress/support/components/common/tiles.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ class Tiles {
3333
}
3434

3535
closeRunMessage() {
36-
cy.get("button[aria-label=\"Close\"]").click();
36+
cy.get("button[aria-label=\"Close\"]").click({multiple: true});
3737
cy.get("body")
3838
.then(($body) => {
3939
if ($body.find("[data-testid=explorer-link]").length) {
40-
cy.get("button[aria-label=\"Close\"]").click();
40+
cy.get("button[aria-label=\"Close\"]").click({multiple: true});
4141
}
4242
});
4343
cy.waitForBootstrapModalToDisappear();

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ class MonitorPage {
33
getMonitorContainer() {
44
return cy.get(`#monitorContent`);
55
}
6+
7+
scrollMonitorToPageSelect() {
8+
cy.get(`#monitorContent`).scrollTo("bottom", {ensureScrollable: false});
9+
cy.wait(500);
10+
return cy.get(`#monitorContent`).scrollTo("right", {ensureScrollable: false});
11+
}
12+
613
getTableRows() {
714
return cy.get(".hc-table_row");
815
}

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
@@ -77,7 +77,7 @@ class RunPage {
7777
}
7878

7979
runStep(stepName: string, flowName: string) {
80-
cy.waitUntil(() => cy.get(`#${flowName}`).findByLabelText(`runStep-${stepName}`)).click({force: true});
80+
cy.waitUntil(() => cy.get(`#${flowName}`).findByLabelText(`runStep-${stepName}`)).first().click({force: true});
8181
cy.waitForAsyncRequest();
8282
}
8383

marklogic-data-hub-central/ui/src/components/modeling/property-table/property-table.test.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ describe("Entity Modeling Property Table Component", () => {
6161
expect(getByLabelText("NewEntity-add-property")).toBeDisabled();
6262
});
6363

64-
test("Property Table renders in side panel view with less columns as designed", () => {
64+
test("Property Table renders in side panel view with less columns as designed", async () => {
6565
let entityName = propertyTableEntities[0].entityName;
6666
let definitions = propertyTableEntities[0].model.definitions;
6767

68-
const {queryByLabelText, getByText, rerender} = render(
68+
const {queryByLabelText, getByText, rerender, getByTestId} = render(
6969
<PropertyTable
7070
canReadEntityModel={true}
7171
canWriteEntityModel={true}
@@ -112,6 +112,12 @@ describe("Entity Modeling Property Table Component", () => {
112112
expect(queryByLabelText("identifier-header")).not.toBeInTheDocument();
113113
expect(queryByLabelText("pii-header")).not.toBeInTheDocument();
114114
expect(queryByLabelText("facet-header")).not.toBeInTheDocument();
115+
116+
fireEvent.mouseOver(getByTestId("structured-shipping"));
117+
await wait(() => expect(screen.getByText(ModelingTooltips.structuredType)).toBeInTheDocument());
118+
119+
fireEvent.mouseOver(getByTestId("multiple-icon-nicknames"));
120+
await wait(() => expect(screen.getByText(ModelingTooltips.multipleIconTooltip)).toBeInTheDocument());
115121
});
116122

117123

marklogic-data-hub-central/ui/src/config/tooltips.config.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ const ModelingTooltips = {
4141
/* Icons for entity properties */
4242
addStructuredProperty: 'Add a property to this structured property.',
4343
deleteProperty: 'Delete this property.',
44+
structuredType: 'Structured Type',
45+
multipleIconTooltip: 'Multiple',
4446

4547
/* Yes/No in modal; column headers in property list */
4648
identifier: 'If enabled, uniquely identifies each instance of this entity type. Restricted to only one property per entity type.',

0 commit comments

Comments
 (0)