@truedat/dd 4.48.7 → 4.48.8
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/CHANGELOG.md +6 -0
- package/package.json +5 -5
- package/src/components/StructureChildrenRelations.js +6 -14
- package/src/components/StructureCrumbs.js +43 -25
- package/src/components/StructureFieldRow.js +12 -10
- package/src/components/StructureFields.js +7 -7
- package/src/components/StructureItem.js +2 -2
- package/src/components/StructureSummary.js +4 -6
- package/src/components/__tests__/StructureFieldRow.spec.js +37 -33
- package/src/components/__tests__/StructureFields.spec.js +26 -27
- package/src/components/__tests__/StructureItem.spec.js +1 -1
- package/src/components/__tests__/StructureItems.spec.js +1 -3
- package/src/components/__tests__/StructureSummary.spec.js +1 -4
- package/src/components/__tests__/__snapshots__/StructureFieldRow.spec.js.snap +71 -74
- package/src/components/__tests__/__snapshots__/StructureFields.spec.js.snap +132 -160
- package/src/messages/en.js +6 -6
- package/src/messages/es.js +6 -6
- package/src/reducers/structure.js +5 -5
- package/src/reducers/structures.js +2 -2
- package/src/selectors/__tests__/getSortedFields.spec.js +11 -11
- package/src/selectors/__tests__/getStructureParent.spec.js +10 -10
- package/src/selectors/getStructureFieldColumns.js +29 -39
- package/src/selectors/getStructureParent.js +2 -7
- package/src/selectors/getStructureSortingCriteria.js +7 -5
- package/src/selectors/structureColumnsSelector.js +2 -6
|
@@ -1,81 +1,78 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<StructureFieldRow /> matches the latest snapshot 1`] = `
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<TableCell
|
|
10
|
-
as="td"
|
|
11
|
-
content={
|
|
12
|
-
<Link
|
|
13
|
-
to="/structures/1"
|
|
4
|
+
<div>
|
|
5
|
+
<table>
|
|
6
|
+
<tbody>
|
|
7
|
+
<tr
|
|
8
|
+
class=""
|
|
14
9
|
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<TableCell
|
|
21
|
-
as="td"
|
|
22
|
-
content={
|
|
23
|
-
<Memo(MemoizedFormattedMessage)
|
|
24
|
-
defaultMessage="tp"
|
|
25
|
-
id="structure.type.tp"
|
|
26
|
-
/>
|
|
27
|
-
}
|
|
28
|
-
key="1"
|
|
29
|
-
/>
|
|
30
|
-
<TableCell
|
|
31
|
-
as="td"
|
|
32
|
-
content="22"
|
|
33
|
-
key="2"
|
|
34
|
-
/>
|
|
35
|
-
<TableCell
|
|
36
|
-
as="td"
|
|
37
|
-
content={
|
|
38
|
-
<Memo(MemoizedFormattedMessage)
|
|
39
|
-
id="structure.field.nullable.true"
|
|
40
|
-
/>
|
|
41
|
-
}
|
|
42
|
-
key="3"
|
|
43
|
-
/>
|
|
44
|
-
<TableCell
|
|
45
|
-
as="td"
|
|
46
|
-
content="dd"
|
|
47
|
-
key="4"
|
|
48
|
-
/>
|
|
49
|
-
<TableCell
|
|
50
|
-
as="td"
|
|
51
|
-
key="5"
|
|
52
|
-
/>
|
|
53
|
-
<TableCell
|
|
54
|
-
as="td"
|
|
55
|
-
key="6"
|
|
56
|
-
textAlign="center"
|
|
57
|
-
/>
|
|
58
|
-
<TableCell
|
|
59
|
-
as="td"
|
|
60
|
-
content={
|
|
61
|
-
<List>
|
|
62
|
-
<ListItem>
|
|
63
|
-
<Link
|
|
64
|
-
to="/concepts/2/versions/current"
|
|
10
|
+
<td
|
|
11
|
+
class=""
|
|
12
|
+
>
|
|
13
|
+
<a
|
|
14
|
+
href="/structures/1"
|
|
65
15
|
>
|
|
66
|
-
|
|
67
|
-
</
|
|
68
|
-
</
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
16
|
+
f1
|
|
17
|
+
</a>
|
|
18
|
+
</td>
|
|
19
|
+
<td
|
|
20
|
+
class=""
|
|
21
|
+
>
|
|
22
|
+
tp
|
|
23
|
+
</td>
|
|
24
|
+
<td
|
|
25
|
+
class=""
|
|
26
|
+
>
|
|
27
|
+
22
|
|
28
|
+
</td>
|
|
29
|
+
<td
|
|
30
|
+
class=""
|
|
31
|
+
>
|
|
32
|
+
Yes
|
|
33
|
+
</td>
|
|
34
|
+
<td
|
|
35
|
+
class=""
|
|
36
|
+
>
|
|
37
|
+
dd
|
|
38
|
+
</td>
|
|
39
|
+
<td
|
|
40
|
+
class=""
|
|
41
|
+
/>
|
|
42
|
+
<td
|
|
43
|
+
class="center aligned"
|
|
44
|
+
/>
|
|
45
|
+
<td
|
|
46
|
+
class=""
|
|
47
|
+
>
|
|
48
|
+
<div
|
|
49
|
+
class="ui list"
|
|
50
|
+
role="list"
|
|
72
51
|
>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
52
|
+
<div
|
|
53
|
+
class="item"
|
|
54
|
+
role="listitem"
|
|
55
|
+
>
|
|
56
|
+
<a
|
|
57
|
+
href="/concepts/2/versions/current"
|
|
58
|
+
>
|
|
59
|
+
Bar
|
|
60
|
+
</a>
|
|
61
|
+
</div>
|
|
62
|
+
<div
|
|
63
|
+
class="item"
|
|
64
|
+
role="listitem"
|
|
65
|
+
>
|
|
66
|
+
<a
|
|
67
|
+
href="/concepts/1/versions/current"
|
|
68
|
+
>
|
|
69
|
+
foo
|
|
70
|
+
</a>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</td>
|
|
74
|
+
</tr>
|
|
75
|
+
</tbody>
|
|
76
|
+
</table>
|
|
77
|
+
</div>
|
|
81
78
|
`;
|
|
@@ -1,166 +1,138 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<StructureFields /> matches the latest snapshot 1`] = `
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<TableHeader
|
|
8
|
-
as="thead"
|
|
4
|
+
<div>
|
|
5
|
+
<table
|
|
6
|
+
class="ui table"
|
|
9
7
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
cellAs="td"
|
|
8
|
+
<thead
|
|
9
|
+
class=""
|
|
13
10
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"name": "description",
|
|
142
|
-
},
|
|
143
|
-
Object {
|
|
144
|
-
"name": "external_id",
|
|
145
|
-
},
|
|
146
|
-
Object {
|
|
147
|
-
"name": "links",
|
|
148
|
-
},
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
field={
|
|
152
|
-
Object {
|
|
153
|
-
"description": "desc2",
|
|
154
|
-
"external_id": "foo",
|
|
155
|
-
"id": 122,
|
|
156
|
-
"name": "field2",
|
|
157
|
-
"nullable": true,
|
|
158
|
-
"precision": "22",
|
|
159
|
-
"type": "varchar",
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
key="1"
|
|
163
|
-
/>
|
|
164
|
-
</TableBody>
|
|
165
|
-
</Table>
|
|
11
|
+
<tr
|
|
12
|
+
class=""
|
|
13
|
+
>
|
|
14
|
+
<th
|
|
15
|
+
class=""
|
|
16
|
+
>
|
|
17
|
+
Field
|
|
18
|
+
</th>
|
|
19
|
+
<th
|
|
20
|
+
class=""
|
|
21
|
+
>
|
|
22
|
+
Type
|
|
23
|
+
</th>
|
|
24
|
+
<th
|
|
25
|
+
class=""
|
|
26
|
+
>
|
|
27
|
+
Precision
|
|
28
|
+
</th>
|
|
29
|
+
<th
|
|
30
|
+
class=""
|
|
31
|
+
>
|
|
32
|
+
Nullable
|
|
33
|
+
</th>
|
|
34
|
+
<th
|
|
35
|
+
class=""
|
|
36
|
+
>
|
|
37
|
+
Description
|
|
38
|
+
</th>
|
|
39
|
+
<th
|
|
40
|
+
class=""
|
|
41
|
+
>
|
|
42
|
+
Concepts
|
|
43
|
+
</th>
|
|
44
|
+
</tr>
|
|
45
|
+
</thead>
|
|
46
|
+
<tbody
|
|
47
|
+
class=""
|
|
48
|
+
>
|
|
49
|
+
<tr
|
|
50
|
+
class=""
|
|
51
|
+
>
|
|
52
|
+
<td
|
|
53
|
+
class=""
|
|
54
|
+
>
|
|
55
|
+
<a
|
|
56
|
+
href="/structures/1"
|
|
57
|
+
>
|
|
58
|
+
field1
|
|
59
|
+
</a>
|
|
60
|
+
</td>
|
|
61
|
+
<td
|
|
62
|
+
class=""
|
|
63
|
+
>
|
|
64
|
+
varchar
|
|
65
|
+
</td>
|
|
66
|
+
<td
|
|
67
|
+
class=""
|
|
68
|
+
>
|
|
69
|
+
22
|
|
70
|
+
</td>
|
|
71
|
+
<td
|
|
72
|
+
class=""
|
|
73
|
+
>
|
|
74
|
+
Yes
|
|
75
|
+
</td>
|
|
76
|
+
<td
|
|
77
|
+
class=""
|
|
78
|
+
>
|
|
79
|
+
desc1
|
|
80
|
+
</td>
|
|
81
|
+
<td
|
|
82
|
+
class=""
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
class="ui list"
|
|
86
|
+
role="list"
|
|
87
|
+
>
|
|
88
|
+
<div
|
|
89
|
+
class="item"
|
|
90
|
+
role="listitem"
|
|
91
|
+
>
|
|
92
|
+
<a
|
|
93
|
+
href="/concepts/123/versions/current"
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr
|
|
100
|
+
class=""
|
|
101
|
+
>
|
|
102
|
+
<td
|
|
103
|
+
class=""
|
|
104
|
+
>
|
|
105
|
+
<a
|
|
106
|
+
href="/structures/2"
|
|
107
|
+
>
|
|
108
|
+
field2
|
|
109
|
+
</a>
|
|
110
|
+
</td>
|
|
111
|
+
<td
|
|
112
|
+
class=""
|
|
113
|
+
>
|
|
114
|
+
varchar
|
|
115
|
+
</td>
|
|
116
|
+
<td
|
|
117
|
+
class=""
|
|
118
|
+
>
|
|
119
|
+
22
|
|
120
|
+
</td>
|
|
121
|
+
<td
|
|
122
|
+
class=""
|
|
123
|
+
>
|
|
124
|
+
Yes
|
|
125
|
+
</td>
|
|
126
|
+
<td
|
|
127
|
+
class=""
|
|
128
|
+
>
|
|
129
|
+
desc2
|
|
130
|
+
</td>
|
|
131
|
+
<td
|
|
132
|
+
class=""
|
|
133
|
+
/>
|
|
134
|
+
</tr>
|
|
135
|
+
</tbody>
|
|
136
|
+
</table>
|
|
137
|
+
</div>
|
|
166
138
|
`;
|
package/src/messages/en.js
CHANGED
|
@@ -227,17 +227,17 @@ export default {
|
|
|
227
227
|
"structure.field.links": "Concepts",
|
|
228
228
|
"structure.field.menu.link": "Link to Concept",
|
|
229
229
|
"structure.field.name": "Field",
|
|
230
|
-
"structure.field.nullable": "Nullable",
|
|
231
|
-
"structure.field.nullable.false": "No",
|
|
232
|
-
"structure.field.nullable.true": "Yes",
|
|
233
|
-
"structure.field.optional": "Optional",
|
|
230
|
+
"structure.field.metadata.nullable": "Nullable",
|
|
231
|
+
"structure.field.metadata.nullable.false": "No",
|
|
232
|
+
"structure.field.metadata.nullable.true": "Yes",
|
|
233
|
+
"structure.field.metadata.optional": "Optional",
|
|
234
|
+
"structure.field.metadata.precision": "Precision",
|
|
235
|
+
"structure.field.metadata.type": "Type",
|
|
234
236
|
"structure.field.patterns.count": "Count",
|
|
235
237
|
"structure.field.patterns.frecuency": "Frecuency",
|
|
236
238
|
"structure.field.patterns.percentage": "Percentage",
|
|
237
239
|
"structure.field.patterns.title": "You are seeing the patterns of the field",
|
|
238
|
-
"structure.field.precision": "Precision",
|
|
239
240
|
"structure.field.required": "Required",
|
|
240
|
-
"structure.field.type": "Type",
|
|
241
241
|
"structure.fields.empty": "No field information available for this structure",
|
|
242
242
|
"structure.filter.empty": "Empty",
|
|
243
243
|
"structure.grant.has_grant": "You have granted access on this structure",
|
package/src/messages/es.js
CHANGED
|
@@ -234,18 +234,18 @@ export default {
|
|
|
234
234
|
"structure.field.has_df_content": "Info adicional",
|
|
235
235
|
"structure.field.links": "Términos",
|
|
236
236
|
"structure.field.menu.link": "Vincular a concepto",
|
|
237
|
+
"structure.field.metadata.nullable": "Opcional",
|
|
238
|
+
"structure.field.metadata.nullable.false": "No",
|
|
239
|
+
"structure.field.metadata.nullable.true": "Sí",
|
|
240
|
+
"structure.field.metadata.optional": "Opcional",
|
|
241
|
+
"structure.field.metadata.precision": "Precisión",
|
|
242
|
+
"structure.field.metadata.type": "Tipo",
|
|
237
243
|
"structure.field.name": "Campo",
|
|
238
|
-
"structure.field.nullable": "Opcional",
|
|
239
|
-
"structure.field.nullable.false": "No",
|
|
240
|
-
"structure.field.nullable.true": "Sí",
|
|
241
|
-
"structure.field.optional": "Opcional",
|
|
242
244
|
"structure.field.patterns.count": "Conteo",
|
|
243
245
|
"structure.field.patterns.frecuency": "Patrones más frecuentes",
|
|
244
246
|
"structure.field.patterns.percentage": "Porcentaje",
|
|
245
247
|
"structure.field.patterns.title": "Estás viendo los patrones del campo",
|
|
246
|
-
"structure.field.precision": "Precisión",
|
|
247
248
|
"structure.field.required": "Requerido",
|
|
248
|
-
"structure.field.type": "Tipo",
|
|
249
249
|
"structure.fields.empty":
|
|
250
250
|
"No se dispone de información sobre los campos de esta estructura",
|
|
251
251
|
"structure.filter.empty": "Vacío",
|
|
@@ -7,8 +7,8 @@ const structureFields = (fn) =>
|
|
|
7
7
|
_.flow(
|
|
8
8
|
fn,
|
|
9
9
|
_.pick([
|
|
10
|
+
"alias",
|
|
10
11
|
"confidential",
|
|
11
|
-
"latest_note",
|
|
12
12
|
"domain_ids",
|
|
13
13
|
"domains",
|
|
14
14
|
"external_id",
|
|
@@ -25,17 +25,17 @@ const structureVersionFields = _.pick([
|
|
|
25
25
|
"degree",
|
|
26
26
|
"deleted_at",
|
|
27
27
|
"description",
|
|
28
|
+
"grant",
|
|
29
|
+
"grants",
|
|
28
30
|
"group",
|
|
29
31
|
"implementations",
|
|
30
32
|
"metadata",
|
|
31
33
|
"name",
|
|
34
|
+
"note",
|
|
35
|
+
"siblings",
|
|
32
36
|
"source",
|
|
33
37
|
"system",
|
|
34
38
|
"type",
|
|
35
|
-
"grant",
|
|
36
|
-
"grants",
|
|
37
|
-
"siblings",
|
|
38
|
-
"published_note",
|
|
39
39
|
]);
|
|
40
40
|
|
|
41
41
|
const structure = (state = initialState, { type, payload }) => {
|
|
@@ -2,36 +2,36 @@ import { getSortedFields } from "..";
|
|
|
2
2
|
|
|
3
3
|
const projects = [
|
|
4
4
|
{ name: "foo2", type: "project" },
|
|
5
|
-
{ name: "foo1", type: "project" }
|
|
5
|
+
{ name: "foo1", type: "project" },
|
|
6
6
|
];
|
|
7
7
|
const schemas = [
|
|
8
|
-
{ name: "bar2", type: "schema", order: 1 },
|
|
9
|
-
{ name: "bar1", type: "schema", order: 1 }
|
|
8
|
+
{ name: "bar2", type: "schema", metadata: { order: 1 } },
|
|
9
|
+
{ name: "bar1", type: "schema", metadata: { order: 1 } },
|
|
10
10
|
];
|
|
11
11
|
const documents = [
|
|
12
12
|
{ name: "baz1", type: "document" },
|
|
13
|
-
{ name: "baz2", type: "document" }
|
|
13
|
+
{ name: "baz2", type: "document" },
|
|
14
14
|
];
|
|
15
15
|
const others = [
|
|
16
|
-
{ name: "bay1", type: "other", order: "0" },
|
|
17
|
-
{ name: "bay2", type: "other", order: "0" }
|
|
16
|
+
{ name: "bay1", type: "other", metadata: { order: "0" } },
|
|
17
|
+
{ name: "bay2", type: "other", metadata: { order: "0" } },
|
|
18
18
|
];
|
|
19
19
|
|
|
20
20
|
describe("selectors: getSortedFields", () => {
|
|
21
21
|
const state = {
|
|
22
|
-
structureFields: [...documents, ...projects, ...schemas, ...others]
|
|
22
|
+
structureFields: [...documents, ...projects, ...schemas, ...others],
|
|
23
23
|
};
|
|
24
24
|
const foo = [
|
|
25
25
|
...others,
|
|
26
26
|
...[
|
|
27
|
-
{ name: "bar1", type: "schema", order: 1 },
|
|
28
|
-
{ name: "bar2", type: "schema", order: 1 }
|
|
27
|
+
{ name: "bar1", type: "schema", metadata: { order: 1 } },
|
|
28
|
+
{ name: "bar2", type: "schema", metadata: { order: 1 } },
|
|
29
29
|
],
|
|
30
30
|
...[
|
|
31
31
|
{ name: "foo1", type: "project" },
|
|
32
|
-
{ name: "foo2", type: "project" }
|
|
32
|
+
{ name: "foo2", type: "project" },
|
|
33
33
|
],
|
|
34
|
-
...documents
|
|
34
|
+
...documents,
|
|
35
35
|
];
|
|
36
36
|
it("get fields sorted by type criteria and name", () => {
|
|
37
37
|
expect(getSortedFields(state)).toEqual(foo);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import _ from "lodash/fp";
|
|
2
1
|
import { getStructureParent } from "..";
|
|
3
2
|
|
|
4
3
|
const structureParents = [
|
|
5
4
|
{
|
|
5
|
+
alias: "alias",
|
|
6
6
|
id: "1",
|
|
7
7
|
name: "structure",
|
|
8
8
|
type: "structure type",
|
|
9
|
-
published_note: { alias: "alias" },
|
|
10
9
|
},
|
|
11
10
|
];
|
|
11
|
+
|
|
12
12
|
const system = { id: "1", name: "system", type: "system" };
|
|
13
13
|
|
|
14
14
|
const structure = {
|
|
15
15
|
id: "1",
|
|
16
16
|
name: "structure",
|
|
17
|
-
system:
|
|
17
|
+
system: { id: "1", name: "system" },
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
describe("selectors: getStructureParent", () => {
|
|
@@ -24,17 +24,17 @@ describe("selectors: getStructureParent", () => {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
it("get structure parent from state when is not empty", () => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
expect(getStructureParent(state)).toEqual({
|
|
28
|
+
alias: "alias",
|
|
29
|
+
id: "1",
|
|
30
|
+
name: "..",
|
|
31
|
+
type: "structure type",
|
|
32
|
+
});
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
it("get system as parent when structureParents is empty", () => {
|
|
36
36
|
const state = { structureParents: [], structure };
|
|
37
|
-
expect(getStructureParent(state)).toEqual(
|
|
37
|
+
expect(getStructureParent(state)).toEqual({ ...system, name: ".." });
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
it("get empty list when no parents nor structure", () => {
|