@truedat/dd 4.48.11 → 4.49.0
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/api/fragments.js +2 -2
- package/src/api/mutations.js +33 -11
- package/src/api/queries.js +37 -10
- package/src/api.js +0 -4
- package/src/components/DictionaryRoutes.js +4 -4
- package/src/components/StructureSummary.js +12 -22
- package/src/components/StructureTag.js +83 -54
- package/src/components/StructureTagForm.js +149 -89
- package/src/components/StructureTags.js +57 -27
- package/src/components/Tag.js +62 -0
- package/src/components/TagCards.js +85 -0
- package/src/components/TagCrumbs.js +25 -0
- package/src/components/TagForm.js +101 -0
- package/src/components/TagStructureButton.js +58 -0
- package/src/components/Tags.js +33 -0
- package/src/components/TagsRoutes.js +39 -0
- package/src/components/__tests__/StructureSummary.spec.js +0 -7
- package/src/components/__tests__/StructureTag.spec.js +79 -5
- package/src/components/__tests__/StructureTagForm.spec.js +99 -50
- package/src/components/__tests__/Tag.spec.js +11 -0
- package/src/components/__tests__/{StructureTagsCards.spec.js → TagCards.spec.js} +10 -10
- package/src/components/__tests__/TagCrumbs.spec.js +10 -0
- package/src/components/__tests__/TagForm.spec.js +72 -0
- package/src/components/__tests__/Tags.spec.js +10 -0
- package/src/components/__tests__/__snapshots__/StructureSummary.spec.js.snap +18 -42
- package/src/components/__tests__/__snapshots__/StructureTag.spec.js.snap +10 -30
- package/src/components/__tests__/__snapshots__/StructureTagForm.spec.js.snap +255 -51
- package/src/components/__tests__/__snapshots__/Tag.spec.js.snap +36 -0
- package/src/components/__tests__/__snapshots__/{StructureTagsCards.spec.js.snap → TagCards.spec.js.snap} +1 -1
- package/src/components/__tests__/__snapshots__/TagCrumbs.spec.js.snap +102 -0
- package/src/components/__tests__/__snapshots__/TagForm.spec.js.snap +70 -0
- package/src/components/__tests__/__snapshots__/{StructureTags.spec.js.snap → Tags.spec.js.snap} +1 -1
- package/src/messages/en.js +25 -30
- package/src/messages/es.js +25 -30
- package/src/reducers/__tests__/{editableStructureTags.spec.js → availableTags.spec.js} +7 -11
- package/src/reducers/__tests__/structureTagSaving.spec.js +36 -0
- package/src/reducers/__tests__/tagSaving.spec.js +32 -0
- package/src/reducers/{editableStructureTags.js → availableTags.js} +2 -2
- package/src/reducers/index.js +6 -12
- package/src/reducers/structureRedirect.js +7 -7
- package/src/reducers/structureTagSaving.js +12 -10
- package/src/reducers/tagSaving.js +18 -0
- package/src/routines.js +5 -6
- package/src/sagas/__tests__/createTag.spec.js +81 -0
- package/src/sagas/__tests__/deleteStructureTag.spec.js +11 -12
- package/src/sagas/__tests__/deleteTag.spec.js +76 -0
- package/src/sagas/__tests__/tagStructure.spec.js +86 -0
- package/src/sagas/__tests__/updateTag.spec.js +81 -0
- package/src/sagas/createTag.js +29 -0
- package/src/sagas/deleteStructureTag.js +12 -9
- package/src/sagas/deleteTag.js +34 -0
- package/src/sagas/index.js +15 -18
- package/src/sagas/tagStructure.js +37 -0
- package/src/sagas/updateTag.js +23 -0
- package/src/components/LinkStructureTagForm.js +0 -163
- package/src/components/LinkedStructureTag.js +0 -124
- package/src/components/StructureLinkTagButton.js +0 -47
- package/src/components/StructureTagsCards.js +0 -92
- package/src/components/StructureTagsCrumbs.js +0 -44
- package/src/components/StructureTagsRoutes.js +0 -45
- package/src/components/TagsHeader.js +0 -32
- package/src/components/__tests__/LinkStructureTagForm.spec.js +0 -184
- package/src/components/__tests__/LinkedStructureTag.spec.js +0 -133
- package/src/components/__tests__/StructureTags.spec.js +0 -14
- package/src/components/__tests__/StructureTagsCrumbs.spec.js +0 -13
- package/src/components/__tests__/__snapshots__/LinkStructureTagForm.spec.js.snap +0 -456
- package/src/components/__tests__/__snapshots__/LinkedStructureTag.spec.js.snap +0 -16
- package/src/components/__tests__/__snapshots__/StructureTagsCrumbs.spec.js.snap +0 -36
- package/src/reducers/__tests__/deletingStructureTags.spec.js +0 -30
- package/src/reducers/__tests__/linkedStructureTags.spec.js +0 -69
- package/src/reducers/__tests__/linkedStructureTagsLoading.spec.js +0 -32
- package/src/reducers/__tests__/linkingStructureTags.spec.js +0 -30
- package/src/reducers/__tests__/structureTagsSaving.spec.js +0 -40
- package/src/reducers/deletingStructureTags.js +0 -16
- package/src/reducers/linkedStructureTags.js +0 -28
- package/src/reducers/linkedStructureTagsLoading.js +0 -16
- package/src/reducers/linkingStructureTags.js +0 -16
- package/src/sagas/__tests__/createStructureTag.spec.js +0 -85
- package/src/sagas/__tests__/deleteLinkStructureTag.spec.js +0 -96
- package/src/sagas/__tests__/fetchLinksStructureTags.spec.js +0 -105
- package/src/sagas/__tests__/linkStructureTag.spec.js +0 -102
- package/src/sagas/__tests__/updateStructureTag.spec.js +0 -84
- package/src/sagas/createStructureTag.js +0 -29
- package/src/sagas/deleteLinkStructureTag.js +0 -29
- package/src/sagas/fetchLinksStructureTags.js +0 -31
- package/src/sagas/linkStructureTag.js +0 -30
- package/src/sagas/updateStructureTag.js +0 -23
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { render } from "@truedat/test/render";
|
|
3
|
-
import { waitFor, fireEvent } from "@testing-library/react";
|
|
4
|
-
import { LinkedStructureTag } from "../LinkedStructureTag";
|
|
5
|
-
|
|
6
|
-
describe("<LinkedStructureTag />", () => {
|
|
7
|
-
const structureTags = [
|
|
8
|
-
{ id: 1, name: "Tag1", description: "description test" },
|
|
9
|
-
{ id: 2, name: "Tag2", description: "large desc".repeat(5) },
|
|
10
|
-
{ id: 3, name: "Tag without description" },
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
const props = {
|
|
14
|
-
id: 1,
|
|
15
|
-
_embedded: {
|
|
16
|
-
data_structure: { id: 1, external_id: "baz" },
|
|
17
|
-
data_structure_tag: { ...structureTags[2] },
|
|
18
|
-
},
|
|
19
|
-
editable: true,
|
|
20
|
-
comment: "foo comment",
|
|
21
|
-
loading: false,
|
|
22
|
-
structureTags,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const state = {
|
|
26
|
-
editableStructureTags: structureTags,
|
|
27
|
-
linkingStructureTags: false,
|
|
28
|
-
deletingStructureTags: false,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const renderOpts = {
|
|
32
|
-
state,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
it("matches the latest snapshot", () => {
|
|
36
|
-
const { container } = render(<LinkedStructureTag {...props} />, renderOpts);
|
|
37
|
-
expect(container).toMatchSnapshot();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it("Show update modal when click in tad edit icon", async () => {
|
|
41
|
-
const { getByText, container } = render(
|
|
42
|
-
<LinkedStructureTag {...props} />,
|
|
43
|
-
renderOpts
|
|
44
|
-
);
|
|
45
|
-
fireEvent.click(container.getElementsByClassName("edit")[0]);
|
|
46
|
-
await waitFor(() => expect(getByText("Tag1")).toBeTruthy());
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it("Show tooltip with description and comment", async () => {
|
|
50
|
-
const tagWithDescriptionProps = {
|
|
51
|
-
...props,
|
|
52
|
-
_embedded: {
|
|
53
|
-
...props._embedded,
|
|
54
|
-
data_structure_tag: { ...structureTags[0] },
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const { getByText } = render(
|
|
59
|
-
<LinkedStructureTag {...tagWithDescriptionProps} />,
|
|
60
|
-
renderOpts
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
fireEvent.mouseEnter(getByText("Tag1"));
|
|
64
|
-
|
|
65
|
-
await waitFor(() => expect(getByText("Comment")).toBeTruthy());
|
|
66
|
-
await waitFor(() => expect(getByText("foo comment")).toBeTruthy());
|
|
67
|
-
await waitFor(() =>
|
|
68
|
-
expect(getByText(structureTags[0].description)).toBeTruthy()
|
|
69
|
-
);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
it("Show tooltip with description", async () => {
|
|
73
|
-
const tagWithDescriptionWithoutCommentProps = {
|
|
74
|
-
...props,
|
|
75
|
-
_embedded: {
|
|
76
|
-
...props._embedded,
|
|
77
|
-
data_structure_tag: { ...structureTags[0] },
|
|
78
|
-
},
|
|
79
|
-
comment: undefined,
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
const { getByText, queryByText } = render(
|
|
83
|
-
<LinkedStructureTag {...tagWithDescriptionWithoutCommentProps} />,
|
|
84
|
-
renderOpts
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
fireEvent.mouseEnter(getByText("Tag1"));
|
|
88
|
-
|
|
89
|
-
await waitFor(() => expect(queryByText("Comment")).toBeNull());
|
|
90
|
-
await waitFor(() => expect(queryByText("foo comment")).toBeNull());
|
|
91
|
-
await waitFor(() =>
|
|
92
|
-
expect(getByText(structureTags[0].description)).toBeTruthy()
|
|
93
|
-
);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it("Show tooltip with comment", async () => {
|
|
97
|
-
const { getByText, queryByText } = render(
|
|
98
|
-
<LinkedStructureTag {...props} />,
|
|
99
|
-
renderOpts
|
|
100
|
-
);
|
|
101
|
-
fireEvent.mouseEnter(getByText("Tag without description"));
|
|
102
|
-
|
|
103
|
-
await waitFor(() => expect(getByText("Comment")).toBeTruthy());
|
|
104
|
-
await waitFor(() => expect(getByText("foo comment")).toBeTruthy());
|
|
105
|
-
await waitFor(() =>
|
|
106
|
-
expect(queryByText(structureTags[0].description)).toBeNull()
|
|
107
|
-
);
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
it("Tooltip not show without description and without comment", async () => {
|
|
111
|
-
const tagWithoutDescriptionWithoutComment = {
|
|
112
|
-
...props,
|
|
113
|
-
comment: undefined,
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const { getByText, queryByText, container } = render(
|
|
117
|
-
<LinkedStructureTag {...tagWithoutDescriptionWithoutComment} />,
|
|
118
|
-
renderOpts
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
fireEvent.mouseEnter(getByText("Tag without description"));
|
|
122
|
-
|
|
123
|
-
await waitFor(() => expect(queryByText("Comment")).toBeNull());
|
|
124
|
-
await waitFor(() => expect(queryByText("foo comment")).toBeNull());
|
|
125
|
-
await waitFor(() =>
|
|
126
|
-
expect(queryByText(structureTags[0].description)).toBeNull()
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
await waitFor(() =>
|
|
130
|
-
expect(container.getElementsByClassName("popup")).toHaveLength(0)
|
|
131
|
-
);
|
|
132
|
-
});
|
|
133
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { render } from "@truedat/test/render";
|
|
3
|
-
import StructureTags from "../StructureTags";
|
|
4
|
-
import en from "../../messages/en";
|
|
5
|
-
|
|
6
|
-
const messages = { en };
|
|
7
|
-
const renderOpts = { messages };
|
|
8
|
-
|
|
9
|
-
describe("<StructureTags />", () => {
|
|
10
|
-
it("matches the latest snapshot", () => {
|
|
11
|
-
const { container } = render(<StructureTags />, renderOpts);
|
|
12
|
-
expect(container).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { shallow } from "enzyme";
|
|
3
|
-
import { StructureTagsCrumbs } from "../StructureTagsCrumbs";
|
|
4
|
-
|
|
5
|
-
describe("<StructureTagsCrumbs />", () => {
|
|
6
|
-
const structureTag = { id: 1, name: "doc" };
|
|
7
|
-
|
|
8
|
-
it("matches the latest snapshot", () => {
|
|
9
|
-
const props = { structureTag };
|
|
10
|
-
const wrapper = shallow(<StructureTagsCrumbs {...props} />);
|
|
11
|
-
expect(wrapper).toMatchSnapshot();
|
|
12
|
-
});
|
|
13
|
-
});
|
|
@@ -1,456 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<LinkStructureTagForm /> create button enabled if there is only one tag available 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="ui container link-structure-tag-form"
|
|
7
|
-
>
|
|
8
|
-
<form
|
|
9
|
-
class="ui form"
|
|
10
|
-
>
|
|
11
|
-
<div
|
|
12
|
-
class="field"
|
|
13
|
-
>
|
|
14
|
-
<label>
|
|
15
|
-
structure.tag.dropdown.label
|
|
16
|
-
</label>
|
|
17
|
-
<div
|
|
18
|
-
aria-disabled="false"
|
|
19
|
-
aria-expanded="false"
|
|
20
|
-
class="ui search selection dropdown"
|
|
21
|
-
name="tag"
|
|
22
|
-
role="combobox"
|
|
23
|
-
>
|
|
24
|
-
<input
|
|
25
|
-
aria-autocomplete="list"
|
|
26
|
-
autocomplete="off"
|
|
27
|
-
class="search"
|
|
28
|
-
tabindex="0"
|
|
29
|
-
type="text"
|
|
30
|
-
value=""
|
|
31
|
-
/>
|
|
32
|
-
<div
|
|
33
|
-
aria-atomic="true"
|
|
34
|
-
aria-live="polite"
|
|
35
|
-
class="divider text"
|
|
36
|
-
role="alert"
|
|
37
|
-
>
|
|
38
|
-
Tag2
|
|
39
|
-
</div>
|
|
40
|
-
<i
|
|
41
|
-
aria-hidden="true"
|
|
42
|
-
class="dropdown icon clear"
|
|
43
|
-
/>
|
|
44
|
-
<div
|
|
45
|
-
class="menu transition"
|
|
46
|
-
role="listbox"
|
|
47
|
-
>
|
|
48
|
-
<div
|
|
49
|
-
aria-checked="true"
|
|
50
|
-
aria-selected="true"
|
|
51
|
-
class="active selected item"
|
|
52
|
-
role="option"
|
|
53
|
-
style="pointer-events: all;"
|
|
54
|
-
>
|
|
55
|
-
<span
|
|
56
|
-
class="description"
|
|
57
|
-
>
|
|
58
|
-
large desclarge desclarge desclarge desclarge desc
|
|
59
|
-
</span>
|
|
60
|
-
<span
|
|
61
|
-
class="text"
|
|
62
|
-
>
|
|
63
|
-
Tag2
|
|
64
|
-
</span>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
<div
|
|
70
|
-
class="field"
|
|
71
|
-
>
|
|
72
|
-
<label>
|
|
73
|
-
structure.tag.textArea.label
|
|
74
|
-
</label>
|
|
75
|
-
<textarea
|
|
76
|
-
data-testid="comment-id"
|
|
77
|
-
name="comment"
|
|
78
|
-
placeholder="structure.tag.textArea.placeholder"
|
|
79
|
-
rows="3"
|
|
80
|
-
/>
|
|
81
|
-
</div>
|
|
82
|
-
<div
|
|
83
|
-
class="actions"
|
|
84
|
-
>
|
|
85
|
-
<button
|
|
86
|
-
class="ui primary button"
|
|
87
|
-
type="submit"
|
|
88
|
-
>
|
|
89
|
-
structure.tag.add
|
|
90
|
-
</button>
|
|
91
|
-
</div>
|
|
92
|
-
</form>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
`;
|
|
96
|
-
|
|
97
|
-
exports[`<LinkStructureTagForm /> matches the latest snapshot create 1`] = `
|
|
98
|
-
<div>
|
|
99
|
-
<div
|
|
100
|
-
class="ui container link-structure-tag-form"
|
|
101
|
-
>
|
|
102
|
-
<form
|
|
103
|
-
class="ui form"
|
|
104
|
-
>
|
|
105
|
-
<div
|
|
106
|
-
class="field"
|
|
107
|
-
>
|
|
108
|
-
<label>
|
|
109
|
-
structure.tag.dropdown.label
|
|
110
|
-
</label>
|
|
111
|
-
<div
|
|
112
|
-
aria-disabled="false"
|
|
113
|
-
aria-expanded="false"
|
|
114
|
-
class="ui search selection dropdown"
|
|
115
|
-
name="tag"
|
|
116
|
-
role="combobox"
|
|
117
|
-
>
|
|
118
|
-
<input
|
|
119
|
-
aria-autocomplete="list"
|
|
120
|
-
autocomplete="off"
|
|
121
|
-
class="search"
|
|
122
|
-
tabindex="0"
|
|
123
|
-
type="text"
|
|
124
|
-
value=""
|
|
125
|
-
/>
|
|
126
|
-
<div
|
|
127
|
-
aria-atomic="true"
|
|
128
|
-
aria-live="polite"
|
|
129
|
-
class="divider default text"
|
|
130
|
-
role="alert"
|
|
131
|
-
>
|
|
132
|
-
structure.tag.dropdown.placeholder
|
|
133
|
-
</div>
|
|
134
|
-
<i
|
|
135
|
-
aria-hidden="true"
|
|
136
|
-
class="dropdown icon"
|
|
137
|
-
/>
|
|
138
|
-
<div
|
|
139
|
-
class="menu transition"
|
|
140
|
-
role="listbox"
|
|
141
|
-
>
|
|
142
|
-
<div
|
|
143
|
-
aria-checked="false"
|
|
144
|
-
aria-selected="true"
|
|
145
|
-
class="selected item"
|
|
146
|
-
role="option"
|
|
147
|
-
style="pointer-events: all;"
|
|
148
|
-
>
|
|
149
|
-
<span
|
|
150
|
-
class="description"
|
|
151
|
-
>
|
|
152
|
-
description test
|
|
153
|
-
</span>
|
|
154
|
-
<span
|
|
155
|
-
class="text"
|
|
156
|
-
>
|
|
157
|
-
Tag1
|
|
158
|
-
</span>
|
|
159
|
-
</div>
|
|
160
|
-
<div
|
|
161
|
-
aria-checked="false"
|
|
162
|
-
aria-selected="false"
|
|
163
|
-
class="item"
|
|
164
|
-
role="option"
|
|
165
|
-
style="pointer-events: all;"
|
|
166
|
-
>
|
|
167
|
-
<span
|
|
168
|
-
class="description"
|
|
169
|
-
>
|
|
170
|
-
large desclarge desclarge desclarge desclarge desc
|
|
171
|
-
</span>
|
|
172
|
-
<span
|
|
173
|
-
class="text"
|
|
174
|
-
>
|
|
175
|
-
Tag2
|
|
176
|
-
</span>
|
|
177
|
-
</div>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
<div
|
|
182
|
-
class="field"
|
|
183
|
-
>
|
|
184
|
-
<label>
|
|
185
|
-
structure.tag.textArea.label
|
|
186
|
-
</label>
|
|
187
|
-
<textarea
|
|
188
|
-
data-testid="comment-id"
|
|
189
|
-
name="comment"
|
|
190
|
-
placeholder="structure.tag.textArea.placeholder"
|
|
191
|
-
rows="3"
|
|
192
|
-
/>
|
|
193
|
-
</div>
|
|
194
|
-
<div
|
|
195
|
-
class="actions"
|
|
196
|
-
>
|
|
197
|
-
<button
|
|
198
|
-
class="ui primary disabled button"
|
|
199
|
-
disabled=""
|
|
200
|
-
tabindex="-1"
|
|
201
|
-
type="submit"
|
|
202
|
-
>
|
|
203
|
-
structure.tag.add
|
|
204
|
-
</button>
|
|
205
|
-
</div>
|
|
206
|
-
</form>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
`;
|
|
210
|
-
|
|
211
|
-
exports[`<LinkStructureTagForm /> matches the latest snapshot create without comment 1`] = `
|
|
212
|
-
<div>
|
|
213
|
-
<div
|
|
214
|
-
class="ui container link-structure-tag-form"
|
|
215
|
-
>
|
|
216
|
-
<form
|
|
217
|
-
class="ui form"
|
|
218
|
-
>
|
|
219
|
-
<div
|
|
220
|
-
class="field"
|
|
221
|
-
>
|
|
222
|
-
<label>
|
|
223
|
-
structure.tag.dropdown.label
|
|
224
|
-
</label>
|
|
225
|
-
<div
|
|
226
|
-
aria-disabled="false"
|
|
227
|
-
aria-expanded="true"
|
|
228
|
-
class="ui active visible search selection dropdown"
|
|
229
|
-
name="tag"
|
|
230
|
-
role="combobox"
|
|
231
|
-
>
|
|
232
|
-
<input
|
|
233
|
-
aria-autocomplete="list"
|
|
234
|
-
autocomplete="off"
|
|
235
|
-
class="search"
|
|
236
|
-
tabindex="0"
|
|
237
|
-
type="text"
|
|
238
|
-
value=""
|
|
239
|
-
/>
|
|
240
|
-
<div
|
|
241
|
-
aria-atomic="true"
|
|
242
|
-
aria-live="polite"
|
|
243
|
-
class="divider text"
|
|
244
|
-
role="alert"
|
|
245
|
-
>
|
|
246
|
-
Tag2
|
|
247
|
-
</div>
|
|
248
|
-
<i
|
|
249
|
-
aria-hidden="true"
|
|
250
|
-
class="dropdown icon clear"
|
|
251
|
-
/>
|
|
252
|
-
<div
|
|
253
|
-
class="visible menu transition"
|
|
254
|
-
role="listbox"
|
|
255
|
-
>
|
|
256
|
-
<div
|
|
257
|
-
aria-checked="false"
|
|
258
|
-
aria-selected="false"
|
|
259
|
-
class="item"
|
|
260
|
-
role="option"
|
|
261
|
-
style="pointer-events: all;"
|
|
262
|
-
>
|
|
263
|
-
<span
|
|
264
|
-
class="description"
|
|
265
|
-
>
|
|
266
|
-
description test
|
|
267
|
-
</span>
|
|
268
|
-
<span
|
|
269
|
-
class="text"
|
|
270
|
-
>
|
|
271
|
-
Tag1
|
|
272
|
-
</span>
|
|
273
|
-
</div>
|
|
274
|
-
<div
|
|
275
|
-
aria-checked="true"
|
|
276
|
-
aria-selected="true"
|
|
277
|
-
class="active selected item"
|
|
278
|
-
role="option"
|
|
279
|
-
style="pointer-events: all;"
|
|
280
|
-
>
|
|
281
|
-
<span
|
|
282
|
-
class="description"
|
|
283
|
-
>
|
|
284
|
-
large desclarge desclarge desclarge desclarge desc
|
|
285
|
-
</span>
|
|
286
|
-
<span
|
|
287
|
-
class="text"
|
|
288
|
-
>
|
|
289
|
-
Tag2
|
|
290
|
-
</span>
|
|
291
|
-
</div>
|
|
292
|
-
</div>
|
|
293
|
-
</div>
|
|
294
|
-
</div>
|
|
295
|
-
<div
|
|
296
|
-
class="field"
|
|
297
|
-
>
|
|
298
|
-
<label>
|
|
299
|
-
structure.tag.textArea.label
|
|
300
|
-
</label>
|
|
301
|
-
<textarea
|
|
302
|
-
data-testid="comment-id"
|
|
303
|
-
name="comment"
|
|
304
|
-
placeholder="structure.tag.textArea.placeholder"
|
|
305
|
-
rows="3"
|
|
306
|
-
/>
|
|
307
|
-
</div>
|
|
308
|
-
<div
|
|
309
|
-
class="actions"
|
|
310
|
-
>
|
|
311
|
-
<button
|
|
312
|
-
class="ui primary button"
|
|
313
|
-
type="submit"
|
|
314
|
-
>
|
|
315
|
-
structure.tag.add
|
|
316
|
-
</button>
|
|
317
|
-
</div>
|
|
318
|
-
</form>
|
|
319
|
-
</div>
|
|
320
|
-
</div>
|
|
321
|
-
`;
|
|
322
|
-
|
|
323
|
-
exports[`<LinkStructureTagForm /> matches the latest snapshot edit 1`] = `
|
|
324
|
-
<div>
|
|
325
|
-
<div
|
|
326
|
-
class="ui container link-structure-tag-form"
|
|
327
|
-
>
|
|
328
|
-
<form
|
|
329
|
-
class="ui form"
|
|
330
|
-
>
|
|
331
|
-
<div
|
|
332
|
-
class="disabled field"
|
|
333
|
-
>
|
|
334
|
-
<label>
|
|
335
|
-
structure.tag.dropdown.label
|
|
336
|
-
</label>
|
|
337
|
-
<div
|
|
338
|
-
aria-disabled="true"
|
|
339
|
-
aria-expanded="false"
|
|
340
|
-
class="ui disabled search selection dropdown"
|
|
341
|
-
name="tag"
|
|
342
|
-
role="combobox"
|
|
343
|
-
>
|
|
344
|
-
<input
|
|
345
|
-
aria-autocomplete="list"
|
|
346
|
-
autocomplete="off"
|
|
347
|
-
class="search"
|
|
348
|
-
tabindex="-1"
|
|
349
|
-
type="text"
|
|
350
|
-
value=""
|
|
351
|
-
/>
|
|
352
|
-
<div
|
|
353
|
-
aria-atomic="true"
|
|
354
|
-
aria-live="polite"
|
|
355
|
-
class="divider text"
|
|
356
|
-
role="alert"
|
|
357
|
-
>
|
|
358
|
-
Tag without description
|
|
359
|
-
</div>
|
|
360
|
-
<i
|
|
361
|
-
aria-hidden="true"
|
|
362
|
-
class="dropdown icon clear"
|
|
363
|
-
/>
|
|
364
|
-
<div
|
|
365
|
-
class="menu transition"
|
|
366
|
-
role="listbox"
|
|
367
|
-
>
|
|
368
|
-
<div
|
|
369
|
-
aria-checked="true"
|
|
370
|
-
aria-selected="true"
|
|
371
|
-
class="active selected item"
|
|
372
|
-
role="option"
|
|
373
|
-
style="pointer-events: all;"
|
|
374
|
-
>
|
|
375
|
-
<span
|
|
376
|
-
class="text"
|
|
377
|
-
>
|
|
378
|
-
Tag without description
|
|
379
|
-
</span>
|
|
380
|
-
</div>
|
|
381
|
-
<div
|
|
382
|
-
aria-checked="false"
|
|
383
|
-
aria-selected="false"
|
|
384
|
-
class="item"
|
|
385
|
-
role="option"
|
|
386
|
-
style="pointer-events: all;"
|
|
387
|
-
>
|
|
388
|
-
<span
|
|
389
|
-
class="description"
|
|
390
|
-
>
|
|
391
|
-
description test
|
|
392
|
-
</span>
|
|
393
|
-
<span
|
|
394
|
-
class="text"
|
|
395
|
-
>
|
|
396
|
-
Tag1
|
|
397
|
-
</span>
|
|
398
|
-
</div>
|
|
399
|
-
<div
|
|
400
|
-
aria-checked="false"
|
|
401
|
-
aria-selected="false"
|
|
402
|
-
class="item"
|
|
403
|
-
role="option"
|
|
404
|
-
style="pointer-events: all;"
|
|
405
|
-
>
|
|
406
|
-
<span
|
|
407
|
-
class="description"
|
|
408
|
-
>
|
|
409
|
-
large desclarge desclarge desclarge desclarge desc
|
|
410
|
-
</span>
|
|
411
|
-
<span
|
|
412
|
-
class="text"
|
|
413
|
-
>
|
|
414
|
-
Tag2
|
|
415
|
-
</span>
|
|
416
|
-
</div>
|
|
417
|
-
</div>
|
|
418
|
-
</div>
|
|
419
|
-
</div>
|
|
420
|
-
<div
|
|
421
|
-
class="field"
|
|
422
|
-
>
|
|
423
|
-
<label>
|
|
424
|
-
structure.tag.textArea.label
|
|
425
|
-
</label>
|
|
426
|
-
<textarea
|
|
427
|
-
data-testid="comment-id"
|
|
428
|
-
name="comment"
|
|
429
|
-
placeholder="structure.tag.textArea.placeholder"
|
|
430
|
-
rows="3"
|
|
431
|
-
>
|
|
432
|
-
foo
|
|
433
|
-
</textarea>
|
|
434
|
-
</div>
|
|
435
|
-
<div
|
|
436
|
-
class="actions"
|
|
437
|
-
>
|
|
438
|
-
<button
|
|
439
|
-
class="ui primary disabled button"
|
|
440
|
-
disabled=""
|
|
441
|
-
tabindex="-1"
|
|
442
|
-
type="submit"
|
|
443
|
-
>
|
|
444
|
-
structure.tag.edit
|
|
445
|
-
</button>
|
|
446
|
-
<button
|
|
447
|
-
class="ui secondary button"
|
|
448
|
-
type="button"
|
|
449
|
-
>
|
|
450
|
-
structure.tag.delete
|
|
451
|
-
</button>
|
|
452
|
-
</div>
|
|
453
|
-
</form>
|
|
454
|
-
</div>
|
|
455
|
-
</div>
|
|
456
|
-
`;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<LinkedStructureTag /> matches the latest snapshot 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="ui tag label"
|
|
7
|
-
style="margin-left: 1.5em;"
|
|
8
|
-
>
|
|
9
|
-
<i
|
|
10
|
-
aria-hidden="true"
|
|
11
|
-
class="edit link icon"
|
|
12
|
-
/>
|
|
13
|
-
Tag without description
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
`;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<StructureTagsCrumbs /> matches the latest snapshot 1`] = `
|
|
4
|
-
<Breadcrumb>
|
|
5
|
-
<BreadcrumbSection
|
|
6
|
-
active={false}
|
|
7
|
-
as={
|
|
8
|
-
Object {
|
|
9
|
-
"$$typeof": Symbol(react.forward_ref),
|
|
10
|
-
"displayName": "Link",
|
|
11
|
-
"propTypes": Object {
|
|
12
|
-
"innerRef": [Function],
|
|
13
|
-
"onClick": [Function],
|
|
14
|
-
"replace": [Function],
|
|
15
|
-
"target": [Function],
|
|
16
|
-
"to": [Function],
|
|
17
|
-
},
|
|
18
|
-
"render": [Function],
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
to="/structureTags"
|
|
22
|
-
>
|
|
23
|
-
<MemoizedFormattedMessage
|
|
24
|
-
id="structureTags.crumbs.root"
|
|
25
|
-
/>
|
|
26
|
-
</BreadcrumbSection>
|
|
27
|
-
<BreadcrumbDivider
|
|
28
|
-
icon="right angle"
|
|
29
|
-
/>
|
|
30
|
-
<BreadcrumbSection
|
|
31
|
-
active={true}
|
|
32
|
-
>
|
|
33
|
-
doc
|
|
34
|
-
</BreadcrumbSection>
|
|
35
|
-
</Breadcrumb>
|
|
36
|
-
`;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { deleteLinkStructureTag } from "../../routines";
|
|
2
|
-
import { deletingStructureTags } from "..";
|
|
3
|
-
|
|
4
|
-
const fooState = { foo: "bar" };
|
|
5
|
-
|
|
6
|
-
describe("reducers: deletingStructureTags", () => {
|
|
7
|
-
it("should provide the initial state", () => {
|
|
8
|
-
expect(deletingStructureTags(undefined, {})).toBe(false);
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
it("should be true after receiving the deleteLinkStructureTag.TRIGGER action", () => {
|
|
12
|
-
expect(
|
|
13
|
-
deletingStructureTags(fooState, {
|
|
14
|
-
type: deleteLinkStructureTag.TRIGGER
|
|
15
|
-
})
|
|
16
|
-
).toBe(true);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it("should be false after receiving the deleteLinkStructureTag.FULFILL action", () => {
|
|
20
|
-
expect(
|
|
21
|
-
deletingStructureTags(fooState, {
|
|
22
|
-
type: deleteLinkStructureTag.FULFILL
|
|
23
|
-
})
|
|
24
|
-
).toBe(false);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it("should ignore unhandled actions", () => {
|
|
28
|
-
expect(deletingStructureTags(fooState, { type: "FOO" })).toBe(fooState);
|
|
29
|
-
});
|
|
30
|
-
});
|