@truedat/dq 6.12.0 → 6.12.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dq",
3
- "version": "6.12.0",
3
+ "version": "6.12.2",
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.0",
96
- "@truedat/df": "6.12.0",
95
+ "@truedat/core": "6.12.2",
96
+ "@truedat/df": "6.12.2",
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": "a182d4660919ab242d3150ef4a51641815913a39"
121
+ "gitHead": "e0acd68539a1ed3786de65ab4fa4221455ea90a4"
122
122
  }
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { render } from "@truedat/test/render";
3
- import { screen } from "@testing-library/react";
4
3
  import { EditRule } from "../EditRule";
5
4
 
6
5
  jest.mock("@truedat/bg/concepts/hooks/useConcepts", () => {
@@ -61,10 +60,10 @@ describe("<EditRule />", () => {
61
60
  const props = { rule, updateRule };
62
61
 
63
62
  it("matches the latest snapshot", async () => {
64
- const { findByText } = render(<EditRule {...props} />, {
63
+ const { container, findByText } = render(<EditRule {...props} />, {
65
64
  fallback: "lazy",
66
65
  });
67
66
  await findByText("Edit Quality Rule");
68
- expect(screen.getByRole("form")).toMatchSnapshot();
67
+ expect(container).toMatchSnapshot();
69
68
  });
70
69
  });
@@ -104,14 +104,12 @@ const renderOpts = {
104
104
  describe("<RuleForm />", () => {
105
105
  it("matches the latest snapshot", async () => {
106
106
  const props = { onSubmit: jest.fn() };
107
- const { container, queryByText } = render(
107
+ const { container, findByText, queryByText } = render(
108
108
  <RuleForm {...props} />,
109
109
  renderOpts
110
110
  );
111
111
  await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
112
- await waitFor(() =>
113
- expect(queryByText(/loading/i)).not.toBeInTheDocument()
114
- );
112
+ await findByText(/draft/i);
115
113
  expect(container).toMatchSnapshot();
116
114
  });
117
115
 
@@ -125,6 +123,10 @@ describe("<RuleForm />", () => {
125
123
  await waitFor(() =>
126
124
  expect(queryByText(/loading/i)).not.toBeInTheDocument()
127
125
  );
126
+ await waitFor(() => {
127
+ expect(container.querySelector(".loading")).toBeNull();
128
+ });
129
+
128
130
  expect(container).toMatchSnapshot();
129
131
  });
130
132
 
@@ -1,376 +1,378 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<EditRule /> matches the latest snapshot 1`] = `
4
- <div
5
- class="ui segment ui text container"
6
- role="form"
7
- style=""
8
- >
9
- <h2
10
- class="ui header"
4
+ <div>
5
+ <div
6
+ class="ui segment ui text container"
7
+ role="form"
8
+ style=""
11
9
  >
12
- <i
13
- aria-hidden="true"
14
- class="cube icon"
15
- />
16
- <div
17
- class="content"
18
- >
19
- Edit Quality Rule
20
- </div>
21
- </h2>
22
- <form
23
- class="ui loading form rule-form"
24
- >
25
- <div
26
- class="field rule-form__field-right"
10
+ <h2
11
+ class="ui header"
27
12
  >
13
+ <i
14
+ aria-hidden="true"
15
+ class="cube icon"
16
+ />
28
17
  <div
29
- class="ui checked toggle checkbox"
18
+ class="content"
30
19
  >
31
- <input
32
- checked=""
33
- class="hidden"
34
- name="active"
35
- readonly=""
36
- tabindex="0"
37
- type="radio"
38
- value=""
39
- />
40
- <label>
41
- Active
42
- </label>
20
+ Edit Quality Rule
43
21
  </div>
44
- </div>
45
- <div
46
- class="field"
22
+ </h2>
23
+ <form
24
+ class="ui loading form rule-form"
47
25
  >
48
- <label
49
- class="rule-form-label"
50
- >
51
- Name
52
- <span>
53
- *
54
- </span>
55
- </label>
56
26
  <div
57
- class="field"
27
+ class="field rule-form__field-right"
58
28
  >
59
29
  <div
60
- class="ui input"
30
+ class="ui checked toggle checkbox"
61
31
  >
62
32
  <input
63
- aria-label="Rule name"
64
- autocomplete="off"
65
- name="name"
66
- placeholder="Rule name"
67
- type="text"
68
- value="nn"
33
+ checked=""
34
+ class="hidden"
35
+ name="active"
36
+ readonly=""
37
+ tabindex="0"
38
+ type="radio"
39
+ value=""
69
40
  />
41
+ <label>
42
+ Active
43
+ </label>
70
44
  </div>
71
45
  </div>
72
- </div>
73
- <div
74
- class="field"
75
- >
76
- <label
77
- class="rule-form-label"
46
+ <div
47
+ class="field"
78
48
  >
79
- Description
80
- </label>
81
- <div>
49
+ <label
50
+ class="rule-form-label"
51
+ >
52
+ Name
53
+ <span>
54
+ *
55
+ </span>
56
+ </label>
82
57
  <div
83
- style="border: 1px solid rgba(34, 36, 38, 0.15); border-radius: 0.28571429rem;"
58
+ class="field"
84
59
  >
85
60
  <div
86
- class="ui menu"
61
+ class="ui input"
87
62
  >
88
- <a
89
- class="icon item"
90
- >
91
- <i
92
- aria-hidden="true"
93
- class="bold icon"
94
- />
95
- </a>
96
- <a
97
- class="icon item"
98
- >
99
- <i
100
- aria-hidden="true"
101
- class="italic icon"
102
- />
103
- </a>
104
- <a
105
- class="icon item"
106
- >
107
- <i
108
- aria-hidden="true"
109
- class="underline icon"
110
- />
111
- </a>
112
- <a
113
- class="icon item"
114
- >
115
- <i
116
- aria-hidden="true"
117
- class="header icon"
118
- />
119
- </a>
120
- <a
121
- class="icon item"
122
- >
123
- <i
124
- aria-hidden="true"
125
- class="h icon"
126
- />
127
- </a>
128
- <a
129
- class="icon item"
130
- >
131
- <i
132
- aria-hidden="true"
133
- class="list ol icon"
134
- />
135
- </a>
136
- <a
137
- class="icon item"
138
- >
139
- <i
140
- aria-hidden="true"
141
- class="list ul icon"
142
- />
143
- </a>
144
- <a
145
- class="icon item"
146
- >
147
- <i
148
- aria-hidden="true"
149
- class="linkify icon"
150
- />
151
- </a>
63
+ <input
64
+ aria-label="Rule name"
65
+ autocomplete="off"
66
+ name="name"
67
+ placeholder="Rule name"
68
+ type="text"
69
+ value="nn"
70
+ />
152
71
  </div>
72
+ </div>
73
+ </div>
74
+ <div
75
+ class="field"
76
+ >
77
+ <label
78
+ class="rule-form-label"
79
+ >
80
+ Description
81
+ </label>
82
+ <div>
153
83
  <div
154
- style="padding: 10px;"
84
+ style="border: 1px solid rgba(34, 36, 38, 0.15); border-radius: 0.28571429rem;"
155
85
  >
156
86
  <div
157
- autocorrect="on"
158
- contenteditable="true"
159
- data-gramm="false"
160
- data-key="7"
161
- data-slate-editor="true"
162
- role="textbox"
163
- spellcheck="true"
164
- style="outline: none; white-space: pre-wrap; word-wrap: break-word;"
87
+ class="ui menu"
88
+ >
89
+ <a
90
+ class="icon item"
91
+ >
92
+ <i
93
+ aria-hidden="true"
94
+ class="bold icon"
95
+ />
96
+ </a>
97
+ <a
98
+ class="icon item"
99
+ >
100
+ <i
101
+ aria-hidden="true"
102
+ class="italic icon"
103
+ />
104
+ </a>
105
+ <a
106
+ class="icon item"
107
+ >
108
+ <i
109
+ aria-hidden="true"
110
+ class="underline icon"
111
+ />
112
+ </a>
113
+ <a
114
+ class="icon item"
115
+ >
116
+ <i
117
+ aria-hidden="true"
118
+ class="header icon"
119
+ />
120
+ </a>
121
+ <a
122
+ class="icon item"
123
+ >
124
+ <i
125
+ aria-hidden="true"
126
+ class="h icon"
127
+ />
128
+ </a>
129
+ <a
130
+ class="icon item"
131
+ >
132
+ <i
133
+ aria-hidden="true"
134
+ class="list ol icon"
135
+ />
136
+ </a>
137
+ <a
138
+ class="icon item"
139
+ >
140
+ <i
141
+ aria-hidden="true"
142
+ class="list ul icon"
143
+ />
144
+ </a>
145
+ <a
146
+ class="icon item"
147
+ >
148
+ <i
149
+ aria-hidden="true"
150
+ class="linkify icon"
151
+ />
152
+ </a>
153
+ </div>
154
+ <div
155
+ style="padding: 10px;"
165
156
  >
166
157
  <div
167
- data-key="8"
168
- data-slate-object="block"
169
- style="position: relative;"
158
+ autocorrect="on"
159
+ contenteditable="true"
160
+ data-gramm="false"
161
+ data-key="7"
162
+ data-slate-editor="true"
163
+ role="textbox"
164
+ spellcheck="true"
165
+ style="outline: none; white-space: pre-wrap; word-wrap: break-word;"
170
166
  >
171
- <span
172
- data-key="9"
173
- data-slate-object="text"
167
+ <div
168
+ data-key="8"
169
+ data-slate-object="block"
170
+ style="position: relative;"
174
171
  >
175
172
  <span
176
- data-offset-key="9:0"
177
- data-slate-leaf="true"
173
+ data-key="9"
174
+ data-slate-object="text"
178
175
  >
179
176
  <span
180
- data-slate-string="true"
177
+ data-offset-key="9:0"
178
+ data-slate-leaf="true"
181
179
  >
182
- rule description
180
+ <span
181
+ data-slate-string="true"
182
+ >
183
+ rule description
184
+ </span>
183
185
  </span>
184
186
  </span>
185
- </span>
187
+ </div>
186
188
  </div>
187
189
  </div>
188
190
  </div>
189
191
  </div>
190
192
  </div>
191
- </div>
192
- <div
193
- class="field"
194
- >
195
- <label
196
- class="rule-form-label"
197
- >
198
- Domain
199
- <span>
200
- *
201
- </span>
202
- <div
203
- class="ui left pointing label"
204
- >
205
- Required field is empty
206
- </div>
207
- </label>
208
- </div>
209
- <div
210
- class="ui disabled segment"
211
- >
212
193
  <div
213
- class="inline fields"
194
+ class="field"
214
195
  >
215
196
  <label
216
197
  class="rule-form-label"
217
198
  >
218
- Concept
199
+ Domain
200
+ <span>
201
+ *
202
+ </span>
203
+ <div
204
+ class="ui left pointing label"
205
+ >
206
+ Required field is empty
207
+ </div>
219
208
  </label>
220
209
  </div>
221
210
  <div
222
- class="accordion ui"
211
+ class="ui disabled segment"
223
212
  >
224
213
  <div
225
- class="title"
214
+ class="inline fields"
226
215
  >
227
- <i
228
- aria-hidden="true"
229
- class="dropdown icon"
230
- />
231
- Select
216
+ <label
217
+ class="rule-form-label"
218
+ >
219
+ Concept
220
+ </label>
232
221
  </div>
233
222
  <div
234
- class="content"
223
+ class="accordion ui"
235
224
  >
236
225
  <div
237
- class="ui segment"
226
+ class="title"
227
+ >
228
+ <i
229
+ aria-hidden="true"
230
+ class="dropdown icon"
231
+ />
232
+ Select
233
+ </div>
234
+ <div
235
+ class="content"
238
236
  >
239
237
  <div
240
- class="ui action left icon input"
238
+ class="ui segment"
241
239
  >
242
- <i
243
- aria-hidden="true"
244
- class="search link icon"
245
- />
246
- <input
247
- placeholder="Searching"
248
- type="text"
249
- value=""
250
- />
251
240
  <div
252
- aria-busy="false"
253
- aria-disabled="false"
254
- aria-expanded="false"
255
- class="ui button floating labeled scrolling dropdown icon"
256
- role="listbox"
257
- tabindex="0"
241
+ class="ui loading action left icon input"
258
242
  >
259
- <div
260
- aria-atomic="true"
261
- aria-live="polite"
262
- class="divider text"
263
- role="alert"
264
- >
265
- Filters
266
- </div>
267
243
  <i
268
244
  aria-hidden="true"
269
- class="filter icon"
245
+ class="search link icon"
246
+ />
247
+ <input
248
+ placeholder="Searching"
249
+ type="text"
250
+ value=""
270
251
  />
271
252
  <div
272
- class="menu transition"
253
+ aria-busy="true"
254
+ aria-disabled="false"
255
+ aria-expanded="false"
256
+ class="ui loading button floating labeled scrolling dropdown icon"
257
+ role="listbox"
258
+ tabindex="0"
273
259
  >
274
260
  <div
275
- class="item"
276
- role="option"
261
+ aria-atomic="true"
262
+ aria-live="polite"
263
+ class="divider text"
264
+ role="alert"
277
265
  >
278
- <em>
279
- (reset all filters)
280
- </em>
266
+ Filters
267
+ </div>
268
+ <i
269
+ aria-hidden="true"
270
+ class="filter icon"
271
+ />
272
+ <div
273
+ class="menu transition"
274
+ >
275
+ <div
276
+ class="item"
277
+ role="option"
278
+ >
279
+ <em>
280
+ (reset all filters)
281
+ </em>
282
+ </div>
281
283
  </div>
282
284
  </div>
283
285
  </div>
284
- </div>
285
- <div
286
- class="selectedFilters"
287
- />
288
- <div
289
- class="ui message"
290
- >
291
286
  <div
292
- class="content"
287
+ class="selectedFilters"
288
+ />
289
+ <div
290
+ class="ui message"
293
291
  >
294
- No concepts found
292
+ <div
293
+ class="content"
294
+ >
295
+ No concepts found
296
+ </div>
295
297
  </div>
296
298
  </div>
297
299
  </div>
298
300
  </div>
299
301
  </div>
300
- </div>
301
- <div
302
- class="required field"
303
- >
304
- <label>
305
- Template
306
- <div
307
- class="ui left pointing label"
308
- >
309
- Empty required field
310
- </div>
311
- </label>
312
302
  <div
313
- class="field"
303
+ class="required field"
314
304
  >
315
- <div
316
- aria-busy="true"
317
- aria-expanded="false"
318
- class="ui loading search selection dropdown"
319
- name="template"
320
- role="combobox"
321
- >
322
- <input
323
- aria-autocomplete="list"
324
- autocomplete="off"
325
- class="search"
326
- tabindex="0"
327
- type="text"
328
- value=""
329
- />
305
+ <label>
306
+ Template
330
307
  <div
331
- aria-atomic="true"
332
- aria-live="polite"
333
- class="divider default text"
334
- role="alert"
308
+ class="ui left pointing label"
335
309
  >
336
- loading...
310
+ Empty required field
337
311
  </div>
338
- <i
339
- aria-hidden="true"
340
- class="dropdown icon"
341
- />
312
+ </label>
313
+ <div
314
+ class="field"
315
+ >
342
316
  <div
343
- class="menu transition"
344
- role="listbox"
317
+ aria-busy="true"
318
+ aria-expanded="false"
319
+ class="ui loading search selection dropdown"
320
+ name="template"
321
+ role="combobox"
345
322
  >
323
+ <input
324
+ aria-autocomplete="list"
325
+ autocomplete="off"
326
+ class="search"
327
+ tabindex="0"
328
+ type="text"
329
+ value=""
330
+ />
331
+ <div
332
+ aria-atomic="true"
333
+ aria-live="polite"
334
+ class="divider default text"
335
+ role="alert"
336
+ >
337
+ loading...
338
+ </div>
339
+ <i
340
+ aria-hidden="true"
341
+ class="dropdown icon"
342
+ />
346
343
  <div
347
- class="message"
344
+ class="menu transition"
345
+ role="listbox"
348
346
  >
349
- No results found.
347
+ <div
348
+ class="message"
349
+ >
350
+ No results found.
351
+ </div>
350
352
  </div>
351
353
  </div>
352
354
  </div>
353
355
  </div>
354
- </div>
355
- <div
356
- class="actions"
357
- >
358
- <a
359
- class="ui secondary button"
360
- href="/"
361
- role="button"
362
- >
363
- Cancel
364
- </a>
365
- <button
366
- class="ui primary disabled button"
367
- disabled=""
368
- tabindex="-1"
369
- type="submit"
356
+ <div
357
+ class="actions"
370
358
  >
371
- Save
372
- </button>
373
- </div>
374
- </form>
359
+ <a
360
+ class="ui secondary button"
361
+ href="/"
362
+ role="button"
363
+ >
364
+ Cancel
365
+ </a>
366
+ <button
367
+ class="ui primary disabled button"
368
+ disabled=""
369
+ tabindex="-1"
370
+ type="submit"
371
+ >
372
+ Save
373
+ </button>
374
+ </div>
375
+ </form>
376
+ </div>
375
377
  </div>
376
378
  `;