@truedat/ie 6.6.5 → 6.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/ie",
3
- "version": "6.6.5",
3
+ "version": "6.7.0",
4
4
  "description": "Truedat Web Ingests",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.5",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "6.6.5",
37
+ "@truedat/test": "6.7.0",
38
38
  "babel-jest": "^28.1.0",
39
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
40
40
  "babel-plugin-lodash": "^3.3.4",
@@ -86,8 +86,8 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "6.6.5",
90
- "@truedat/df": "6.6.5",
89
+ "@truedat/core": "6.7.0",
90
+ "@truedat/df": "6.7.0",
91
91
  "file-saver": "^2.0.5",
92
92
  "moment": "^2.29.4",
93
93
  "path-to-regexp": "^1.7.0",
@@ -107,5 +107,5 @@
107
107
  "react-dom": ">= 16.8.6 < 17",
108
108
  "semantic-ui-react": ">= 2.0.3 < 2.2"
109
109
  },
110
- "gitHead": "875dcb0716cc64d30974106dc64c861d4306fcd6"
110
+ "gitHead": "6a4284b126a917e396160f1b36c03ca0faf6bac5"
111
111
  }
@@ -12,7 +12,7 @@ export const IngestCompleteness = ({ ingest }) => {
12
12
  _.get("template.content"),
13
13
  _.map(({ fields }) =>
14
14
  _.filter(({ cardinality, name }) => {
15
- const value = _.get(name)(content);
15
+ const value = _.get(`${name}.value`)(content);
16
16
  return (
17
17
  !_.isNumber(value) &&
18
18
  _.includes(cardinality)(["1", "+"]) &&
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { shallow } from "enzyme";
2
+ import { render } from "@truedat/test/render";
3
3
  import { IngestCompleteness } from "../IngestCompleteness";
4
4
 
5
5
  describe("<IngestCompleteness />", () => {
@@ -11,19 +11,19 @@ describe("<IngestCompleteness />", () => {
11
11
  fields: [
12
12
  { cardinality: "?", name: "field1" },
13
13
  { cardinality: "1", name: "field2" },
14
- { cardinality: "1", name: "field3" }
15
- ]
16
- }
17
- ]
14
+ { cardinality: "1", name: "field3" },
15
+ ],
16
+ },
17
+ ],
18
18
  },
19
19
  content: {
20
- field3: "value"
21
- }
22
- }
20
+ field3: { value: "value", origin: "user" },
21
+ },
22
+ },
23
23
  };
24
24
 
25
25
  it("matches the latest snapshot", () => {
26
- const wrapper = shallow(<IngestCompleteness {...props} />);
27
- expect(wrapper).toMatchSnapshot();
26
+ const { container } = render(<IngestCompleteness {...props} />);
27
+ expect(container).toMatchSnapshot();
28
28
  });
29
29
  });
@@ -1,27 +1,29 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<IngestCompleteness /> matches the latest snapshot 1`] = `
4
- <Segment>
5
- <Header
6
- as="h4"
7
- dividing={true}
4
+ <div>
5
+ <div
6
+ class="ui segment"
8
7
  >
9
- <MemoizedFormattedMessage
10
- defaultMessage="Missing required fields"
11
- id="ingests.props.missing_fields"
12
- />
13
- </Header>
14
- <List>
15
- <ListItem
16
- key="0"
8
+ <h4
9
+ class="ui dividing header"
17
10
  >
18
- <Icon
19
- as="i"
20
- color="grey"
21
- fitted={true}
22
- name="right angle"
23
- />
24
- </ListItem>
25
- </List>
26
- </Segment>
11
+ Missing required fields
12
+ </h4>
13
+ <div
14
+ class="ui list"
15
+ role="list"
16
+ >
17
+ <div
18
+ class="item"
19
+ role="listitem"
20
+ >
21
+ <i
22
+ aria-hidden="true"
23
+ class="grey right angle fitted icon"
24
+ />
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
27
29
  `;