@truedat/qx 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 +45 -64
- package/src/components/QxRoutes.js +38 -19
- package/src/components/__tests__/QxRoutes.spec.js +73 -0
- package/src/components/__tests__/__snapshots__/QxRoutes.spec.js.snap +60 -0
- package/src/components/common/ClauseViewer.js +6 -6
- package/src/components/common/DescriptionInput.js +0 -1
- package/src/components/common/ResourceSelector.js +2 -3
- package/src/components/common/TestFormWrapper.js +2 -13
- package/src/components/common/TypeSelector.js +0 -1
- package/src/components/common/__tests__/DescriptionInput.spec.js +12 -21
- package/src/components/common/__tests__/ResourceSelector.spec.js +42 -87
- package/src/components/common/__tests__/TypeSelector.spec.js +0 -1
- package/src/components/common/__tests__/__snapshots__/ResourceSelector.spec.js.snap +32 -22
- package/src/components/common/expressions/Clauses.js +5 -6
- package/src/components/common/expressions/Condition.js +8 -9
- package/src/components/common/expressions/ConstantSelector.js +2 -2
- package/src/components/common/expressions/Expression.js +2 -2
- package/src/components/common/expressions/FieldSelector.js +2 -2
- package/src/components/common/expressions/FunctionArgs.js +5 -6
- package/src/components/common/expressions/FunctionSelector.js +2 -2
- package/src/components/common/expressions/ParamSelector.js +2 -2
- package/src/components/common/expressions/ShapeSelector.js +7 -16
- package/src/components/common/expressions/__tests__/Clauses.spec.js +10 -9
- package/src/components/common/expressions/__tests__/Condition.spec.js +6 -26
- package/src/components/common/expressions/__tests__/ConstantSelector.spec.js +14 -30
- package/src/components/common/expressions/__tests__/Expression.spec.js +44 -51
- package/src/components/common/expressions/__tests__/FieldSelector.spec.js +2 -7
- package/src/components/common/expressions/__tests__/FunctionArgs.spec.js +18 -44
- package/src/components/common/expressions/__tests__/FunctionSelector.spec.js +19 -27
- package/src/components/common/expressions/__tests__/ParamSelector.spec.js +28 -58
- package/src/components/common/expressions/__tests__/ShapeSelector.spec.js +42 -43
- package/src/components/common/expressions/__tests__/__snapshots__/Condition.spec.js.snap +6 -6
- package/src/components/common/expressions/__tests__/__snapshots__/ConstantSelector.spec.js.snap +6 -7
- package/src/components/common/expressions/__tests__/__snapshots__/Expression.spec.js.snap +20 -20
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +8 -9
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap +670 -8
- package/src/components/common/expressions/__tests__/__snapshots__/ParamSelector.spec.js.snap +5 -5
- package/src/components/common/expressions/__tests__/__snapshots__/ShapeSelector.spec.js.snap +9 -9
- package/src/components/common/expressions/__tests__/useWatchParams.spec.js +1 -4
- package/src/components/common/expressions/constantInputs/AnySelector.js +5 -6
- package/src/components/common/expressions/constantInputs/BooleanSelector.js +2 -2
- package/src/components/common/expressions/constantInputs/DefaultSelector.js +2 -2
- package/src/components/common/expressions/constantInputs/__tests__/AnySelector.spec.js +16 -37
- package/src/components/common/expressions/constantInputs/__tests__/BooleanSelector.spec.js +14 -17
- package/src/components/common/expressions/constantInputs/__tests__/DefaultSelector.spec.js +12 -27
- package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/AnySelector.spec.js.snap +11 -11
- package/src/components/common/expressions/constantInputs/__tests__/__snapshots__/DefaultSelector.spec.js.snap +0 -1
- package/src/components/common/resourceSelectors/DataStructureSelector.js +2 -2
- package/src/components/common/resourceSelectors/DataViewSelector.js +2 -2
- package/src/components/common/resourceSelectors/ReferenceDatasetSelector.js +2 -2
- package/src/components/common/resourceSelectors/__tests__/DataStructureSelector.spec.js +5 -29
- package/src/components/common/resourceSelectors/__tests__/DataViewSelector.spec.js +23 -25
- package/src/components/common/resourceSelectors/__tests__/ReferenceDatasetSelector.spec.js +21 -32
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataStructureSelector.spec.js.snap +3 -4
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataViewSelector.spec.js.snap +1 -1
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/ReferenceDatasetSelector.spec.js.snap +1 -1
- package/src/components/dataViews/DataViewEditor.js +5 -6
- package/src/components/dataViews/DataViewSelect.js +4 -5
- package/src/components/dataViews/DataViews.js +1 -2
- package/src/components/dataViews/Queryable.js +4 -4
- package/src/components/dataViews/Queryables.js +0 -1
- package/src/components/dataViews/__tests__/DataViewEditor.spec.js +36 -111
- package/src/components/dataViews/__tests__/DataViewSelect.spec.js +0 -1
- package/src/components/dataViews/__tests__/DataViews.spec.js +15 -16
- package/src/components/dataViews/__tests__/Queryable.spec.js +0 -1
- package/src/components/dataViews/__tests__/Queryables.spec.js +35 -74
- package/src/components/dataViews/__tests__/__snapshots__/DataViewEditor.spec.js.snap +61 -55
- package/src/components/dataViews/__tests__/__snapshots__/DataViews.spec.js.snap +5 -5
- package/src/components/dataViews/__tests__/__snapshots__/Queryables.spec.js.snap +59 -59
- package/src/components/dataViews/queryableProperties/From.js +4 -4
- package/src/components/dataViews/queryableProperties/GroupBy.js +6 -6
- package/src/components/dataViews/queryableProperties/Join.js +6 -6
- package/src/components/dataViews/queryableProperties/JoinTypeIcon.js +8 -9
- package/src/components/dataViews/queryableProperties/Select.js +4 -5
- package/src/components/dataViews/queryableProperties/SelectField.js +4 -4
- package/src/components/dataViews/queryableProperties/Where.js +4 -4
- package/src/components/dataViews/queryableProperties/__tests__/From.spec.js +0 -1
- package/src/components/dataViews/queryableProperties/__tests__/GroupBy.spec.js +16 -42
- package/src/components/dataViews/queryableProperties/__tests__/Join.spec.js +6 -29
- package/src/components/dataViews/queryableProperties/__tests__/JoinTypeIcon.spec.js +0 -1
- package/src/components/dataViews/queryableProperties/__tests__/Select.spec.js +26 -50
- package/src/components/dataViews/queryableProperties/__tests__/SelectField.spec.js +22 -42
- package/src/components/dataViews/queryableProperties/__tests__/Where.spec.js +6 -17
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/GroupBy.spec.js.snap +309 -9
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Join.spec.js.snap +12 -12
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Select.spec.js.snap +192 -18
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/SelectField.spec.js.snap +6 -8
- package/src/components/dataViews/queryableProperties/__tests__/__snapshots__/Where.spec.js.snap +2 -2
- package/src/components/functions/FunctionEditor.js +3 -5
- package/src/components/functions/FunctionParams.js +2 -3
- package/src/components/functions/Functions.js +3 -4
- package/src/components/functions/__tests__/FunctionEditor.spec.js +61 -57
- package/src/components/functions/__tests__/FunctionParams.spec.js +50 -47
- package/src/components/functions/__tests__/Functions.spec.js +5 -12
- package/src/components/functions/__tests__/__snapshots__/FunctionParams.spec.js.snap +11 -11
- package/src/components/functions/__tests__/__snapshots__/Functions.spec.js.snap +4 -5
- package/src/components/qualityControls/ControlProperties.js +4 -4
- package/src/components/qualityControls/ControlPropertiesView.js +0 -1
- package/src/components/qualityControls/EditQualityControl.js +5 -5
- package/src/components/qualityControls/IconPopup.js +0 -1
- package/src/components/qualityControls/NewDraftQualityControl.js +8 -6
- package/src/components/qualityControls/NewQualityControl.js +5 -6
- package/src/components/qualityControls/QualityBadge.js +29 -30
- package/src/components/qualityControls/QualityControl.js +4 -7
- package/src/components/qualityControls/QualityControlActions.js +7 -7
- package/src/components/qualityControls/QualityControlCrumbs.js +1 -3
- package/src/components/qualityControls/QualityControlEditor.js +5 -11
- package/src/components/qualityControls/QualityControlHeader.js +4 -6
- package/src/components/qualityControls/QualityControlHistory.js +3 -3
- package/src/components/qualityControls/QualityControlManageDomain.js +2 -2
- package/src/components/qualityControls/QualityControlQueryModal.js +1 -1
- package/src/components/qualityControls/QualityControlRoutes.js +27 -54
- package/src/components/qualityControls/QualityControlRow.js +0 -2
- package/src/components/qualityControls/QualityControlScores.js +7 -5
- package/src/components/qualityControls/QualityControlTabs.js +2 -2
- package/src/components/qualityControls/QualityControls.js +10 -8
- package/src/components/qualityControls/QualityControlsLabelResults.js +0 -2
- package/src/components/qualityControls/QualityControlsPagination.js +0 -1
- package/src/components/qualityControls/QualityControlsTable.js +1 -2
- package/src/components/qualityControls/ScoreCriteria.js +4 -4
- package/src/components/qualityControls/ScoreCriteriaView.js +0 -1
- package/src/components/qualityControls/__tests__/ControlProperties.spec.js +10 -15
- package/src/components/qualityControls/__tests__/ControlPropertiesView.spec.js +0 -1
- package/src/components/qualityControls/__tests__/EditQualityControl.spec.js +28 -70
- package/src/components/qualityControls/__tests__/IconPopup.spec.js +10 -11
- package/src/components/qualityControls/__tests__/NewDraftQualityControl.spec.js +33 -70
- package/src/components/qualityControls/__tests__/NewQualityControl.spec.js +81 -113
- package/src/components/qualityControls/__tests__/QualityBadge.spec.js +50 -58
- package/src/components/qualityControls/__tests__/QualityControl.spec.js +19 -31
- package/src/components/qualityControls/__tests__/QualityControlActions.spec.js +49 -46
- package/src/components/qualityControls/__tests__/QualityControlCrumbs.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlEditor.spec.js +68 -107
- package/src/components/qualityControls/__tests__/QualityControlHeader.spec.js +22 -25
- package/src/components/qualityControls/__tests__/QualityControlHistory.spec.js +6 -6
- package/src/components/qualityControls/__tests__/QualityControlManageDomain.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlQueryModal.spec.js +12 -11
- package/src/components/qualityControls/__tests__/QualityControlRow.spec.js +4 -8
- package/src/components/qualityControls/__tests__/QualityControlScores.spec.js +23 -19
- package/src/components/qualityControls/__tests__/QualityControlTabs.spec.js +2 -3
- package/src/components/qualityControls/__tests__/QualityControls.spec.js +69 -53
- package/src/components/qualityControls/__tests__/QualityControlsLabelResults.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlsPagination.spec.js +0 -1
- package/src/components/qualityControls/__tests__/QualityControlsTable.spec.js +2 -3
- package/src/components/qualityControls/__tests__/ScoreCriteria.spec.js +0 -1
- package/src/components/qualityControls/__tests__/ScoreCriteriaView.spec.js +0 -1
- package/src/components/qualityControls/__tests__/__fixtures__/qualityControlHelper.js +1 -1
- package/src/components/qualityControls/__tests__/__snapshots__/EditQualityControl.spec.js.snap +32 -34
- package/src/components/qualityControls/__tests__/__snapshots__/NewDraftQualityControl.spec.js.snap +31 -33
- package/src/components/qualityControls/__tests__/__snapshots__/NewQualityControl.spec.js.snap +17 -19
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControl.spec.js.snap +9 -15
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlActions.spec.js.snap +5 -4
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlCrumbs.spec.js.snap +1 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlEditor.spec.js.snap +0 -3
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlHeader.spec.js.snap +16 -11
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlHistory.spec.js.snap +2 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlRow.spec.js.snap +2 -1
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlScores.spec.js.snap +3 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlTabs.spec.js.snap +3 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControls.spec.js.snap +11 -21
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlsTable.spec.js.snap +2 -0
- package/src/components/qualityControls/controlProperties/Count.js +5 -5
- package/src/components/qualityControls/controlProperties/Ratio.js +6 -8
- package/src/components/qualityControls/controlProperties/__tests__/Count.spec.js +6 -11
- package/src/components/qualityControls/controlProperties/__tests__/Ratio.spec.js +9 -27
- package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/Ratio.spec.js.snap +10 -10
- package/src/components/qualityControls/qualityByControlMode.js +14 -14
- package/src/components/qualityControls/qualityControlScoresColumns.js +1 -2
- package/src/components/qualityControls/scoreCriterias/Deviation.js +2 -2
- package/src/components/qualityControls/scoreCriterias/ErrorCount.js +3 -4
- package/src/components/qualityControls/scoreCriterias/Percentage.js +2 -2
- package/src/components/qualityControls/scoreCriterias/__tests__/Deviation.spec.js +0 -1
- package/src/components/qualityControls/scoreCriterias/__tests__/ErrorCount.spec.js +39 -43
- package/src/components/qualityControls/scoreCriterias/__tests__/Percentage.spec.js +23 -19
- package/src/components/qualityControls/scoreCriterias/__tests__/__snapshots__/ErrorCount.spec.js.snap +4 -7
- package/src/components/scores/MyScoreGroups.js +0 -1
- package/src/components/scores/QualityBar.js +24 -22
- package/src/components/scores/Score.js +4 -5
- package/src/components/scores/ScoreCrumbs.js +3 -5
- package/src/components/scores/ScoreDetails.js +2 -2
- package/src/components/scores/ScoreEvents.js +2 -2
- package/src/components/scores/ScoreGroup.js +5 -4
- package/src/components/scores/ScoreGroupBreadcrumbs.js +1 -2
- package/src/components/scores/ScoreGroupForm.js +2 -4
- package/src/components/scores/ScoreGroupLink.js +1 -2
- package/src/components/scores/ScoreGroupMessage.js +0 -1
- package/src/components/scores/ScoreGroupPopup.js +1 -1
- package/src/components/scores/ScoreGroupsRoutes.js +19 -0
- package/src/components/scores/ScoreGroupsTable.js +15 -48
- package/src/components/scores/ScoreRoutes.js +9 -24
- package/src/components/scores/ScoreStatusDecorator.js +1 -2
- package/src/components/scores/ScoreTabs.js +2 -2
- package/src/components/scores/__tests__/MyScoreGroups.spec.js +0 -1
- package/src/components/scores/__tests__/QualityBar.spec.js +19 -26
- package/src/components/scores/__tests__/Score.spec.js +2 -3
- package/src/components/scores/__tests__/ScoreCrumbs.spec.js +4 -5
- package/src/components/scores/__tests__/ScoreDetails.spec.js +4 -5
- package/src/components/scores/__tests__/ScoreEvents.spec.js +2 -3
- package/src/components/scores/__tests__/ScoreGroup.spec.js +15 -14
- package/src/components/scores/__tests__/ScoreGroupBreadcrumbs.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupForm.spec.js +18 -34
- package/src/components/scores/__tests__/ScoreGroupLink.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupMessage.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreGroupPopup.spec.js +0 -2
- package/src/components/scores/__tests__/ScoreGroupsRoutes.spec.js +32 -0
- package/src/components/scores/__tests__/ScoreGroupsTable.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreStatusDecorator.spec.js +0 -1
- package/src/components/scores/__tests__/ScoreTabs.spec.js +3 -4
- package/src/components/scores/__tests__/__snapshots__/MyScoreGroups.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/Score.spec.js.snap +4 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreCrumbs.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreDetails.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroup.spec.js.snap +39 -10
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupBreadcrumbs.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupForm.spec.js.snap +10 -10
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupLink.spec.js.snap +1 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupsRoutes.spec.js.snap +19 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupsTable.spec.js.snap +2 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreStatusDecorator.spec.js.snap +5 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreTabs.spec.js.snap +4 -0
- package/src/hooks/__tests__/useDataViews.spec.js +1 -1
- package/src/hooks/__tests__/useFunctions.spec.js +5 -5
- package/src/hooks/useDataViews.js +2 -2
- package/src/hooks/useExecutionGroups.js +1 -1
- package/src/hooks/useFunctions.js +4 -4
- package/src/hooks/useQualityControls.js +13 -7
- package/src/hooks/useScoreGroups.js +1 -1
- package/src/hooks/useScores.js +2 -2
- package/src/styles/scores.less +21 -21
- package/src/types.js +1 -4
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { waitFor } from "@testing-library/react";
|
|
3
|
-
import { act } from "react-dom/test-utils";
|
|
4
1
|
import userEvent from "@testing-library/user-event";
|
|
5
|
-
import {
|
|
2
|
+
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
6
4
|
import TestFormWrapper from "@truedat/qx/components/common/TestFormWrapper";
|
|
7
5
|
import DataViewSelector from "../DataViewSelector";
|
|
8
6
|
|
|
9
|
-
const renderOpts = {
|
|
10
|
-
messages: {
|
|
11
|
-
en: {
|
|
12
|
-
"queryables.resource.selector.data_view": "data_view",
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
7
|
+
const renderOpts = {};
|
|
16
8
|
|
|
17
9
|
describe("<DataViewSelector />", () => {
|
|
18
10
|
it("matches the latest snapshot", async () => {
|
|
19
|
-
const
|
|
11
|
+
const rendered = render(
|
|
20
12
|
<TestFormWrapper
|
|
21
13
|
context={{
|
|
22
14
|
sourceId: 10,
|
|
@@ -27,13 +19,12 @@ describe("<DataViewSelector />", () => {
|
|
|
27
19
|
</TestFormWrapper>,
|
|
28
20
|
renderOpts
|
|
29
21
|
);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
expect(container).toMatchSnapshot();
|
|
33
|
-
});
|
|
22
|
+
await waitForLoad(rendered);
|
|
23
|
+
expect(rendered.container).toMatchSnapshot();
|
|
34
24
|
});
|
|
25
|
+
|
|
35
26
|
it("hides current data_view", async () => {
|
|
36
|
-
const
|
|
27
|
+
const rendered = render(
|
|
37
28
|
<TestFormWrapper
|
|
38
29
|
context={{
|
|
39
30
|
sourceId: 10,
|
|
@@ -48,14 +39,16 @@ describe("<DataViewSelector />", () => {
|
|
|
48
39
|
</TestFormWrapper>,
|
|
49
40
|
renderOpts
|
|
50
41
|
);
|
|
42
|
+
await waitForLoad(rendered);
|
|
51
43
|
|
|
52
44
|
await waitFor(() =>
|
|
53
|
-
expect(queryByText(/
|
|
45
|
+
expect(rendered.queryByText(/selecteddataview/i)).not.toBeInTheDocument()
|
|
54
46
|
);
|
|
55
47
|
});
|
|
48
|
+
|
|
56
49
|
it("handles onChange", async () => {
|
|
57
50
|
const onChange = jest.fn();
|
|
58
|
-
const
|
|
51
|
+
const rendered = render(
|
|
59
52
|
<TestFormWrapper
|
|
60
53
|
context={{
|
|
61
54
|
sourceId: 10,
|
|
@@ -84,10 +77,12 @@ describe("<DataViewSelector />", () => {
|
|
|
84
77
|
</TestFormWrapper>,
|
|
85
78
|
renderOpts
|
|
86
79
|
);
|
|
80
|
+
await waitForLoad(rendered);
|
|
87
81
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
const user = userEvent.setup({ delay: null });
|
|
83
|
+
await user.click(
|
|
84
|
+
rendered.getByRole("option", { name: /selecteddataview/i })
|
|
85
|
+
);
|
|
91
86
|
|
|
92
87
|
expect(onChange).toHaveBeenLastCalledWith({
|
|
93
88
|
fields: [
|
|
@@ -116,7 +111,7 @@ describe("<DataViewSelector />", () => {
|
|
|
116
111
|
});
|
|
117
112
|
|
|
118
113
|
it("handles search", async () => {
|
|
119
|
-
const
|
|
114
|
+
const rendered = render(
|
|
120
115
|
<TestFormWrapper
|
|
121
116
|
context={{
|
|
122
117
|
sourceId: 10,
|
|
@@ -130,10 +125,13 @@ describe("<DataViewSelector />", () => {
|
|
|
130
125
|
</TestFormWrapper>,
|
|
131
126
|
renderOpts
|
|
132
127
|
);
|
|
128
|
+
await waitForLoad(rendered);
|
|
129
|
+
|
|
130
|
+
const user = userEvent.setup({ delay: null });
|
|
131
|
+
await user.type(rendered.getByRole("textbox"), "User");
|
|
133
132
|
|
|
134
|
-
userEvent.type(getByRole("textbox"), "User");
|
|
135
133
|
await waitFor(() =>
|
|
136
|
-
expect(queryByText(/
|
|
134
|
+
expect(rendered.queryByText(/selecteddataview/i)).not.toBeInTheDocument()
|
|
137
135
|
);
|
|
138
136
|
});
|
|
139
137
|
});
|
|
@@ -1,40 +1,28 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { waitFor } from "@testing-library/react";
|
|
3
|
-
import { act } from "react-dom/test-utils";
|
|
4
1
|
import userEvent from "@testing-library/user-event";
|
|
5
|
-
import {
|
|
2
|
+
import { waitFor } from "@testing-library/react";
|
|
3
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
6
4
|
import TestFormWrapper from "@truedat/qx/components/common/TestFormWrapper";
|
|
7
5
|
import ReferenceDatasetSelector from "../ReferenceDatasetSelector";
|
|
8
6
|
|
|
9
|
-
const renderOpts = {
|
|
10
|
-
messages: {
|
|
11
|
-
en: {
|
|
12
|
-
"queryables.resource.selector.reference_dataset": "reference_dataset",
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
7
|
describe("<ReferenceDatasetSelector />", () => {
|
|
18
8
|
it("matches the latest snapshot", async () => {
|
|
19
|
-
const
|
|
9
|
+
const rendered = render(
|
|
20
10
|
<TestFormWrapper
|
|
21
11
|
context={{
|
|
22
12
|
referenceDatasets: [{ name: "UserReferenceDataset", id: 1 }],
|
|
23
13
|
}}
|
|
24
14
|
>
|
|
25
15
|
<ReferenceDatasetSelector />
|
|
26
|
-
</TestFormWrapper
|
|
27
|
-
renderOpts
|
|
16
|
+
</TestFormWrapper>
|
|
28
17
|
);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
expect(container).toMatchSnapshot();
|
|
32
|
-
});
|
|
18
|
+
await waitForLoad(rendered);
|
|
19
|
+
expect(rendered.container).toMatchSnapshot();
|
|
33
20
|
});
|
|
34
21
|
|
|
35
22
|
it("handles onChange", async () => {
|
|
23
|
+
const user = userEvent.setup({ delay: null });
|
|
36
24
|
const onChange = jest.fn();
|
|
37
|
-
const
|
|
25
|
+
const rendered = render(
|
|
38
26
|
<TestFormWrapper
|
|
39
27
|
context={{
|
|
40
28
|
referenceDatasets: [
|
|
@@ -48,15 +36,13 @@ describe("<ReferenceDatasetSelector />", () => {
|
|
|
48
36
|
}}
|
|
49
37
|
>
|
|
50
38
|
<ReferenceDatasetSelector onChange={onChange} />
|
|
51
|
-
</TestFormWrapper
|
|
52
|
-
renderOpts
|
|
39
|
+
</TestFormWrapper>
|
|
53
40
|
);
|
|
41
|
+
await waitForLoad(rendered);
|
|
54
42
|
|
|
55
|
-
await
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
);
|
|
59
|
-
});
|
|
43
|
+
await user.click(
|
|
44
|
+
rendered.getByRole("option", { name: /SelectedReferenceDataset/i })
|
|
45
|
+
);
|
|
60
46
|
|
|
61
47
|
expect(onChange).toHaveBeenLastCalledWith({
|
|
62
48
|
fields: [
|
|
@@ -74,7 +60,8 @@ describe("<ReferenceDatasetSelector />", () => {
|
|
|
74
60
|
});
|
|
75
61
|
|
|
76
62
|
it("handles search", async () => {
|
|
77
|
-
const {
|
|
63
|
+
const user = userEvent.setup({ delay: null });
|
|
64
|
+
const rendered = render(
|
|
78
65
|
<TestFormWrapper
|
|
79
66
|
context={{
|
|
80
67
|
referenceDatasets: [
|
|
@@ -84,14 +71,16 @@ describe("<ReferenceDatasetSelector />", () => {
|
|
|
84
71
|
}}
|
|
85
72
|
>
|
|
86
73
|
<ReferenceDatasetSelector />
|
|
87
|
-
</TestFormWrapper
|
|
88
|
-
renderOpts
|
|
74
|
+
</TestFormWrapper>
|
|
89
75
|
);
|
|
76
|
+
await waitForLoad(rendered);
|
|
90
77
|
|
|
91
|
-
|
|
78
|
+
await user.type(rendered.getByRole("textbox"), "User");
|
|
92
79
|
|
|
93
80
|
await waitFor(() =>
|
|
94
|
-
expect(
|
|
81
|
+
expect(
|
|
82
|
+
rendered.queryByText(/SelectedReferenceDataset/i)
|
|
83
|
+
).not.toBeInTheDocument()
|
|
95
84
|
);
|
|
96
85
|
});
|
|
97
86
|
});
|
|
@@ -7,7 +7,6 @@ exports[`<DataStructureSelector /> matches the latest snapshot 1`] = `
|
|
|
7
7
|
aria-hidden="true"
|
|
8
8
|
class="dropdown icon"
|
|
9
9
|
/>
|
|
10
|
-
|
|
11
10
|
</div>
|
|
12
11
|
<div
|
|
13
12
|
class="ui segment"
|
|
@@ -20,7 +19,7 @@ exports[`<DataStructureSelector /> matches the latest snapshot 1`] = `
|
|
|
20
19
|
class="search link icon"
|
|
21
20
|
/>
|
|
22
21
|
<input
|
|
23
|
-
placeholder="search
|
|
22
|
+
placeholder="search.placeholder"
|
|
24
23
|
type="text"
|
|
25
24
|
value=""
|
|
26
25
|
/>
|
|
@@ -85,9 +84,9 @@ exports[`<DataStructureSelector /> matches the latest snapshot 1`] = `
|
|
|
85
84
|
<div
|
|
86
85
|
class="header"
|
|
87
86
|
>
|
|
88
|
-
header
|
|
87
|
+
structures.not_found.header
|
|
89
88
|
</div>
|
|
90
|
-
body
|
|
89
|
+
structures.not_found.body
|
|
91
90
|
</div>
|
|
92
91
|
</div>
|
|
93
92
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { lazy, Fragment, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import {
|
|
@@ -18,8 +18,8 @@ import QxContext from "@truedat/qx/components/QxContext";
|
|
|
18
18
|
import DataViewSelect from "./DataViewSelect";
|
|
19
19
|
import Queryables from "./Queryables";
|
|
20
20
|
|
|
21
|
-
const SourceSelector =
|
|
22
|
-
import("@truedat/cx/sources/components/SourceSelector")
|
|
21
|
+
const SourceSelector = lazy(
|
|
22
|
+
() => import("@truedat/cx/sources/components/SourceSelector")
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
export default function DataViewEditor({
|
|
@@ -108,7 +108,6 @@ export default function DataViewEditor({
|
|
|
108
108
|
render={({ field: { onChange, value } }) => (
|
|
109
109
|
<Form.Field required>
|
|
110
110
|
<label>{formatMessage({ id: "dataViews.form.source" })}</label>
|
|
111
|
-
|
|
112
111
|
<SourceSelector
|
|
113
112
|
disabled={isEditForm}
|
|
114
113
|
value={value + ""}
|
|
@@ -118,10 +117,10 @@ export default function DataViewEditor({
|
|
|
118
117
|
)}
|
|
119
118
|
/>
|
|
120
119
|
{!_.isNil(sourceId) ? (
|
|
121
|
-
<QxContext
|
|
120
|
+
<QxContext value={{ ...context, sourceId }}>
|
|
122
121
|
<Queryables />
|
|
123
122
|
<DataViewSelect />
|
|
124
|
-
</QxContext
|
|
123
|
+
</QxContext>
|
|
125
124
|
) : null}
|
|
126
125
|
<Divider hidden />
|
|
127
126
|
<Container textAlign="right">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { use } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { useFormContext } from "react-hook-form";
|
|
5
5
|
import { Grid, Label, Segment } from "semantic-ui-react";
|
|
@@ -10,7 +10,7 @@ import { reduceQueryableFields } from "./queryableFunctions";
|
|
|
10
10
|
export default function DataViewSelect() {
|
|
11
11
|
const { formatMessage } = useIntl();
|
|
12
12
|
const { watch } = useFormContext();
|
|
13
|
-
const context =
|
|
13
|
+
const context = use(QxContext);
|
|
14
14
|
|
|
15
15
|
const fields = _.flow(
|
|
16
16
|
watch,
|
|
@@ -27,9 +27,8 @@ export default function DataViewSelect() {
|
|
|
27
27
|
{formatMessage({ id: `dataViews.form.select` })}
|
|
28
28
|
</Label>
|
|
29
29
|
</div>
|
|
30
|
-
|
|
31
30
|
<Grid.Row className="vertical-space">
|
|
32
|
-
<QxContext
|
|
31
|
+
<QxContext
|
|
33
32
|
value={{
|
|
34
33
|
...context,
|
|
35
34
|
field: `select.properties`,
|
|
@@ -37,7 +36,7 @@ export default function DataViewSelect() {
|
|
|
37
36
|
}}
|
|
38
37
|
>
|
|
39
38
|
<Select />
|
|
40
|
-
</QxContext
|
|
39
|
+
</QxContext>
|
|
41
40
|
</Grid.Row>
|
|
42
41
|
</Segment>
|
|
43
42
|
</Grid.Column>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import { useIntl, FormattedMessage } from "react-intl";
|
|
4
4
|
import { useQuery } from "@apollo/client";
|
|
5
5
|
import {
|
|
@@ -113,7 +113,6 @@ export default function DataViews() {
|
|
|
113
113
|
</Header.Subheader>
|
|
114
114
|
</Header.Content>
|
|
115
115
|
</Header>
|
|
116
|
-
|
|
117
116
|
<Grid>
|
|
118
117
|
<GridColumn width={4}>
|
|
119
118
|
<Button fluid onClick={setStateNewDataView} disabled={isDirty}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState, use } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { Controller, useFormContext } from "react-hook-form";
|
|
@@ -19,7 +19,7 @@ const queryableComponents = {
|
|
|
19
19
|
export default function Queryable({ index, onDelete }) {
|
|
20
20
|
const { formatMessage } = useIntl();
|
|
21
21
|
const { control, watch } = useFormContext();
|
|
22
|
-
const context =
|
|
22
|
+
const context = use(QxContext);
|
|
23
23
|
const [isShownDelete, setIsShownDelete] = useState();
|
|
24
24
|
const { type } = watch(`queryables[${index}]`);
|
|
25
25
|
|
|
@@ -115,7 +115,7 @@ export default function Queryable({ index, onDelete }) {
|
|
|
115
115
|
/>
|
|
116
116
|
</Grid.Row>
|
|
117
117
|
<Grid.Row className="vertical-space">
|
|
118
|
-
<QxContext
|
|
118
|
+
<QxContext
|
|
119
119
|
value={{
|
|
120
120
|
...context,
|
|
121
121
|
field: `queryables[${index}].properties`,
|
|
@@ -123,7 +123,7 @@ export default function Queryable({ index, onDelete }) {
|
|
|
123
123
|
}}
|
|
124
124
|
>
|
|
125
125
|
{queryableComponents[type]}
|
|
126
|
-
</QxContext
|
|
126
|
+
</QxContext>
|
|
127
127
|
</Grid.Row>
|
|
128
128
|
</Segment>
|
|
129
129
|
</Grid.Column>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import React, { Suspense } from "react";
|
|
2
|
-
import { waitFor } from "@testing-library/react";
|
|
3
|
-
import { act } from "react-dom/test-utils";
|
|
4
1
|
import userEvent from "@testing-library/user-event";
|
|
5
|
-
import {
|
|
2
|
+
import { act, waitFor } from "@testing-library/react";
|
|
3
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
6
4
|
import { SOURCE_OPTIONS_QUERY } from "@truedat/cx/sources/api/queries";
|
|
7
5
|
import { sources } from "@truedat/qx/components/qualityControls/__tests__/__fixtures__/qualityControlHelper";
|
|
8
6
|
import DataViewEditor from "../DataViewEditor";
|
|
@@ -12,60 +10,6 @@ const sourcesMock = {
|
|
|
12
10
|
result: { data: { sources } },
|
|
13
11
|
};
|
|
14
12
|
|
|
15
|
-
const messages = {
|
|
16
|
-
en: {
|
|
17
|
-
"actions.cancel": "cancel",
|
|
18
|
-
"actions.delete": "delete",
|
|
19
|
-
"actions.discard.confirmation.content": "content",
|
|
20
|
-
"actions.discard.confirmation.header": "header",
|
|
21
|
-
"actions.save": "save",
|
|
22
|
-
"confirmation.no": "confirmation_no",
|
|
23
|
-
"confirmation.yes": "confirmation_yes",
|
|
24
|
-
"dataViews.action.delete.content": "content",
|
|
25
|
-
"dataViews.action.delete.header": "header",
|
|
26
|
-
"dataViews.action.new": "new",
|
|
27
|
-
"dataViews.form.error.empty_select": "empty_select",
|
|
28
|
-
"dataViews.form.name": "name",
|
|
29
|
-
"dataViews.form.queryable.alias": "alias",
|
|
30
|
-
"dataViews.form.queryable.from": "from",
|
|
31
|
-
"dataViews.form.queryable.group_by": "group_by",
|
|
32
|
-
"dataViews.form.queryable.join": "join",
|
|
33
|
-
"dataViews.form.queryable.select": "select",
|
|
34
|
-
"dataViews.form.queryable.where": "where",
|
|
35
|
-
"dataViews.form.select": "select",
|
|
36
|
-
"expression.clause.action.addExpression": "addExpression",
|
|
37
|
-
"expression.clause.action.addGroup": "addGroup",
|
|
38
|
-
"expression.condition.customExpression": "customExpression",
|
|
39
|
-
"expression.condition.selectFunction": "selectFunction",
|
|
40
|
-
"expression.form.clause": "clause",
|
|
41
|
-
"form.validation.required": "required",
|
|
42
|
-
"functions.expression.shape.constant": "constant",
|
|
43
|
-
"functions.expression.shape.field": "field",
|
|
44
|
-
"functions.expression.shape.function": "function",
|
|
45
|
-
"functions.form.add_description": "add_description",
|
|
46
|
-
"functions.form.required": "required",
|
|
47
|
-
"group.props.name": "name",
|
|
48
|
-
"queryables.form.resource": "resource",
|
|
49
|
-
"queryables.resource.selector.data_structure": "data_structure",
|
|
50
|
-
"queryables.resource.selector.data_view": "data_view",
|
|
51
|
-
"queryables.resource.type.data_structure": "data_structure",
|
|
52
|
-
"queryables.resource.type.data_view": "data_view",
|
|
53
|
-
"queryables.resource.type.reference_dataset": "reference_dataset",
|
|
54
|
-
"queryables.resource.type": "type",
|
|
55
|
-
"queryables.select.form.add_all_select_fields": "add_all_select_fields",
|
|
56
|
-
"queryables.select.form.add_select_field": "add_select_field",
|
|
57
|
-
"queryables.select.form.alias": "alias",
|
|
58
|
-
"source.search.placeholder": "placeholder",
|
|
59
|
-
"dataViews.form.source": "source",
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const renderOpts = {
|
|
64
|
-
mocks: [sourcesMock],
|
|
65
|
-
messages,
|
|
66
|
-
fallback: "lazy",
|
|
67
|
-
};
|
|
68
|
-
|
|
69
13
|
const defaultProps = {
|
|
70
14
|
selectedDataView: null,
|
|
71
15
|
context: { sourceId: 10 },
|
|
@@ -78,20 +22,13 @@ const defaultProps = {
|
|
|
78
22
|
|
|
79
23
|
describe("<DataViewEditor />", () => {
|
|
80
24
|
it("matches the latest snapshot for empty", async () => {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
renderOpts
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
await waitFor(() => {
|
|
87
|
-
expect(queryByText(/lazy/i)).not.toBeInTheDocument();
|
|
88
|
-
expect(container.querySelector(".loader")).not.toBeInTheDocument();
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
await act(async () => {
|
|
92
|
-
expect(container).toMatchSnapshot();
|
|
25
|
+
const rendered = render(<DataViewEditor {...defaultProps} />, {
|
|
26
|
+
mocks: [sourcesMock],
|
|
93
27
|
});
|
|
28
|
+
await waitForLoad(rendered);
|
|
29
|
+
expect(rendered.container).toMatchSnapshot();
|
|
94
30
|
});
|
|
31
|
+
|
|
95
32
|
it("matches the latest snapshot with content", async () => {
|
|
96
33
|
const props = {
|
|
97
34
|
...defaultProps,
|
|
@@ -146,21 +83,12 @@ describe("<DataViewEditor />", () => {
|
|
|
146
83
|
},
|
|
147
84
|
},
|
|
148
85
|
};
|
|
149
|
-
const { container, queryByText } = render(
|
|
150
|
-
<Suspense fallback={<p>Loading selector</p>}>
|
|
151
|
-
<DataViewEditor {...props} />
|
|
152
|
-
</Suspense>,
|
|
153
|
-
renderOpts
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
await waitFor(() => {
|
|
157
|
-
expect(queryByText(/lazy/i)).not.toBeInTheDocument();
|
|
158
|
-
expect(container.querySelector(".loader")).not.toBeInTheDocument();
|
|
159
|
-
});
|
|
160
86
|
|
|
161
|
-
|
|
162
|
-
|
|
87
|
+
const rendered = render(<DataViewEditor {...props} />, {
|
|
88
|
+
mocks: [sourcesMock],
|
|
163
89
|
});
|
|
90
|
+
await waitForLoad(rendered);
|
|
91
|
+
expect(rendered.container).toMatchSnapshot();
|
|
164
92
|
});
|
|
165
93
|
|
|
166
94
|
it("handles user interaction", async () => {
|
|
@@ -217,48 +145,45 @@ describe("<DataViewEditor />", () => {
|
|
|
217
145
|
],
|
|
218
146
|
},
|
|
219
147
|
};
|
|
220
|
-
const {
|
|
221
|
-
container,
|
|
222
|
-
getAllByRole,
|
|
223
|
-
getByRole,
|
|
224
|
-
getByPlaceholderText,
|
|
225
|
-
queryByText,
|
|
226
|
-
} = render(<DataViewEditor {...props} />, renderOpts);
|
|
227
148
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
expect(container.querySelector(".loader")).not.toBeInTheDocument();
|
|
149
|
+
const rendered = render(<DataViewEditor {...props} />, {
|
|
150
|
+
mocks: [sourcesMock],
|
|
231
151
|
});
|
|
152
|
+
await waitForLoad(rendered);
|
|
153
|
+
|
|
154
|
+
const user = userEvent.setup({ delay: null, skipHover: true });
|
|
232
155
|
|
|
233
156
|
// Insert name
|
|
234
|
-
|
|
157
|
+
await user.type(rendered.getAllByRole("textbox")[0], "data_view_name");
|
|
235
158
|
|
|
236
159
|
// Insert From information
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
await act(async () => {
|
|
244
|
-
userEvent.click(getByRole("button", { name: /add_all_select_fields/i }));
|
|
245
|
-
});
|
|
160
|
+
await user.type(rendered.getByPlaceholderText(/alias/i), "from_alias");
|
|
161
|
+
await user.click(rendered.getByRole("option", { name: /data_view/i }));
|
|
162
|
+
await user.click(
|
|
163
|
+
rendered.getByRole("option", { name: /anotherdataview/i })
|
|
164
|
+
);
|
|
246
165
|
|
|
247
|
-
expect(getByRole("button", { name: /save/i })).
|
|
166
|
+
expect(rendered.getByRole("button", { name: /save/i })).toBeDisabled();
|
|
248
167
|
|
|
249
|
-
|
|
168
|
+
await user.click(
|
|
169
|
+
rendered.getByRole("button", { name: /add_all_select_fields/i })
|
|
170
|
+
);
|
|
250
171
|
|
|
251
|
-
await
|
|
252
|
-
|
|
253
|
-
});
|
|
254
|
-
await act(async () => {
|
|
255
|
-
userEvent.click(getByRole("button", { name: /modal-negative-action/i }));
|
|
172
|
+
await waitFor(() => {
|
|
173
|
+
expect(rendered.getByRole("button", { name: /save/i })).toBeEnabled();
|
|
256
174
|
});
|
|
257
175
|
|
|
176
|
+
expect(rendered.container).toMatchSnapshot();
|
|
177
|
+
|
|
178
|
+
await user.click(rendered.getByRole("button", { name: /cancel/i }));
|
|
179
|
+
await user.click(
|
|
180
|
+
rendered.getByRole("button", { name: /modal-negative-action/i })
|
|
181
|
+
);
|
|
258
182
|
await act(async () => {
|
|
259
|
-
|
|
183
|
+
await user.click(rendered.getByRole("button", { name: /save/i }));
|
|
260
184
|
});
|
|
261
185
|
|
|
186
|
+
await waitForLoad(rendered);
|
|
262
187
|
expect(onSubmit).toHaveBeenCalledWith({
|
|
263
188
|
description: "",
|
|
264
189
|
source_id: 10,
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render } from "@truedat/test/render";
|
|
1
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
2
|
import { REFERENCE_DATASETS_HEADERS_QUERY } from "@truedat/dd/api/queries";
|
|
4
3
|
import DataViews from "../DataViews";
|
|
5
4
|
|
|
5
|
+
jest.mock("@truedat/qx/hooks/useFunctions", () => {
|
|
6
|
+
const originalModule = jest.requireActual("@truedat/qx/hooks/useFunctions");
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
__esModule: true,
|
|
10
|
+
...originalModule,
|
|
11
|
+
useFunctions: jest.fn(() => ({})),
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
|
|
6
15
|
jest.mock("@truedat/qx/hooks/useDataViews", () => {
|
|
7
16
|
const originalModule = jest.requireActual("@truedat/qx/hooks/useDataViews");
|
|
8
17
|
|
|
@@ -49,22 +58,12 @@ const referenceDatasetsMock = {
|
|
|
49
58
|
|
|
50
59
|
const renderOpts = {
|
|
51
60
|
mocks: [referenceDatasetsMock],
|
|
52
|
-
messages: {
|
|
53
|
-
en: {
|
|
54
|
-
"dataViews.action.new": "new",
|
|
55
|
-
"dataViews.empty_list": "empty_list",
|
|
56
|
-
"dataViews.no_selection": "no_selection",
|
|
57
|
-
"dataViews.subheader": "subheader",
|
|
58
|
-
"dataViews.header": "header",
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
fallback: "lazy",
|
|
62
61
|
};
|
|
63
62
|
|
|
64
63
|
describe("<DataViews />", () => {
|
|
65
|
-
it("matches the latest snapshot", () => {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
expect(container).toMatchSnapshot();
|
|
64
|
+
it("matches the latest snapshot", async () => {
|
|
65
|
+
const rendered = render(<DataViews />, renderOpts);
|
|
66
|
+
await waitForLoad(rendered);
|
|
67
|
+
expect(rendered.container).toMatchSnapshot();
|
|
69
68
|
});
|
|
70
69
|
});
|