@truedat/bg 7.5.9 → 7.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +41 -70
- package/src/concepts/components/Concept.js +22 -19
- package/src/concepts/components/ConceptActions.js +39 -34
- package/src/concepts/components/ConceptArchive.js +0 -1
- package/src/concepts/components/ConceptArchiveRow.js +3 -4
- package/src/concepts/components/ConceptCompleteness.js +1 -2
- package/src/concepts/components/ConceptConfidentialButton.js +1 -2
- package/src/concepts/components/ConceptCreate.js +1 -1
- package/src/concepts/components/ConceptCrumbs.js +10 -8
- package/src/concepts/components/ConceptDeleteModalBody.js +7 -10
- package/src/concepts/components/ConceptDetails.js +3 -3
- package/src/concepts/components/ConceptEdit.js +5 -5
- package/src/concepts/components/ConceptForm.js +39 -43
- package/src/concepts/components/ConceptHeader.js +0 -1
- package/src/concepts/components/ConceptLinksDropdownSelector.js +1 -2
- package/src/concepts/components/ConceptLoader.js +3 -3
- package/src/concepts/components/ConceptManageDomain.js +2 -1
- package/src/concepts/components/ConceptManageDomainPopup.js +1 -1
- package/src/concepts/components/ConceptRoutes.js +263 -226
- package/src/concepts/components/ConceptRow.js +0 -1
- package/src/concepts/components/ConceptSubscription.js +15 -14
- package/src/concepts/components/ConceptSummary.js +0 -1
- package/src/concepts/components/ConceptTabPane.js +36 -41
- package/src/concepts/components/ConceptTabs.js +1 -4
- package/src/concepts/components/ConceptTaxonomy.js +1 -3
- package/src/concepts/components/Concepts.js +0 -1
- package/src/concepts/components/ConceptsActions.js +2 -3
- package/src/concepts/components/ConceptsBulkUpdate.js +3 -6
- package/src/concepts/components/ConceptsLabelResults.js +0 -1
- package/src/concepts/components/ConceptsLinkDecorator.js +1 -2
- package/src/concepts/components/ConceptsLinksManagement.js +7 -8
- package/src/concepts/components/ConceptsPagination.js +0 -1
- package/src/concepts/components/ConceptsPanel.js +5 -4
- package/src/concepts/components/ConceptsTable.js +2 -3
- package/src/concepts/components/ConceptsUpdateButton.js +6 -6
- package/src/concepts/components/ConceptsUploadButton.js +0 -1
- package/src/concepts/components/ConceptsUploadEvents.js +0 -2
- package/src/concepts/components/ConceptsUploadEventsTable.js +12 -19
- package/src/concepts/components/DomainConcepts.js +0 -1
- package/src/concepts/components/EventRow.js +0 -1
- package/src/concepts/components/Events.js +3 -4
- package/src/concepts/components/FieldGroupTable.js +1 -2
- package/src/concepts/components/LinkedMessage.js +9 -13
- package/src/concepts/components/SharedToDomains.js +8 -7
- package/src/concepts/components/SharedToDomainsPopup.js +1 -1
- package/src/concepts/components/SharedToForm.js +3 -6
- package/src/concepts/components/__tests__/Concept.spec.js +8 -42
- package/src/concepts/components/__tests__/ConceptActions.spec.js +7 -7
- package/src/concepts/components/__tests__/ConceptArchive.spec.js +5 -5
- package/src/concepts/components/__tests__/ConceptArchiveLoader.spec.js +15 -14
- package/src/concepts/components/__tests__/ConceptArchiveRow.spec.js +0 -1
- package/src/concepts/components/__tests__/ConceptCompleteness.spec.js +0 -1
- package/src/concepts/components/__tests__/ConceptConfidentialButton.spec.js +10 -17
- package/src/concepts/components/__tests__/ConceptContext.spec.js +1 -1
- package/src/concepts/components/__tests__/ConceptCrumbs.spec.js +12 -34
- package/src/concepts/components/__tests__/ConceptDeleteModalBody.spec.js +47 -26
- package/src/concepts/components/__tests__/ConceptDetails.spec.js +1 -9
- package/src/concepts/components/__tests__/ConceptEdit.spec.js +2 -2
- package/src/concepts/components/__tests__/ConceptForm.spec.js +26 -19
- package/src/concepts/components/__tests__/ConceptHeader.spec.js +33 -57
- package/src/concepts/components/__tests__/ConceptLinksManagement.spec.js +27 -34
- package/src/concepts/components/__tests__/ConceptLoader.spec.js +51 -37
- package/src/concepts/components/__tests__/ConceptManageDomain.spec.js +12 -47
- package/src/concepts/components/__tests__/ConceptManageDomainPopup.spec.js +65 -24
- package/src/concepts/components/__tests__/ConceptRow.spec.js +6 -17
- package/src/concepts/components/__tests__/ConceptSubscription.spec.js +9 -9
- package/src/concepts/components/__tests__/ConceptSubscriptionLoader.spec.js +20 -16
- package/src/concepts/components/__tests__/ConceptSummary.spec.js +11 -10
- package/src/concepts/components/__tests__/ConceptTabPane.spec.js +73 -5
- package/src/concepts/components/__tests__/ConceptTabs.spec.js +6 -21
- package/src/concepts/components/__tests__/ConceptTaxonomy.spec.js +16 -12
- package/src/concepts/components/__tests__/Concepts.spec.js +6 -26
- package/src/concepts/components/__tests__/ConceptsActions.spec.js +0 -1
- package/src/concepts/components/__tests__/ConceptsBulkUpdate.spec.js +31 -36
- package/src/concepts/components/__tests__/ConceptsLabelResults.spec.js +4 -5
- package/src/concepts/components/__tests__/ConceptsLinkDecorator.spec.js +3 -4
- package/src/concepts/components/__tests__/ConceptsPanel.spec.js +7 -26
- package/src/concepts/components/__tests__/ConceptsTable.spec.js +34 -60
- package/src/concepts/components/__tests__/ConceptsUpdateButton.spec.js +6 -7
- package/src/concepts/components/__tests__/ConceptsUploadButton.spec.js +25 -13
- package/src/concepts/components/__tests__/ConceptsUploadEventsTable.spec.js +11 -9
- package/src/concepts/components/__tests__/Events.spec.js +10 -10
- package/src/concepts/components/__tests__/SharedToDomains.spec.js +25 -19
- package/src/concepts/components/__tests__/SharedToDomainsPopup.spec.js +48 -36
- package/src/concepts/components/__tests__/SharedToForm.spec.js +24 -32
- package/src/concepts/components/__tests__/__snapshots__/Concept.spec.js.snap +108 -23
- package/src/concepts/components/__tests__/__snapshots__/ConceptActions.spec.js.snap +12 -16
- package/src/concepts/components/__tests__/__snapshots__/ConceptArchive.spec.js.snap +77 -65
- package/src/concepts/components/__tests__/__snapshots__/ConceptArchiveRow.spec.js.snap +2 -4
- package/src/concepts/components/__tests__/__snapshots__/ConceptConfidentialButton.spec.js.snap +11 -31
- package/src/concepts/components/__tests__/__snapshots__/ConceptCrumbs.spec.js.snap +41 -56
- package/src/concepts/components/__tests__/__snapshots__/ConceptDeleteModalBody.spec.js.snap +3 -5
- package/src/concepts/components/__tests__/__snapshots__/ConceptDetails.spec.js.snap +0 -1
- package/src/concepts/components/__tests__/__snapshots__/ConceptEdit.spec.js.snap +1 -12
- package/src/concepts/components/__tests__/__snapshots__/ConceptForm.spec.js.snap +10 -11
- package/src/concepts/components/__tests__/__snapshots__/ConceptHeader.spec.js.snap +2 -2
- package/src/concepts/components/__tests__/__snapshots__/ConceptLinksManagement.spec.js.snap +14 -14
- package/src/concepts/components/__tests__/__snapshots__/ConceptLoader.spec.js.snap +14 -9
- package/src/concepts/components/__tests__/__snapshots__/ConceptManageDomain.spec.js.snap +43 -5
- package/src/concepts/components/__tests__/__snapshots__/ConceptManageDomainPopup.spec.js.snap +10 -163
- package/src/concepts/components/__tests__/__snapshots__/ConceptRow.spec.js.snap +4 -7
- package/src/concepts/components/__tests__/__snapshots__/ConceptSubscription.spec.js.snap +8 -55
- package/src/concepts/components/__tests__/__snapshots__/ConceptSubscriptionLoader.spec.js.snap +1 -1
- package/src/concepts/components/__tests__/__snapshots__/ConceptSummary.spec.js.snap +6 -6
- package/src/concepts/components/__tests__/__snapshots__/ConceptTabPane.spec.js.snap +18 -34
- package/src/concepts/components/__tests__/__snapshots__/ConceptTabs.spec.js.snap +26 -13
- package/src/concepts/components/__tests__/__snapshots__/ConceptTaxonomy.spec.js.snap +63 -53
- package/src/concepts/components/__tests__/__snapshots__/Concepts.spec.js.snap +10 -25
- package/src/concepts/components/__tests__/__snapshots__/ConceptsActions.spec.js.snap +1 -0
- package/src/concepts/components/__tests__/__snapshots__/ConceptsBulkUpdate.spec.js.snap +7 -6
- package/src/concepts/components/__tests__/__snapshots__/ConceptsLabelResults.spec.js.snap +1 -1
- package/src/concepts/components/__tests__/__snapshots__/ConceptsLinkDecorator.spec.js.snap +1 -0
- package/src/concepts/components/__tests__/__snapshots__/ConceptsPanel.spec.js.snap +10 -25
- package/src/concepts/components/__tests__/__snapshots__/ConceptsTable.spec.js.snap +1 -1
- package/src/concepts/components/__tests__/__snapshots__/ConceptsUpdateButton.spec.js.snap +1 -1
- package/src/concepts/components/__tests__/__snapshots__/ConceptsUploadButton.spec.js.snap +9 -74
- package/src/concepts/components/__tests__/__snapshots__/ConceptsUploadEventsTable.spec.js.snap +14 -14
- package/src/concepts/components/__tests__/__snapshots__/Events.spec.js.snap +83 -43
- package/src/concepts/components/__tests__/__snapshots__/SharedToDomains.spec.js.snap +56 -33
- package/src/concepts/components/__tests__/__snapshots__/SharedToDomainsPopup.spec.js.snap +9 -145
- package/src/concepts/components/__tests__/__snapshots__/SharedToForm.spec.js.snap +2 -2
- package/src/concepts/reducers/__tests__/conceptRedirect.spec.js +1 -1
- package/src/concepts/reducers/conceptRedirect.js +4 -6
- package/src/concepts/relations/components/ConceptImplementationLinks.js +5 -4
- package/src/concepts/relations/components/ConceptLinkActions.js +1 -1
- package/src/concepts/relations/components/ConceptLinksActions.js +4 -4
- package/src/concepts/relations/components/ConceptRelationActions.js +3 -4
- package/src/concepts/relations/components/ConceptRelationForm.js +3 -3
- package/src/concepts/relations/components/ConceptRelationRow.js +10 -10
- package/src/concepts/relations/components/ConceptRelations.js +10 -11
- package/src/concepts/relations/components/ConceptRelationsRoutes.js +20 -39
- package/src/concepts/relations/components/ConceptRelationsSummary.js +26 -29
- package/src/concepts/relations/components/ConceptSelector.js +4 -7
- package/src/concepts/relations/components/ConceptStructureLinks.js +2 -2
- package/src/concepts/relations/components/__tests__/ConceptImplementationLinks.spec.js +19 -59
- package/src/concepts/relations/components/__tests__/ConceptLinksActions.spec.js +9 -10
- package/src/concepts/relations/components/__tests__/ConceptRelationActions.spec.js +9 -7
- package/src/concepts/relations/components/__tests__/ConceptRelationForm.spec.js +30 -42
- package/src/concepts/relations/components/__tests__/ConceptRelationRow.spec.js +11 -16
- package/src/concepts/relations/components/__tests__/ConceptRelations.spec.js +11 -14
- package/src/concepts/relations/components/__tests__/ConceptRelationsRoutes.spec.js +108 -8
- package/src/concepts/relations/components/__tests__/ConceptRelationsSummary.spec.js +39 -38
- package/src/concepts/relations/components/__tests__/ConceptSelector.spec.js +24 -36
- package/src/concepts/relations/components/__tests__/ConceptStructureLinks.spec.js +21 -11
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptImplementationLinks.spec.js.snap +131 -28
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptLinksActions.spec.js.snap +4 -3
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationActions.spec.js.snap +10 -26
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationForm.spec.js.snap +15 -19
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationRow.spec.js.snap +36 -33
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelations.spec.js.snap +76 -51
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationsRoutes.spec.js.snap +15 -29
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptRelationsSummary.spec.js.snap +45 -100
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptSelector.spec.js.snap +9 -9
- package/src/concepts/relations/components/__tests__/__snapshots__/ConceptStructureLinks.spec.js.snap +10 -10
- package/src/concepts/relations/sagas/conceptLinkAction.js +2 -2
- package/src/concepts/relations/sagas/linkConcept.js +1 -1
- package/src/concepts/relations/selectors/getBusinessConceptsLinksToImplementationsColumns.js +1 -2
- package/src/concepts/relations/selectors/getConceptLinks.js +1 -2
- package/src/concepts/relations/selectors/getConceptRelations.js +14 -14
- package/src/concepts/sagas/__tests__/saveSharedTo.spec.js +3 -3
- package/src/concepts/sagas/__tests__/setConfidentialConcept.spec.js +5 -5
- package/src/concepts/sagas/conceptAction.js +2 -2
- package/src/concepts/sagas/fetchConceptArchive.js +1 -1
- package/src/concepts/sagas/setConfidentialConcept.js +2 -2
- package/src/concepts/selectors/__tests__/getConceptDomainPath.spec.js +2 -2
- package/src/concepts/selectors/getConceptColumns.js +1 -2
- package/src/concepts/selectors/getConceptTemplate.js +1 -1
- package/src/concepts/selectors/getConceptUploadEventColumns.js +0 -1
- package/src/concepts/selectors/getConceptVersionPath.js +2 -2
- package/src/concepts/selectors/getParsedEvents.js +2 -2
- package/src/concepts/selectors/getTemplateFields.js +3 -3
- package/src/concepts/selectors/getTemplateGroups.js +1 -1
- package/src/hooks/__mocks__/useDomains.js +42 -0
- package/src/hooks/useDomains.js +3 -3
- package/src/taxonomy/components/AddDomainMember.js +3 -4
- package/src/taxonomy/components/Domain.js +19 -23
- package/src/taxonomy/components/DomainActions.js +1 -2
- package/src/taxonomy/components/DomainCards.js +4 -6
- package/src/taxonomy/components/DomainContent.js +42 -87
- package/src/taxonomy/components/DomainCrumbs.js +4 -4
- package/src/taxonomy/components/DomainDetail.js +4 -5
- package/src/taxonomy/components/DomainForm.js +1 -3
- package/src/taxonomy/components/DomainImplementations.js +8 -7
- package/src/taxonomy/components/DomainItem.js +1 -2
- package/src/taxonomy/components/DomainMembers.js +0 -1
- package/src/taxonomy/components/DomainRoutes.js +15 -21
- package/src/taxonomy/components/DomainSearch.js +0 -1
- package/src/taxonomy/components/DomainStructures.js +0 -1
- package/src/taxonomy/components/DomainTabs.js +3 -4
- package/src/taxonomy/components/DomainTaxonomy.js +1 -2
- package/src/taxonomy/components/Domains.js +15 -5
- package/src/taxonomy/components/DomainsActions.js +2 -4
- package/src/taxonomy/components/EditDomain.js +5 -5
- package/src/taxonomy/components/NewDomain.js +4 -4
- package/src/taxonomy/components/__tests__/AddDomainMember.spec.js +6 -5
- package/src/taxonomy/components/__tests__/Domain.spec.js +63 -123
- package/src/taxonomy/components/__tests__/DomainActions.spec.js +0 -1
- package/src/taxonomy/components/__tests__/DomainCards.spec.js +44 -51
- package/src/taxonomy/components/__tests__/DomainContent.spec.js +138 -158
- package/src/taxonomy/components/__tests__/DomainCrumbs.spec.js +14 -19
- package/src/taxonomy/components/__tests__/DomainDetail.spec.js +2 -3
- package/src/taxonomy/components/__tests__/DomainForm.spec.js +44 -60
- package/src/taxonomy/components/__tests__/DomainItem.spec.js +17 -14
- package/src/taxonomy/components/__tests__/DomainMembers.spec.js +9 -13
- package/src/taxonomy/components/__tests__/DomainRoutes.spec.js +54 -0
- package/src/taxonomy/components/__tests__/DomainStructures.spec.js +10 -51
- package/src/taxonomy/components/__tests__/DomainTabs.spec.js +14 -33
- package/src/taxonomy/components/__tests__/DomainTaxonomy.spec.js +17 -16
- package/src/taxonomy/components/__tests__/Domains.spec.js +63 -95
- package/src/taxonomy/components/__tests__/DomainsActions.spec.js +12 -11
- package/src/taxonomy/components/__tests__/EditDomain.spec.js +13 -54
- package/src/taxonomy/components/__tests__/NewDomain.spec.js +17 -61
- package/src/taxonomy/components/__tests__/__snapshots__/AddDomainMember.spec.js.snap +10 -9
- package/src/taxonomy/components/__tests__/__snapshots__/Domain.spec.js.snap +53 -72
- package/src/taxonomy/components/__tests__/__snapshots__/DomainActions.spec.js.snap +2 -1
- package/src/taxonomy/components/__tests__/__snapshots__/DomainCards.spec.js.snap +247 -27
- package/src/taxonomy/components/__tests__/__snapshots__/DomainContent.spec.js.snap +14 -294
- package/src/taxonomy/components/__tests__/__snapshots__/DomainCrumbs.spec.js.snap +6 -2
- package/src/taxonomy/components/__tests__/__snapshots__/DomainDetail.spec.js.snap +5 -4
- package/src/taxonomy/components/__tests__/__snapshots__/DomainForm.spec.js.snap +13 -12
- package/src/taxonomy/components/__tests__/__snapshots__/DomainItem.spec.js.snap +16 -12
- package/src/taxonomy/components/__tests__/__snapshots__/DomainRoutes.spec.js.snap +52 -0
- package/src/taxonomy/components/__tests__/__snapshots__/DomainStructures.spec.js.snap +7 -7
- package/src/taxonomy/components/__tests__/__snapshots__/DomainTabs.spec.js.snap +10 -5
- package/src/taxonomy/components/__tests__/__snapshots__/DomainTaxonomy.spec.js.snap +37 -29
- package/src/taxonomy/components/__tests__/__snapshots__/Domains.spec.js.snap +123 -6
- package/src/taxonomy/components/__tests__/__snapshots__/DomainsActions.spec.js.snap +2 -1
- package/src/taxonomy/components/__tests__/__snapshots__/EditDomain.spec.js.snap +15 -14
- package/src/taxonomy/components/__tests__/__snapshots__/NewDomain.spec.js.snap +31 -28
- package/src/taxonomy/selectors/index.js +0 -1
- package/src/concepts/relations/components/__tests__/ConceptSelector2.spec.js +0 -76
- package/src/concepts/selectors/__tests__/getConceptSubscope.spec.js +0 -37
- package/src/concepts/selectors/__tests__/getSidemenuGlossarySubscopes.spec.js +0 -17
- package/src/concepts/selectors/getConceptStatus.js +0 -1
- package/src/concepts/selectors/getConceptSubscope.js +0 -19
- package/src/concepts/selectors/getSidemenuGlossarySubscopes.js +0 -8
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render } from "@truedat/test/render";
|
|
1
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
2
|
import { waitFor } from "@testing-library/react";
|
|
4
3
|
import SearchContextWrapper from "@truedat/core/components/common/SearchContextWrapper";
|
|
5
4
|
import DomainStructures from "../DomainStructures";
|
|
@@ -29,62 +28,22 @@ jest.mock("@truedat/dd/hooks/useStructures", () => {
|
|
|
29
28
|
}),
|
|
30
29
|
};
|
|
31
30
|
});
|
|
31
|
+
jest.mock("@truedat/core/hooks/useUserFilters");
|
|
32
32
|
|
|
33
33
|
describe("<DomainStructures />", () => {
|
|
34
|
-
const
|
|
35
|
-
messages: {
|
|
36
|
-
en: {
|
|
37
|
-
"search.placeholder": "Search...",
|
|
38
|
-
"structures.loading.header": "Loading structures...",
|
|
39
|
-
"structures.actions.download.tooltip": "Download structures metadata",
|
|
40
|
-
"structures.actions.download.popup":
|
|
41
|
-
"You must search or filter to download structures",
|
|
42
|
-
"structures.actions.editableDownload.tooltip":
|
|
43
|
-
"Download editable structures metadata",
|
|
44
|
-
"structures.props.deleted_at": "Deleted",
|
|
45
|
-
"structures.props.inserted_at": "Inserted",
|
|
46
|
-
"structures.props.description": "Description",
|
|
47
|
-
"structures.props.path": "Path",
|
|
48
|
-
"structures.props.metadata": "Metadata",
|
|
49
|
-
"structures.props.system": "System",
|
|
50
|
-
"structures.props.domain": "Domain",
|
|
51
|
-
"structures.props.group": "Group",
|
|
52
|
-
"structures.props.external_id": "External Id",
|
|
53
|
-
"structures.props.link_to_structure": "Link to structure",
|
|
54
|
-
"structures.props.alias_name": "Alias",
|
|
55
|
-
"structures.props.tech_name": "Technical Name",
|
|
56
|
-
"structures.props.type": "Type",
|
|
57
|
-
"structure.type.undefined.text": "text",
|
|
58
|
-
"structure.updated_at": "updated_at",
|
|
59
|
-
"search.placeholder": "Search...",
|
|
60
|
-
"structure.group": "Group",
|
|
61
|
-
"structure.system": "System",
|
|
62
|
-
"structure.name": "Name",
|
|
63
|
-
"structures.retrieved.results": "Results",
|
|
64
|
-
"structures.loading.header": "Header",
|
|
65
|
-
"structure.relation.relation_type_name": "type",
|
|
66
|
-
"structure.type": "type",
|
|
67
|
-
"structures.not_found.header": "Header",
|
|
68
|
-
"structures.not_found.body":
|
|
69
|
-
"No structures have been found matching these filters.",
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
fallback: "lazy",
|
|
73
|
-
};
|
|
34
|
+
const props = { domain: { id: 1, name: "domain" } };
|
|
74
35
|
|
|
75
36
|
it("matches the latest snapshot", async () => {
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
<SearchContextWrapper>
|
|
79
|
-
<DomainStructures {...props} />
|
|
80
|
-
</SearchContextWrapper>,
|
|
81
|
-
renderOpts
|
|
37
|
+
const rendered = render(
|
|
38
|
+
<SearchContextWrapper><DomainStructures {...props} /></SearchContextWrapper>
|
|
82
39
|
);
|
|
40
|
+
await waitForLoad(rendered);
|
|
83
41
|
await waitFor(() =>
|
|
84
|
-
expect(
|
|
42
|
+
expect(
|
|
43
|
+
rendered.queryByText(/structures.not_found.body/i)
|
|
44
|
+
).toBeInTheDocument()
|
|
85
45
|
);
|
|
86
|
-
await findByText(/No structures have been found matching these filters./);
|
|
87
46
|
|
|
88
|
-
expect(container).toMatchSnapshot();
|
|
47
|
+
expect(rendered.container).toMatchSnapshot();
|
|
89
48
|
});
|
|
90
49
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { render } from "@truedat/test/render";
|
|
3
2
|
import { useAuthorized } from "@truedat/core/hooks";
|
|
4
3
|
import DomainTabs from "../DomainTabs";
|
|
@@ -9,7 +8,7 @@ jest.mock("@truedat/core/hooks", () => ({
|
|
|
9
8
|
|
|
10
9
|
describe("<DomainTabs />", () => {
|
|
11
10
|
const domain = {
|
|
12
|
-
id: 1,
|
|
11
|
+
id: "1",
|
|
13
12
|
name: "Test Domain",
|
|
14
13
|
};
|
|
15
14
|
|
|
@@ -18,37 +17,23 @@ describe("<DomainTabs />", () => {
|
|
|
18
17
|
hiddenTabs: [],
|
|
19
18
|
};
|
|
20
19
|
|
|
21
|
-
const renderOpts = {
|
|
22
|
-
messages: {
|
|
23
|
-
en: {
|
|
24
|
-
"tabs.subdomains": "Subdomains",
|
|
25
|
-
"tabs.concepts": "Concepts",
|
|
26
|
-
"tabs.structures": "Structures",
|
|
27
|
-
"tabs.implementations": "Implementations",
|
|
28
|
-
"tabs.members": "Members",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
20
|
it("matches the latest snapshot", () => {
|
|
34
21
|
const { container } = render(
|
|
35
|
-
<DomainTabs domain={domain} taxonomyConfig={taxonomyConfig}
|
|
36
|
-
renderOpts
|
|
22
|
+
<DomainTabs domain={domain} taxonomyConfig={taxonomyConfig} />
|
|
37
23
|
);
|
|
38
24
|
expect(container).toMatchSnapshot();
|
|
39
25
|
});
|
|
40
26
|
|
|
41
27
|
it("renders all tabs", () => {
|
|
42
28
|
const { getByText } = render(
|
|
43
|
-
<DomainTabs domain={domain} taxonomyConfig={taxonomyConfig}
|
|
44
|
-
renderOpts
|
|
29
|
+
<DomainTabs domain={domain} taxonomyConfig={taxonomyConfig} />
|
|
45
30
|
);
|
|
46
31
|
|
|
47
|
-
expect(getByText("
|
|
48
|
-
expect(getByText("
|
|
49
|
-
expect(getByText("
|
|
50
|
-
expect(getByText("
|
|
51
|
-
expect(getByText("
|
|
32
|
+
expect(getByText("tabs.subdomains")).toBeInTheDocument();
|
|
33
|
+
expect(getByText("tabs.concepts")).toBeInTheDocument();
|
|
34
|
+
expect(getByText("tabs.structures")).toBeInTheDocument();
|
|
35
|
+
expect(getByText("tabs.implementations")).toBeInTheDocument();
|
|
36
|
+
expect(getByText("tabs.members")).toBeInTheDocument();
|
|
52
37
|
});
|
|
53
38
|
|
|
54
39
|
it("hides tabs based on hiddenTabs config", () => {
|
|
@@ -58,8 +43,7 @@ describe("<DomainTabs />", () => {
|
|
|
58
43
|
};
|
|
59
44
|
|
|
60
45
|
const { queryByText } = render(
|
|
61
|
-
<DomainTabs domain={domain} taxonomyConfig={hiddenTabsConfig}
|
|
62
|
-
renderOpts
|
|
46
|
+
<DomainTabs domain={domain} taxonomyConfig={hiddenTabsConfig} />
|
|
63
47
|
);
|
|
64
48
|
|
|
65
49
|
expect(queryByText("Structures")).not.toBeInTheDocument();
|
|
@@ -73,13 +57,12 @@ describe("<DomainTabs />", () => {
|
|
|
73
57
|
};
|
|
74
58
|
|
|
75
59
|
const { container } = render(
|
|
76
|
-
<DomainTabs domain={domain} taxonomyConfig={priorityTabsConfig}
|
|
77
|
-
renderOpts
|
|
60
|
+
<DomainTabs domain={domain} taxonomyConfig={priorityTabsConfig} />
|
|
78
61
|
);
|
|
79
62
|
|
|
80
63
|
const tabs = container.querySelectorAll(".item");
|
|
81
|
-
expect(tabs[0].textContent).toBe("
|
|
82
|
-
expect(tabs[1].textContent).toBe("
|
|
64
|
+
expect(tabs[0].textContent).toBe("tabs.implementations");
|
|
65
|
+
expect(tabs[1].textContent).toBe("tabs.concepts");
|
|
83
66
|
});
|
|
84
67
|
|
|
85
68
|
it("hides 'implementations' tab if dqAuthorized is false", () => {
|
|
@@ -88,8 +71,7 @@ describe("<DomainTabs />", () => {
|
|
|
88
71
|
);
|
|
89
72
|
|
|
90
73
|
const { queryByText } = render(
|
|
91
|
-
<DomainTabs domain={domain} taxonomyConfig={taxonomyConfig}
|
|
92
|
-
renderOpts
|
|
74
|
+
<DomainTabs domain={domain} taxonomyConfig={taxonomyConfig} />
|
|
93
75
|
);
|
|
94
76
|
|
|
95
77
|
expect(queryByText("Implementations")).not.toBeInTheDocument();
|
|
@@ -99,8 +81,7 @@ describe("<DomainTabs />", () => {
|
|
|
99
81
|
useAuthorized.mockImplementation((permission) => permission == "quality");
|
|
100
82
|
|
|
101
83
|
const { queryByText } = render(
|
|
102
|
-
<DomainTabs domain={domain} taxonomyConfig={taxonomyConfig}
|
|
103
|
-
renderOpts
|
|
84
|
+
<DomainTabs domain={domain} taxonomyConfig={taxonomyConfig} />
|
|
104
85
|
);
|
|
105
86
|
|
|
106
87
|
expect(queryByText("Structures")).not.toBeInTheDocument();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
3
|
-
import { shallow } from "enzyme";
|
|
2
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
4
3
|
import { DomainTaxonomy } from "../DomainTaxonomy";
|
|
5
4
|
|
|
6
5
|
describe("<DomainTaxonomy />", () => {
|
|
@@ -8,28 +7,30 @@ describe("<DomainTaxonomy />", () => {
|
|
|
8
7
|
id: 3,
|
|
9
8
|
parents: [
|
|
10
9
|
{ id: 1, name: "foo", external_id: "foo" },
|
|
11
|
-
{ id: 2, name: "bar", external_id: "bar" }
|
|
12
|
-
]
|
|
10
|
+
{ id: 2, name: "bar", external_id: "bar" },
|
|
11
|
+
],
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
it("matches the latest snapshot when we have parents", () => {
|
|
14
|
+
it("matches the latest snapshot when we have parents", async () => {
|
|
16
15
|
const props = { domain };
|
|
17
|
-
const
|
|
18
|
-
|
|
16
|
+
const rendered = render(<DomainTaxonomy {...props} />);
|
|
17
|
+
await waitForLoad(rendered);
|
|
18
|
+
expect(rendered.container).toMatchSnapshot();
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
it("matches the latest snapshot if no parents provided", () => {
|
|
21
|
+
it("matches the latest snapshot if no parents provided", async () => {
|
|
22
22
|
const props = { domain: _.omit(["parents"])(domain) };
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const rendered = render(<DomainTaxonomy {...props} />);
|
|
24
|
+
await waitForLoad(rendered);
|
|
25
|
+
expect(rendered.container).toMatchSnapshot();
|
|
25
26
|
});
|
|
26
27
|
|
|
27
|
-
it("renders parents reversed", () => {
|
|
28
|
+
it("renders parents reversed", async () => {
|
|
28
29
|
const props = { domain };
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
expect(
|
|
32
|
-
expect(
|
|
33
|
-
expect(
|
|
30
|
+
const rendered = render(<DomainTaxonomy {...props} />);
|
|
31
|
+
await waitForLoad(rendered);
|
|
32
|
+
expect(rendered.container.querySelectorAll(".highlighted")).toHaveLength(2);
|
|
33
|
+
expect(rendered.getAllByText(/bar/i)).toHaveLength(1);
|
|
34
|
+
expect(rendered.getAllByText(/foo/i)).toHaveLength(1);
|
|
34
35
|
});
|
|
35
36
|
});
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { waitFor } from "@testing-library/react";
|
|
3
|
-
import { DOMAINS_QUERY } from "@truedat/core/api/queries";
|
|
1
|
+
import { useParams, useNavigate } from "react-router";
|
|
4
2
|
import userEvent from "@testing-library/user-event";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
4
|
+
import { domainsMock } from "@truedat/test/mocks";
|
|
7
5
|
import { useDomains } from "../../../hooks/useDomains";
|
|
8
6
|
import Domains from "../Domains";
|
|
9
7
|
|
|
10
8
|
jest.mock("../../assets/searching.png", () => "mocked-searching.png");
|
|
11
9
|
|
|
12
|
-
jest.mock("react-router
|
|
13
|
-
...jest.requireActual("react-router
|
|
14
|
-
useHistory: jest.fn(),
|
|
10
|
+
jest.mock("react-router", () => ({
|
|
11
|
+
...jest.requireActual("react-router"),
|
|
15
12
|
useParams: jest.fn(() => ({ id: 3 })),
|
|
13
|
+
useNavigate: jest.fn(),
|
|
16
14
|
}));
|
|
17
15
|
|
|
18
|
-
jest.mock("../../../hooks/useDomains"
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
jest.mock("../../../hooks/useDomains");
|
|
17
|
+
|
|
18
|
+
useDomains.mockImplementation(
|
|
19
|
+
jest.fn(() => ({
|
|
21
20
|
data: [
|
|
22
21
|
{
|
|
23
22
|
description: "No tiene padre",
|
|
@@ -107,8 +106,8 @@ jest.mock("../../../hooks/useDomains", () => ({
|
|
|
107
106
|
method: "GET",
|
|
108
107
|
},
|
|
109
108
|
},
|
|
110
|
-
}))
|
|
111
|
-
|
|
109
|
+
}))
|
|
110
|
+
);
|
|
112
111
|
|
|
113
112
|
const domains = [
|
|
114
113
|
{
|
|
@@ -122,66 +121,54 @@ const domains = [
|
|
|
122
121
|
|
|
123
122
|
const variables = {
|
|
124
123
|
action: "viewDomain",
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const domainsMock = {
|
|
128
|
-
request: { query: DOMAINS_QUERY, variables },
|
|
129
|
-
result: { data: { domains: domains } },
|
|
124
|
+
domainActions: undefined,
|
|
125
|
+
ids: undefined,
|
|
130
126
|
};
|
|
131
127
|
|
|
132
128
|
const renderOpts = {
|
|
133
|
-
mocks: [
|
|
134
|
-
|
|
129
|
+
mocks: [
|
|
130
|
+
domainsMock({ action: "viewDomain", fetchPolicy: "no-cache" }, domains),
|
|
131
|
+
domainsMock(variables, domains),
|
|
132
|
+
domainsMock(variables, domains),
|
|
133
|
+
],
|
|
135
134
|
};
|
|
136
135
|
|
|
137
136
|
describe("<Domains />", () => {
|
|
138
137
|
it("matches the latest snapshot", async () => {
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
await waitFor(() =>
|
|
143
|
-
expect(queryByText(/loading/i)).not.toBeInTheDocument()
|
|
144
|
-
);
|
|
145
|
-
expect(container).toMatchSnapshot();
|
|
138
|
+
const rendered = render(<Domains />, renderOpts);
|
|
139
|
+
await waitForLoad(rendered);
|
|
140
|
+
expect(rendered.container).toMatchSnapshot();
|
|
146
141
|
});
|
|
147
142
|
|
|
148
143
|
it("renders the correct number of domain elements", async () => {
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
await waitFor(() =>
|
|
153
|
-
expect(queryByText(/loading/i)).not.toBeInTheDocument()
|
|
154
|
-
);
|
|
155
|
-
const domainElements = getAllByText(/element_/);
|
|
144
|
+
const rendered = render(<Domains />, renderOpts);
|
|
145
|
+
await waitForLoad(rendered);
|
|
146
|
+
const domainElements = rendered.getAllByText(/element_/i);
|
|
156
147
|
expect(domainElements.length).toBe(2);
|
|
157
148
|
});
|
|
158
149
|
|
|
159
150
|
it("renders domain elements with correct names", async () => {
|
|
160
|
-
const
|
|
161
|
-
await
|
|
162
|
-
await waitFor(() =>
|
|
163
|
-
expect(queryByText(/loading/i)).not.toBeInTheDocument()
|
|
164
|
-
);
|
|
151
|
+
const rendered = render(<Domains />, renderOpts);
|
|
152
|
+
await waitForLoad(rendered);
|
|
165
153
|
|
|
166
|
-
expect(getByText(
|
|
167
|
-
expect(getByText(
|
|
154
|
+
expect(rendered.getByText(/element_2/i)).toBeInTheDocument();
|
|
155
|
+
expect(rendered.getByText(/element_3/i)).toBeInTheDocument();
|
|
168
156
|
|
|
169
|
-
expect(queryByText(
|
|
170
|
-
expect(queryByText(
|
|
171
|
-
expect(queryByText(
|
|
172
|
-
expect(queryByText(
|
|
157
|
+
expect(rendered.queryByText(/element_1/i)).not.toBeInTheDocument();
|
|
158
|
+
expect(rendered.queryByText(/element_4/i)).not.toBeInTheDocument();
|
|
159
|
+
expect(rendered.queryByText(/element_5/i)).not.toBeInTheDocument();
|
|
160
|
+
expect(rendered.queryByText(/element_6/i)).not.toBeInTheDocument();
|
|
173
161
|
});
|
|
174
162
|
|
|
175
163
|
it("redirects to domains list if domainId is invalid", async () => {
|
|
176
164
|
const mockHistoryPush = jest.fn();
|
|
177
|
-
|
|
165
|
+
useNavigate.mockImplementationOnce(() => mockHistoryPush);
|
|
178
166
|
useParams.mockImplementationOnce(() => ({ id: 999 }));
|
|
179
167
|
|
|
180
|
-
render(<Domains />, renderOpts);
|
|
168
|
+
const rendered = render(<Domains />, renderOpts);
|
|
169
|
+
await waitForLoad(rendered);
|
|
181
170
|
|
|
182
|
-
|
|
183
|
-
expect(mockHistoryPush).toHaveBeenCalledWith("/domains");
|
|
184
|
-
});
|
|
171
|
+
expect(mockHistoryPush).toHaveBeenCalledWith("/domains");
|
|
185
172
|
});
|
|
186
173
|
|
|
187
174
|
it("renders EmptyImage when no domains available", async () => {
|
|
@@ -192,67 +179,48 @@ describe("<Domains />", () => {
|
|
|
192
179
|
loading: false,
|
|
193
180
|
}));
|
|
194
181
|
const mockHistoryPush = jest.fn();
|
|
195
|
-
|
|
182
|
+
useNavigate.mockImplementationOnce(() => mockHistoryPush);
|
|
196
183
|
|
|
197
|
-
const
|
|
184
|
+
const rendered = render(<Domains />, renderOpts);
|
|
185
|
+
await waitForLoad(rendered);
|
|
198
186
|
|
|
199
|
-
|
|
200
|
-
expect(
|
|
201
|
-
queryByText(
|
|
202
|
-
"Please, select a domain on the left pane to see the detail."
|
|
203
|
-
)
|
|
204
|
-
).toBeInTheDocument();
|
|
205
|
-
});
|
|
187
|
+
expect(rendered.getByText(/domains.general.message/i)).toBeInTheDocument();
|
|
206
188
|
});
|
|
207
189
|
|
|
208
190
|
it("handles grid control buttons correctly", async () => {
|
|
209
|
-
const {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
);
|
|
213
|
-
|
|
214
|
-
await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
|
|
215
|
-
await waitFor(() =>
|
|
216
|
-
expect(queryByText(/loading/i)).not.toBeInTheDocument()
|
|
217
|
-
);
|
|
191
|
+
const user = userEvent.setup({ delay: null });
|
|
192
|
+
const rendered = render(<Domains />, renderOpts);
|
|
193
|
+
await waitForLoad(rendered);
|
|
218
194
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
).toBeInTheDocument();
|
|
223
|
-
});
|
|
195
|
+
expect(
|
|
196
|
+
rendered.container.querySelector(".taxonomy-domains-breadcrumb")
|
|
197
|
+
).toBeInTheDocument();
|
|
224
198
|
|
|
225
|
-
const hideButton = container.querySelector(
|
|
226
|
-
"button[data-tooltip='
|
|
199
|
+
const hideButton = rendered.container.querySelector(
|
|
200
|
+
"button[data-tooltip='domains.list.hide']"
|
|
227
201
|
);
|
|
228
202
|
|
|
229
|
-
const minimizeButton = container.querySelector(
|
|
203
|
+
const minimizeButton = rendered.container.querySelector(
|
|
230
204
|
"button[data-tooltip='domains.list.minimize']"
|
|
231
205
|
);
|
|
232
206
|
|
|
233
|
-
const maximizeButton = container.querySelector(
|
|
207
|
+
const maximizeButton = rendered.container.querySelector(
|
|
234
208
|
"button[data-tooltip='domains.list.maximize']"
|
|
235
209
|
);
|
|
236
210
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
).toBeNull();
|
|
242
|
-
});
|
|
211
|
+
await user.click(hideButton);
|
|
212
|
+
expect(
|
|
213
|
+
rendered.container.querySelector(".taxonomy-domains-grid-animation")
|
|
214
|
+
).toBeNull();
|
|
243
215
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
).toBeNull();
|
|
249
|
-
});
|
|
216
|
+
await user.click(minimizeButton);
|
|
217
|
+
expect(
|
|
218
|
+
rendered.container.querySelector(".taxonomy-domains-grid-animation")
|
|
219
|
+
).toBeNull();
|
|
250
220
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
).toBeInTheDocument();
|
|
256
|
-
});
|
|
221
|
+
await user.click(maximizeButton);
|
|
222
|
+
expect(
|
|
223
|
+
rendered.container.querySelector(".taxonomy-domains-grid-animation")
|
|
224
|
+
).toBeInTheDocument();
|
|
257
225
|
});
|
|
258
226
|
});
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render } from "@truedat/test/render";
|
|
1
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
2
|
import { DomainsActions } from "../DomainsActions";
|
|
4
3
|
|
|
5
4
|
describe("<DomainsActions />", () => {
|
|
6
|
-
it("matches the latest snapshot", () => {
|
|
5
|
+
it("matches the latest snapshot", async () => {
|
|
7
6
|
const actions = {
|
|
8
7
|
create: { href: "/api/domains", input: {}, method: "POST" },
|
|
9
8
|
index: { href: "/api/domains", input: {}, method: "GET" },
|
|
10
9
|
};
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
);
|
|
14
|
-
expect(
|
|
15
|
-
expect(getByText("New Domain")).toBeInTheDocument();
|
|
10
|
+
const rendered = render(<DomainsActions actions={actions} />);
|
|
11
|
+
await waitForLoad(rendered);
|
|
12
|
+
expect(rendered.container).toMatchSnapshot();
|
|
13
|
+
expect(rendered.getByText(/domains.actions.create/i)).toBeInTheDocument();
|
|
16
14
|
});
|
|
17
15
|
|
|
18
|
-
it("
|
|
19
|
-
const
|
|
20
|
-
|
|
16
|
+
it("does not show the button if no actions exist", async () => {
|
|
17
|
+
const rendered = render(<DomainsActions />);
|
|
18
|
+
await waitForLoad(rendered);
|
|
19
|
+
expect(
|
|
20
|
+
rendered.queryByText(/domains.actions.create/i)
|
|
21
|
+
).not.toBeInTheDocument();
|
|
21
22
|
});
|
|
22
23
|
});
|
|
@@ -1,65 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { useQuery } from "@apollo/client";
|
|
4
|
-
import { render } from "@truedat/test/render";
|
|
5
|
-
import { useDomainUpdate } from "../../../hooks/useDomains";
|
|
1
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
2
|
+
import { domainsMock } from "@truedat/test/mocks";
|
|
6
3
|
import { EditDomain } from "../EditDomain";
|
|
7
4
|
|
|
8
|
-
jest.mock("
|
|
9
|
-
...jest.requireActual("react-router-dom"),
|
|
10
|
-
useHistory: jest.fn(),
|
|
11
|
-
}));
|
|
12
|
-
|
|
13
|
-
jest.mock("../../../hooks/useDomains", () => ({
|
|
14
|
-
...jest.requireActual("../../../hooks/useDomains"),
|
|
15
|
-
useDomainUpdate: jest.fn(),
|
|
16
|
-
}));
|
|
17
|
-
|
|
18
|
-
jest.mock("@apollo/client", () => ({
|
|
19
|
-
...jest.requireActual("@apollo/client"),
|
|
20
|
-
useQuery: jest.fn(),
|
|
21
|
-
}));
|
|
5
|
+
jest.mock("../../../hooks/useDomains");
|
|
22
6
|
|
|
23
7
|
const renderOpts = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"domain.props.name": "Name",
|
|
31
|
-
"domain.props.name.placeholder": "Name-placeholder",
|
|
32
|
-
"domain.props.external_id": "External_id",
|
|
33
|
-
"domain.props.external_id.placeholder": "External_id-placeholder",
|
|
34
|
-
"domain.props.domain_group": "Domain_group",
|
|
35
|
-
"domain.props.domain_group.placeholder": "Domain_group-placeholder",
|
|
36
|
-
"domain.props.type": "Type",
|
|
37
|
-
"domain.props.type.placeholder": "Type-placeholder",
|
|
38
|
-
"domain.props.description.placeholder": "Description-placeholder",
|
|
39
|
-
"domain.props.description": "Description",
|
|
40
|
-
"form.validation.required": "{prop} is required",
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
fallback: "lazy",
|
|
8
|
+
mocks: [
|
|
9
|
+
domainsMock({
|
|
10
|
+
action: "viewDomain",
|
|
11
|
+
fetchPolicy: "no-cache",
|
|
12
|
+
}),
|
|
13
|
+
],
|
|
44
14
|
};
|
|
45
15
|
|
|
46
16
|
describe("<EditDomain />", () => {
|
|
47
|
-
const mockHistoryPush = jest.fn();
|
|
48
|
-
const mockCreateDomain = jest.fn();
|
|
49
|
-
const mockClientResetStore = jest.fn();
|
|
50
|
-
|
|
51
17
|
const domain = { id: 1, name: "nn", description: "dd" };
|
|
52
18
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
client: { resetStore: mockClientResetStore },
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it("matches the latest snapshot", () => {
|
|
62
|
-
const { container } = render(<EditDomain domain={domain} />, renderOpts);
|
|
63
|
-
expect(container).toMatchSnapshot();
|
|
19
|
+
it("matches the latest snapshot", async () => {
|
|
20
|
+
const rendered = render(<EditDomain domain={domain} />, renderOpts);
|
|
21
|
+
await waitForLoad(rendered);
|
|
22
|
+
expect(rendered.container).toMatchSnapshot();
|
|
64
23
|
});
|
|
65
24
|
});
|