@truedat/ie 8.12.2 → 8.12.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 +3 -3
- package/src/ingests/components/__tests__/IngestArchiveRow.spec.js +7 -1
- package/src/ingests/components/__tests__/IngestForm.spec.js +8 -0
- package/src/ingests/components/__tests__/__snapshots__/IngestArchiveRow.spec.js.snap +31 -27
- package/src/ingests/components/__tests__/__snapshots__/IngestForm.spec.js.snap +106 -0
- package/src/ingests/selectors/getIngestColumns.js +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/ie",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.4",
|
|
4
4
|
"description": "Truedat Web Ingests",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@testing-library/jest-dom": "^6.6.3",
|
|
55
55
|
"@testing-library/react": "^16.3.0",
|
|
56
56
|
"@testing-library/user-event": "^14.6.1",
|
|
57
|
-
"@truedat/test": "8.12.
|
|
57
|
+
"@truedat/test": "8.12.4",
|
|
58
58
|
"identity-obj-proxy": "^3.0.0",
|
|
59
59
|
"jest": "^29.7.0",
|
|
60
60
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"slate-react": "^0.22.10",
|
|
91
91
|
"swr": "^2.3.3"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "d5bc1af84c4d828bdec676b0da58385cf0d6015f"
|
|
94
94
|
}
|
|
@@ -17,7 +17,13 @@ describe("<IngestArchiveRow />", () => {
|
|
|
17
17
|
last_change_by: "maixu",
|
|
18
18
|
version: 1,
|
|
19
19
|
};
|
|
20
|
-
const rendered = render(
|
|
20
|
+
const rendered = render(
|
|
21
|
+
<table>
|
|
22
|
+
<tbody>
|
|
23
|
+
<IngestArchiveRow {...props} />
|
|
24
|
+
</tbody>
|
|
25
|
+
</table>,
|
|
26
|
+
);
|
|
21
27
|
await waitForLoad(rendered);
|
|
22
28
|
expect(rendered.container).toMatchSnapshot();
|
|
23
29
|
});
|
|
@@ -12,9 +12,15 @@ const templateVariables = { scope: "ie", domainIds: [1] };
|
|
|
12
12
|
const domainVariables = { action: "createIngest" };
|
|
13
13
|
|
|
14
14
|
describe("<IngestForm />", () => {
|
|
15
|
+
afterEach(() => {
|
|
16
|
+
jest.useFakeTimers();
|
|
17
|
+
jest.setSystemTime(new Date("2025-01-01"));
|
|
18
|
+
});
|
|
19
|
+
|
|
15
20
|
describe("with multiple templates", () => {
|
|
16
21
|
const renderOpts = {
|
|
17
22
|
mocks: [
|
|
23
|
+
multipleTemplatesMock({ scope: "ie", domainIds: null }),
|
|
18
24
|
multipleTemplatesMock(templateVariables),
|
|
19
25
|
domainsMock(domainVariables),
|
|
20
26
|
],
|
|
@@ -35,6 +41,7 @@ describe("<IngestForm />", () => {
|
|
|
35
41
|
const rendered = render(<IngestForm />, renderOpts);
|
|
36
42
|
await waitForLoad(rendered);
|
|
37
43
|
|
|
44
|
+
jest.useRealTimers();
|
|
38
45
|
const user = userEvent.setup({ delay: null });
|
|
39
46
|
await user.click(await rendered.findByText(/foodomain/i));
|
|
40
47
|
|
|
@@ -47,6 +54,7 @@ describe("<IngestForm />", () => {
|
|
|
47
54
|
describe("with a single template", () => {
|
|
48
55
|
const renderOpts = {
|
|
49
56
|
mocks: [
|
|
57
|
+
singleTemplateMock({ scope: "ie", domainIds: null }),
|
|
50
58
|
singleTemplateMock(templateVariables),
|
|
51
59
|
domainsMock(domainVariables),
|
|
52
60
|
],
|
|
@@ -2,33 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`<IngestArchiveRow /> matches the latest snapshot 1`] = `
|
|
4
4
|
<div>
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class=""
|
|
10
|
-
>
|
|
11
|
-
ingests.status.status
|
|
12
|
-
</td>
|
|
13
|
-
<td
|
|
14
|
-
class=""
|
|
15
|
-
>
|
|
16
|
-
1
|
|
17
|
-
</td>
|
|
18
|
-
<td
|
|
19
|
-
class=""
|
|
20
|
-
>
|
|
21
|
-
maixu
|
|
22
|
-
</td>
|
|
23
|
-
<td
|
|
24
|
-
class=""
|
|
25
|
-
>
|
|
26
|
-
<time
|
|
27
|
-
datetime="1530084773154"
|
|
5
|
+
<table>
|
|
6
|
+
<tbody>
|
|
7
|
+
<tr
|
|
8
|
+
class=""
|
|
28
9
|
>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
<td
|
|
11
|
+
class=""
|
|
12
|
+
>
|
|
13
|
+
ingests.status.status
|
|
14
|
+
</td>
|
|
15
|
+
<td
|
|
16
|
+
class=""
|
|
17
|
+
>
|
|
18
|
+
1
|
|
19
|
+
</td>
|
|
20
|
+
<td
|
|
21
|
+
class=""
|
|
22
|
+
>
|
|
23
|
+
maixu
|
|
24
|
+
</td>
|
|
25
|
+
<td
|
|
26
|
+
class=""
|
|
27
|
+
>
|
|
28
|
+
<time
|
|
29
|
+
datetime="1530084773154"
|
|
30
|
+
>
|
|
31
|
+
2018-06-27 07:32
|
|
32
|
+
</time>
|
|
33
|
+
</td>
|
|
34
|
+
</tr>
|
|
35
|
+
</tbody>
|
|
36
|
+
</table>
|
|
33
37
|
</div>
|
|
34
38
|
`;
|
|
@@ -276,6 +276,37 @@ exports[`<IngestForm /> with a single template matches the latest snapshot 1`] =
|
|
|
276
276
|
</div>
|
|
277
277
|
</div>
|
|
278
278
|
</div>
|
|
279
|
+
<div
|
|
280
|
+
class="ui segment"
|
|
281
|
+
>
|
|
282
|
+
<h4
|
|
283
|
+
class="ui header"
|
|
284
|
+
>
|
|
285
|
+
g1
|
|
286
|
+
</h4>
|
|
287
|
+
<div
|
|
288
|
+
class="field"
|
|
289
|
+
data-testid="form-field"
|
|
290
|
+
>
|
|
291
|
+
<label>
|
|
292
|
+
field1
|
|
293
|
+
</label>
|
|
294
|
+
<div
|
|
295
|
+
class="field"
|
|
296
|
+
>
|
|
297
|
+
<div
|
|
298
|
+
class="ui input"
|
|
299
|
+
>
|
|
300
|
+
<input
|
|
301
|
+
name="field1"
|
|
302
|
+
placeholder="field1"
|
|
303
|
+
type="text"
|
|
304
|
+
value=""
|
|
305
|
+
/>
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
279
310
|
<div
|
|
280
311
|
class="actions"
|
|
281
312
|
>
|
|
@@ -576,6 +607,81 @@ exports[`<IngestForm /> with multiple templates matches the latest snapshot 1`]
|
|
|
576
607
|
</div>
|
|
577
608
|
</div>
|
|
578
609
|
</div>
|
|
610
|
+
<div
|
|
611
|
+
class="required field"
|
|
612
|
+
>
|
|
613
|
+
<label>
|
|
614
|
+
template.selector.label
|
|
615
|
+
<div
|
|
616
|
+
class="ui left pointing label"
|
|
617
|
+
>
|
|
618
|
+
template.form.validation.empty_required
|
|
619
|
+
</div>
|
|
620
|
+
</label>
|
|
621
|
+
<div
|
|
622
|
+
class="field"
|
|
623
|
+
>
|
|
624
|
+
<div
|
|
625
|
+
aria-busy="false"
|
|
626
|
+
aria-expanded="false"
|
|
627
|
+
class="ui search selection dropdown"
|
|
628
|
+
name="template"
|
|
629
|
+
role="combobox"
|
|
630
|
+
>
|
|
631
|
+
<input
|
|
632
|
+
aria-autocomplete="list"
|
|
633
|
+
autocomplete="off"
|
|
634
|
+
class="search"
|
|
635
|
+
tabindex="0"
|
|
636
|
+
type="text"
|
|
637
|
+
value=""
|
|
638
|
+
/>
|
|
639
|
+
<div
|
|
640
|
+
aria-atomic="true"
|
|
641
|
+
aria-live="polite"
|
|
642
|
+
class="divider default text"
|
|
643
|
+
role="alert"
|
|
644
|
+
>
|
|
645
|
+
template.selector.placeholder
|
|
646
|
+
</div>
|
|
647
|
+
<i
|
|
648
|
+
aria-hidden="true"
|
|
649
|
+
class="dropdown icon"
|
|
650
|
+
/>
|
|
651
|
+
<div
|
|
652
|
+
class="menu transition"
|
|
653
|
+
role="listbox"
|
|
654
|
+
>
|
|
655
|
+
<div
|
|
656
|
+
aria-checked="false"
|
|
657
|
+
aria-selected="true"
|
|
658
|
+
class="selected item"
|
|
659
|
+
role="option"
|
|
660
|
+
style="pointer-events: all;"
|
|
661
|
+
>
|
|
662
|
+
<span
|
|
663
|
+
class="text"
|
|
664
|
+
>
|
|
665
|
+
template1
|
|
666
|
+
</span>
|
|
667
|
+
</div>
|
|
668
|
+
<div
|
|
669
|
+
aria-checked="false"
|
|
670
|
+
aria-selected="false"
|
|
671
|
+
class="item"
|
|
672
|
+
role="option"
|
|
673
|
+
style="pointer-events: all;"
|
|
674
|
+
>
|
|
675
|
+
<span
|
|
676
|
+
class="text"
|
|
677
|
+
>
|
|
678
|
+
template2
|
|
679
|
+
</span>
|
|
680
|
+
</div>
|
|
681
|
+
</div>
|
|
682
|
+
</div>
|
|
683
|
+
</div>
|
|
684
|
+
</div>
|
|
579
685
|
<div
|
|
580
686
|
class="actions"
|
|
581
687
|
>
|
|
@@ -43,9 +43,8 @@ const translateDecorator = (text) => <FormattedMessage id={text} />;
|
|
|
43
43
|
const getIngests = (state) => state.ingests;
|
|
44
44
|
const getColumns = (state) => state.ingestsColumns;
|
|
45
45
|
|
|
46
|
-
export const getIngestColumns =
|
|
47
|
-
|
|
48
|
-
);
|
|
46
|
+
export const getIngestColumns = (state) =>
|
|
47
|
+
getColumns(state) ?? defaultIngestColumns;
|
|
49
48
|
|
|
50
49
|
const getIngestColumnNames = createSelector(getIngestColumns, _.map("name"));
|
|
51
50
|
|