@truedat/ie 4.44.4 → 4.44.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.44.5] 2022-05-20
4
+
5
+ ### Changed
6
+
7
+ - [TD-4230] Refactored `IngestForm` to use `SelectableDynamicForm`
8
+
3
9
  ## [4.37.4] 2022-02-04
4
10
 
5
11
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/ie",
3
- "version": "4.44.4",
3
+ "version": "4.44.5",
4
4
  "description": "Truedat Web Ingests",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -16,22 +16,26 @@
16
16
  "scripts": {
17
17
  "clean": "rimraf yarn-error.log",
18
18
  "debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
19
- "test": "jest --coverage",
20
- "test:watch": "jest --watch",
19
+ "test": "TZ=UTC jest --coverage",
20
+ "test:watch": "TZ=UTC jest --watch",
21
21
  "eslint": "eslint src/**",
22
22
  "eslint:fix": "eslint --fix src/**"
23
23
  },
24
24
  "devDependencies": {
25
- "@babel/cli": "^7.14.8",
26
- "@babel/core": "^7.15.0",
27
- "@babel/plugin-proposal-class-properties": "^7.14.5",
28
- "@babel/plugin-proposal-object-rest-spread": "^7.14.7",
25
+ "@babel/cli": "^7.17.10",
26
+ "@babel/core": "^7.18.0",
27
+ "@babel/plugin-proposal-class-properties": "^7.17.12",
28
+ "@babel/plugin-proposal-object-rest-spread": "^7.18.0",
29
+ "@babel/plugin-proposal-optional-chaining": "^7.17.12",
29
30
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
30
- "@babel/plugin-transform-modules-commonjs": "^7.15.0",
31
- "@babel/preset-env": "^7.15.0",
32
- "@babel/preset-react": "^7.14.5",
33
- "@truedat/test": "4.44.4",
34
- "babel-jest": "^27.0.6",
31
+ "@babel/plugin-transform-modules-commonjs": "^7.18.0",
32
+ "@babel/preset-env": "^7.18.0",
33
+ "@babel/preset-react": "^7.17.12",
34
+ "@testing-library/jest-dom": "^5.16.4",
35
+ "@testing-library/react": "^12.0.0",
36
+ "@testing-library/user-event": "^13.2.1",
37
+ "@truedat/test": "4.44.5",
38
+ "babel-jest": "^28.1.0",
35
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
36
40
  "babel-plugin-lodash": "^3.3.4",
37
41
  "babel-plugin-react-intl": "^5.1.18",
@@ -40,7 +44,8 @@
40
44
  "enzyme-adapter-react-16": "^1.15.6",
41
45
  "enzyme-to-json": "^3.6.2",
42
46
  "identity-obj-proxy": "^3.0.0",
43
- "jest": "^27.0.6",
47
+ "jest": "^28.1.0",
48
+ "jest-environment-jsdom": "^28.1.0",
44
49
  "react": "^16.14.0",
45
50
  "react-dom": "^16.14.0",
46
51
  "redux-saga-test-plan": "^4.0.4",
@@ -48,6 +53,8 @@
48
53
  "semantic-ui-react": "^2.0.3"
49
54
  },
50
55
  "jest": {
56
+ "maxWorkers": "50%",
57
+ "testTimeout": 10000,
51
58
  "moduleDirectories": [
52
59
  "<rootDir>/src",
53
60
  "../../node_modules"
@@ -80,14 +87,14 @@
80
87
  ]
81
88
  },
82
89
  "dependencies": {
83
- "@truedat/core": "4.44.4",
84
- "@truedat/df": "4.44.4",
90
+ "@truedat/core": "4.44.5",
91
+ "@truedat/df": "4.44.5",
85
92
  "file-saver": "^2.0.5",
86
93
  "moment": "^2.24.0",
87
94
  "path-to-regexp": "^1.7.0",
88
- "prop-types": "^15.7.2",
95
+ "prop-types": "^15.8.1",
89
96
  "react-intl": "^5.20.10",
90
- "react-moment": "^0.9.7",
97
+ "react-moment": "^1.1.2",
91
98
  "react-redux": "^7.2.4",
92
99
  "react-router-dom": "^5.2.0",
93
100
  "redux": "^4.1.1",
@@ -100,5 +107,5 @@
100
107
  "react-dom": ">= 16.8.6 < 17",
101
108
  "semantic-ui-react": ">= 0.88.2 < 2.1"
102
109
  },
103
- "gitHead": "36fb183e1d22181e6a15b3bac2c01b39214eacdb"
110
+ "gitHead": "5a339468198c803592b285eddd0dd0c0b0eced93"
104
111
  }
@@ -1,13 +1,9 @@
1
- import React from "react";
2
1
  import { connect } from "react-redux";
3
2
  import { bindActionCreators } from "redux";
3
+ import { AvailableFilters } from "@truedat/core/components";
4
4
  import { addIngestFilter, resetIngestFilters } from "../routines";
5
5
  import { getIngestAvailableFilters } from "../selectors";
6
6
 
7
- const AvailableFilters = React.lazy(() =>
8
- import("@truedat/core/components/AvailableFilters")
9
- );
10
-
11
7
  const mapStateToProps = (state) => ({
12
8
  filters: getIngestAvailableFilters(state),
13
9
  disabled: state.ingestFiltersLoading,
@@ -1,14 +1,10 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
3
2
  import { connect } from "react-redux";
4
3
  import { bindActionCreators } from "redux";
4
+ import { AvailableFilters } from "@truedat/core/components";
5
5
  import { addIngestFilter, resetIngestFilters } from "../routines";
6
6
  import { getIngestAvailableFilters } from "../selectors";
7
7
 
8
- const AvailableFilters = React.lazy(() =>
9
- import("@truedat/core/components/AvailableFilters")
10
- );
11
-
12
8
  const mapStateToProps = (state) => ({
13
9
  filters: _.flow(getIngestAvailableFilters, _.without(["status"]))(state),
14
10
  disabled: state.ingestFiltersLoading,
@@ -13,23 +13,18 @@ import {
13
13
  import { compose } from "redux";
14
14
  import { connect } from "react-redux";
15
15
  import { injectIntl, FormattedMessage } from "react-intl";
16
- import { HistoryBackButton, TemplateSelector } from "@truedat/core/components";
17
- import { selectDomain } from "@truedat/df/routines";
18
- import { applyTemplate } from "@truedat/df/utils";
16
+ import { HistoryBackButton } from "@truedat/core/components";
19
17
  import { ingestAction } from "../routines";
20
18
 
21
19
  const DomainDropdownSelector = React.lazy(() =>
22
20
  import("@truedat/bg/taxonomy/components/DomainDropdownSelector")
23
21
  );
24
- const DynamicForm = React.lazy(() =>
25
- import("@truedat/df/components/DynamicForm")
22
+ const SelectableDynamicForm = React.lazy(() =>
23
+ import("@truedat/df/components/SelectableDynamicForm")
26
24
  );
27
25
  const RichTextEditor = React.lazy(() =>
28
26
  import("@truedat/core/components/RichTextEditor")
29
27
  );
30
- const TemplateLoader = React.lazy(() =>
31
- import("@truedat/df/templates/components/TemplateLoader")
32
- );
33
28
 
34
29
  const actionKey = "create";
35
30
 
@@ -39,8 +34,6 @@ const initialState = {
39
34
  name: "",
40
35
  description: {},
41
36
  content: {},
42
- templatesLoading: true,
43
- template: null,
44
37
  };
45
38
 
46
39
  const isNonEmptyString = _.flow(_.trim, _.negate(_.isEmpty));
@@ -48,6 +41,7 @@ const isValid = _.conforms({
48
41
  name: isNonEmptyString,
49
42
  domain_id: _.isFinite,
50
43
  description: _.negate(_.isEmpty),
44
+ type: isNonEmptyString,
51
45
  });
52
46
 
53
47
  export class IngestForm extends React.Component {
@@ -56,41 +50,13 @@ export class IngestForm extends React.Component {
56
50
  ingestAction: PropTypes.func,
57
51
  ingestActionLoading: PropTypes.string,
58
52
  intl: PropTypes.object,
59
- selectDomain: PropTypes.func,
60
53
  };
61
54
 
62
55
  state = initialState;
63
56
 
64
- handleTemplatesLoaded = ({ templates = [] } = {}) => {
65
- const { type: name, content, domain_id } = this.state;
66
- const template = name
67
- ? _.find(_.propEq("name", name))(templates)
68
- : _.size(templates) == 1
69
- ? templates[0]
70
- : null;
71
- this.setState({
72
- template,
73
- templatesLoading: false,
74
- type: template?.name || null,
75
- content: template ? applyTemplate(template)(content, domain_id) : {},
76
- });
77
- };
78
-
79
- handleTemplateSelected = (e, { template }) => {
80
- const { content, domain_id } = this.state;
81
- this.setState({
82
- template,
83
- type: template?.name || null,
84
- content: template ? applyTemplate(template)(content, domain_id) : {},
85
- });
86
- };
87
-
88
- handleDomainSelected = (e, { value }) => {
57
+ handleDomainSelected = (_e, { value }) => {
89
58
  const domain_id = value;
90
59
 
91
- const { selectDomain } = this.props;
92
- selectDomain({ id: domain_id });
93
-
94
60
  this.setState({ domain_id });
95
61
  };
96
62
 
@@ -106,25 +72,24 @@ export class IngestForm extends React.Component {
106
72
  }
107
73
  };
108
74
 
109
- handleContentChange = (content) => this.setState({ content });
75
+ handleContentChange = ({ content }) => this.setState({ content });
110
76
 
111
77
  isInvalid = () => _.negate(isValid)(this.state);
112
78
 
113
79
  handleSubmit = (e) => {
114
80
  e.preventDefault();
115
81
  const { action, ingestAction } = this.props;
116
- const ingestVersion = _.pick(["domain_id", "type", ...staticFields])(
117
- this.state
118
- );
119
- const { template, content, domain_id } = this.state;
82
+ const ingest_version = _.pick([
83
+ "domain_id",
84
+ "type",
85
+ "content",
86
+ ...staticFields,
87
+ ])(this.state);
120
88
 
121
89
  ingestAction({
122
90
  action: actionKey,
123
91
  ...action,
124
- ingest_version: {
125
- ...ingestVersion,
126
- content: applyTemplate(template)(content, domain_id),
127
- },
92
+ ingest_version,
128
93
  });
129
94
  };
130
95
 
@@ -135,12 +100,10 @@ export class IngestForm extends React.Component {
135
100
  intl: { formatMessage },
136
101
  } = this.props;
137
102
 
138
- const { name, description, content, template, templatesLoading } =
139
- this.state;
103
+ const { name, description, content, type, domain_id } = this.state;
140
104
 
141
105
  const loading =
142
- templatesLoading ||
143
- (action && action.href && ingestActionLoading === action.href);
106
+ action && action.href && ingestActionLoading === action.href;
144
107
 
145
108
  return (
146
109
  <Container as={Segment} text>
@@ -150,18 +113,10 @@ export class IngestForm extends React.Component {
150
113
  <FormattedMessage id="ingests.actions.create" />
151
114
  </Header.Content>
152
115
  </Header>
153
- <TemplateLoader />
154
116
  <Form loading={loading}>
155
117
  <DomainDropdownSelector
156
118
  onChange={this.handleDomainSelected}
157
- invalid={!_.isFinite(this.state.domain_id)}
158
- />
159
- <TemplateSelector
160
- scope="ie"
161
- selectedValue={template?.id}
162
- onChange={this.handleTemplateSelected}
163
- onLoad={this.handleTemplatesLoaded}
164
- required
119
+ invalid={!_.isFinite(domain_id)}
165
120
  />
166
121
  <Form.Field required>
167
122
  <label>
@@ -189,13 +144,16 @@ export class IngestForm extends React.Component {
189
144
  onChange={this.handleEditorChange}
190
145
  />
191
146
  </Form.Field>
192
- {template?.id ? (
193
- <DynamicForm
194
- onChange={this.handleContentChange}
195
- content={content}
196
- template={template}
197
- />
198
- ) : null}
147
+
148
+ <SelectableDynamicForm
149
+ scope="ie"
150
+ domainIds={_.isNil(domain_id) ? null : [domain_id]}
151
+ required
152
+ content={content}
153
+ name={type}
154
+ onChange={this.handleContentChange}
155
+ onNameChange={(type) => this.setState({ type })}
156
+ />
199
157
  <div className="actions">
200
158
  <HistoryBackButton
201
159
  content={formatMessage({ id: "actions.cancel" })}
@@ -220,5 +178,5 @@ const mapStateToProps = ({ ingestActionLoading, ingestsActions }) => ({
220
178
 
221
179
  export default compose(
222
180
  injectIntl,
223
- connect(mapStateToProps, { ingestAction, selectDomain })
181
+ connect(mapStateToProps, { ingestAction })
224
182
  )(IngestForm);
@@ -1,17 +1,16 @@
1
1
  import React from "react";
2
- import { shallowWithIntl } from "@truedat/test/intl-stub";
3
- import { IngestFilters } from "../IngestFilters";
2
+ import { render } from "@truedat/test/render";
3
+ import IngestFilters from "../IngestFilters";
4
4
 
5
- describe("<IngestFilters />", () => {
6
- const active = true;
7
- const ingestSelectedFilters = {
8
- selectedFilters: [],
9
- openFilter: undefined
10
- };
5
+ const state = {
6
+ ingestFilters: { domain_id: [1, 2], confidential: ["yes", "no"] },
7
+ ingestActiveFilters: { domain_id: [1] },
8
+ };
9
+ const renderOpts = { state };
11
10
 
11
+ describe("<IngestFilters />", () => {
12
12
  it("matches the latest snapshot", () => {
13
- const props = { active, ingestSelectedFilters };
14
- const wrapper = shallowWithIntl(<IngestFilters {...props} />);
15
- expect(wrapper).toMatchSnapshot();
13
+ const { container } = render(<IngestFilters />, renderOpts);
14
+ expect(container).toMatchSnapshot();
16
15
  });
17
16
  });
@@ -1,102 +1,68 @@
1
- import React, { Suspense } from "react";
2
- import { waitFor } from "@testing-library/react";
1
+ import React from "react";
3
2
  import { render } from "@truedat/test/render";
4
- import { TEMPLATES_QUERY } from "@truedat/core/api/queries";
3
+ import { waitFor } from "@testing-library/react";
4
+ import { multipleTemplatesMock, singleTemplateMock } from "@truedat/test/mocks";
5
5
  import IngestForm from "../IngestForm";
6
6
 
7
- const template1 = {
8
- id: "1",
9
- name: "template1",
10
- label: "template1",
11
- scope: "remediation",
12
- content: [
13
- {
14
- name: "g1",
15
- fields: [{ name: "field1", label: "field1", placeholder: "field1" }],
16
- },
17
- ],
18
- };
19
- const template2 = {
20
- id: "2",
21
- name: "template2",
22
- label: "template2",
23
- scope: "remediation",
24
- content: {},
25
- };
26
- const makeRenderOpts = (templates) => ({
27
- mocks: [
28
- {
29
- request: { query: TEMPLATES_QUERY, variables: { scope: "ie" } },
30
- result: { data: { templates } },
31
- },
32
- ],
33
- state: {
34
- ingestActions: { create: {} },
35
- ingestActionLoading: "",
36
- domains: [{ id: 1, name: "domain1" }],
37
- },
38
- });
7
+ const variables = { scope: "ie", domainIds: [1] };
39
8
 
40
9
  describe("<IngestForm />", () => {
41
10
  describe("with multiple templates", () => {
42
- const templates = [template1, template2];
43
- const renderOpts = makeRenderOpts(templates);
11
+ const renderOpts = {
12
+ mocks: [multipleTemplatesMock(variables)],
13
+ state: {
14
+ ingestActions: { create: {} },
15
+ ingestActionLoading: "",
16
+ domains: [{ id: 1, name: "domain1" }],
17
+ },
18
+ fallback: "lazy",
19
+ };
44
20
 
45
21
  it("matches the latest snapshot", async () => {
46
- const { container, queryByText } = render(
47
- <Suspense fallback="loading...">
48
- <IngestForm />
49
- </Suspense>,
50
- renderOpts
22
+ const { container, queryByText } = render(<IngestForm />, renderOpts);
23
+ await waitFor(() =>
24
+ expect(queryByText(/loading/i)).not.toBeInTheDocument()
51
25
  );
52
- await waitFor(() => {
53
- expect(queryByText(/loading/i)).not.toBeInTheDocument();
54
- });
26
+ await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
55
27
  expect(container).toMatchSnapshot();
56
28
  });
57
29
 
58
30
  it("contains a template selector", async () => {
59
- const { queryByRole } = render(
60
- <Suspense fallback="loading...">
61
- <IngestForm />
62
- </Suspense>,
63
- renderOpts
31
+ const { queryByText } = render(<IngestForm />, renderOpts);
32
+ await waitFor(() =>
33
+ expect(queryByText(/loading/i)).not.toBeInTheDocument()
64
34
  );
65
- await waitFor(() => {
66
- expect(
67
- queryByRole("option", { name: "template1" })
68
- ).toBeInTheDocument();
69
- });
35
+ await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
36
+ expect(queryByText("template1")).toBeInTheDocument();
70
37
  });
71
38
  });
72
39
 
73
40
  describe("with a single template", () => {
74
- const templates = [template1];
75
- const renderOpts = makeRenderOpts(templates);
41
+ const renderOpts = {
42
+ mocks: [singleTemplateMock(variables)],
43
+ state: {
44
+ ingestActions: { create: {} },
45
+ ingestActionLoading: "",
46
+ domains: [{ id: 1, name: "domain1" }],
47
+ },
48
+ fallback: "lazy",
49
+ };
76
50
 
77
51
  it("matches the latest snapshot", async () => {
78
- const { container, queryByText } = render(
79
- <Suspense fallback="loading...">
80
- <IngestForm />
81
- </Suspense>,
82
- renderOpts
52
+ const { container, queryByText } = render(<IngestForm />, renderOpts);
53
+ await waitFor(() =>
54
+ expect(queryByText(/loading/i)).not.toBeInTheDocument()
83
55
  );
84
- await waitFor(() => {
85
- expect(queryByText(/loading/i)).not.toBeInTheDocument();
86
- });
56
+ await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
87
57
  expect(container).toMatchSnapshot();
88
58
  });
89
59
 
90
60
  it("contains no <TemplateSelector />", async () => {
91
- const { queryByText } = render(
92
- <Suspense fallback="loading...">
93
- <IngestForm />
94
- </Suspense>,
95
- renderOpts
61
+ const { queryByText } = render(<IngestForm />, renderOpts);
62
+ await waitFor(() =>
63
+ expect(queryByText(/loading/i)).not.toBeInTheDocument()
96
64
  );
97
- await waitFor(() => {
98
- expect(queryByText(/loading/i)).not.toBeInTheDocument();
99
- });
65
+ await waitFor(() => expect(queryByText(/lazy/i)).not.toBeInTheDocument());
100
66
  expect(queryByText("template1")).not.toBeInTheDocument();
101
67
  });
102
68
  });
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
- import { shallowWithIntl } from "@truedat/test/intl-stub";
2
+ import { render } from "@truedat/test/render";
3
3
  import { IngestsLabelResults } from "../IngestsLabelResults";
4
4
 
5
5
  describe("<IngestsLabelResults />", () => {
6
6
  const props = { ingestCount: 22 };
7
7
 
8
8
  it("matches the latest snapshot", () => {
9
- const wrapper = shallowWithIntl(<IngestsLabelResults {...props} />);
10
- expect(wrapper).toMatchSnapshot();
9
+ const { container } = render(<IngestsLabelResults {...props} />);
10
+ expect(container).toMatchSnapshot();
11
11
  });
12
12
  });
@@ -1,14 +1,47 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<IngestFilters /> matches the latest snapshot 1`] = `
4
- <Switch>
5
- <Route
6
- exact={true}
7
- path="/ingests"
8
- render={[Function]}
9
- />
10
- <Route
11
- render={[Function]}
12
- />
13
- </Switch>
4
+ <div>
5
+ <div
6
+ aria-expanded="false"
7
+ class="ui button floating labeled scrolling dropdown icon"
8
+ role="listbox"
9
+ tabindex="0"
10
+ >
11
+ <div
12
+ aria-atomic="true"
13
+ aria-live="polite"
14
+ class="divider text"
15
+ role="alert"
16
+ >
17
+ Filters
18
+ </div>
19
+ <i
20
+ aria-hidden="true"
21
+ class="filter icon"
22
+ />
23
+ <div
24
+ class="menu transition"
25
+ >
26
+ <div
27
+ class="item"
28
+ role="option"
29
+ >
30
+ <em>
31
+ (reset all filters)
32
+ </em>
33
+ </div>
34
+ <div
35
+ class="item"
36
+ role="option"
37
+ >
38
+ <span
39
+ class="text"
40
+ >
41
+ confidential
42
+ </span>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </div>
14
47
  `;
@@ -4,7 +4,6 @@ exports[`<IngestForm /> with a single template matches the latest snapshot 1`] =
4
4
  <div>
5
5
  <div
6
6
  class="ui segment ui text container"
7
- style=""
8
7
  >
9
8
  <h2
10
9
  class="ui header"
@@ -199,23 +198,23 @@ exports[`<IngestForm /> with a single template matches the latest snapshot 1`] =
199
198
  autocorrect="on"
200
199
  contenteditable="true"
201
200
  data-gramm="false"
202
- data-key="10"
201
+ data-key="9"
203
202
  data-slate-editor="true"
204
203
  role="textbox"
205
204
  spellcheck="true"
206
205
  style="outline: none; white-space: pre-wrap; word-wrap: break-word;"
207
206
  >
208
207
  <div
209
- data-key="11"
208
+ data-key="10"
210
209
  data-slate-object="block"
211
210
  style="position: relative;"
212
211
  >
213
212
  <span
214
- data-key="14"
213
+ data-key="13"
215
214
  data-slate-object="text"
216
215
  >
217
216
  <span
218
- data-offset-key="14:0"
217
+ data-offset-key="13:0"
219
218
  data-slate-leaf="true"
220
219
  >
221
220
  <span>
@@ -375,81 +374,6 @@ exports[`<IngestForm /> with multiple templates matches the latest snapshot 1`]
375
374
  </div>
376
375
  </div>
377
376
  </div>
378
- <div
379
- class="required field"
380
- >
381
- <label>
382
- Template
383
- <div
384
- class="ui left pointing label"
385
- >
386
- Empty required field
387
- </div>
388
- </label>
389
- <div
390
- class="field"
391
- >
392
- <div
393
- aria-busy="false"
394
- aria-expanded="false"
395
- class="ui search selection dropdown"
396
- name="template"
397
- role="combobox"
398
- >
399
- <input
400
- aria-autocomplete="list"
401
- autocomplete="off"
402
- class="search"
403
- tabindex="0"
404
- type="text"
405
- value=""
406
- />
407
- <div
408
- aria-atomic="true"
409
- aria-live="polite"
410
- class="divider default text"
411
- role="alert"
412
- >
413
- Select a template...
414
- </div>
415
- <i
416
- aria-hidden="true"
417
- class="dropdown icon"
418
- />
419
- <div
420
- class="menu transition"
421
- role="listbox"
422
- >
423
- <div
424
- aria-checked="false"
425
- aria-selected="true"
426
- class="selected item"
427
- role="option"
428
- style="pointer-events: all;"
429
- >
430
- <span
431
- class="text"
432
- >
433
- template1
434
- </span>
435
- </div>
436
- <div
437
- aria-checked="false"
438
- aria-selected="false"
439
- class="item"
440
- role="option"
441
- style="pointer-events: all;"
442
- >
443
- <span
444
- class="text"
445
- >
446
- template2
447
- </span>
448
- </div>
449
- </div>
450
- </div>
451
- </div>
452
- </div>
453
377
  <div
454
378
  class="required field"
455
379
  >
@@ -577,11 +501,11 @@ exports[`<IngestForm /> with multiple templates matches the latest snapshot 1`]
577
501
  style="position: relative;"
578
502
  >
579
503
  <span
580
- data-key="4"
504
+ data-key="3"
581
505
  data-slate-object="text"
582
506
  >
583
507
  <span
584
- data-offset-key="4:0"
508
+ data-offset-key="3:0"
585
509
  data-slate-leaf="true"
586
510
  >
587
511
  <span>
@@ -605,6 +529,81 @@ exports[`<IngestForm /> with multiple templates matches the latest snapshot 1`]
605
529
  </div>
606
530
  </div>
607
531
  </div>
532
+ <div
533
+ class="required field"
534
+ >
535
+ <label>
536
+ Template
537
+ <div
538
+ class="ui left pointing label"
539
+ >
540
+ Empty required field
541
+ </div>
542
+ </label>
543
+ <div
544
+ class="field"
545
+ >
546
+ <div
547
+ aria-busy="false"
548
+ aria-expanded="false"
549
+ class="ui search selection dropdown"
550
+ name="template"
551
+ role="combobox"
552
+ >
553
+ <input
554
+ aria-autocomplete="list"
555
+ autocomplete="off"
556
+ class="search"
557
+ tabindex="0"
558
+ type="text"
559
+ value=""
560
+ />
561
+ <div
562
+ aria-atomic="true"
563
+ aria-live="polite"
564
+ class="divider default text"
565
+ role="alert"
566
+ >
567
+ Select a template...
568
+ </div>
569
+ <i
570
+ aria-hidden="true"
571
+ class="dropdown icon"
572
+ />
573
+ <div
574
+ class="menu transition"
575
+ role="listbox"
576
+ >
577
+ <div
578
+ aria-checked="false"
579
+ aria-selected="true"
580
+ class="selected item"
581
+ role="option"
582
+ style="pointer-events: all;"
583
+ >
584
+ <span
585
+ class="text"
586
+ >
587
+ template1
588
+ </span>
589
+ </div>
590
+ <div
591
+ aria-checked="false"
592
+ aria-selected="false"
593
+ class="item"
594
+ role="option"
595
+ style="pointer-events: all;"
596
+ >
597
+ <span
598
+ class="text"
599
+ >
600
+ template2
601
+ </span>
602
+ </div>
603
+ </div>
604
+ </div>
605
+ </div>
606
+ </div>
608
607
  <div
609
608
  class="actions"
610
609
  >
@@ -1,14 +1,16 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<IngestsLabelResults /> matches the latest snapshot 1`] = `
4
- <Label
5
- className="ingests-label-results"
6
- >
7
- 22
8
- <LabelDetail>
9
- <MemoizedFormattedMessage
10
- id="ingests.retrieved.results"
11
- />
12
- </LabelDetail>
13
- </Label>
4
+ <div>
5
+ <div
6
+ class="ui label ingests-label-results"
7
+ >
8
+ 22
9
+ <div
10
+ class="detail"
11
+ >
12
+ Retrieved elements
13
+ </div>
14
+ </div>
15
+ </div>
14
16
  `;