Skip to content

Commit 30cb97d

Browse files
lucianabc-endavaMarkLogic Builder
authored andcommitted
DHFPROD-8860: Job response modal not opening on Monitor
1 parent f922220 commit 30cb97d

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import "cypress-wait-until";
44
import {toolbar} from "../../support/components/common";
55
import LoginPage from "../../support/pages/login";
66
import browsePage from "../../support/pages/browse";
7+
import runPage from "../../support/pages/run";
78

89
describe("Monitor Tile", () => {
910

@@ -68,6 +69,20 @@ describe("Monitor Tile", () => {
6869
browsePage.getApplyFacetsButton().should("be.disabled");
6970
});
7071

72+
it("Verify job ID link opens status modal", () => {
73+
74+
cy.log("*** open status modal via jobs link ***");
75+
monitorPage.getAllJobIdLink().first().click();
76+
runPage.getFlowStatusModal().should("be.visible");
77+
78+
cy.log("*** verify step result content inside status modal ***");
79+
runPage.getStepSuccess("mapPersonJSON").should("be.visible");
80+
runPage.verifyFlowModalCompleted("testPersonJSON");
81+
cy.log("*** modal can be closed ***");
82+
runPage.closeFlowStatusModal("testPersonJSON");
83+
runPage.getFlowStatusModal().should("not.exist");
84+
});
85+
7186
//TODO: Re-test facets without using ml-tooltip-container
7287

7388
// it("apply multiple facets, deselect them, apply changes, apply multiple, clear them, verify no facets checked", () => {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ class MonitorPage {
1313
getTableRows() {
1414
return cy.get(".hc-table_row");
1515
}
16+
17+
getAllJobIdLink() {
18+
return cy.findAllByTestId("jobId-link");
19+
}
20+
1621
waitForMonitorTableToLoad() {
1722
cy.waitUntil(() => this.getTableRows().should("have.length.gt", 0));
1823
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class RunPage {
1919
return cy.get(`[aria-label=${flowName}-completed]`);
2020
}
2121

22+
getStepSuccess(stepName: string) {
23+
return cy.get(`[data-testid="${stepName}-success"]`);
24+
}
25+
2226
isFlowNotVisible(flowName: string) {
2327
return cy.get(`#${flowName}`).should("not.exist");
2428
}

marklogic-data-hub-central/ui/src/components/job-response/job-response.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const JobResponse: React.FC<Props> = ({jobId, setOpenJobResponse, setUserCanStop
5959
setIsStepRunning(true);
6060
setTimeoutId(setTimeout(() => { retrieveJobDoc(); }, 3000));
6161
} else {
62-
setIsStepRunning(false);
62+
if (setIsStepRunning) setIsStepRunning(false);
6363
}
6464
}
6565
} catch (error) {

marklogic-data-hub-central/ui/src/components/job-results-table-view/job-results-table-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const JobResultsTableView = ({data}) => {
5656
formatter: (jobId) => {
5757
return <>
5858
<HCTooltip text="Click the JOB ID to see the details" id="Click JOB ID to see the details" placement="right">
59-
<a onClick={() => handleOpenJobResponse(jobId)}>{jobId}</a>
59+
<a data-testid={`jobId-link`} onClick={() => handleOpenJobResponse(jobId)}>{jobId}</a>
6060
</HCTooltip>
6161
</>;
6262
}

0 commit comments

Comments
 (0)