Skip to content

Commit c7761f9

Browse files
senumulapallySanjeevani19
authored andcommitted
DHFPROD-9382: Does not correctly work the initial view in curate.
1 parent 161e657 commit c7761f9

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ describe("Mapping", () => {
4242
cy.loginAsDeveloper().withRequest();
4343
cy.deleteSteps("mapping", "mapRelation");
4444
cy.deleteEntities("Relation");
45+
cy.deleteEntities("TestEntity");
4546
cy.deleteFlows("relationFlow");
4647
cy.deleteRecordsInFinal("mapRelation");
4748
cy.resetTestUser();
@@ -69,6 +70,24 @@ describe("Mapping", () => {
6970
cy.publishDataModel();
7071
propertyTable.getForeignIcon("relatedTo").should("exist");
7172
});
73+
it("Create new entity and check if there is no message in curate tile", {defaultCommandTimeout: 120000}, () => {
74+
cy.waitUntil(() => toolbar.getModelToolbarIcon()).click();
75+
modelPage.selectView("table");
76+
entityTypeTable.waitForTableToLoad();
77+
cy.waitUntil(() => modelPage.getAddButton()).click({force: true});
78+
modelPage.getAddEntityTypeOption().should("be.visible").click({force: true});
79+
entityTypeModal.newEntityName("TestEntity");
80+
entityTypeModal.getAddButton().click();
81+
cy.waitForAsyncRequest();
82+
cy.wait(1000);
83+
//Save Changes
84+
cy.publishDataModel();
85+
cy.waitUntil(() => toolbar.getCurateToolbarIcon()).click();
86+
cy.waitUntil(() => curatePage.getEntityTypePanel("TestEntity")).should("be.visible");
87+
curatePage.getEntityTypePanel("TestEntity").should("exist");
88+
curatePage.toggleEntityTypeId("TestEntity");
89+
cy.contains("This functionality is not implemented yet.").should("not.exist");
90+
});
7291
it("Create new mapping in Curate", {defaultCommandTimeout: 120000}, () => {
7392
cy.waitUntil(() => toolbar.getCurateToolbarIcon()).click();
7493
cy.waitUntil(() => curatePage.getEntityTypePanel("Person")).should("be.visible");

marklogic-data-hub-central/ui/src/components/entities/entity-tiles.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ const EntityTiles = (props) => {
9797
}
9898
}
9999

100-
if (dataHubViewSettings && dataHubViewSettings?.activeTabs?.length) {
100+
const entityKeys = Object.keys(props.entityModels);
101+
const activeTab = dataHubViewSettings?.activeTabs.map(stepName => stepName && stepName.split("-").pop());
102+
const filterValues = entityKeys?.filter(key => !activeTab?.includes(key));
103+
104+
if (dataHubViewSettings && dataHubViewSettings?.activeTabs?.length
105+
&& !(filterValues.length && entityKeys.length)) {
101106
setViewData(dataHubViewSettings?.activeTabs);
102107
} else {
103108
let tempView: string[] = [];
@@ -108,6 +113,7 @@ const EntityTiles = (props) => {
108113
}
109114
}, [props, location]);
110115

116+
111117
const updateView = (index, artifactType, entityType) => {
112118
let tempView: string[];
113119
tempView = viewData;
@@ -476,7 +482,7 @@ const EntityTiles = (props) => {
476482
/>
477483
</div>;
478484
} else {
479-
output = <div><br />This functionality implemented yet.</div>;
485+
output = <div><br />This functionality is not implemented yet.</div>;
480486
}
481487
return output;
482488
};

0 commit comments

Comments
 (0)