@truedat/qx 8.12.2 → 8.12.5
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 +3 -3
- package/src/components/common/expressions/FunctionSelector.js +2 -2
- package/src/components/common/expressions/__tests__/Condition.spec.js +2 -0
- package/src/components/common/expressions/__tests__/Expression.spec.js +2 -0
- package/src/components/common/expressions/__tests__/ShapeSelector.spec.js +2 -0
- package/src/components/common/expressions/__tests__/__snapshots__/Expression.spec.js.snap +81 -69
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +27 -23
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap +162 -138
- package/src/components/dataViews/__tests__/SimpleDataViewEditor.spec.js +15 -0
- package/src/components/dataViews/queryableProperties/__tests__/Select.spec.js +2 -0
- package/src/components/dataViews/queryableProperties/__tests__/SelectField.spec.js +2 -0
- package/src/components/functions/__tests__/__snapshots__/FunctionEditor.spec.js.snap +81 -69
- package/src/components/qualityControls/__tests__/EditQualityControl.spec.js +7 -1
- package/src/components/qualityControls/__tests__/NewQualityControl.spec.js +19 -15
- package/src/components/qualityControls/__tests__/QualityControl.spec.js +8 -3
- package/src/components/qualityControls/__tests__/QualityControlActions.spec.js +2 -0
- package/src/components/qualityControls/__tests__/QualityControlEditor.spec.js +16 -117
- package/src/components/qualityControls/__tests__/QualityControlEvents.spec.js +18 -4
- package/src/components/qualityControls/__tests__/QualityControls.spec.js +8 -11
- package/src/components/scores/__tests__/ScoreGroupPopup.spec.js +5 -2
- package/src/components/selectors/__tests__/getQualityControlScoresColumns.spec.js +15 -0
- package/src/components/selectors/getQualityControlScoresColumns.js +1 -1
package/src/components/common/expressions/__tests__/__snapshots__/FunctionSelector.spec.js.snap
CHANGED
|
@@ -120,41 +120,45 @@ exports[`<FunctionSelector /> user interaction 1`] = `
|
|
|
120
120
|
style="pointer-events: all;"
|
|
121
121
|
>
|
|
122
122
|
<div
|
|
123
|
-
class="
|
|
123
|
+
class="text"
|
|
124
124
|
>
|
|
125
125
|
<div
|
|
126
|
-
class="
|
|
126
|
+
class="ui header"
|
|
127
127
|
>
|
|
128
|
-
<div>
|
|
129
|
-
eq
|
|
130
|
-
</div>
|
|
131
128
|
<div
|
|
132
|
-
class="
|
|
129
|
+
class="flex-center"
|
|
133
130
|
>
|
|
134
|
-
<div
|
|
135
|
-
|
|
136
|
-
>
|
|
137
|
-
<i
|
|
138
|
-
aria-hidden="true"
|
|
139
|
-
class="question circle outline icon"
|
|
140
|
-
/>
|
|
141
|
-
arg1
|
|
131
|
+
<div>
|
|
132
|
+
eq
|
|
142
133
|
</div>
|
|
143
134
|
<div
|
|
144
|
-
class="
|
|
135
|
+
class="function-params-label"
|
|
145
136
|
>
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
<div
|
|
138
|
+
class="ui grey label"
|
|
139
|
+
>
|
|
140
|
+
<i
|
|
141
|
+
aria-hidden="true"
|
|
142
|
+
class="question circle outline icon"
|
|
143
|
+
/>
|
|
144
|
+
arg1
|
|
145
|
+
</div>
|
|
146
|
+
<div
|
|
147
|
+
class="ui grey label"
|
|
148
|
+
>
|
|
149
|
+
<i
|
|
150
|
+
aria-hidden="true"
|
|
151
|
+
class="question circle outline icon"
|
|
152
|
+
/>
|
|
153
|
+
arg2
|
|
154
|
+
</div>
|
|
151
155
|
</div>
|
|
152
156
|
</div>
|
|
153
157
|
</div>
|
|
158
|
+
<div
|
|
159
|
+
class="sub header"
|
|
160
|
+
/>
|
|
154
161
|
</div>
|
|
155
|
-
<div
|
|
156
|
-
class="sub header"
|
|
157
|
-
/>
|
|
158
162
|
</div>
|
|
159
163
|
</div>
|
|
160
164
|
</div>
|
|
@@ -310,41 +314,45 @@ exports[`<FunctionSelector /> user interaction 1`] = `
|
|
|
310
314
|
style="pointer-events: all;"
|
|
311
315
|
>
|
|
312
316
|
<div
|
|
313
|
-
class="
|
|
317
|
+
class="text"
|
|
314
318
|
>
|
|
315
319
|
<div
|
|
316
|
-
class="
|
|
320
|
+
class="ui header"
|
|
317
321
|
>
|
|
318
|
-
<div>
|
|
319
|
-
eq
|
|
320
|
-
</div>
|
|
321
322
|
<div
|
|
322
|
-
class="
|
|
323
|
+
class="flex-center"
|
|
323
324
|
>
|
|
324
|
-
<div
|
|
325
|
-
|
|
326
|
-
>
|
|
327
|
-
<i
|
|
328
|
-
aria-hidden="true"
|
|
329
|
-
class="question circle outline icon"
|
|
330
|
-
/>
|
|
331
|
-
arg1
|
|
325
|
+
<div>
|
|
326
|
+
eq
|
|
332
327
|
</div>
|
|
333
328
|
<div
|
|
334
|
-
class="
|
|
329
|
+
class="function-params-label"
|
|
335
330
|
>
|
|
336
|
-
<
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
331
|
+
<div
|
|
332
|
+
class="ui grey label"
|
|
333
|
+
>
|
|
334
|
+
<i
|
|
335
|
+
aria-hidden="true"
|
|
336
|
+
class="question circle outline icon"
|
|
337
|
+
/>
|
|
338
|
+
arg1
|
|
339
|
+
</div>
|
|
340
|
+
<div
|
|
341
|
+
class="ui grey label"
|
|
342
|
+
>
|
|
343
|
+
<i
|
|
344
|
+
aria-hidden="true"
|
|
345
|
+
class="question circle outline icon"
|
|
346
|
+
/>
|
|
347
|
+
arg2
|
|
348
|
+
</div>
|
|
341
349
|
</div>
|
|
342
350
|
</div>
|
|
343
351
|
</div>
|
|
352
|
+
<div
|
|
353
|
+
class="sub header"
|
|
354
|
+
/>
|
|
344
355
|
</div>
|
|
345
|
-
<div
|
|
346
|
-
class="sub header"
|
|
347
|
-
/>
|
|
348
356
|
</div>
|
|
349
357
|
</div>
|
|
350
358
|
</div>
|
|
@@ -502,41 +510,45 @@ exports[`<FunctionSelector /> user interaction 1`] = `
|
|
|
502
510
|
style="pointer-events: all;"
|
|
503
511
|
>
|
|
504
512
|
<div
|
|
505
|
-
class="
|
|
513
|
+
class="text"
|
|
506
514
|
>
|
|
507
515
|
<div
|
|
508
|
-
class="
|
|
516
|
+
class="ui header"
|
|
509
517
|
>
|
|
510
|
-
<div>
|
|
511
|
-
eq
|
|
512
|
-
</div>
|
|
513
518
|
<div
|
|
514
|
-
class="
|
|
519
|
+
class="flex-center"
|
|
515
520
|
>
|
|
516
|
-
<div
|
|
517
|
-
|
|
518
|
-
>
|
|
519
|
-
<i
|
|
520
|
-
aria-hidden="true"
|
|
521
|
-
class="question circle outline icon"
|
|
522
|
-
/>
|
|
523
|
-
arg1
|
|
521
|
+
<div>
|
|
522
|
+
eq
|
|
524
523
|
</div>
|
|
525
524
|
<div
|
|
526
|
-
class="
|
|
525
|
+
class="function-params-label"
|
|
527
526
|
>
|
|
528
|
-
<
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
527
|
+
<div
|
|
528
|
+
class="ui grey label"
|
|
529
|
+
>
|
|
530
|
+
<i
|
|
531
|
+
aria-hidden="true"
|
|
532
|
+
class="question circle outline icon"
|
|
533
|
+
/>
|
|
534
|
+
arg1
|
|
535
|
+
</div>
|
|
536
|
+
<div
|
|
537
|
+
class="ui grey label"
|
|
538
|
+
>
|
|
539
|
+
<i
|
|
540
|
+
aria-hidden="true"
|
|
541
|
+
class="question circle outline icon"
|
|
542
|
+
/>
|
|
543
|
+
arg2
|
|
544
|
+
</div>
|
|
533
545
|
</div>
|
|
534
546
|
</div>
|
|
535
547
|
</div>
|
|
548
|
+
<div
|
|
549
|
+
class="sub header"
|
|
550
|
+
/>
|
|
536
551
|
</div>
|
|
537
|
-
<div
|
|
538
|
-
class="sub header"
|
|
539
|
-
/>
|
|
540
552
|
</div>
|
|
541
553
|
</div>
|
|
542
554
|
</div>
|
|
@@ -613,41 +625,45 @@ exports[`<FunctionSelector /> user interaction 2`] = `
|
|
|
613
625
|
style="pointer-events: all;"
|
|
614
626
|
>
|
|
615
627
|
<div
|
|
616
|
-
class="
|
|
628
|
+
class="text"
|
|
617
629
|
>
|
|
618
630
|
<div
|
|
619
|
-
class="
|
|
631
|
+
class="ui header"
|
|
620
632
|
>
|
|
621
|
-
<div>
|
|
622
|
-
eq
|
|
623
|
-
</div>
|
|
624
633
|
<div
|
|
625
|
-
class="
|
|
634
|
+
class="flex-center"
|
|
626
635
|
>
|
|
627
|
-
<div
|
|
628
|
-
|
|
629
|
-
>
|
|
630
|
-
<i
|
|
631
|
-
aria-hidden="true"
|
|
632
|
-
class="question circle outline icon"
|
|
633
|
-
/>
|
|
634
|
-
arg1
|
|
636
|
+
<div>
|
|
637
|
+
eq
|
|
635
638
|
</div>
|
|
636
639
|
<div
|
|
637
|
-
class="
|
|
640
|
+
class="function-params-label"
|
|
638
641
|
>
|
|
639
|
-
<
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
642
|
+
<div
|
|
643
|
+
class="ui grey label"
|
|
644
|
+
>
|
|
645
|
+
<i
|
|
646
|
+
aria-hidden="true"
|
|
647
|
+
class="question circle outline icon"
|
|
648
|
+
/>
|
|
649
|
+
arg1
|
|
650
|
+
</div>
|
|
651
|
+
<div
|
|
652
|
+
class="ui grey label"
|
|
653
|
+
>
|
|
654
|
+
<i
|
|
655
|
+
aria-hidden="true"
|
|
656
|
+
class="question circle outline icon"
|
|
657
|
+
/>
|
|
658
|
+
arg2
|
|
659
|
+
</div>
|
|
644
660
|
</div>
|
|
645
661
|
</div>
|
|
646
662
|
</div>
|
|
663
|
+
<div
|
|
664
|
+
class="sub header"
|
|
665
|
+
/>
|
|
647
666
|
</div>
|
|
648
|
-
<div
|
|
649
|
-
class="sub header"
|
|
650
|
-
/>
|
|
651
667
|
</div>
|
|
652
668
|
</div>
|
|
653
669
|
</div>
|
|
@@ -803,41 +819,45 @@ exports[`<FunctionSelector /> user interaction 2`] = `
|
|
|
803
819
|
style="pointer-events: all;"
|
|
804
820
|
>
|
|
805
821
|
<div
|
|
806
|
-
class="
|
|
822
|
+
class="text"
|
|
807
823
|
>
|
|
808
824
|
<div
|
|
809
|
-
class="
|
|
825
|
+
class="ui header"
|
|
810
826
|
>
|
|
811
|
-
<div>
|
|
812
|
-
eq
|
|
813
|
-
</div>
|
|
814
827
|
<div
|
|
815
|
-
class="
|
|
828
|
+
class="flex-center"
|
|
816
829
|
>
|
|
817
|
-
<div
|
|
818
|
-
|
|
819
|
-
>
|
|
820
|
-
<i
|
|
821
|
-
aria-hidden="true"
|
|
822
|
-
class="question circle outline icon"
|
|
823
|
-
/>
|
|
824
|
-
arg1
|
|
830
|
+
<div>
|
|
831
|
+
eq
|
|
825
832
|
</div>
|
|
826
833
|
<div
|
|
827
|
-
class="
|
|
834
|
+
class="function-params-label"
|
|
828
835
|
>
|
|
829
|
-
<
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
836
|
+
<div
|
|
837
|
+
class="ui grey label"
|
|
838
|
+
>
|
|
839
|
+
<i
|
|
840
|
+
aria-hidden="true"
|
|
841
|
+
class="question circle outline icon"
|
|
842
|
+
/>
|
|
843
|
+
arg1
|
|
844
|
+
</div>
|
|
845
|
+
<div
|
|
846
|
+
class="ui grey label"
|
|
847
|
+
>
|
|
848
|
+
<i
|
|
849
|
+
aria-hidden="true"
|
|
850
|
+
class="question circle outline icon"
|
|
851
|
+
/>
|
|
852
|
+
arg2
|
|
853
|
+
</div>
|
|
834
854
|
</div>
|
|
835
855
|
</div>
|
|
836
856
|
</div>
|
|
857
|
+
<div
|
|
858
|
+
class="sub header"
|
|
859
|
+
/>
|
|
837
860
|
</div>
|
|
838
|
-
<div
|
|
839
|
-
class="sub header"
|
|
840
|
-
/>
|
|
841
861
|
</div>
|
|
842
862
|
</div>
|
|
843
863
|
</div>
|
|
@@ -995,41 +1015,45 @@ exports[`<FunctionSelector /> user interaction 2`] = `
|
|
|
995
1015
|
style="pointer-events: all;"
|
|
996
1016
|
>
|
|
997
1017
|
<div
|
|
998
|
-
class="
|
|
1018
|
+
class="text"
|
|
999
1019
|
>
|
|
1000
1020
|
<div
|
|
1001
|
-
class="
|
|
1021
|
+
class="ui header"
|
|
1002
1022
|
>
|
|
1003
|
-
<div>
|
|
1004
|
-
eq
|
|
1005
|
-
</div>
|
|
1006
1023
|
<div
|
|
1007
|
-
class="
|
|
1024
|
+
class="flex-center"
|
|
1008
1025
|
>
|
|
1009
|
-
<div
|
|
1010
|
-
|
|
1011
|
-
>
|
|
1012
|
-
<i
|
|
1013
|
-
aria-hidden="true"
|
|
1014
|
-
class="question circle outline icon"
|
|
1015
|
-
/>
|
|
1016
|
-
arg1
|
|
1026
|
+
<div>
|
|
1027
|
+
eq
|
|
1017
1028
|
</div>
|
|
1018
1029
|
<div
|
|
1019
|
-
class="
|
|
1030
|
+
class="function-params-label"
|
|
1020
1031
|
>
|
|
1021
|
-
<
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1032
|
+
<div
|
|
1033
|
+
class="ui grey label"
|
|
1034
|
+
>
|
|
1035
|
+
<i
|
|
1036
|
+
aria-hidden="true"
|
|
1037
|
+
class="question circle outline icon"
|
|
1038
|
+
/>
|
|
1039
|
+
arg1
|
|
1040
|
+
</div>
|
|
1041
|
+
<div
|
|
1042
|
+
class="ui grey label"
|
|
1043
|
+
>
|
|
1044
|
+
<i
|
|
1045
|
+
aria-hidden="true"
|
|
1046
|
+
class="question circle outline icon"
|
|
1047
|
+
/>
|
|
1048
|
+
arg2
|
|
1049
|
+
</div>
|
|
1026
1050
|
</div>
|
|
1027
1051
|
</div>
|
|
1028
1052
|
</div>
|
|
1053
|
+
<div
|
|
1054
|
+
class="sub header"
|
|
1055
|
+
/>
|
|
1029
1056
|
</div>
|
|
1030
|
-
<div
|
|
1031
|
-
class="sub header"
|
|
1032
|
-
/>
|
|
1033
1057
|
</div>
|
|
1034
1058
|
</div>
|
|
1035
1059
|
</div>
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, waitForLoad } from "@truedat/test/render";
|
|
3
3
|
import { screen } from "@testing-library/react";
|
|
4
|
+
import { SOURCE_OPTIONS_QUERY } from "@truedat/cx/sources/api/queries";
|
|
4
5
|
import SimpleDataViewEditor from "../simpleForm/SimpleDataViewEditor";
|
|
5
6
|
|
|
7
|
+
const renderOpts = {
|
|
8
|
+
mocks: [
|
|
9
|
+
{
|
|
10
|
+
request: { query: SOURCE_OPTIONS_QUERY },
|
|
11
|
+
result: { data: { sources: [] } },
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
|
|
6
16
|
// Keep intl messages simple (just echo the id)
|
|
7
17
|
const mockFormatMessage = jest.fn(({ id }) => id);
|
|
8
18
|
jest.mock("react-intl", () => ({
|
|
@@ -44,6 +54,7 @@ describe("<SimpleDataViewEditor /> (own rendering only, no child mocks)", () =>
|
|
|
44
54
|
isSubmitting={false}
|
|
45
55
|
mode="guided"
|
|
46
56
|
/>,
|
|
57
|
+
renderOpts,
|
|
47
58
|
);
|
|
48
59
|
await waitForLoad(rendered);
|
|
49
60
|
expect(rendered.container).toBeEmptyDOMElement();
|
|
@@ -59,6 +70,7 @@ describe("<SimpleDataViewEditor /> (own rendering only, no child mocks)", () =>
|
|
|
59
70
|
isSubmitting={false}
|
|
60
71
|
mode="guided"
|
|
61
72
|
/>,
|
|
73
|
+
renderOpts,
|
|
62
74
|
);
|
|
63
75
|
await waitForLoad(rendered);
|
|
64
76
|
|
|
@@ -100,6 +112,7 @@ describe("<SimpleDataViewEditor /> (own rendering only, no child mocks)", () =>
|
|
|
100
112
|
isSubmitting={true}
|
|
101
113
|
mode="guided"
|
|
102
114
|
/>,
|
|
115
|
+
renderOpts,
|
|
103
116
|
);
|
|
104
117
|
await waitForLoad(rendered);
|
|
105
118
|
|
|
@@ -123,6 +136,7 @@ describe("<SimpleDataViewEditor /> (own rendering only, no child mocks)", () =>
|
|
|
123
136
|
isSubmitting={false}
|
|
124
137
|
mode="guided"
|
|
125
138
|
/>,
|
|
139
|
+
renderOpts,
|
|
126
140
|
);
|
|
127
141
|
await waitForLoad(rendered);
|
|
128
142
|
|
|
@@ -144,6 +158,7 @@ describe("<SimpleDataViewEditor /> (own rendering only, no child mocks)", () =>
|
|
|
144
158
|
isSubmitting={false}
|
|
145
159
|
mode="guided"
|
|
146
160
|
/>,
|
|
161
|
+
renderOpts,
|
|
147
162
|
);
|
|
148
163
|
await waitForLoad(rendered);
|
|
149
164
|
|
|
@@ -4,6 +4,8 @@ import TestFormWrapper from "@truedat/qx/components/common/TestFormWrapper";
|
|
|
4
4
|
import Select from "../Select";
|
|
5
5
|
|
|
6
6
|
describe("<Select />", () => {
|
|
7
|
+
beforeEach(() => jest.useRealTimers());
|
|
8
|
+
|
|
7
9
|
it("matches the latest snapshot", async () => {
|
|
8
10
|
const rendered = render(
|
|
9
11
|
<TestFormWrapper>
|
|
@@ -4,6 +4,8 @@ import TestFormWrapper from "@truedat/qx/components/common/TestFormWrapper";
|
|
|
4
4
|
import SelectField from "../SelectField";
|
|
5
5
|
|
|
6
6
|
describe("<SelectField />", () => {
|
|
7
|
+
beforeEach(() => jest.useRealTimers());
|
|
8
|
+
|
|
7
9
|
it("matches the latest snapshot for select", async () => {
|
|
8
10
|
const rendered = render(
|
|
9
11
|
<TestFormWrapper
|