@truedat/dd 7.11.2 → 7.11.4
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 +2 -2
- package/src/api/queries.js +285 -28
- package/src/components/ImplementationStructuresLoader.js +6 -6
- package/src/components/StructureSelectorInputField.js +7 -5
- package/src/components/__tests__/ImplementationStructuresLoader.spec.js +5 -5
- package/src/components/__tests__/ProfileExecutionLoader.spec.js +1 -1
- package/src/components/__tests__/ProfileGroupLoader.spec.js +1 -1
- package/src/reducers/__tests__/graph.spec.js +3 -3
- package/src/reducers/__tests__/graphLoading.spec.js +3 -3
- package/src/reducers/__tests__/graphRedirect.spec.js +3 -3
- package/src/reducers/__tests__/structureFields.spec.js +7 -7
- package/src/reducers/__tests__/structureImpactGraph.spec.js +3 -3
- package/src/reducers/__tests__/structureImpactId.spec.js +3 -3
- package/src/reducers/__tests__/structureLineageGraph.spec.js +3 -3
- package/src/reducers/__tests__/structureLineageId.spec.js +3 -3
- package/src/reducers/__tests__/structureLinks.spec.js +5 -5
- package/src/reducers/__tests__/structureRedirect.spec.js +1 -1
- package/src/reducers/__tests__/structureRelations.spec.js +1 -1
- package/src/reducers/__tests__/structureSystem.spec.js +3 -3
- package/src/reducers/graph.js +2 -2
- package/src/reducers/graphLoading.js +2 -2
- package/src/reducers/graphRedirect.js +2 -2
- package/src/reducers/structureFields.js +4 -4
- package/src/reducers/structureImpactGraph.js +2 -2
- package/src/reducers/structureImpactId.js +2 -2
- package/src/reducers/structureLineageGraph.js +2 -2
- package/src/reducers/structureLineageId.js +2 -2
- package/src/reducers/structureLinks.js +3 -3
- package/src/reducers/structureSiblings.js +7 -1
- package/src/reducers/structureSystem.js +2 -2
- package/src/reducers/structureVersions.js +2 -3
- package/src/routines.js +1 -0
- package/src/sagas/__tests__/legacyFetchStructure.spec.js +148 -0
- package/src/sagas/__tests__/requestGrantRemoval.spec.js +132 -0
- package/src/sagas/createGrantRequestStatus.js +1 -0
- package/src/sagas/index.js +3 -2
- package/src/sagas/legacyFetchStructure.js +55 -0
- package/src/sagas/requestGrantRemoval.js +2 -2
- package/src/selectors/getStructuresFields.js +3 -2
- package/src/selectors/getTabVisibility.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "7.11.
|
|
3
|
+
"version": "7.11.4",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"svg-pan-zoom": "^3.6.2",
|
|
84
84
|
"swr": "^2.3.3"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "6e614a856e1b8cb0a8beaa3b4f20c851f5b93f4f"
|
|
87
87
|
}
|
package/src/api/queries.js
CHANGED
|
@@ -238,11 +238,255 @@ export const STRUCTURE_STRUCTURE_LINKS_QUERY = gql`
|
|
|
238
238
|
}
|
|
239
239
|
`;
|
|
240
240
|
|
|
241
|
-
export const
|
|
241
|
+
export const LEGACY_DATA_STRUCTURE_VERSION_QUERY = gql`
|
|
242
242
|
query DataStructureVersion(
|
|
243
243
|
$dataStructureId: ID!
|
|
244
244
|
$version: String!
|
|
245
|
+
$note_fields: [String]
|
|
245
246
|
) {
|
|
247
|
+
dataStructureVersion(dataStructureId: $dataStructureId, version: $version) {
|
|
248
|
+
id
|
|
249
|
+
version
|
|
250
|
+
class
|
|
251
|
+
description
|
|
252
|
+
name
|
|
253
|
+
type
|
|
254
|
+
group
|
|
255
|
+
deleted_at
|
|
256
|
+
metadata
|
|
257
|
+
data_structure {
|
|
258
|
+
alias
|
|
259
|
+
confidential
|
|
260
|
+
domain_ids
|
|
261
|
+
domains {
|
|
262
|
+
external_id
|
|
263
|
+
id
|
|
264
|
+
name
|
|
265
|
+
parent_id
|
|
266
|
+
parents {
|
|
267
|
+
external_id
|
|
268
|
+
id
|
|
269
|
+
name
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
external_id
|
|
273
|
+
id
|
|
274
|
+
inserted_at
|
|
275
|
+
latest_note
|
|
276
|
+
roles
|
|
277
|
+
source {
|
|
278
|
+
external_id
|
|
279
|
+
id
|
|
280
|
+
}
|
|
281
|
+
source_id
|
|
282
|
+
system_id
|
|
283
|
+
updated_at
|
|
284
|
+
}
|
|
285
|
+
parents {
|
|
286
|
+
alias
|
|
287
|
+
classes
|
|
288
|
+
data_structure_id
|
|
289
|
+
deleted_at
|
|
290
|
+
id
|
|
291
|
+
metadata
|
|
292
|
+
name
|
|
293
|
+
type
|
|
294
|
+
has_note
|
|
295
|
+
note
|
|
296
|
+
}
|
|
297
|
+
children {
|
|
298
|
+
alias
|
|
299
|
+
classes
|
|
300
|
+
data_structure_id
|
|
301
|
+
deleted_at
|
|
302
|
+
id
|
|
303
|
+
metadata
|
|
304
|
+
name
|
|
305
|
+
type
|
|
306
|
+
has_note
|
|
307
|
+
note
|
|
308
|
+
}
|
|
309
|
+
siblings {
|
|
310
|
+
alias
|
|
311
|
+
classes
|
|
312
|
+
data_structure_id
|
|
313
|
+
deleted_at
|
|
314
|
+
id
|
|
315
|
+
metadata
|
|
316
|
+
name
|
|
317
|
+
type
|
|
318
|
+
}
|
|
319
|
+
versions {
|
|
320
|
+
deleted_at
|
|
321
|
+
inserted_at
|
|
322
|
+
updated_at
|
|
323
|
+
version
|
|
324
|
+
}
|
|
325
|
+
ancestry
|
|
326
|
+
|
|
327
|
+
grants {
|
|
328
|
+
data_structure {
|
|
329
|
+
external_id
|
|
330
|
+
id
|
|
331
|
+
system_id
|
|
332
|
+
}
|
|
333
|
+
data_structure_version {
|
|
334
|
+
ancestry
|
|
335
|
+
name
|
|
336
|
+
}
|
|
337
|
+
detail
|
|
338
|
+
end_date
|
|
339
|
+
external_ref
|
|
340
|
+
id
|
|
341
|
+
inserted_at
|
|
342
|
+
pending_removal
|
|
343
|
+
source_user_name
|
|
344
|
+
start_date
|
|
345
|
+
system {
|
|
346
|
+
external_id
|
|
347
|
+
id
|
|
348
|
+
name
|
|
349
|
+
}
|
|
350
|
+
updated_at
|
|
351
|
+
user {
|
|
352
|
+
email
|
|
353
|
+
full_name
|
|
354
|
+
user_name
|
|
355
|
+
}
|
|
356
|
+
user_id
|
|
357
|
+
}
|
|
358
|
+
grant {
|
|
359
|
+
data_structure {
|
|
360
|
+
external_id
|
|
361
|
+
id
|
|
362
|
+
system_id
|
|
363
|
+
}
|
|
364
|
+
data_structure_version {
|
|
365
|
+
ancestry
|
|
366
|
+
name
|
|
367
|
+
}
|
|
368
|
+
detail
|
|
369
|
+
end_date
|
|
370
|
+
external_ref
|
|
371
|
+
id
|
|
372
|
+
inserted_at
|
|
373
|
+
pending_removal
|
|
374
|
+
source_user_name
|
|
375
|
+
start_date
|
|
376
|
+
system {
|
|
377
|
+
external_id
|
|
378
|
+
id
|
|
379
|
+
name
|
|
380
|
+
}
|
|
381
|
+
updated_at
|
|
382
|
+
user {
|
|
383
|
+
email
|
|
384
|
+
full_name
|
|
385
|
+
user_name
|
|
386
|
+
}
|
|
387
|
+
user_id
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
classes
|
|
391
|
+
implementation_count
|
|
392
|
+
data_structure_link_count
|
|
393
|
+
|
|
394
|
+
has_note
|
|
395
|
+
note
|
|
396
|
+
profile {
|
|
397
|
+
max
|
|
398
|
+
min
|
|
399
|
+
null_count
|
|
400
|
+
most_frequent
|
|
401
|
+
total_count
|
|
402
|
+
}
|
|
403
|
+
source {
|
|
404
|
+
id
|
|
405
|
+
external_id
|
|
406
|
+
}
|
|
407
|
+
system {
|
|
408
|
+
id
|
|
409
|
+
name
|
|
410
|
+
}
|
|
411
|
+
structure_type {
|
|
412
|
+
metadata_views {
|
|
413
|
+
name
|
|
414
|
+
fields
|
|
415
|
+
}
|
|
416
|
+
template_id
|
|
417
|
+
translation
|
|
418
|
+
}
|
|
419
|
+
degree {
|
|
420
|
+
in
|
|
421
|
+
out
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
data_fields {
|
|
425
|
+
alias
|
|
426
|
+
classes
|
|
427
|
+
data_structure_id
|
|
428
|
+
deleted_at
|
|
429
|
+
description
|
|
430
|
+
degree {
|
|
431
|
+
in
|
|
432
|
+
out
|
|
433
|
+
}
|
|
434
|
+
links
|
|
435
|
+
id
|
|
436
|
+
metadata
|
|
437
|
+
name
|
|
438
|
+
type
|
|
439
|
+
profile {
|
|
440
|
+
max
|
|
441
|
+
min
|
|
442
|
+
most_frequent
|
|
443
|
+
null_count
|
|
444
|
+
patterns
|
|
445
|
+
total_count
|
|
446
|
+
unique_count
|
|
447
|
+
}
|
|
448
|
+
has_note
|
|
449
|
+
note(select_fields: $note_fields)
|
|
450
|
+
}
|
|
451
|
+
relations {
|
|
452
|
+
parents {
|
|
453
|
+
id
|
|
454
|
+
structure {
|
|
455
|
+
id
|
|
456
|
+
data_structure_id
|
|
457
|
+
name
|
|
458
|
+
type
|
|
459
|
+
}
|
|
460
|
+
relation_type {
|
|
461
|
+
name
|
|
462
|
+
description
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
children {
|
|
466
|
+
id
|
|
467
|
+
structure {
|
|
468
|
+
id
|
|
469
|
+
data_structure_id
|
|
470
|
+
name
|
|
471
|
+
type
|
|
472
|
+
}
|
|
473
|
+
relation_type {
|
|
474
|
+
name
|
|
475
|
+
description
|
|
476
|
+
}
|
|
477
|
+
links
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
links
|
|
482
|
+
_actions
|
|
483
|
+
user_permissions
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
`;
|
|
487
|
+
|
|
488
|
+
export const DATA_STRUCTURE_VERSION_QUERY = gql`
|
|
489
|
+
query DataStructureVersion($dataStructureId: ID!, $version: String!) {
|
|
246
490
|
dataStructureVersion(dataStructureId: $dataStructureId, version: $version) {
|
|
247
491
|
id
|
|
248
492
|
version
|
|
@@ -312,6 +556,38 @@ export const DATA_STRUCTURE_VERSION_QUERY = gql`
|
|
|
312
556
|
|
|
313
557
|
grants_count
|
|
314
558
|
|
|
559
|
+
grant {
|
|
560
|
+
data_structure {
|
|
561
|
+
external_id
|
|
562
|
+
id
|
|
563
|
+
system_id
|
|
564
|
+
}
|
|
565
|
+
data_structure_version {
|
|
566
|
+
ancestry
|
|
567
|
+
name
|
|
568
|
+
}
|
|
569
|
+
detail
|
|
570
|
+
end_date
|
|
571
|
+
external_ref
|
|
572
|
+
id
|
|
573
|
+
inserted_at
|
|
574
|
+
pending_removal
|
|
575
|
+
source_user_name
|
|
576
|
+
start_date
|
|
577
|
+
system {
|
|
578
|
+
external_id
|
|
579
|
+
id
|
|
580
|
+
name
|
|
581
|
+
}
|
|
582
|
+
updated_at
|
|
583
|
+
user {
|
|
584
|
+
email
|
|
585
|
+
full_name
|
|
586
|
+
user_name
|
|
587
|
+
}
|
|
588
|
+
user_id
|
|
589
|
+
}
|
|
590
|
+
|
|
315
591
|
classes
|
|
316
592
|
implementation_count
|
|
317
593
|
data_structure_link_count
|
|
@@ -381,12 +657,9 @@ export const DATA_STRUCTURE_VERSION_QUERY = gql`
|
|
|
381
657
|
}
|
|
382
658
|
}
|
|
383
659
|
`;
|
|
384
|
-
|
|
660
|
+
|
|
385
661
|
export const DATA_STRUCTURE_VERSION_METADATA_QUERY = gql`
|
|
386
|
-
query DataStructureVersion(
|
|
387
|
-
$dataStructureId: ID!
|
|
388
|
-
$version: String!
|
|
389
|
-
) {
|
|
662
|
+
query DataStructureVersion($dataStructureId: ID!, $version: String!) {
|
|
390
663
|
dataStructureVersion(dataStructureId: $dataStructureId, version: $version) {
|
|
391
664
|
metadata
|
|
392
665
|
}
|
|
@@ -394,22 +667,15 @@ export const DATA_STRUCTURE_VERSION_METADATA_QUERY = gql`
|
|
|
394
667
|
`;
|
|
395
668
|
|
|
396
669
|
export const DATA_STRUCTURE_VERSION_LINKS_QUERY = gql`
|
|
397
|
-
query DataStructureVersion(
|
|
398
|
-
$dataStructureId: ID!
|
|
399
|
-
$version: String!
|
|
400
|
-
) {
|
|
670
|
+
query DataStructureVersion($dataStructureId: ID!, $version: String!) {
|
|
401
671
|
dataStructureVersion(dataStructureId: $dataStructureId, version: $version) {
|
|
402
672
|
links
|
|
403
673
|
}
|
|
404
674
|
}
|
|
405
675
|
`;
|
|
406
676
|
|
|
407
|
-
|
|
408
677
|
export const DATA_STRUCTURE_VERSION_VERSIONS_QUERY = gql`
|
|
409
|
-
query DataStructureVersion(
|
|
410
|
-
$dataStructureId: ID!
|
|
411
|
-
$version: String!
|
|
412
|
-
) {
|
|
678
|
+
query DataStructureVersion($dataStructureId: ID!, $version: String!) {
|
|
413
679
|
dataStructureVersion(dataStructureId: $dataStructureId, version: $version) {
|
|
414
680
|
versions {
|
|
415
681
|
deleted_at
|
|
@@ -422,10 +688,7 @@ export const DATA_STRUCTURE_VERSION_VERSIONS_QUERY = gql`
|
|
|
422
688
|
`;
|
|
423
689
|
|
|
424
690
|
export const DATA_STRUCTURE_VERSION_GRANTS_QUERY = gql`
|
|
425
|
-
query DataStructureVersion(
|
|
426
|
-
$dataStructureId: ID!
|
|
427
|
-
$version: String!
|
|
428
|
-
) {
|
|
691
|
+
query DataStructureVersion($dataStructureId: ID!, $version: String!) {
|
|
429
692
|
dataStructureVersion(dataStructureId: $dataStructureId, version: $version) {
|
|
430
693
|
grants {
|
|
431
694
|
data_structure {
|
|
@@ -463,10 +726,7 @@ export const DATA_STRUCTURE_VERSION_GRANTS_QUERY = gql`
|
|
|
463
726
|
`;
|
|
464
727
|
|
|
465
728
|
export const DATA_STRUCTURE_PARENTS_QUERY = gql`
|
|
466
|
-
query DataStructureVersion(
|
|
467
|
-
$dataStructureId: ID!
|
|
468
|
-
$version: String!
|
|
469
|
-
) {
|
|
729
|
+
query DataStructureVersion($dataStructureId: ID!, $version: String!) {
|
|
470
730
|
dataStructureVersion(dataStructureId: $dataStructureId, version: $version) {
|
|
471
731
|
parents {
|
|
472
732
|
alias
|
|
@@ -483,12 +743,9 @@ export const DATA_STRUCTURE_PARENTS_QUERY = gql`
|
|
|
483
743
|
}
|
|
484
744
|
}
|
|
485
745
|
`;
|
|
486
|
-
|
|
746
|
+
|
|
487
747
|
export const DATA_STRUCTURE_CHILDREN_QUERY = gql`
|
|
488
|
-
query DataStructureVersion(
|
|
489
|
-
$dataStructureId: ID!
|
|
490
|
-
$version: String!
|
|
491
|
-
) {
|
|
748
|
+
query DataStructureVersion($dataStructureId: ID!, $version: String!) {
|
|
492
749
|
dataStructureVersion(dataStructureId: $dataStructureId, version: $version) {
|
|
493
750
|
children {
|
|
494
751
|
alias
|
|
@@ -2,11 +2,11 @@ import _ from "lodash/fp";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { connect } from "react-redux";
|
|
5
|
-
import {
|
|
5
|
+
import { legacyFetchStructure, clearStructure } from "../routines";
|
|
6
6
|
|
|
7
7
|
export const ImplementationStructuresLoader = ({
|
|
8
8
|
clearStructure,
|
|
9
|
-
|
|
9
|
+
legacyFetchStructure,
|
|
10
10
|
structureIds,
|
|
11
11
|
structuresFields,
|
|
12
12
|
structuresSiblings,
|
|
@@ -23,14 +23,14 @@ export const ImplementationStructuresLoader = ({
|
|
|
23
23
|
// check structure_ids, will be undefined if structureIds is an empty Array
|
|
24
24
|
if (structure_id && !_.includes(structure_id)(structures)) {
|
|
25
25
|
if (!_.includes(structure_id)(requestedStructures)) {
|
|
26
|
-
|
|
26
|
+
legacyFetchStructure({ id: structure_id });
|
|
27
27
|
setRequestedStructures([...requestedStructures, structure_id]);
|
|
28
28
|
}
|
|
29
29
|
} else if (structureIndex + 1 < _.size(structureIds)) {
|
|
30
30
|
setStructureIndex(structureIndex + 1);
|
|
31
31
|
}
|
|
32
32
|
}, [
|
|
33
|
-
|
|
33
|
+
legacyFetchStructure,
|
|
34
34
|
structureIds,
|
|
35
35
|
structures,
|
|
36
36
|
structureIndex,
|
|
@@ -46,7 +46,7 @@ export const ImplementationStructuresLoader = ({
|
|
|
46
46
|
|
|
47
47
|
ImplementationStructuresLoader.propTypes = {
|
|
48
48
|
clearStructure: PropTypes.func,
|
|
49
|
-
|
|
49
|
+
legacyFetchStructure: PropTypes.func,
|
|
50
50
|
structuresFields: PropTypes.array,
|
|
51
51
|
structuresSiblings: PropTypes.array,
|
|
52
52
|
structureIds: PropTypes.array,
|
|
@@ -57,6 +57,6 @@ export const mapStateToProps = ({ structuresFields, structuresSiblings }) => ({
|
|
|
57
57
|
structuresSiblings: _.keys(structuresSiblings),
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
export default connect(mapStateToProps, {
|
|
60
|
+
export default connect(mapStateToProps, { legacyFetchStructure, clearStructure })(
|
|
61
61
|
ImplementationStructuresLoader
|
|
62
62
|
);
|
|
@@ -3,7 +3,7 @@ import PropTypes from "prop-types";
|
|
|
3
3
|
import { connect } from "react-redux";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { Container, Form, Icon } from "semantic-ui-react";
|
|
6
|
-
import {
|
|
6
|
+
import { legacyFetchStructure } from "../routines";
|
|
7
7
|
import StructureSelector from "./StructureSelector";
|
|
8
8
|
import StructureSelectorInputFieldJoin from "./StructureSelectorInputFieldJoin";
|
|
9
9
|
|
|
@@ -19,13 +19,13 @@ export const StructureSelectorInputField = ({
|
|
|
19
19
|
selectedStructure,
|
|
20
20
|
selectedSystem,
|
|
21
21
|
systemRequired,
|
|
22
|
-
|
|
22
|
+
legacyFetchStructure,
|
|
23
23
|
structureSelectorOverwriteColumns,
|
|
24
24
|
fieldWidth,
|
|
25
25
|
}) => {
|
|
26
26
|
const { formatMessage } = useIntl();
|
|
27
27
|
const handleSelectStructure = (value) => {
|
|
28
|
-
value &&
|
|
28
|
+
value && legacyFetchStructure({ id: _.prop("id")(value) });
|
|
29
29
|
value && onChange(value);
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -124,7 +124,7 @@ export const StructureSelectorInputField = ({
|
|
|
124
124
|
|
|
125
125
|
StructureSelectorInputField.propTypes = {
|
|
126
126
|
active: PropTypes.bool,
|
|
127
|
-
|
|
127
|
+
legacyFetchStructure: PropTypes.func,
|
|
128
128
|
joined: PropTypes.bool,
|
|
129
129
|
onChange: PropTypes.func,
|
|
130
130
|
onChangeField: PropTypes.func,
|
|
@@ -139,4 +139,6 @@ StructureSelectorInputField.propTypes = {
|
|
|
139
139
|
fieldWidth: PropTypes.number,
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
export default connect(null, {
|
|
142
|
+
export default connect(null, { legacyFetchStructure })(
|
|
143
|
+
StructureSelectorInputField
|
|
144
|
+
);
|
|
@@ -2,19 +2,19 @@ import { render } from "@truedat/test/render";
|
|
|
2
2
|
import { ImplementationStructuresLoader } from "../ImplementationStructuresLoader";
|
|
3
3
|
|
|
4
4
|
describe("<ImplementationStructuresLoader/>", () => {
|
|
5
|
-
it("calls
|
|
5
|
+
it("calls legacyFetchStructure on mount and clearStructure on unmount", () => {
|
|
6
6
|
const props = {
|
|
7
7
|
clearStructure: jest.fn(),
|
|
8
|
-
|
|
8
|
+
legacyFetchStructure: jest.fn(),
|
|
9
9
|
structureIds: [42],
|
|
10
10
|
};
|
|
11
11
|
const { unmount } = render(<ImplementationStructuresLoader {...props} />);
|
|
12
12
|
expect(props.clearStructure).toHaveBeenCalledTimes(0);
|
|
13
|
-
expect(props.
|
|
14
|
-
expect(props.
|
|
13
|
+
expect(props.legacyFetchStructure).toHaveBeenCalledTimes(1);
|
|
14
|
+
expect(props.legacyFetchStructure).toHaveBeenCalledWith({ id: 42 });
|
|
15
15
|
|
|
16
16
|
unmount();
|
|
17
17
|
expect(props.clearStructure).toHaveBeenCalledTimes(1);
|
|
18
|
-
expect(props.
|
|
18
|
+
expect(props.legacyFetchStructure).toHaveBeenCalledTimes(1);
|
|
19
19
|
});
|
|
20
20
|
});
|
|
@@ -16,7 +16,7 @@ describe("<ProfileExecutionLoader />", () => {
|
|
|
16
16
|
expect(rendered.container).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
it("calls
|
|
19
|
+
it("calls fetchProfileExecution when component mounts but not when it unmounts", async () => {
|
|
20
20
|
const clearProfileExecution = jest.fn();
|
|
21
21
|
const fetchProfileExecution = jest.fn();
|
|
22
22
|
const props = { clearProfileExecution, fetchProfileExecution };
|
|
@@ -16,7 +16,7 @@ describe("<ProfileGroupLoader />", () => {
|
|
|
16
16
|
expect(rendered.container).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
it("calls
|
|
19
|
+
it("calls fetchProfileGroup when component mounts but not when it unmounts", async () => {
|
|
20
20
|
const clearProfileGroup = jest.fn();
|
|
21
21
|
const fetchProfileGroup = jest.fn();
|
|
22
22
|
const props = { clearProfileGroup, fetchProfileGroup };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { graph, initialState } from "../graph";
|
|
2
|
-
import { clearGraph, fetchGraph,
|
|
2
|
+
import { clearGraph, fetchGraph, legacyFetchStructure } from "../../routines";
|
|
3
3
|
|
|
4
4
|
const fooState = { foo: "bar" };
|
|
5
5
|
|
|
@@ -12,8 +12,8 @@ describe("reducers: graph", () => {
|
|
|
12
12
|
expect(graph(fooState, { type: clearGraph.TRIGGER })).toEqual(initialState);
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
it("should be the initial state after receiving the
|
|
16
|
-
expect(graph(fooState, { type:
|
|
15
|
+
it("should be the initial state after receiving the legacyFetchStructure.TRIGGER action", () => {
|
|
16
|
+
expect(graph(fooState, { type: legacyFetchStructure.TRIGGER })).toEqual(
|
|
17
17
|
initialState
|
|
18
18
|
);
|
|
19
19
|
});
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createGraph,
|
|
5
5
|
createStructureGraph,
|
|
6
6
|
fetchGraph,
|
|
7
|
-
|
|
7
|
+
legacyFetchStructure,
|
|
8
8
|
fetchStructureGraph,
|
|
9
9
|
} from "../../routines";
|
|
10
10
|
import { graphLoading } from "..";
|
|
@@ -56,8 +56,8 @@ describe("reducers: graphLoading", () => {
|
|
|
56
56
|
expect(graphLoading(true, { type: fetchGraph.FULFILL })).toBe(false);
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
it("should be false after receiving the
|
|
60
|
-
expect(graphLoading(true, { type:
|
|
59
|
+
it("should be false after receiving the legacyFetchStructure.TRIGGER action", () => {
|
|
60
|
+
expect(graphLoading(true, { type: legacyFetchStructure.TRIGGER })).toBe(false);
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
it("should be false after receiving the fetchStructureGraph.FULFILL action", () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clearRedirect } from "@truedat/core/routines";
|
|
2
2
|
import { graphRedirect, initialState } from "../graphRedirect";
|
|
3
|
-
import { clearStructure,
|
|
3
|
+
import { clearStructure, legacyFetchStructure, createGraph } from "../../routines";
|
|
4
4
|
|
|
5
5
|
const fooState = { foo: "bar" };
|
|
6
6
|
|
|
@@ -21,8 +21,8 @@ describe("reducers: graphRedirect", () => {
|
|
|
21
21
|
);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
it("should be the initial state after receiving the
|
|
25
|
-
expect(graphRedirect(fooState, { type:
|
|
24
|
+
it("should be the initial state after receiving the legacyFetchStructure.TRIGGER action", () => {
|
|
25
|
+
expect(graphRedirect(fooState, { type: legacyFetchStructure.TRIGGER })).toBe(
|
|
26
26
|
initialState
|
|
27
27
|
);
|
|
28
28
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { clearStructure,
|
|
1
|
+
import { clearStructure, legacyFetchStructure } from "../../routines";
|
|
2
2
|
import { structureFields, structuresFields } from "..";
|
|
3
3
|
|
|
4
4
|
const fooState = { foo: "bar" };
|
|
@@ -17,9 +17,9 @@ describe("reducers: structureFields", () => {
|
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it("should handle the fetchStructure.TRIGGER action", () => {
|
|
20
|
-
expect(
|
|
21
|
-
|
|
22
|
-
);
|
|
20
|
+
expect(
|
|
21
|
+
structureFields(fooState, { type: legacyFetchStructure.TRIGGER })
|
|
22
|
+
).toEqual(initialState);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
it("should handle the fetchStructure.SUCCESS action", () => {
|
|
@@ -28,7 +28,7 @@ describe("reducers: structureFields", () => {
|
|
|
28
28
|
|
|
29
29
|
expect(
|
|
30
30
|
structureFields(fooState, {
|
|
31
|
-
type:
|
|
31
|
+
type: legacyFetchStructure.SUCCESS,
|
|
32
32
|
payload: { data },
|
|
33
33
|
})
|
|
34
34
|
).toMatchObject(data_fields);
|
|
@@ -52,14 +52,14 @@ describe("reducers: structuresFields", () => {
|
|
|
52
52
|
).toEqual(initialState);
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
it("should handle the
|
|
55
|
+
it("should handle the legacyFetchStructure.SUCCESS action", () => {
|
|
56
56
|
const data_fields = [{ id: 1, name: "Field 1" }];
|
|
57
57
|
const data_structure = { id: 2 };
|
|
58
58
|
const data = { data_fields, data_structure };
|
|
59
59
|
|
|
60
60
|
expect(
|
|
61
61
|
structuresFields(fooState, {
|
|
62
|
-
type:
|
|
62
|
+
type: legacyFetchStructure.SUCCESS,
|
|
63
63
|
payload: { data },
|
|
64
64
|
})
|
|
65
65
|
).toMatchObject({ 2: data_fields });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { initialState, structureImpactGraph } from "../structureImpactGraph";
|
|
2
2
|
import {
|
|
3
3
|
clearStructure,
|
|
4
|
-
|
|
4
|
+
legacyFetchStructure,
|
|
5
5
|
fetchStructureGraph,
|
|
6
6
|
createGraph,
|
|
7
7
|
} from "../../routines";
|
|
@@ -19,9 +19,9 @@ describe("reducers: structureImpactGraph", () => {
|
|
|
19
19
|
).toBe(initialState);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
it("should return the initial state after receiving the
|
|
22
|
+
it("should return the initial state after receiving the legacyFetchStructure.TRIGGER action", () => {
|
|
23
23
|
expect(
|
|
24
|
-
structureImpactGraph(fooState, { type:
|
|
24
|
+
structureImpactGraph(fooState, { type: legacyFetchStructure.TRIGGER })
|
|
25
25
|
).toBe(initialState);
|
|
26
26
|
});
|
|
27
27
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { initialState, structureImpactId } from "../structureImpactId";
|
|
2
|
-
import {
|
|
2
|
+
import { legacyFetchStructure, createStructureGraph } from "../../routines";
|
|
3
3
|
|
|
4
4
|
const fooState = { foo: "bar" };
|
|
5
5
|
|
|
@@ -8,8 +8,8 @@ describe("reducers: structureImpactId", () => {
|
|
|
8
8
|
expect(structureImpactId(undefined, {})).toBe(initialState);
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
it("should return the initial state after receiving the
|
|
12
|
-
expect(structureImpactId(fooState, { type:
|
|
11
|
+
it("should return the initial state after receiving the legacyFetchStructure.TRIGGER action", () => {
|
|
12
|
+
expect(structureImpactId(fooState, { type: legacyFetchStructure.TRIGGER })).toBe(
|
|
13
13
|
initialState
|
|
14
14
|
);
|
|
15
15
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { initialState, structureLineageGraph } from "../structureLineageGraph";
|
|
2
2
|
import {
|
|
3
3
|
clearStructure,
|
|
4
|
-
|
|
4
|
+
legacyFetchStructure,
|
|
5
5
|
fetchStructureGraph,
|
|
6
6
|
createGraph,
|
|
7
7
|
} from "../../routines";
|
|
@@ -19,9 +19,9 @@ describe("reducers: structureLineageGraph", () => {
|
|
|
19
19
|
).toBe(initialState);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
it("should return the initial state after receiving the
|
|
22
|
+
it("should return the initial state after receiving the legacyFetchStructure.TRIGGER action", () => {
|
|
23
23
|
expect(
|
|
24
|
-
structureLineageGraph(fooState, { type:
|
|
24
|
+
structureLineageGraph(fooState, { type: legacyFetchStructure.TRIGGER })
|
|
25
25
|
).toBe(initialState);
|
|
26
26
|
});
|
|
27
27
|
|