@truedat/dq 5.2.1 → 5.2.2

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
+ ## [5.2.2] 2023-02-22
4
+
5
+ ### Changed
6
+
7
+ - [TD-5471] Code review
8
+
3
9
  ## [5.2.0] 2023-02-22
4
10
 
5
11
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dq",
3
- "version": "5.2.1",
3
+ "version": "5.2.2",
4
4
  "description": "Truedat Web Data Quality Module",
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": "5.2.1",
37
+ "@truedat/test": "5.2.2",
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",
@@ -92,8 +92,8 @@
92
92
  },
93
93
  "dependencies": {
94
94
  "@apollo/client": "^3.7.1",
95
- "@truedat/core": "5.2.1",
96
- "@truedat/df": "5.2.1",
95
+ "@truedat/core": "5.2.2",
96
+ "@truedat/df": "5.2.2",
97
97
  "decode-uri-component": "^0.2.2",
98
98
  "graphql": "^15.5.3",
99
99
  "moment": "^2.29.4",
@@ -118,5 +118,5 @@
118
118
  "react-dom": ">= 16.8.6 < 17",
119
119
  "semantic-ui-react": ">= 2.0.3 < 2.2"
120
120
  },
121
- "gitHead": "1f9ce2ad2fb29d1d8dc5ccb8940a7f573e7127bc"
121
+ "gitHead": "39b2e1047e9a1ef56be526292208be23bfdd798d"
122
122
  }
@@ -75,7 +75,7 @@ const mapStateToProps = ({
75
75
  uploadingImplementationsFile,
76
76
  implementationsActions,
77
77
  }) => ({
78
- canAutoPublish: !_.isEmpty(implementationsActions?.autoPublish),
78
+ canAutoPublish: _.has("autoPublish")(implementationsActions),
79
79
  loading: uploadingImplementationsFile,
80
80
  implementationsActions,
81
81
  });
@@ -47,7 +47,7 @@ describe("<ImplementationsUploadButton />", () => {
47
47
  });
48
48
 
49
49
  it("false canAutoPublish makes the modal not show the publish button; update using an implementations CSV", async () => {
50
- const { getByRole, queryByRole, getByTestId } = render(
50
+ const { getByRole, queryByRole, getByText } = render(
51
51
  <ImplementationsUploadButton {...{ ...props, canAutoPublish: false }} />
52
52
  );
53
53
 
@@ -66,7 +66,7 @@ describe("<ImplementationsUploadButton />", () => {
66
66
  });
67
67
  const formData = new FormData();
68
68
  formData.append("implementations", fakeFile);
69
- const dropZone = getByTestId("fileDropZone");
69
+ const dropZone = getByText("Drag an drop file or click to select file");
70
70
  const data = mockData([fakeFile]);
71
71
 
72
72
  await waitFor(() => {
@@ -88,7 +88,7 @@ describe("<ImplementationsUploadButton />", () => {
88
88
  });
89
89
 
90
90
  it("true canAutoPublish makes the modal show the publish button; publishing an implementations CSV puts auto_publish FormData to true", async () => {
91
- const { getByRole, getByTestId } = render(
91
+ const { getByRole, getByText } = render(
92
92
  <ImplementationsUploadButton {...{ ...props, canAutoPublish: true }} />
93
93
  );
94
94
 
@@ -108,7 +108,7 @@ describe("<ImplementationsUploadButton />", () => {
108
108
  const formData = new FormData();
109
109
  formData.append("implementations", fakeFile);
110
110
  formData.append("auto_publish", true);
111
- const dropZone = getByTestId("fileDropZone");
111
+ const dropZone = getByText("Drag an drop file or click to select file");
112
112
  const data = mockData([fakeFile]);
113
113
 
114
114
  await waitFor(() => {
@@ -65,7 +65,7 @@ describe("<ImplementationsUploadButton />", () => {
65
65
  });
66
66
 
67
67
  it("clicks yes action button", async () => {
68
- const { getByRole, getByTestId, queryByRole } = render(
68
+ const { getByRole, getByText, queryByRole } = render(
69
69
  <UploadModal
70
70
  {...{
71
71
  trigger,
@@ -93,7 +93,7 @@ describe("<ImplementationsUploadButton />", () => {
93
93
  type: "text/csv",
94
94
  });
95
95
 
96
- const dropZone = getByTestId("fileDropZone");
96
+ const dropZone = getByText("Drag an drop file or click to select file");
97
97
  const data = mockData([fakeFile]);
98
98
 
99
99
  await waitFor(() => {
@@ -110,7 +110,7 @@ describe("<ImplementationsUploadButton />", () => {
110
110
  });
111
111
 
112
112
  it("clicks extra action button", async () => {
113
- const { getByRole, getByTestId } = render(
113
+ const { getByRole, getByText } = render(
114
114
  <UploadModal
115
115
  {...{
116
116
  trigger,
@@ -139,7 +139,7 @@ describe("<ImplementationsUploadButton />", () => {
139
139
  type: "text/csv",
140
140
  });
141
141
 
142
- const dropZone = getByTestId("fileDropZone");
142
+ const dropZone = getByText("Drag an drop file or click to select file");
143
143
  const data = mockData([fakeFile]);
144
144
 
145
145
  await waitFor(() => {