@truedat/dq 6.12.2 → 6.12.3
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 +4 -4
- package/src/components/__tests__/NewRule.spec.js +5 -2
- package/src/components/ruleImplementationForm/RuleImplementationRawForm.js +1 -1
- package/src/components/ruleImplementationForm/__tests__/RuleImplementationRawForm.spec.js +42 -12
- package/src/components/ruleImplementationForm/__tests__/__snapshots__/RuleImplementationRawForm.spec.js.snap +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dq",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.3",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
94
|
"@apollo/client": "^3.7.1",
|
|
95
|
-
"@truedat/core": "6.12.
|
|
96
|
-
"@truedat/df": "6.12.
|
|
95
|
+
"@truedat/core": "6.12.3",
|
|
96
|
+
"@truedat/df": "6.12.3",
|
|
97
97
|
"decode-uri-component": "^0.2.2",
|
|
98
98
|
"graphql": "^15.5.3",
|
|
99
99
|
"moment": "^2.29.4",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"react-dom": ">= 16.8.6 < 17",
|
|
119
119
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "2a55116634e90fc77f5317f980b7117e7dbdea31"
|
|
122
122
|
}
|
|
@@ -12,8 +12,11 @@ const renderOpts = { fallback: "lazy", state };
|
|
|
12
12
|
describe("<NewRule />", () => {
|
|
13
13
|
it("matches the latest snapshot (with concept)", async () => {
|
|
14
14
|
// falla el snapshot porque viene sin description y falta algún campo
|
|
15
|
-
const { container, queryByText } = render(
|
|
16
|
-
|
|
15
|
+
const { container, queryByText, findByText } = render(
|
|
16
|
+
<NewRule />,
|
|
17
|
+
renderOpts
|
|
18
|
+
);
|
|
19
|
+
await findByText(/No results found./);
|
|
17
20
|
expect(container).toMatchSnapshot();
|
|
18
21
|
});
|
|
19
22
|
});
|
|
@@ -135,7 +135,7 @@ export const RuleImplementationRawForm = ({
|
|
|
135
135
|
)(sources);
|
|
136
136
|
const databaseOptions = _.flow(
|
|
137
137
|
_.find({ id: selectedSourceId }),
|
|
138
|
-
_.path(["config", "databases"]),
|
|
138
|
+
_.path(["config", "databases", "value"]),
|
|
139
139
|
_.sortedUniq,
|
|
140
140
|
_.map((value) => ({ key: value, text: value, value }))
|
|
141
141
|
)(sources);
|
|
@@ -54,18 +54,36 @@ const props = {
|
|
|
54
54
|
sourcesLoading: false,
|
|
55
55
|
sources: [
|
|
56
56
|
{
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
config: {
|
|
58
|
+
alias: {
|
|
59
|
+
origin: "user",
|
|
60
|
+
value: "source1",
|
|
61
|
+
},
|
|
62
|
+
job_types: {
|
|
63
|
+
origin: "user",
|
|
64
|
+
value: ["quality"],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
59
67
|
externalId: "ext_id_1",
|
|
68
|
+
id: "8",
|
|
60
69
|
},
|
|
61
70
|
{
|
|
62
|
-
id: "2",
|
|
63
71
|
config: {
|
|
64
|
-
alias:
|
|
65
|
-
|
|
66
|
-
|
|
72
|
+
alias: {
|
|
73
|
+
origin: "user",
|
|
74
|
+
value: "source2",
|
|
75
|
+
},
|
|
76
|
+
databases: {
|
|
77
|
+
origin: "user",
|
|
78
|
+
value: ["db1", "db2"],
|
|
79
|
+
},
|
|
80
|
+
job_types: {
|
|
81
|
+
origin: "user",
|
|
82
|
+
value: ["quality"],
|
|
83
|
+
},
|
|
67
84
|
},
|
|
68
85
|
externalId: "ext_id_2",
|
|
86
|
+
id: "2",
|
|
69
87
|
},
|
|
70
88
|
{ id: "3", config: {}, externalId: "ext_id_3" },
|
|
71
89
|
],
|
|
@@ -112,7 +130,7 @@ describe("<RuleImplementationRawForm />", () => {
|
|
|
112
130
|
expect(queryByRole("option", { name: "ext_id_1" })).toBeInTheDocument();
|
|
113
131
|
});
|
|
114
132
|
|
|
115
|
-
it("renders databases dropdown if selected source has databases", () => {
|
|
133
|
+
it("renders databases dropdown if selected source has databases", async () => {
|
|
116
134
|
const customProps = {
|
|
117
135
|
...props,
|
|
118
136
|
rawContent: {
|
|
@@ -127,7 +145,10 @@ describe("<RuleImplementationRawForm />", () => {
|
|
|
127
145
|
<RuleImplementationRawForm {...customProps} />,
|
|
128
146
|
renderOpts
|
|
129
147
|
);
|
|
130
|
-
|
|
148
|
+
|
|
149
|
+
await waitFor(() => {
|
|
150
|
+
expect(queryByRole("option", { name: "db1" })).toBeInTheDocument();
|
|
151
|
+
});
|
|
131
152
|
});
|
|
132
153
|
|
|
133
154
|
it("dont renders databases dropdown if selected source doesnt have databases", () => {
|
|
@@ -252,13 +273,22 @@ describe("<RuleImplementationRawForm />", () => {
|
|
|
252
273
|
source_id: "2",
|
|
253
274
|
validations: "",
|
|
254
275
|
source: {
|
|
255
|
-
id: "2",
|
|
256
276
|
config: {
|
|
257
|
-
alias:
|
|
258
|
-
|
|
259
|
-
|
|
277
|
+
alias: {
|
|
278
|
+
origin: "user",
|
|
279
|
+
value: "source2",
|
|
280
|
+
},
|
|
281
|
+
databases: {
|
|
282
|
+
origin: "user",
|
|
283
|
+
value: ["db1", "db2"],
|
|
284
|
+
},
|
|
285
|
+
job_types: {
|
|
286
|
+
origin: "user",
|
|
287
|
+
value: ["quality"],
|
|
288
|
+
},
|
|
260
289
|
},
|
|
261
290
|
externalId: "ext_id_2",
|
|
291
|
+
id: "2",
|
|
262
292
|
},
|
|
263
293
|
});
|
|
264
294
|
});
|
|
@@ -303,7 +303,7 @@ exports[`<RuleImplementationRawForm /> matches the latest snapshot 1`] = `
|
|
|
303
303
|
class="divider text"
|
|
304
304
|
role="alert"
|
|
305
305
|
>
|
|
306
|
-
|
|
306
|
+
Select data source
|
|
307
307
|
</div>
|
|
308
308
|
<i
|
|
309
309
|
aria-hidden="true"
|
|
@@ -314,9 +314,9 @@ exports[`<RuleImplementationRawForm /> matches the latest snapshot 1`] = `
|
|
|
314
314
|
role="listbox"
|
|
315
315
|
>
|
|
316
316
|
<div
|
|
317
|
-
aria-checked="
|
|
317
|
+
aria-checked="false"
|
|
318
318
|
aria-selected="true"
|
|
319
|
-
class="
|
|
319
|
+
class="selected item"
|
|
320
320
|
role="option"
|
|
321
321
|
style="pointer-events: all;"
|
|
322
322
|
>
|