Skip to content

Commit a77e7b9

Browse files
devinnicholsonMarkLogic Builder
authored andcommitted
DHFPROD-7409: HC UI inconsistent load "settings" access
1 parent 62384a1 commit a77e7b9

File tree

7 files changed

+75
-243
lines changed

7 files changed

+75
-243
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ describe("Validate CRUD functionality from list view", () => {
5757
cy.findByText(stepName).should("be.visible");
5858
});
5959
it("Verify Edit", () => {
60-
loadPage.stepName(stepName).click();
60+
loadPage.editStepInCardView(stepName).click();
6161
loadPage.stepNameInput().should("be.disabled");
6262
loadPage.stepDescriptionInput().clear().type("UPDATED");
6363
loadPage.saveButton().click();
6464
cy.waitForAsyncRequest();
6565
cy.findByText("UPDATED").should("be.visible");
6666
});
6767
it("Verify Advanced Settings and Error validations", () => {
68-
loadPage.stepName(stepName).click();
68+
loadPage.editStepInCardView(stepName).click();
6969
loadPage.switchEditAdvanced().click(); // Advanced tab
7070
loadPage.selectTargetDB("FINAL");
7171
loadPage.targetCollectionInput().type("e2eTestCollection{enter}test1{enter}test2{enter}");
@@ -95,29 +95,29 @@ describe("Validate CRUD functionality from list view", () => {
9595
loadPage.confirmationOptions("No").click();
9696
cy.waitUntil(() => loadPage.saveSettings(stepName)).click({force: true});
9797
cy.waitForAsyncRequest();
98-
loadPage.stepName(stepName).should("be.visible");
98+
loadPage.editStepInCardView(stepName).should("be.visible");
9999
});
100100
it("Open settings, change setting, switch tabs, save", () => {
101-
loadPage.stepName(stepName).click();
101+
loadPage.editStepInCardView(stepName).click();
102102
loadPage.stepDescriptionInput().clear().type("UPDATE2");
103103
loadPage.switchEditAdvanced().click();
104104
cy.waitUntil(() => loadPage.saveSettings(stepName)).click({force: true});
105105
cy.waitForAsyncRequest();
106106
});
107107
it("Verify that change was saved", () => {
108-
loadPage.stepName(stepName).click();
108+
loadPage.editStepInCardView(stepName).click();
109109
loadPage.stepDescription("UPDATE2").should("be.visible");
110110
loadPage.cancelButton().click();
111111
});
112112
it("Open settings, change setting, switch tabs, cancel, discard changes", () => {
113-
loadPage.stepName(stepName).click();
113+
loadPage.editStepInCardView(stepName).click();
114114
loadPage.stepDescriptionInput().clear().type("DISCARD");
115115
loadPage.switchEditAdvanced().click();
116116
cy.findByTestId(`${stepName}-cancel-settings`).click();
117117
cy.findByText("Discard changes?").should("be.visible");
118118
loadPage.confirmationOptions("Yes").click();
119119
// Verify that change was NOT saved.
120-
loadPage.stepName(stepName).click();
120+
loadPage.editStepInCardView(stepName).click();
121121
loadPage.stepDescription("UPDATE2").should("be.visible");
122122
loadPage.stepDescription("DISCARD").should("not.exist");
123123
loadPage.cancelButton().click();
@@ -200,8 +200,8 @@ describe("Validate CRUD functionality from list view", () => {
200200
});
201201
it("Add step to a new flow and Verify Run Load step where step exists in multiple flows", {defaultCommandTimeout: 120000}, () => {
202202
cy.waitUntil(() => toolbar.getLoadToolbarIcon()).click();
203-
loadPage.loadView("table").click();
204-
loadPage.addStepToNewFlowListView(stepName);
203+
loadPage.loadView("th-large").click();
204+
loadPage.addStepToNewFlow(stepName);
205205
cy.waitForAsyncRequest();
206206
cy.findByText("New Flow").should("be.visible");
207207
runPage.setFlowName(flowName2);
@@ -239,10 +239,10 @@ describe("Validate CRUD functionality from list view", () => {
239239
loadPage.deleteStep(stepName).click();
240240
loadPage.confirmationOptions("No").click();
241241
cy.waitForAsyncRequest();
242-
loadPage.stepName(stepName).should("be.visible");
242+
loadPage.editStepInCardView(stepName).should("be.visible");
243243
loadPage.deleteStep(stepName).click();
244244
cy.waitUntil(() => loadPage.confirmationOptions("Yes")).click();
245245
cy.waitForAsyncRequest();
246-
loadPage.stepName(stepName).should("not.exist");
246+
loadPage.editStepInCardView(stepName).should("not.exist");
247247
});
248-
});
248+
});

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ describe("login", () => {
8888
});
8989

9090
toolbar.getModelToolbarIcon().click();
91-
cy.wait(2000);
9291
tiles.getModelTile().should("exist");
9392
modelPage.getAddEntityButton().should("be.disabled");
9493
});
@@ -119,7 +118,7 @@ describe("login", () => {
119118
loadPage.loadView("table").click();
120119
tiles.waitForTableToLoad();
121120
loadPage.addToFlowDisabled(stepName).should("exist");
122-
loadPage.stepName(stepName).click();
121+
loadPage.editStepInCardView(stepName).click();
123122
loadPage.saveButton().should("be.disabled");
124123
loadPage.cancelButton().click();
125124
loadPage.deleteStepDisabled(stepName).should("exist");
@@ -236,4 +235,4 @@ describe("login", () => {
236235
cy.contains("Welcome to MarkLogic Data Hub Central");
237236
});
238237

239-
});
238+
});

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

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ class LoadPage {
22

33
//Load tile list view page objects
44
/**
5-
* @param type - accepts `table` for list-view or `th-large` for card-view
6-
*/
5+
* @param type - accepts `table` for list-view or `th-large` for card-view
6+
*/
77
loadView(type: string) {
88
return cy.get(`[data-icon="${type}"]`);
99
}
1010

1111
/**
12-
* @param type - accepts `list` or `card`
13-
*/
12+
* @param type - accepts `list` or `card`
13+
*/
1414
addNewButton(type: string) {
1515
return cy.findByLabelText(`add-new-${type}`);
1616
}
@@ -44,15 +44,15 @@ class LoadPage {
4444
}
4545

4646
/**
47-
* add to flow icon in load table view
48-
* @param stepName
49-
*/
47+
* add to flow icon in load table view
48+
* @param stepName
49+
*/
5050
addToFlow(stepName: string) {
51-
return cy.findByLabelText(`${stepName}-add-icon`);
51+
return cy.findByLabelText(`${stepName}-run`);
5252
}
5353

5454
addToFlowDisabled(stepName: string) {
55-
return cy.findByLabelText(`${stepName}-disabled-add-icon`);
55+
return cy.findByTestId(`${stepName}-disabled-run`);
5656
}
5757

5858
switchEditAdvanced() {
@@ -114,8 +114,8 @@ class LoadPage {
114114
}
115115

116116
/**
117-
* @param text - a string that matches any button by its label
118-
*/
117+
* @param text - a string that matches any button by its label
118+
*/
119119
findByButtonText(text: string) {
120120
return cy.findByLabelText(text);
121121
}
@@ -168,17 +168,17 @@ class LoadPage {
168168
}
169169

170170
/**
171-
* Clicks on a database option
172-
* @param db - accepts `STAGING` or `FINAL`
173-
*/
171+
* Clicks on a database option
172+
* @param db - accepts `STAGING` or `FINAL`
173+
*/
174174
selectTargetDB(db: string) {
175175
cy.waitUntil(() => cy.findByLabelText("targetDatabase-select")).click();
176176
cy.waitUntil(() => cy.findByTestId(`targetDbOptions-data-hub-${db}`)).click({force: true});
177177
}
178178

179179
/**
180-
* This input field takes multiple values with special character sequences for keyboard events
181-
*/
180+
* This input field takes multiple values with special character sequences for keyboard events
181+
*/
182182
targetCollectionInput() {
183183
return cy.findByLabelText("additionalColl-select");
184184
}
@@ -188,19 +188,19 @@ class LoadPage {
188188
}
189189

190190
/**
191-
* Overwrite the existing default permissions
192-
* @param permissions - accepts a comma separated text of roles and capabilities alternately
193-
* @example role1,cap1,role2,cap2
194-
*/
191+
* Overwrite the existing default permissions
192+
* @param permissions - accepts a comma separated text of roles and capabilities alternately
193+
* @example role1,cap1,role2,cap2
194+
*/
195195
setTargetPermissions(permissions: string) {
196196
return cy.get("#targetPermissions").clear().type(permissions);
197197
}
198198

199199
/**
200-
* Add to the existing default permissions
201-
* @param permissions - accepts a comma separated text of roles and capabilities alternately
202-
* @example role1,cap1,role2,cap2
203-
*/
200+
* Add to the existing default permissions
201+
* @param permissions - accepts a comma separated text of roles and capabilities alternately
202+
* @example role1,cap1,role2,cap2
203+
*/
204204
appendTargetPermissions(permissions: string) {
205205
return cy.get("#targetPermissions").type(`,${permissions}`);
206206
}
@@ -215,21 +215,21 @@ class LoadPage {
215215
}
216216

217217
/**
218-
* Textarea that takes a file path in fixtures and pastes the json object {} in the text area
219-
* @param fixturePath - file path to headerContent json config file
220-
* @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
221-
*/
218+
* Textarea that takes a file path in fixtures and pastes the json object {} in the text area
219+
* @param fixturePath - file path to headerContent json config file
220+
* @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
221+
*/
222222
setHeaderContent(fixturePath: string) {
223223
cy.fixture(fixturePath).then(content => {
224224
cy.get("#headers").clear().type(JSON.stringify(content), {parseSpecialCharSequences: false});
225225
});
226226
}
227227

228228
/**
229-
* Textarea that takes a file path in fixtures and pastes the json array object [] in the text area
230-
* @param fixturePath - file path to stepInterceptor json config file
231-
* @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
232-
*/
229+
* Textarea that takes a file path in fixtures and pastes the json array object [] in the text area
230+
* @param fixturePath - file path to stepInterceptor json config file
231+
* @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
232+
*/
233233
setStepInterceptor(fixturePath: string) {
234234
cy.findByText("Interceptors").click();
235235
if (fixturePath === "") { return cy.get("#interceptors").clear(); } else {
@@ -240,10 +240,10 @@ class LoadPage {
240240
}
241241

242242
/**
243-
* Textarea that takes a file path in fixtures and pastes the json object {} in the text area
244-
* @param fixturePath - file path to customHook json config file
245-
* @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
246-
*/
243+
* Textarea that takes a file path in fixtures and pastes the json object {} in the text area
244+
* @param fixturePath - file path to customHook json config file
245+
* @see https://docs.cypress.io/api/commands/type.html#Key-Combinations
246+
*/
247247
setCustomHook(fixturePath: string) {
248248
cy.findByText("Custom Hook").click();
249249
if (fixturePath === "") { return cy.get("#customHook").clear(); } else {
@@ -296,8 +296,8 @@ class LoadPage {
296296
}
297297

298298
addStepToNewFlowListView(stepName: string) {
299-
cy.findByLabelText(`${stepName}-add-icon`).click();
300-
this.addToNewFlow(stepName).click({force: true});
299+
cy.findByTestId(`${stepName}-run`).click();
300+
this.runInNewFlow(stepName).click({force: true});
301301
cy.waitForAsyncRequest();
302302
}
303303

@@ -314,4 +314,4 @@ class LoadPage {
314314
}
315315

316316
const loadPage = new LoadPage();
317-
export default loadPage;
317+
export default loadPage;

marklogic-data-hub-central/ui/src/components/load/load-list.module.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@
2727
}
2828
}
2929

30+
.editIcon{
31+
font-size: 21px;
32+
color: #5B69AF;
33+
cursor: pointer;
34+
padding-right: 9px;
35+
padding-left: 3px;
36+
&:hover{
37+
color: var(--hoverColor) !important;
38+
}
39+
}
40+
3041
.popover {
3142
color: #FF8C00;
3243
align-items: flex-start;
@@ -79,8 +90,8 @@
7990
.deleteIcon {
8091
color: #B32424;
8192
font-size: 21px;
82-
align-items: flex-start;
8393
cursor: pointer;
94+
margin-bottom: 2px;
8495
padding-bottom: 2px;
8596
&:hover{
8697
color: var(--hoverColor) !important;

0 commit comments

Comments
 (0)