@truedat/cx 8.7.0 → 8.7.1
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/configurations/components/Configuration.js +1 -1
- package/src/configurations/components/ConfigurationActions.js +2 -2
- package/src/configurations/components/ConfigurationCards.js +2 -2
- package/src/configurations/components/ConfigurationForm.js +3 -3
- package/src/configurations/components/ConfigurationRoutes.js +2 -2
- package/src/configurations/components/ConfigurationTokenLoader.js +1 -1
- package/src/configurations/components/Configurations.js +1 -1
- package/src/configurations/components/DynamicConfigurationForm.js +1 -1
- package/src/configurations/components/EditConfiguration.js +1 -1
- package/src/configurations/components/__tests__/ConfigurationCards.spec.js +3 -3
- package/src/configurations/reducers/__tests__/configuration.spec.js +4 -4
- package/src/configurations/reducers/__tests__/configurationLoading.spec.js +4 -4
- package/src/configurations/reducers/__tests__/configurationRedirect.spec.js +9 -9
- package/src/configurations/reducers/__tests__/configurationToken.spec.js +6 -6
- package/src/configurations/reducers/__tests__/configurationTokenLoading.spec.js +3 -3
- package/src/configurations/reducers/__tests__/configurations.spec.js +4 -4
- package/src/configurations/reducers/__tests__/configurationsLoading.spec.js +4 -4
- package/src/configurations/reducers/__tests__/systemConfigurations.spec.js +3 -3
- package/src/configurations/reducers/configurations.js +1 -1
- package/src/configurations/reducers/systemConfigurations.js +1 -1
- package/src/configurations/routines.js +1 -1
- package/src/configurations/sagas/__tests__/deleteConfiguration.spec.js +1 -1
- package/src/configurations/sagas/__tests__/fetchConfigurations.spec.js +3 -3
- package/src/configurations/sagas/__tests__/signConfiguration.spec.js +1 -1
- package/src/configurations/sagas/index.js +2 -2
- package/src/jobs/components/JobFilters.js +1 -1
- package/src/jobs/components/JobFiltersLoader.js +1 -1
- package/src/jobs/components/JobSelectedFilters.js +2 -2
- package/src/jobs/components/JobsLoader.js +2 -2
- package/src/jobs/components/JobsTable.js +1 -1
- package/src/jobs/components/__tests__/JobRow.spec.js +2 -2
- package/src/jobs/components/__tests__/JobsTable.spec.js +4 -4
- package/src/jobs/reducers/__tests__/job.spec.js +2 -2
- package/src/jobs/reducers/__tests__/jobActiveFilters.spec.js +11 -11
- package/src/jobs/reducers/__tests__/jobCount.spec.js +3 -3
- package/src/jobs/reducers/__tests__/jobFilters.spec.js +2 -2
- package/src/jobs/reducers/__tests__/jobFiltersLoading.spec.js +2 -2
- package/src/jobs/reducers/__tests__/jobQuery.spec.js +4 -4
- package/src/jobs/reducers/__tests__/jobSelectedFilter.spec.js +9 -9
- package/src/jobs/reducers/__tests__/jobs.spec.js +5 -5
- package/src/jobs/reducers/__tests__/jobsPageSize.spec.js +3 -3
- package/src/jobs/reducers/jobFilters.js +1 -1
- package/src/jobs/reducers/jobSelectedFilter.js +1 -1
- package/src/jobs/sagas/__tests__/fetchJob.spec.js +2 -2
- package/src/jobs/sagas/__tests__/fetchJobFilters.spec.js +5 -5
- package/src/jobs/sagas/__tests__/fetchJobs.spec.js +5 -5
- package/src/jobs/sagas/index.js +2 -2
- package/src/jobs/selectors/getJobAvailableFilters.js +2 -2
- package/src/jobs/selectors/getJobFilterTypes.js +1 -1
- package/src/jobs/selectors/getJobSelectedFilterActiveValues.js +1 -1
- package/src/jobs/selectors/getJobSelectedFilterValues.js +2 -2
- package/src/jobs/selectors/getJobSelectedFilters.js +1 -1
- package/src/jobs/selectors/jobColumnsSelector.js +1 -1
- package/src/jobs/selectors/jobRowsSelector.js +2 -2
- package/src/jobs/selectors/sourceJobColumnsSelector.js +1 -1
- package/src/messages/en.js +12 -7
- package/src/messages/es.js +12 -7
- package/src/messages/index.js +1 -1
- package/src/sources/components/NewJob.js +1 -1
- package/src/sources/components/SourceActions.js +2 -2
- package/src/sources/components/SourceConfiguration.js +1 -1
- package/src/sources/components/SourceForm.js +2 -2
- package/src/sources/components/SourceSelector.js +8 -8
- package/src/sources/components/Sources.js +1 -1
- package/src/sources/components/__tests__/SourceDetail.spec.js +1 -1
- package/src/sources/components/__tests__/SourceForm.spec.js +3 -3
- package/src/sources/components/__tests__/SourceSelector.spec.js +1 -1
- package/src/sources/components/__tests__/Sources.spec.js +4 -4
- package/src/sources/reducers/__tests__/sourceRedirect.spec.js +8 -8
- package/src/sources/reducers/__tests__/sourceUpdateStatus.spec.js +4 -4
- package/src/sources/sagas/createSource.js +1 -1
- package/src/sources/sagas/updateSource.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/cx",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.1",
|
|
4
4
|
"description": "Truedat Web Connectors",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@testing-library/jest-dom": "^6.6.3",
|
|
52
52
|
"@testing-library/react": "^16.3.0",
|
|
53
53
|
"@testing-library/user-event": "^14.6.1",
|
|
54
|
-
"@truedat/test": "8.7.
|
|
54
|
+
"@truedat/test": "8.7.1",
|
|
55
55
|
"identity-obj-proxy": "^3.0.0",
|
|
56
56
|
"jest": "^29.7.0",
|
|
57
57
|
"redux-saga-test-plan": "^4.0.6"
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"semantic-ui-react": "^3.0.0-beta.2",
|
|
85
85
|
"swr": "^2.3.3"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "f7605a6ea3f78839b42bb7d8339eec125ba49acb"
|
|
88
88
|
}
|
|
@@ -7,7 +7,7 @@ import ConfigurationActions from "./ConfigurationActions";
|
|
|
7
7
|
import ConfigurationBreadcrumbs from "./ConfigurationBreadcrumbs";
|
|
8
8
|
|
|
9
9
|
const DynamicFormViewer = lazy(
|
|
10
|
-
() => import("@truedat/df/components/DynamicFormViewer")
|
|
10
|
+
() => import("@truedat/df/components/DynamicFormViewer"),
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
export const Configuration = ({ configuration, template }) =>
|
|
@@ -76,7 +76,7 @@ export const ConfigurationActions = ({
|
|
|
76
76
|
const availableActions = _.flow(
|
|
77
77
|
_.omitBy(_.isUndefined),
|
|
78
78
|
_.keys,
|
|
79
|
-
_.map((action) => _.prop(action)(contentActions))
|
|
79
|
+
_.map((action) => _.prop(action)(contentActions)),
|
|
80
80
|
)(actions);
|
|
81
81
|
return availableActions;
|
|
82
82
|
};
|
|
@@ -98,5 +98,5 @@ ConfigurationActions.propTypes = {
|
|
|
98
98
|
const mapStateToProps = ({ configuration }) => ({ configuration });
|
|
99
99
|
|
|
100
100
|
export default connect(mapStateToProps, { deleteConfiguration })(
|
|
101
|
-
ConfigurationActions
|
|
101
|
+
ConfigurationActions,
|
|
102
102
|
);
|
|
@@ -28,7 +28,7 @@ export const ConfigurationCards = ({
|
|
|
28
28
|
>
|
|
29
29
|
<FormattedMessage
|
|
30
30
|
id={`${"configuration"}.${_.prop("external_id")(
|
|
31
|
-
configuration
|
|
31
|
+
configuration,
|
|
32
32
|
)}`}
|
|
33
33
|
defaultMessage={_.prop("external_id")(configuration)}
|
|
34
34
|
/>
|
|
@@ -101,5 +101,5 @@ const mapStateToProps = ({ configurationsLoading }) => ({
|
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
export default connect(mapStateToProps, { deleteConfiguration })(
|
|
104
|
-
ConfigurationCards
|
|
104
|
+
ConfigurationCards,
|
|
105
105
|
);
|
|
@@ -14,7 +14,7 @@ import { selectTemplate } from "@truedat/df/routines";
|
|
|
14
14
|
const DynamicForm = lazy(() => import("@truedat/df/components/DynamicForm"));
|
|
15
15
|
|
|
16
16
|
const TemplateLoader = lazy(
|
|
17
|
-
() => import("@truedat/df/templates/components/TemplateLoader")
|
|
17
|
+
() => import("@truedat/df/templates/components/TemplateLoader"),
|
|
18
18
|
);
|
|
19
19
|
|
|
20
20
|
const isEmptyArray = _.isEmpty;
|
|
@@ -56,7 +56,7 @@ const ConfigurationForm = ({
|
|
|
56
56
|
if (configurationType) {
|
|
57
57
|
const currentTemplateId = _.flow(
|
|
58
58
|
_.find(_.propEq("name", configurationType)),
|
|
59
|
-
_.get("id")
|
|
59
|
+
_.get("id"),
|
|
60
60
|
)(templates);
|
|
61
61
|
if (!_.isNil(currentTemplateId))
|
|
62
62
|
selectTemplate({ id: currentTemplateId });
|
|
@@ -91,7 +91,7 @@ const ConfigurationForm = ({
|
|
|
91
91
|
const newConfiguration = _.pick(["external_id", "type"])(formState);
|
|
92
92
|
const appliedContent = _.flow(
|
|
93
93
|
_.prop("dynamic_content"),
|
|
94
|
-
applyTemplate
|
|
94
|
+
applyTemplate,
|
|
95
95
|
)(formState);
|
|
96
96
|
|
|
97
97
|
onSubmit({
|
|
@@ -19,10 +19,10 @@ import Configuration from "./Configuration";
|
|
|
19
19
|
import ConfigurationsLoader from "./ConfigurationsLoader";
|
|
20
20
|
|
|
21
21
|
const TemplateLoader = React.lazy(
|
|
22
|
-
() => import("@truedat/df/templates/components/TemplateLoader")
|
|
22
|
+
() => import("@truedat/df/templates/components/TemplateLoader"),
|
|
23
23
|
);
|
|
24
24
|
const TemplatesLoader = React.lazy(
|
|
25
|
-
() => import("@truedat/core/components/TemplatesLoader")
|
|
25
|
+
() => import("@truedat/core/components/TemplatesLoader"),
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
export const ConfigurationRoutes = ({
|
|
@@ -4,7 +4,7 @@ import { lazy } from "react";
|
|
|
4
4
|
const DynamicForm = lazy(() => import("@truedat/df/components/DynamicForm"));
|
|
5
5
|
|
|
6
6
|
const TemplateLoader = lazy(
|
|
7
|
-
() => import("@truedat/df/templates/components/TemplateLoader")
|
|
7
|
+
() => import("@truedat/df/templates/components/TemplateLoader"),
|
|
8
8
|
);
|
|
9
9
|
|
|
10
10
|
const DynamicConfigurationForm = ({ dfContent, handleContentChange }) => (
|
|
@@ -19,7 +19,7 @@ describe("<ConfigurationCards />", () => {
|
|
|
19
19
|
it("matches the latest snapshot", () => {
|
|
20
20
|
const { container } = render(
|
|
21
21
|
<ConfigurationCards configurations={configurations} />,
|
|
22
|
-
renderOpts
|
|
22
|
+
renderOpts,
|
|
23
23
|
);
|
|
24
24
|
expect(container).toMatchSnapshot();
|
|
25
25
|
});
|
|
@@ -28,7 +28,7 @@ describe("<ConfigurationCards />", () => {
|
|
|
28
28
|
const props = { configurations: [] };
|
|
29
29
|
const { container, queryByText } = render(
|
|
30
30
|
<ConfigurationCards {...props} />,
|
|
31
|
-
renderOpts
|
|
31
|
+
renderOpts,
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
expect(container.querySelectorAll("div.ui.card")).toHaveLength(0);
|
|
@@ -39,7 +39,7 @@ describe("<ConfigurationCards />", () => {
|
|
|
39
39
|
const props = { configurations };
|
|
40
40
|
const { container, queryByText } = render(
|
|
41
41
|
<ConfigurationCards {...props} />,
|
|
42
|
-
renderOpts
|
|
42
|
+
renderOpts,
|
|
43
43
|
);
|
|
44
44
|
expect(container.querySelectorAll("div.ui.card")).toHaveLength(5);
|
|
45
45
|
});
|
|
@@ -12,7 +12,7 @@ describe("reducers: configuration", () => {
|
|
|
12
12
|
|
|
13
13
|
it("should handle the fetchConfiguration.TRIGGER action", () => {
|
|
14
14
|
expect(
|
|
15
|
-
configuration(fooState, { type: fetchConfiguration.TRIGGER })
|
|
15
|
+
configuration(fooState, { type: fetchConfiguration.TRIGGER }),
|
|
16
16
|
).toEqual(initialState);
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -26,13 +26,13 @@ describe("reducers: configuration", () => {
|
|
|
26
26
|
configuration(fooState, {
|
|
27
27
|
type: fetchConfiguration.SUCCESS,
|
|
28
28
|
payload: { data: configuration_obj },
|
|
29
|
-
})
|
|
29
|
+
}),
|
|
30
30
|
).toMatchObject(configuration_obj);
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
it("should handle the fetchConfiguration.FAILURE action", () => {
|
|
34
34
|
expect(
|
|
35
|
-
configuration(fooState, { type: fetchConfiguration.FAILURE })
|
|
35
|
+
configuration(fooState, { type: fetchConfiguration.FAILURE }),
|
|
36
36
|
).toEqual(initialState);
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ describe("reducers: configuration", () => {
|
|
|
40
40
|
expect(
|
|
41
41
|
configuration(fooState, {
|
|
42
42
|
type: clearConfiguration.TRIGGER,
|
|
43
|
-
})
|
|
43
|
+
}),
|
|
44
44
|
).toEqual({});
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -12,21 +12,21 @@ describe("reducers: configuration", () => {
|
|
|
12
12
|
|
|
13
13
|
it("should handle the fetchConfiguration.TRIGGER action", () => {
|
|
14
14
|
expect(
|
|
15
|
-
configurationLoading(fooState, { type: fetchConfiguration.TRIGGER })
|
|
15
|
+
configurationLoading(fooState, { type: fetchConfiguration.TRIGGER }),
|
|
16
16
|
).toEqual(true);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it("should handle the fetchConfiguration.REQUEST action", () => {
|
|
20
20
|
expect(
|
|
21
|
-
configurationLoading(fooState, { type: fetchConfiguration.REQUEST })
|
|
21
|
+
configurationLoading(fooState, { type: fetchConfiguration.REQUEST }),
|
|
22
22
|
).toEqual(true);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
it("should handle the fetchConfiguration.FULFILL action", () => {
|
|
26
26
|
expect(
|
|
27
27
|
configurationLoading(true, {
|
|
28
|
-
type: fetchConfiguration.FULFILL
|
|
29
|
-
})
|
|
28
|
+
type: fetchConfiguration.FULFILL,
|
|
29
|
+
}),
|
|
30
30
|
).toBe(false);
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -3,7 +3,7 @@ import { clearRedirect } from "@truedat/core/routines";
|
|
|
3
3
|
import {
|
|
4
4
|
createConfiguration,
|
|
5
5
|
updateConfiguration,
|
|
6
|
-
deleteConfiguration
|
|
6
|
+
deleteConfiguration,
|
|
7
7
|
} from "../../routines";
|
|
8
8
|
import { configurationRedirect } from "..";
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ describe("reducers: configurationRedirect", () => {
|
|
|
17
17
|
|
|
18
18
|
it("should handle the clearRedirect.TRIGGER action", () => {
|
|
19
19
|
expect(
|
|
20
|
-
configurationRedirect("foo", { type: clearRedirect.TRIGGER })
|
|
20
|
+
configurationRedirect("foo", { type: clearRedirect.TRIGGER }),
|
|
21
21
|
).toEqual(initialState);
|
|
22
22
|
});
|
|
23
23
|
|
|
@@ -25,8 +25,8 @@ describe("reducers: configurationRedirect", () => {
|
|
|
25
25
|
expect(
|
|
26
26
|
configurationRedirect("foo", {
|
|
27
27
|
type: createConfiguration.SUCCESS,
|
|
28
|
-
meta: { redirectUrl: CONFIGURATIONS }
|
|
29
|
-
})
|
|
28
|
+
meta: { redirectUrl: CONFIGURATIONS },
|
|
29
|
+
}),
|
|
30
30
|
).toEqual(CONFIGURATIONS);
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -34,8 +34,8 @@ describe("reducers: configurationRedirect", () => {
|
|
|
34
34
|
expect(
|
|
35
35
|
configurationRedirect("foo", {
|
|
36
36
|
type: updateConfiguration.SUCCESS,
|
|
37
|
-
meta: { redirectUrl: CONFIGURATIONS }
|
|
38
|
-
})
|
|
37
|
+
meta: { redirectUrl: CONFIGURATIONS },
|
|
38
|
+
}),
|
|
39
39
|
).toEqual(CONFIGURATIONS);
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -43,14 +43,14 @@ describe("reducers: configurationRedirect", () => {
|
|
|
43
43
|
expect(
|
|
44
44
|
configurationRedirect("foo", {
|
|
45
45
|
type: deleteConfiguration.SUCCESS,
|
|
46
|
-
meta: { redirectUrl: CONFIGURATIONS }
|
|
47
|
-
})
|
|
46
|
+
meta: { redirectUrl: CONFIGURATIONS },
|
|
47
|
+
}),
|
|
48
48
|
).toEqual(CONFIGURATIONS);
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
it("should ignore unknown actions", () => {
|
|
52
52
|
expect(configurationRedirect("foo", { type: "bar", payload })).toEqual(
|
|
53
|
-
"foo"
|
|
53
|
+
"foo",
|
|
54
54
|
);
|
|
55
55
|
});
|
|
56
56
|
});
|
|
@@ -12,7 +12,7 @@ describe("reducers: configurationToken", () => {
|
|
|
12
12
|
|
|
13
13
|
it("should handle the signConfiguration.TRIGGER action", () => {
|
|
14
14
|
expect(
|
|
15
|
-
configurationToken(fooState, { type: signConfiguration.TRIGGER })
|
|
15
|
+
configurationToken(fooState, { type: signConfiguration.TRIGGER }),
|
|
16
16
|
).toEqual(initialState);
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -21,22 +21,22 @@ describe("reducers: configurationToken", () => {
|
|
|
21
21
|
expect(
|
|
22
22
|
configurationToken(fooState, {
|
|
23
23
|
type: signConfiguration.SUCCESS,
|
|
24
|
-
payload: { token }
|
|
25
|
-
})
|
|
24
|
+
payload: { token },
|
|
25
|
+
}),
|
|
26
26
|
).toBe(token);
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
it("should handle the signConfiguration.FAILURE action", () => {
|
|
30
30
|
expect(
|
|
31
|
-
configurationToken(fooState, { type: signConfiguration.FAILURE })
|
|
31
|
+
configurationToken(fooState, { type: signConfiguration.FAILURE }),
|
|
32
32
|
).toEqual(initialState);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
it("should handle the clearConfigurationToken action", () => {
|
|
36
36
|
expect(
|
|
37
37
|
configurationToken(fooState, {
|
|
38
|
-
type: clearConfigurationToken.TRIGGER
|
|
39
|
-
})
|
|
38
|
+
type: clearConfigurationToken.TRIGGER,
|
|
39
|
+
}),
|
|
40
40
|
).toEqual(initialState);
|
|
41
41
|
});
|
|
42
42
|
|
|
@@ -12,15 +12,15 @@ describe("reducers: configuration", () => {
|
|
|
12
12
|
|
|
13
13
|
it("should handle the signConfiguration.TRIGGER action", () => {
|
|
14
14
|
expect(
|
|
15
|
-
configurationTokenLoading(fooState, { type: signConfiguration.TRIGGER })
|
|
15
|
+
configurationTokenLoading(fooState, { type: signConfiguration.TRIGGER }),
|
|
16
16
|
).toEqual(true);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it("should handle the signConfiguration.FULFILL action", () => {
|
|
20
20
|
expect(
|
|
21
21
|
configurationTokenLoading(true, {
|
|
22
|
-
type: signConfiguration.FULFILL
|
|
23
|
-
})
|
|
22
|
+
type: signConfiguration.FULFILL,
|
|
23
|
+
}),
|
|
24
24
|
).toBe(false);
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -19,7 +19,7 @@ describe("reducers: configurations", () => {
|
|
|
19
19
|
|
|
20
20
|
it("should handle the fetchConfigurations.TRIGGER action", () => {
|
|
21
21
|
expect(
|
|
22
|
-
configurations(fooState, { type: fetchConfigurations.TRIGGER })
|
|
22
|
+
configurations(fooState, { type: fetchConfigurations.TRIGGER }),
|
|
23
23
|
).toEqual(initialState);
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -28,19 +28,19 @@ describe("reducers: configurations", () => {
|
|
|
28
28
|
configurations(fooState, {
|
|
29
29
|
type: fetchConfigurations.SUCCESS,
|
|
30
30
|
payload: { data },
|
|
31
|
-
})
|
|
31
|
+
}),
|
|
32
32
|
).toEqual(data);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
it("should handle the clearConfigurations.TRIGGER action", () => {
|
|
36
36
|
expect(
|
|
37
|
-
configurations(fooState, { type: clearConfigurations.TRIGGER })
|
|
37
|
+
configurations(fooState, { type: clearConfigurations.TRIGGER }),
|
|
38
38
|
).toEqual(initialState);
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
it("should handle the fetchConfigurations.FAILURE action", () => {
|
|
42
42
|
expect(
|
|
43
|
-
configurations(fooState, { type: fetchConfigurations.FAILURE })
|
|
43
|
+
configurations(fooState, { type: fetchConfigurations.FAILURE }),
|
|
44
44
|
).toEqual(initialState);
|
|
45
45
|
});
|
|
46
46
|
});
|
|
@@ -12,21 +12,21 @@ describe("reducers: configuration", () => {
|
|
|
12
12
|
|
|
13
13
|
it("should handle the fetchConfigurations.TRIGGER action", () => {
|
|
14
14
|
expect(
|
|
15
|
-
configurationsLoading(fooState, { type: fetchConfigurations.TRIGGER })
|
|
15
|
+
configurationsLoading(fooState, { type: fetchConfigurations.TRIGGER }),
|
|
16
16
|
).toEqual(true);
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it("should handle the fetchConfigurations.REQUEST action", () => {
|
|
20
20
|
expect(
|
|
21
|
-
configurationsLoading(fooState, { type: fetchConfigurations.REQUEST })
|
|
21
|
+
configurationsLoading(fooState, { type: fetchConfigurations.REQUEST }),
|
|
22
22
|
).toEqual(true);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
it("should handle the fetchConfigurations.FULFILL action", () => {
|
|
26
26
|
expect(
|
|
27
27
|
configurationsLoading(true, {
|
|
28
|
-
type: fetchConfigurations.FULFILL
|
|
29
|
-
})
|
|
28
|
+
type: fetchConfigurations.FULFILL,
|
|
29
|
+
}),
|
|
30
30
|
).toBe(false);
|
|
31
31
|
});
|
|
32
32
|
|
|
@@ -24,7 +24,7 @@ describe("reducers: systemConfigurations", () => {
|
|
|
24
24
|
|
|
25
25
|
it("should handle the fetchConfigurations.TRIGGER action", () => {
|
|
26
26
|
expect(
|
|
27
|
-
systemConfigurations(fooState, { type: fetchConfigurations.TRIGGER })
|
|
27
|
+
systemConfigurations(fooState, { type: fetchConfigurations.TRIGGER }),
|
|
28
28
|
).toEqual(initialState);
|
|
29
29
|
});
|
|
30
30
|
|
|
@@ -33,13 +33,13 @@ describe("reducers: systemConfigurations", () => {
|
|
|
33
33
|
systemConfigurations(fooState, {
|
|
34
34
|
type: fetchConfigurations.SUCCESS,
|
|
35
35
|
payload: { data },
|
|
36
|
-
})
|
|
36
|
+
}),
|
|
37
37
|
).toEqual(data);
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
it("should handle the fetchConfigurations.FAILURE action", () => {
|
|
41
41
|
expect(
|
|
42
|
-
systemConfigurations(fooState, { type: fetchConfigurations.FAILURE })
|
|
42
|
+
systemConfigurations(fooState, { type: fetchConfigurations.FAILURE }),
|
|
43
43
|
).toEqual(initialState);
|
|
44
44
|
});
|
|
45
45
|
});
|
|
@@ -15,7 +15,7 @@ const configurations = (state = initialState, { type, payload }) => {
|
|
|
15
15
|
const data = _.propOr({}, "data")(payload);
|
|
16
16
|
return _.flow(
|
|
17
17
|
_.map(pickFields),
|
|
18
|
-
_.sortBy((s) => _.deburr(s.external_id))
|
|
18
|
+
_.sortBy((s) => _.deburr(s.external_id)),
|
|
19
19
|
)(data);
|
|
20
20
|
}
|
|
21
21
|
case fetchConfigurations.FAILURE:
|
|
@@ -13,7 +13,7 @@ const systemConfigurations = (state = initialState, { type, payload }) => {
|
|
|
13
13
|
return _.flow(
|
|
14
14
|
_.propOr({}, "data"),
|
|
15
15
|
_.map(pickFields),
|
|
16
|
-
_.sortBy((s) => _.deburr(s.external_id))
|
|
16
|
+
_.sortBy((s) => _.deburr(s.external_id)),
|
|
17
17
|
)(payload);
|
|
18
18
|
}
|
|
19
19
|
case fetchConfigurations.FAILURE:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRoutine } from "redux-saga-routines";
|
|
2
2
|
|
|
3
3
|
export const clearConfigurationToken = createRoutine(
|
|
4
|
-
"CLEAR_CONFIGURATION_TOKEN"
|
|
4
|
+
"CLEAR_CONFIGURATION_TOKEN",
|
|
5
5
|
);
|
|
6
6
|
export const fetchConfiguration = createRoutine("FETCH_CONFIGURATION");
|
|
7
7
|
export const fetchConfigurations = createRoutine("FETCH_CONFIGURATIONS");
|
|
@@ -3,7 +3,7 @@ import { testSaga } from "redux-saga-test-plan";
|
|
|
3
3
|
import { apiJsonDelete, JSON_OPTS } from "@truedat/core/services/api";
|
|
4
4
|
import {
|
|
5
5
|
deleteConfigurationSaga,
|
|
6
|
-
deleteConfigurationRequestSaga
|
|
6
|
+
deleteConfigurationRequestSaga,
|
|
7
7
|
} from "../deleteConfiguration";
|
|
8
8
|
import { deleteConfiguration } from "../../routines";
|
|
9
9
|
import { API_CONFIGURATION } from "../../api";
|
|
@@ -2,7 +2,7 @@ import { testSaga } from "redux-saga-test-plan";
|
|
|
2
2
|
import { apiJson, JSON_OPTS } from "@truedat/core/services/api";
|
|
3
3
|
import {
|
|
4
4
|
fetchConfigurationsRequestSaga,
|
|
5
|
-
fetchConfigurationsSaga
|
|
5
|
+
fetchConfigurationsSaga,
|
|
6
6
|
} from "../fetchConfigurations";
|
|
7
7
|
import { fetchConfigurations } from "../../routines";
|
|
8
8
|
import { API_CONFIGURATIONS } from "../../api";
|
|
@@ -31,8 +31,8 @@ describe("sagas: fetchConfigurationsSaga", () => {
|
|
|
31
31
|
const data = {
|
|
32
32
|
collection: [
|
|
33
33
|
{ external_id: "Micro1", type: "a" },
|
|
34
|
-
{ external_id: "Micro2", type: "a" }
|
|
35
|
-
]
|
|
34
|
+
{ external_id: "Micro2", type: "a" },
|
|
35
|
+
],
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
it("should put a success action when a response is returned", () => {
|
|
@@ -3,7 +3,7 @@ import { testSaga } from "redux-saga-test-plan";
|
|
|
3
3
|
import { apiJsonPost, JSON_OPTS } from "@truedat/core/services/api";
|
|
4
4
|
import {
|
|
5
5
|
signConfigurationRequestSaga,
|
|
6
|
-
signConfigurationSaga
|
|
6
|
+
signConfigurationSaga,
|
|
7
7
|
} from "../signConfiguration";
|
|
8
8
|
import { signConfiguration } from "../../routines";
|
|
9
9
|
import { API_CONFIGURATION_SIGN } from "../../api";
|
|
@@ -11,7 +11,7 @@ export {
|
|
|
11
11
|
fetchConfigurationsRequestSaga,
|
|
12
12
|
createConfigurationRequestSaga,
|
|
13
13
|
updateConfigurationRequestSaga,
|
|
14
|
-
signConfigurationRequestSaga
|
|
14
|
+
signConfigurationRequestSaga,
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export default [
|
|
@@ -20,5 +20,5 @@ export default [
|
|
|
20
20
|
fetchConfigurationsRequestSaga(),
|
|
21
21
|
createConfigurationRequestSaga(),
|
|
22
22
|
updateConfigurationRequestSaga(),
|
|
23
|
-
signConfigurationRequestSaga()
|
|
23
|
+
signConfigurationRequestSaga(),
|
|
24
24
|
];
|
|
@@ -13,7 +13,7 @@ const mapStateToProps = (state) => ({
|
|
|
13
13
|
const mapDispatchToProps = (dispatch) =>
|
|
14
14
|
bindActionCreators(
|
|
15
15
|
{ addFilter: addJobFilter, resetFilters: resetJobFilters },
|
|
16
|
-
dispatch
|
|
16
|
+
dispatch,
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
export default connect(mapStateToProps, mapDispatchToProps)(AvailableFilters);
|
|
@@ -7,7 +7,7 @@ import { clearJobFilters, fetchJobFilters } from "../routines";
|
|
|
7
7
|
const mapDispatchToProps = (dispatch) =>
|
|
8
8
|
bindActionCreators(
|
|
9
9
|
{ clearFilters: clearJobFilters, fetchFilters: fetchJobFilters },
|
|
10
|
-
dispatch
|
|
10
|
+
dispatch,
|
|
11
11
|
);
|
|
12
12
|
|
|
13
13
|
const makeMapStateToProps = () => {
|
|
@@ -21,7 +21,7 @@ export const mapStateToProps = (state) => {
|
|
|
21
21
|
state;
|
|
22
22
|
const values = _.flow(
|
|
23
23
|
getJobSelectedFilterValues,
|
|
24
|
-
_.map((v) => ({ text: v, value: v }))
|
|
24
|
+
_.map((v) => ({ text: v, value: v })),
|
|
25
25
|
)(state);
|
|
26
26
|
return {
|
|
27
27
|
loading,
|
|
@@ -42,7 +42,7 @@ const mapDispatchToProps = (dispatch) =>
|
|
|
42
42
|
resetFilters: resetJobFilters,
|
|
43
43
|
toggleFilterValue: toggleJobFilterValue,
|
|
44
44
|
},
|
|
45
|
-
dispatch
|
|
45
|
+
dispatch,
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
export default connect(mapStateToProps, mapDispatchToProps)(SelectedFilters);
|
|
@@ -25,7 +25,7 @@ JobsLoader.propTypes = {
|
|
|
25
25
|
const makeMapStateToProps = () => {
|
|
26
26
|
const searchQuerySelector = makeSearchQuerySelector(
|
|
27
27
|
"jobQuery",
|
|
28
|
-
"jobActiveFilters"
|
|
28
|
+
"jobActiveFilters",
|
|
29
29
|
);
|
|
30
30
|
const mapStateToProps = (state, props) => ({
|
|
31
31
|
payload: searchQuerySelector(state, props),
|
|
@@ -34,5 +34,5 @@ const makeMapStateToProps = () => {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
export default connect(makeMapStateToProps, { clearJobs, fetchJobs })(
|
|
37
|
-
JobsLoader
|
|
37
|
+
JobsLoader,
|
|
38
38
|
);
|
|
@@ -32,7 +32,7 @@ describe("<JobRow />", () => {
|
|
|
32
32
|
<JobRow {...props} />
|
|
33
33
|
</tbody>
|
|
34
34
|
</table>,
|
|
35
|
-
renderOpts
|
|
35
|
+
renderOpts,
|
|
36
36
|
);
|
|
37
37
|
await waitForLoad(rendered);
|
|
38
38
|
expect(rendered.container).toMatchSnapshot();
|
|
@@ -46,7 +46,7 @@ describe("<JobRow />", () => {
|
|
|
46
46
|
<JobRow {...props} />
|
|
47
47
|
</tbody>
|
|
48
48
|
</table>,
|
|
49
|
-
renderOpts
|
|
49
|
+
renderOpts,
|
|
50
50
|
);
|
|
51
51
|
await waitForLoad(rendered);
|
|
52
52
|
|
|
@@ -39,7 +39,7 @@ describe("<JobsTable />", () => {
|
|
|
39
39
|
const rendered = render(<JobsTable />, renderOpts);
|
|
40
40
|
await waitForLoad(rendered);
|
|
41
41
|
expect(
|
|
42
|
-
rendered.getByRole("columnheader", { name: /end_date/i })
|
|
42
|
+
rendered.getByRole("columnheader", { name: /end_date/i }),
|
|
43
43
|
).toHaveClass("sorted descending");
|
|
44
44
|
});
|
|
45
45
|
|
|
@@ -49,17 +49,17 @@ describe("<JobsTable />", () => {
|
|
|
49
49
|
|
|
50
50
|
const user = userEvent.setup({ delay: null });
|
|
51
51
|
expect(
|
|
52
|
-
rendered.getByRole("columnheader", { name: /source\.type/i })
|
|
52
|
+
rendered.getByRole("columnheader", { name: /source\.type/i }),
|
|
53
53
|
).not.toHaveClass("sorted");
|
|
54
54
|
|
|
55
55
|
await user.click(rendered.getByText(/source\.type/i));
|
|
56
56
|
expect(
|
|
57
|
-
rendered.getByRole("columnheader", { name: /source\.type/i })
|
|
57
|
+
rendered.getByRole("columnheader", { name: /source\.type/i }),
|
|
58
58
|
).toHaveClass("sorted ascending");
|
|
59
59
|
|
|
60
60
|
await user.click(rendered.getByText(/source\.type/i));
|
|
61
61
|
expect(
|
|
62
|
-
rendered.getByRole("columnheader", { name: /source\.type/i })
|
|
62
|
+
rendered.getByRole("columnheader", { name: /source\.type/i }),
|
|
63
63
|
).toHaveClass("sorted descending");
|
|
64
64
|
});
|
|
65
65
|
});
|