@truedat/dq 6.3.3 → 6.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dq",
3
- "version": "6.3.3",
3
+ "version": "6.3.5",
4
4
  "description": "Truedat Web Data Quality Module",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.5",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "6.3.3",
37
+ "@truedat/test": "6.3.4",
38
38
  "babel-jest": "^28.1.0",
39
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
40
40
  "babel-plugin-lodash": "^3.3.4",
@@ -92,8 +92,8 @@
92
92
  },
93
93
  "dependencies": {
94
94
  "@apollo/client": "^3.7.1",
95
- "@truedat/core": "6.3.3",
96
- "@truedat/df": "6.3.3",
95
+ "@truedat/core": "6.3.5",
96
+ "@truedat/df": "6.3.5",
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": "ee40175932833d26f2d0ca297ce5a3a26fb71cb2"
121
+ "gitHead": "2cacdf1fc99746cb4f8dca7d770662c0d96c5bb7"
122
122
  }
@@ -4,17 +4,90 @@ import { render } from "@truedat/test/render";
4
4
  import userEvent from "@testing-library/user-event";
5
5
  import { domainsMock, multipleTemplatesMock } from "@truedat/test/mocks";
6
6
  import RuleForm from "../RuleForm";
7
+ import en from "../../messages/en";
7
8
  import { globalState } from "./__fixtures__/RuleForm";
8
9
 
10
+ const data = {
11
+ data: [
12
+ {
13
+ id: 1,
14
+ name: "My Concept",
15
+ domain: { id: 1, name: "bar" },
16
+ status: "draft",
17
+ business_concept_id: 1,
18
+ last_change_at: "2020-01-01T00:00:00.000Z",
19
+ },
20
+ ],
21
+ };
22
+
23
+ const filterData = {
24
+ data: {
25
+ some: {
26
+ values: ["some_xxx", "some_yyy", "some_xwy"],
27
+ },
28
+ },
29
+ };
30
+
31
+ jest.mock("@truedat/bg/concepts/hooks/useConcepts", () => {
32
+ const originalModule = jest.requireActual(
33
+ "@truedat/bg/concepts/hooks/useConcepts"
34
+ );
35
+
36
+ return {
37
+ __esModule: true,
38
+ ...originalModule,
39
+ useConceptFilters: () => ({
40
+ trigger: () => ({
41
+ then: (callback) =>
42
+ callback({
43
+ data: filterData,
44
+ }),
45
+ }),
46
+ }),
47
+ useConceptVersionsSearch: () => ({
48
+ trigger: () => ({
49
+ then: (callback) =>
50
+ callback({
51
+ data,
52
+ headers: {},
53
+ }),
54
+ }),
55
+ }),
56
+ };
57
+ });
58
+
9
59
  const rule = {
10
60
  id: 123,
11
- business_concept_id: "2D2B3",
61
+ business_concept_id: "1",
12
62
  name: "control1",
13
63
  current_business_concept_version: { name: "My Concept" },
14
64
  };
15
65
 
66
+ const messages = {
67
+ en: {
68
+ ...en,
69
+ "concepts.status.undefined": "undefined",
70
+ "search.save_filters": "save filters",
71
+ "search.clear_filters": "clear filters",
72
+ "search.applied_filters": "apply filters",
73
+ "search.placeholder": "Search concepts...",
74
+ "actions.save": "Save",
75
+ "actions.cancel": "Cancel",
76
+ "actions.delete": "Delete",
77
+ "template.selector.placeholder": "Select a template...",
78
+ "domain.selector.placeholder": "Select a domain...",
79
+ "domain.selector.label": "Domain",
80
+ loading: "loading...",
81
+ "concepts.props.status": "Status",
82
+ "concepts.props.domain": "Domain",
83
+ "concepts.props.name": "Term",
84
+ "template.form.validation.empty_required": "Empty required field",
85
+ "template.selector.label": "Template",
86
+ "concepts.search.results.empty": "No concepts found",
87
+ },
88
+ };
89
+
16
90
  const state = {
17
- conceptActiveFilters: {},
18
91
  domains: [{ id: 1, name: "domain1" }],
19
92
  };
20
93
 
@@ -24,6 +97,7 @@ const renderOpts = {
24
97
  multipleTemplatesMock({ scope: "dq", domainIds: [1] }),
25
98
  ],
26
99
  state,
100
+ messages,
27
101
  fallback: "lazy",
28
102
  };
29
103
 
@@ -342,6 +342,8 @@ exports[`<RuleForm /> matches the latest snapshot (edit mode) 1`] = `
342
342
  class="search link icon"
343
343
  />
344
344
  <div
345
+ aria-busy="false"
346
+ aria-disabled="false"
345
347
  aria-expanded="false"
346
348
  class="ui button floating labeled scrolling dropdown icon"
347
349
  role="listbox"
@@ -367,24 +369,79 @@ exports[`<RuleForm /> matches the latest snapshot (edit mode) 1`] = `
367
369
  role="option"
368
370
  >
369
371
  <em>
370
- (reset all filters)
372
+ (reset filters)
371
373
  </em>
372
374
  </div>
375
+ <div
376
+ class="item"
377
+ role="option"
378
+ >
379
+ <span
380
+ class="text"
381
+ >
382
+ some
383
+ </span>
384
+ </div>
373
385
  </div>
374
386
  </div>
375
387
  </div>
376
388
  <div
377
389
  class="selectedFilters"
378
390
  />
379
- <div
380
- class="ui message"
391
+ <table
392
+ class="ui small selectable table"
381
393
  >
382
- <div
383
- class="content"
394
+ <thead
395
+ class=""
384
396
  >
385
- No concepts found
386
- </div>
387
- </div>
397
+ <tr
398
+ class=""
399
+ >
400
+ <th
401
+ class=""
402
+ >
403
+ Term
404
+ </th>
405
+ <th
406
+ class=""
407
+ >
408
+ Domain
409
+ </th>
410
+ <th
411
+ class=""
412
+ >
413
+ Status
414
+ </th>
415
+ </tr>
416
+ </thead>
417
+ <tbody
418
+ class=""
419
+ >
420
+ <tr
421
+ class=""
422
+ >
423
+ <td
424
+ class=""
425
+ >
426
+ My Concept
427
+ </td>
428
+ <td
429
+ class=""
430
+ >
431
+ bar
432
+ </td>
433
+ <td
434
+ class=""
435
+ >
436
+ <div
437
+ class="ui olive label"
438
+ >
439
+ draft
440
+ </div>
441
+ </td>
442
+ </tr>
443
+ </tbody>
444
+ </table>
388
445
  </div>
389
446
  </div>
390
447
  </div>
@@ -755,6 +812,8 @@ exports[`<RuleForm /> matches the latest snapshot 1`] = `
755
812
  class="search link icon"
756
813
  />
757
814
  <div
815
+ aria-busy="false"
816
+ aria-disabled="false"
758
817
  aria-expanded="false"
759
818
  class="ui button floating labeled scrolling dropdown icon"
760
819
  role="listbox"
@@ -780,24 +839,79 @@ exports[`<RuleForm /> matches the latest snapshot 1`] = `
780
839
  role="option"
781
840
  >
782
841
  <em>
783
- (reset all filters)
842
+ (reset filters)
784
843
  </em>
785
844
  </div>
845
+ <div
846
+ class="item"
847
+ role="option"
848
+ >
849
+ <span
850
+ class="text"
851
+ >
852
+ some
853
+ </span>
854
+ </div>
786
855
  </div>
787
856
  </div>
788
857
  </div>
789
858
  <div
790
859
  class="selectedFilters"
791
860
  />
792
- <div
793
- class="ui message"
861
+ <table
862
+ class="ui small selectable table"
794
863
  >
795
- <div
796
- class="content"
864
+ <thead
865
+ class=""
797
866
  >
798
- No concepts found
799
- </div>
800
- </div>
867
+ <tr
868
+ class=""
869
+ >
870
+ <th
871
+ class=""
872
+ >
873
+ Term
874
+ </th>
875
+ <th
876
+ class=""
877
+ >
878
+ Domain
879
+ </th>
880
+ <th
881
+ class=""
882
+ >
883
+ Status
884
+ </th>
885
+ </tr>
886
+ </thead>
887
+ <tbody
888
+ class=""
889
+ >
890
+ <tr
891
+ class=""
892
+ >
893
+ <td
894
+ class=""
895
+ >
896
+ My Concept
897
+ </td>
898
+ <td
899
+ class=""
900
+ >
901
+ bar
902
+ </td>
903
+ <td
904
+ class=""
905
+ >
906
+ <div
907
+ class="ui olive label"
908
+ >
909
+ draft
910
+ </div>
911
+ </td>
912
+ </tr>
913
+ </tbody>
914
+ </table>
801
915
  </div>
802
916
  </div>
803
917
  </div>