Skip to content

Commit 447c795

Browse files
nikhila.godugu@marklogic.comMarkLogic Builder
authored andcommitted
DHFPROD-9663: Fix E2E tests on 11.0-Nightly-linux-On-Prem
1 parent 33eacf8 commit 447c795

File tree

13 files changed

+58
-72
lines changed

13 files changed

+58
-72
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ describe("Custom step settings: ", () => {
1616
cy.contains(Application.title);
1717
cy.loginAsTestUserWithRoles("hub-central-flow-writer", "hub-central-match-merge-writer", "hub-central-mapping-writer", "hub-central-load-writer", "hub-central-custom-writer").withRequest();
1818
LoginPage.postLogin();
19+
toolbar.getCurateToolbarIcon().click();
20+
curatePage.getEntityTypePanel("Customer").should("be.visible");
1921
//Saving Local Storage to preserve session
2022
cy.saveLocalStorage();
2123
});
@@ -30,14 +32,9 @@ describe("Custom step settings: ", () => {
3032
cy.saveLocalStorage();
3133
});
3234

33-
it("Navigate to Curate tile -> Customer entity -> custom tab", () => {
34-
cy.waitUntil(() => toolbar.getCurateToolbarIcon()).click();
35-
cy.waitUntil(() => curatePage.getEntityTypePanel("Customer").should("be.visible"));
35+
it("Validate step name is disabled, changes are discarded on cancel", () => {
3636
curatePage.toggleEntityTypeId("Customer");
3737
curatePage.selectCustomTab("Customer");
38-
});
39-
40-
it("Validate step name is disabled, changes are discarded on cancel", () => {
4138
curatePage.editStep(stepName).click();
4239
createEditStepDialog.stepNameInput().should("be.disabled");
4340
createEditStepDialog.stepDescriptionInput().should("be.enabled");

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe("Create and verify load steps, map step and flows with interceptors & c
4343
});
4444
it("Create and Edit load step", () => {
4545
toolbar.getLoadToolbarIcon().click();
46-
cy.waitUntil(() => loadPage.stepName("ingestion-step").should("be.visible"));
46+
loadPage.stepName("ingestion-step").should("be.visible");
4747
loadPage.addNewButton("card").click();
4848
loadPage.saveButton().should("be.enabled");
4949
loadPage.stepNameInput().type(loadStep);
@@ -104,9 +104,10 @@ describe("Create and verify load steps, map step and flows with interceptors & c
104104
});
105105
it("Create mapping step", () => {
106106
toolbar.getCurateToolbarIcon().click();
107-
cy.waitUntil(() => curatePage.getEntityTypePanel("Customer").should("be.visible"));
107+
cy.waitForAsyncRequest();
108+
curatePage.getEntityTypePanel("Customer").should("be.visible");
108109
curatePage.toggleEntityTypeId("Order");
109-
cy.waitUntil(() => curatePage.addNewStep("Order").click());
110+
curatePage.addNewStep("Order").click();
110111
createEditMappingDialog.setMappingName(mapStep);
111112
createEditMappingDialog.setMappingDescription("An order mapping with custom interceptors");
112113
createEditMappingDialog.setSourceRadio("Query");
@@ -117,7 +118,7 @@ describe("Create and verify load steps, map step and flows with interceptors & c
117118
advancedSettingsDialog.setStepInterceptor("curateTile/orderDateInterceptor");
118119
createEditMappingDialog.saveButton().click({force: true});
119120
cy.waitForAsyncRequest();
120-
cy.waitUntil(() => curatePage.dataPresent().should("exist"));
121+
curatePage.dataPresent().should("exist");
121122
//verify that step details automatically opens after step creation
122123
curatePage.verifyStepDetailsOpen(mapStep);
123124
browsePage.waitForSpinnerToDisappear();
@@ -149,9 +150,9 @@ describe("Create and verify load steps, map step and flows with interceptors & c
149150
mappingStepDetail.setXpathExpressionInput("shipRegion", "ShipRegion");
150151
mappingStepDetail.setXpathExpressionInput("shippedDate", "ShippedDate");
151152
cy.findByTestId("shippedDate-mapexpression").blur();
152-
cy.waitUntil(() => curatePage.dataPresent().should("exist"));
153+
curatePage.dataPresent().should("exist");
153154
// Test the mappings
154-
cy.waitUntil(() => mappingStepDetail.testMap().should("be.enabled"));
155+
mappingStepDetail.testMap().should("be.enabled");
155156
mappingStepDetail.testMap().click({force: true});
156157
mappingStepDetail.validateMapValue("Order", "orderId", "10259");
157158
mappingStepDetail.validateMapValue("Order", "address", "");
@@ -170,9 +171,9 @@ describe("Create and verify load steps, map step and flows with interceptors & c
170171
mappingStepDetail.setEntitySearch("city");
171172
mappingStepDetail.validateMapValue("Order", "city", "Houston");
172173
mappingStepDetail.submitEntitySearch().click();
173-
cy.waitUntil(() => mappingStepDetail.moreLink()).should("be.visible");
174+
mappingStepDetail.moreLink().should("be.visible");
174175
mappingStepDetail.moreLink().click();
175-
cy.waitUntil(() => mappingStepDetail.lessLink()).should("be.visible");
176+
mappingStepDetail.lessLink().should("be.visible");
176177
mappingStepDetail.validateMapValue("Order", "city", "Houston");
177178
mappingStepDetail.validateMapValue("Order", "state", "100 Main Street");
178179
mappingStepDetail.lessLink().click();
@@ -187,7 +188,7 @@ describe("Create and verify load steps, map step and flows with interceptors & c
187188
curatePage.toggleEntityTypeId("Order");
188189
// Open step details and switch to Advanced tab in step settings
189190
curatePage.openStepDetails(mapStep);
190-
cy.waitUntil(() => curatePage.dataPresent().should("exist"));
191+
curatePage.dataPresent().should("exist");
191192
mappingStepDetail.testMap().click({force: true});
192193
mappingStepDetail.validateMapValue("Order", "orderId", "10259");
193194
mappingStepDetail.stepSettingsLink().click();
@@ -201,7 +202,7 @@ describe("Create and verify load steps, map step and flows with interceptors & c
201202
advancedSettingsDialog.saveSettings(mapStep).should("not.exist");
202203

203204
//verify that step details page remains opens when step settings was opened from within the step details page
204-
cy.waitUntil(() => curatePage.dataPresent().should("exist"));
205+
curatePage.dataPresent().should("exist");
205206
curatePage.verifyStepDetailsOpen(mapStep);
206207
cy.wait(2000);
207208
});
@@ -233,7 +234,7 @@ describe("Create and verify load steps, map step and flows with interceptors & c
233234
advancedSettingsDialog.saveSettings(mapStep).click();
234235
advancedSettingsDialog.saveSettings(mapStep).should("not.exist");
235236
//Step source data is present now.
236-
cy.waitUntil(() => curatePage.dataPresent().should("exist"));
237+
curatePage.dataPresent().should("exist");
237238
curatePage.verifyStepDetailsOpen(mapStep);
238239

239240
mappingStepDetail.entitySettingsLink().scrollIntoView().should("be.visible").click({force: true});

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ describe("Mapping", () => {
4949
cy.waitForAsyncRequest();
5050
});
5151
it("Define new entity, add relationship property", {defaultCommandTimeout: 120000}, () => {
52-
cy.waitUntil(() => toolbar.getModelToolbarIcon()).click();
52+
toolbar.getModelToolbarIcon().should("be.visible").click();
5353
modelPage.selectView("table");
5454
entityTypeTable.waitForTableToLoad();
55-
cy.waitUntil(() => modelPage.getAddButton()).click({force: true});
55+
modelPage.getAddButton().should("be.visible").click({force: true});
5656
modelPage.getAddEntityTypeOption().should("be.visible").click({force: true});
5757
entityTypeModal.newEntityName("Relation");
5858
entityTypeModal.getAddButton().click();
@@ -89,18 +89,18 @@ describe("Mapping", () => {
8989
cy.contains("This functionality is not implemented yet.").should("not.exist");
9090
});
9191
it("Create new mapping in Curate", {defaultCommandTimeout: 120000}, () => {
92-
cy.waitUntil(() => toolbar.getCurateToolbarIcon()).click();
93-
cy.waitUntil(() => curatePage.getEntityTypePanel("Person")).should("be.visible");
92+
toolbar.getCurateToolbarIcon().should("be.visible").click();
93+
curatePage.getEntityTypePanel("Person").should("be.visible");
9494
curatePage.getEntityTypePanel("Person").should("exist");
9595
curatePage.toggleEntityTypeId("Person");
96-
cy.waitUntil(() => curatePage.addNewStep("Person")).click();
96+
curatePage.addNewStep("Person").should("be.visible").click();
9797
createEditMappingDialog.setMappingName("mapRelation");
9898
createEditMappingDialog.setSourceRadio("Query");
9999
createEditMappingDialog.setQueryInput(`cts.collectionQuery(['loadPersonJSON'])`);
100100
createEditMappingDialog.saveButton().click({force: true});
101101
curatePage.verifyStepDetailsOpen("mapRelation");
102102
browsePage.waitForSpinnerToDisappear();
103-
cy.waitUntil(() => mappingStepDetail.dataAvailable()).should("be.visible");
103+
mappingStepDetail.dataAvailable().should("be.visible");
104104
mappingStepDetail.entityTitle("Person").should("exist");
105105
});
106106
it("Verify related entities in mapping details with defaults", {defaultCommandTimeout: 120000}, () => {
@@ -135,7 +135,7 @@ describe("Mapping", () => {
135135
mappingStepDetail.successMessage().should("exist");
136136
mappingStepDetail.successMessage().should("not.exist");
137137
cy.log("**Test expresssions**");
138-
cy.waitUntil(() => mappingStepDetail.testMap()).should("be.enabled");
138+
mappingStepDetail.testMap().should("be.enabled");
139139
mappingStepDetail.testMap().click({force: true});
140140
cy.waitForAsyncRequest();
141141
mappingStepDetail.validateMapValue("Person", "id", "444-44-4440");
@@ -225,7 +225,7 @@ describe("Mapping", () => {
225225
});
226226

227227
it("Create new flow, add mapping to flow, run mapping, verify results", () => {
228-
cy.waitUntil(() => toolbar.getRunToolbarIcon()).click();
228+
toolbar.getRunToolbarIcon().should("be.visible").click();
229229
runPage.createFlowButton().click();
230230
runPage.newFlowModal().should("be.visible");
231231
runPage.setFlowName("relationFlow");
@@ -275,17 +275,17 @@ describe("Mapping", () => {
275275
mappingStepDetail.getValidationError("Person").should("exist");
276276
mappingStepDetail.editTargetPermissions("Person", "data-hub-common,read,data-hub-common,update");
277277
mappingStepDetail.getValidationError("Person").should("not.have.text");
278-
cy.waitUntil(() => mappingStepDetail.getSaveSettings("Person")).click({force: true});
278+
mappingStepDetail.getSaveSettings("Person").should("be.visible").click({force: true});
279279

280280
mappingStepDetail.getEntitySettings("Relation").scrollIntoView().click();
281281
mappingStepDetail.editTargetPermissions("Relation", "data-hub-common,read,data-hub-common");
282-
cy.waitUntil(() => mappingStepDetail.getSaveSettings("Relation")).click({force: true});
282+
mappingStepDetail.getSaveSettings("Relation").should("be.visible").click({force: true});
283283
mappingStepDetail.getValidationError("Relation").should("exist");
284284
mappingStepDetail.editTargetPermissions("Relation", "data-hub-common,read");
285-
cy.waitUntil(() => mappingStepDetail.getSaveSettings("Relation")).click({force: true});
285+
mappingStepDetail.getSaveSettings("Relation").should("be.visible").click({force: true});
286286
mappingStepDetail.getValidationError("Relation").should("not.have.text");
287287
mappingStepDetail.editTargetPermissions("Relation", "data-hub-common,read,data-hub-common,update");
288-
cy.waitUntil(() => mappingStepDetail.getSaveSettings("Relation")).click({force: true});
288+
mappingStepDetail.getSaveSettings("Relation").should("be.visible").click({force: true});
289289
browsePage.waitForSpinnerToDisappear();
290290
});
291291
it("Delete related entity from mapping via filter", () => {
@@ -303,7 +303,7 @@ describe("Mapping", () => {
303303
curatePage.openMappingStepDetail("Person", "mapRelation");
304304
curatePage.verifyStepDetailsOpen("mapRelation");
305305
browsePage.waitForSpinnerToDisappear();
306-
cy.waitUntil(() => mappingStepDetail.relatedFilterSelection("Person", "Relation (relatedTo Person)")).should("exist");
306+
mappingStepDetail.relatedFilterSelection("Person", "Relation (relatedTo Person)").should("exist");
307307

308308
// Related entity exists before deletion
309309
cy.log("**Validate related entity exists before deletion**");
@@ -329,7 +329,7 @@ describe("Mapping", () => {
329329
});
330330
it("Reopen step and verify the deleted related entity is no longer there", () => {
331331
mappingStepDetail.goBackToCurateHomePage();
332-
cy.waitUntil(() => curatePage.getEntityTypePanel("Person")).should("be.visible");
332+
curatePage.getEntityTypePanel("Person").should("be.visible");
333333
//curatePage.toggleEntityTypeId("Person");
334334
curatePage.openMappingStepDetail("Person", "mapRelation");
335335
curatePage.verifyStepDetailsOpen("mapRelation");

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ describe("manage queries modal scenarios, developer role", () => {
4040
browsePage.waitForHCTableToLoad();
4141
entitiesSidebar.openBaseEntityDropdown();
4242
entitiesSidebar.selectBaseEntityOption("Customer");
43-
entitiesSidebar.getBaseEntityOption("Customer").should("be.visible");
4443
entitiesSidebar.openBaseEntityFacets("Customer");
4544
browsePage.getFacetItemCheckbox("name", "Adams Cole").click();
4645
browsePage.getSelectedFacets().should("exist");
@@ -99,8 +98,7 @@ describe("manage queries modal scenarios, developer role", () => {
9998
entitiesSidebar.removeSelectedBaseEntity();
10099
entitiesSidebar.openBaseEntityDropdown();
101100
entitiesSidebar.selectBaseEntityOption("Person");
102-
entitiesSidebar.getBaseEntityOption("Person").should("be.visible");
103-
cy.waitUntil(() => browsePage.getDetailInstanceViewIcon("/json/persons/last-name-dob-custom1.json"), {timeout: 10000}).click({force: true});
101+
browsePage.getDetailInstanceViewIcon("/json/persons/last-name-dob-custom1.json").should("be.visible", {timeout: 10000}).click({force: true});
104102
browsePage.waitForSpinnerToDisappear();
105103
});
106104
it("Navigate to detail page and verify if manage query modal opens up.", () => {
@@ -158,10 +156,8 @@ describe("manage queries modal scenarios, developer role", () => {
158156
browsePage.waitForHCTableToLoad();
159157
entitiesSidebar.openBaseEntityDropdown();
160158
entitiesSidebar.selectBaseEntityOption("All Entities");
161-
entitiesSidebar.getBaseEntityOption("All Entities").should("be.visible");
162159
entitiesSidebar.openBaseEntityDropdown();
163160
entitiesSidebar.selectBaseEntityOption("Person");
164-
entitiesSidebar.getBaseEntityOption("Person").should("be.visible");
165161
entitiesSidebar.openBaseEntityFacets("Person");
166162
browsePage.getShowMoreLink("fname").should("be.visible").click();
167163
browsePage.getFacetItemCheckbox("fname", "Alice").click();
@@ -211,7 +207,6 @@ describe("manage queries modal scenarios, developer role", () => {
211207
//create a query first
212208
entitiesSidebar.openBaseEntityDropdown();
213209
entitiesSidebar.selectBaseEntityOption("Person");
214-
entitiesSidebar.getBaseEntityOption("Person").should("be.visible");
215210
entitiesSidebar.openBaseEntityFacets("Person");
216211
browsePage.getShowMoreLink("fname").should("be.visible").click();
217212
browsePage.getFacetItemCheckbox("fname", "Alice").click();
@@ -256,7 +251,6 @@ describe("manage queries modal scenarios, developer role", () => {
256251
entitiesSidebar.toggleEntitiesView();
257252
entitiesSidebar.openBaseEntityDropdown();
258253
entitiesSidebar.selectBaseEntityOption("Person");
259-
entitiesSidebar.getBaseEntityOption("Person").should("be.visible");
260254
//create a query
261255
entitiesSidebar.openBaseEntityFacets("Person");
262256
browsePage.getShowMoreLink("fname").should("be.visible").click();
@@ -278,7 +272,6 @@ describe("manage queries modal scenarios, developer role", () => {
278272
browsePage.getClearAllFacetsButton().click();
279273
entitiesSidebar.openBaseEntityDropdown();
280274
entitiesSidebar.selectBaseEntityOption("Customer");
281-
entitiesSidebar.getBaseEntityOption("Customer").should("be.visible");
282275
cy.get("#instance").first().click({force: true});
283276
cy.waitForAsyncRequest();
284277
browsePage.waitForSpinnerToDisappear();

0 commit comments

Comments
 (0)