Skip to content

Commit 515a0a9

Browse files
ngodugu-marklogicMarkLogic Builder
authored andcommitted
DHFPROD-7137: Update the E2E tests in feature/5.4
1 parent 50ba084 commit 515a0a9

29 files changed

+237
-69
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,22 @@ describe("Add Matching step to a flow", () => {
2020
cy.contains(Application.title);
2121
cy.loginAsDeveloper().withRequest();
2222
LoginPage.postLogin();
23+
cy.waitForAsyncRequest();
2324
});
2425
beforeEach(() => {
2526
cy.loginAsDeveloper().withRequest();
27+
cy.waitForAsyncRequest();
2628
});
2729
afterEach(() => {
2830
cy.resetTestUser();
31+
cy.waitForAsyncRequest();
2932
});
3033
after(() => {
3134
cy.loginAsDeveloper().withRequest();
3235
cy.deleteSteps("matching", "matchCustomerTest");
3336
cy.deleteFlows("matchE2ETest", "matchE2ETestRun");
3437
cy.resetTestUser();
38+
cy.waitForAsyncRequest();
3539
});
3640
it("Navigating to Customer Match tab", () => {
3741
cy.waitUntil(() => toolbar.getCurateToolbarIcon()).click();
@@ -62,16 +66,18 @@ describe("Add Matching step to a flow", () => {
6266
});
6367
it("Add the Match step to new flow and Run the step(new)", () => {
6468
curatePage.addToNewFlow("Customer", matchStep);
69+
cy.waitForAsyncRequest();
6570
cy.findByText("New Flow").should("be.visible");
6671
runPage.setFlowName(flowName1);
6772
runPage.setFlowDescription(`${flowName1} description`);
6873
loadPage.confirmationOptions("Save").click();
6974
cy.waitForAsyncRequest();
7075
cy.verifyStepAddedToFlow("Match", matchStep);
71-
runPage.runStep(matchStep).click();
7276
cy.waitForAsyncRequest();
77+
runPage.runStep(matchStep);
7378
cy.verifyStepRunResult("success", "Matching", matchStep);
7479
tiles.closeRunMessage();
80+
cy.waitForAsyncRequest();
7581
});
7682
it("Delete the step and Navigate back to match tab", () => {
7783
runPage.deleteStep(matchStep).click();
@@ -89,8 +95,8 @@ describe("Add Matching step to a flow", () => {
8995
curatePage.confirmAddStepToFlow(matchStep, flowName1);
9096
cy.waitForAsyncRequest();
9197
cy.verifyStepAddedToFlow("Match", matchStep);
92-
runPage.runStep(matchStep).click();
9398
cy.waitForAsyncRequest();
99+
runPage.runStep(matchStep);
94100
cy.verifyStepRunResult("success", "Matching", matchStep);
95101
tiles.closeRunMessage();
96102
});
@@ -108,10 +114,13 @@ describe("Add Matching step to a flow", () => {
108114
it("Add the Match step to new flow from card run button and should automatically run", () => {
109115
curatePage.runStepInCardView(matchStep).click();
110116
curatePage.runInNewFlow(matchStep).click();
117+
cy.waitForAsyncRequest();
111118
cy.findByText("New Flow").should("be.visible");
112119
runPage.setFlowName(flowName2);
113120
runPage.setFlowDescription(`${flowName2} description`);
121+
cy.wait(500);
114122
loadPage.confirmationOptions("Save").click();
123+
cy.wait(500);
115124
cy.waitForAsyncRequest();
116125
cy.verifyStepAddedToFlow("Match", matchStep);
117126
cy.waitUntil(() => runPage.getFlowName(flowName2).should("be.visible"));

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,22 @@ describe("Add Merge step to a flow", () => {
2020
cy.contains(Application.title);
2121
cy.loginAsDeveloper().withRequest();
2222
LoginPage.postLogin();
23+
cy.waitForAsyncRequest();
2324
});
2425
beforeEach(() => {
2526
cy.loginAsDeveloper().withRequest();
27+
cy.waitForAsyncRequest();
2628
});
2729
afterEach(() => {
2830
cy.resetTestUser();
31+
cy.waitForAsyncRequest();
2932
});
3033
after(() => {
3134
cy.loginAsDeveloper().withRequest();
3235
cy.deleteSteps("merging", "mergeCustomerTest");
3336
cy.deleteFlows("mergeE2ETest", "mergeE2ETestRun");
3437
cy.resetTestUser();
38+
cy.waitForAsyncRequest();
3539
});
3640
it("Navigating to Customer Merge tab", () => {
3741
cy.waitUntil(() => toolbar.getCurateToolbarIcon()).click();
@@ -64,14 +68,17 @@ describe("Add Merge step to a flow", () => {
6468
});
6569
it("Add the Merge step to new flow and Run the step(new)", () => {
6670
curatePage.addToNewFlow("Customer", mergeStep);
71+
cy.waitForAsyncRequest();
6772
cy.findByText("New Flow").should("be.visible");
6873
runPage.setFlowName(flowName1);
6974
runPage.setFlowDescription(`${flowName1} description`);
75+
cy.wait(500);
7076
loadPage.confirmationOptions("Save").click();
77+
cy.wait(500);
7178
cy.waitForAsyncRequest();
7279
cy.verifyStepAddedToFlow("Merge", mergeStep);
73-
runPage.runStep(mergeStep).click();
7480
cy.waitForAsyncRequest();
81+
runPage.runStep(mergeStep);
7582
cy.verifyStepRunResult("success", "Merging", mergeStep);
7683
tiles.closeRunMessage();
7784
});
@@ -91,8 +98,8 @@ describe("Add Merge step to a flow", () => {
9198
curatePage.confirmAddStepToFlow(mergeStep, flowName1);
9299
cy.waitForAsyncRequest();
93100
cy.verifyStepAddedToFlow("Merge", mergeStep);
94-
runPage.runStep(mergeStep).click();
95101
cy.waitForAsyncRequest();
102+
runPage.runStep(mergeStep);
96103
cy.verifyStepRunResult("success", "Merging", mergeStep);
97104
tiles.closeRunMessage();
98105
});
@@ -110,6 +117,7 @@ describe("Add Merge step to a flow", () => {
110117
it("Add the Merge step to new flow from card run button and should automatically run", () => {
111118
curatePage.runStepInCardView(mergeStep).click();
112119
curatePage.runInNewFlow(mergeStep).click();
120+
cy.waitForAsyncRequest();
113121
cy.findByText("New Flow").should("be.visible");
114122
runPage.setFlowName(flowName2);
115123
runPage.setFlowDescription(`${flowName2} description`);

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,23 @@ describe("Create and verify load steps, map step and flows with a custom header"
2424
cy.contains(Application.title);
2525
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-mapping-writer", "hub-central-load-writer").withRequest();
2626
LoginPage.postLogin();
27+
cy.waitForAsyncRequest();
2728
});
2829
beforeEach(() => {
2930
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-mapping-writer", "hub-central-load-writer").withRequest();
31+
cy.waitForAsyncRequest();
3032
});
3133
afterEach(() => {
3234
cy.resetTestUser();
35+
cy.waitForAsyncRequest();
3336
});
3437
after(() => {
3538
cy.loginAsDeveloper().withRequest();
3639
cy.deleteSteps("ingestion", "loadOrderCustomHeader");
3740
cy.deleteSteps("mapping", "mapOrderCustomHeader");
3841
cy.deleteFlows("orderCustomHeaderFlow", "orderE2eFlow");
3942
cy.resetTestUser();
43+
cy.waitForAsyncRequest();
4044
});
4145
it("Create load step", () => {
4246
toolbar.getLoadToolbarIcon().click();
@@ -58,14 +62,17 @@ describe("Create and verify load steps, map step and flows with a custom header"
5862
advancedSettingsDialog.saveSettings(loadStep).should("not.be.exist");
5963
// add step to a new flow
6064
loadPage.addStepToNewFlow(loadStep);
65+
cy.waitForAsyncRequest();
6166
cy.findByText("New Flow").should("be.visible");
6267
runPage.setFlowName(flowName);
6368
runPage.setFlowDescription(`${flowName} description`);
6469
loadPage.confirmationOptions("Save").click();
6570
cy.verifyStepAddedToFlow("Load", loadStep);
6671
//Run the ingest with JSON
67-
runPage.runStep(loadStep).click();
72+
cy.waitForAsyncRequest();
73+
runPage.runStep(loadStep);
6874
cy.uploadFile("input/10260.json");
75+
cy.waitForAsyncRequest();
6976
cy.verifyStepRunResult("success", "Ingestion", loadStep);
7077
tiles.closeRunMessage();
7178
});
@@ -121,7 +128,8 @@ describe("Create and verify load steps, map step and flows with a custom header"
121128
curatePage.getExistingFlowFromDropdown(flowName).click();
122129
curatePage.addStepToFlowConfirmationMessage();
123130
curatePage.confirmAddStepToFlow(mapStep, flowName);
124-
runPage.runStep(mapStep).click();
131+
cy.waitForAsyncRequest();
132+
runPage.runStep(mapStep);
125133
cy.verifyStepRunResult("success", "Mapping", mapStep);
126134
tiles.closeRunMessage();
127135
runPage.deleteStep(mapStep).click();
@@ -152,6 +160,7 @@ describe("Create and verify load steps, map step and flows with a custom header"
152160
//Just deleted flow should not be visible on flows list
153161
cy.findByText(flowName).should("not.be.visible");
154162
curatePage.runInNewFlow(mapStep).click({force: true});
163+
cy.waitForAsyncRequest();
155164
cy.findByText("New Flow").should("be.visible");
156165
runPage.setFlowName(flowName);
157166
runPage.setFlowDescription(`${flowName} description`);
@@ -178,10 +187,14 @@ describe("Create and verify load steps, map step and flows with a custom header"
178187
cy.waitUntil(() => curatePage.getEntityTypePanel("Customer").should("be.visible"));
179188
curatePage.toggleEntityTypeId("Order");
180189
curatePage.addToNewFlow("Order", mapStep);
190+
cy.waitForAsyncRequest();
181191
cy.findByText("New Flow").should("be.visible");
182192
runPage.setFlowName(flowName2);
183193
runPage.setFlowDescription(`${flowName2} description`);
194+
cy.wait(500);
184195
loadPage.confirmationOptions("Save").click();
196+
cy.wait(500);
197+
cy.waitForAsyncRequest();
185198
cy.verifyStepAddedToFlow("Map", mapStep);
186199
//Verify Run Map step where step exists in multiple flows, choose one to automatically run in
187200
toolbar.getCurateToolbarIcon().click();

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,23 @@ describe("Create and verify load steps, map step and flows with interceptors & c
2222
cy.contains(Application.title);
2323
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-mapping-writer", "hub-central-load-writer").withRequest();
2424
LoginPage.postLogin();
25+
cy.waitForAsyncRequest();
2526
});
2627
beforeEach(() => {
2728
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-mapping-writer", "hub-central-load-writer").withRequest();
29+
cy.waitForAsyncRequest();
2830
});
2931
afterEach(() => {
3032
cy.resetTestUser();
33+
cy.waitForAsyncRequest();
3134
});
3235
after(() => {
3336
cy.loginAsDeveloper().withRequest();
3437
cy.deleteSteps("ingestion", "loadOrder");
3538
cy.deleteSteps("mapping", "mapOrder", "mapCustomer");
3639
cy.deleteFlows("orderFlow");
3740
cy.resetTestUser();
41+
cy.waitForAsyncRequest();
3842
});
3943
it("Create load step", () => {
4044
toolbar.getLoadToolbarIcon().click();
@@ -49,6 +53,7 @@ describe("Create and verify load steps, map step and flows with interceptors & c
4953
advancedSettingsDialog.setStepInterceptor("loadTile/orderCategoryCodeInterceptor");
5054

5155
loadPage.confirmationOptions("Save").click({force: true});
56+
cy.waitForAsyncRequest();
5257
cy.findByText(loadStep).should("be.visible");
5358
});
5459
it("Edit load step", () => {
@@ -77,14 +82,19 @@ describe("Create and verify load steps, map step and flows with interceptors & c
7782
});
7883
it("Add step to new flow and Run", () => {
7984
loadPage.addStepToNewFlow(loadStep);
85+
cy.waitForAsyncRequest();
8086
cy.findByText("New Flow").should("be.visible");
8187
runPage.editSave().should("be.enabled");
8288
runPage.setFlowName(flowName);
8389
runPage.setFlowDescription(`${flowName} description`);
90+
cy.wait(500);
8491
loadPage.confirmationOptions("Save").click();
92+
cy.wait(500);
93+
cy.waitForAsyncRequest();
8594
cy.verifyStepAddedToFlow("Load", loadStep);
8695
//Run the ingest with JSON
87-
runPage.runStep(loadStep).click();
96+
cy.waitForAsyncRequest();
97+
runPage.runStep(loadStep);
8898
cy.uploadFile("input/10259.json");
8999
cy.verifyStepRunResult("success", "Ingestion", loadStep);
90100
tiles.closeRunMessage();
@@ -197,7 +207,9 @@ describe("Create and verify load steps, map step and flows with interceptors & c
197207
curatePage.addStepToFlowConfirmationMessage();
198208
curatePage.confirmAddStepToFlow(mapStep, flowName);
199209

200-
runPage.runStep(mapStep).click();
210+
cy.waitForAsyncRequest();
211+
runPage.runStep(mapStep);
212+
cy.waitForAsyncRequest();
201213
cy.verifyStepRunResult("success", "Mapping", mapStep);
202214
runPage.explorerLink().click();
203215
browsePage.getTableViewSourceIcon().click();

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,21 @@ describe("Matching", () => {
1818
cy.contains(Application.title);
1919
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-match-merge-writer", "hub-central-mapping-writer", "hub-central-load-writer").withRequest();
2020
LoginPage.postLogin();
21+
cy.waitForAsyncRequest();
2122
});
2223
beforeEach(() => {
2324
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-match-merge-writer", "hub-central-mapping-writer", "hub-central-load-writer").withRequest();
25+
cy.waitForAsyncRequest();
2426
});
2527
afterEach(() => {
2628
cy.resetTestUser();
29+
cy.waitForAsyncRequest();
2730
});
2831
after(() => {
2932
cy.loginAsDeveloper().withRequest();
3033
cy.deleteSteps("matching", "matchCustomerTest");
3134
cy.resetTestUser();
35+
cy.waitForAsyncRequest();
3236
});
3337
it("Navigate to curate tab and Open Customer entity", () => {
3438
cy.waitUntil(() => toolbar.getCurateToolbarIcon()).click();

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,21 @@ describe("Merging", () => {
1818
cy.contains(Application.title);
1919
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-match-merge-writer", "hub-central-mapping-writer", "hub-central-load-writer").withRequest();
2020
LoginPage.postLogin();
21+
cy.waitForAsyncRequest();
2122
});
2223
beforeEach(() => {
2324
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-match-merge-writer", "hub-central-mapping-writer", "hub-central-load-writer").withRequest();
25+
cy.waitForAsyncRequest();
2426
});
2527
afterEach(() => {
2628
cy.resetTestUser();
29+
cy.waitForAsyncRequest();
2730
});
2831
after(() => {
2932
cy.loginAsDeveloper().withRequest();
3033
cy.deleteSteps("merging", "mergeOrderTestStep");
3134
cy.resetTestUser();
35+
cy.waitForAsyncRequest();
3236
});
3337
it("Navigate to curate tab and Open Order entity", () => {
3438
cy.waitUntil(() => toolbar.getCurateToolbarIcon()).click();

marklogic-data-hub-central/ui/e2e/cypress/integration/curation/load/customIngestion.spec.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,40 @@ import "cypress-wait-until";
77

88
describe("Custom Ingestion", () => {
99

10-
beforeEach(() => {
10+
before(() => {
1111
cy.visit("/");
1212
cy.contains(Application.title);
1313
cy.loginAsTestUserWithRoles("hub-central-load-reader", "hub-central-step-runner").withRequest();
1414
LoginPage.postLogin();
15+
cy.waitForAsyncRequest();
1516
cy.waitUntil(() => toolbar.getLoadToolbarIcon()).click();
1617
cy.waitUntil(() => loadPage.stepName("ingestion-step").should("be.visible"));
1718
});
18-
19-
afterEach(() => {
19+
after(() => {
2020
cy.resetTestUser();
21+
cy.waitForAsyncRequest();
2122
});
22-
23-
2423
it("verify that custom ingestion step shows up and can be run", () => {
2524
const flowName = "testCustomFlow";
2625
const loadStep = "ingestion-step";
27-
2826
// create load step
2927
toolbar.getLoadToolbarIcon().click();
3028
cy.waitUntil(() => loadPage.stepName("ingestion-step").should("be.visible"));
3129
// open settings
3230
loadPage.editStepInCardView(loadStep).click();
3331
loadPage.switchEditAdvanced().click(); // Advanced tab
34-
3532
//custom ingestion steps have step definition name
3633
cy.findByText("Step Definition Name").should("exist");
37-
3834
loadPage.cancelSettings(loadStep).click();
39-
4035
toolbar.getRunToolbarIcon().click();
4136
//Run the ingest with JSON
4237
cy.waitUntil(() => cy.findByText(flowName).closest("div")).click();
4338
cy.waitUntil(() => cy.contains("Custom"));
44-
runPage.runStep(loadStep).click();
45-
46-
cy.get("#fileUpload").attachFile("input/test-1.json", {subjectType: "input", force: true});
39+
cy.waitForAsyncRequest();
40+
runPage.runStep(loadStep);
41+
cy.uploadFile("input/test-1.json");
4742
cy.waitForAsyncRequest();
4843
cy.waitUntil(() => cy.get("span p"));
49-
5044
cy.verifyStepRunResult("success", "Ingestion", loadStep);
5145
tiles.closeRunMessage();
5246

0 commit comments

Comments
 (0)