@capillarytech/creatives-library 7.12.112 → 7.12.114
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
|
@@ -99,7 +99,7 @@ class NewCallTask extends React.Component { // eslint-disable-line react/prefer-
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
render() {
|
|
102
|
-
const { intl, isLoading, metaEntities, selectedOfferDetails } = this.props;
|
|
102
|
+
const { intl, isLoading, metaEntities, selectedOfferDetails , injectedTags} = this.props;
|
|
103
103
|
const { formatMessage } = intl;
|
|
104
104
|
const { subject, messageBody, description, callTaskActionType } = this.state;
|
|
105
105
|
const tags = metaEntities && metaEntities.tags ? metaEntities.tags.standard : [];
|
|
@@ -125,6 +125,7 @@ class NewCallTask extends React.Component { // eslint-disable-line react/prefer-
|
|
|
125
125
|
tags={tags}
|
|
126
126
|
onTagSelect={this.onTagSelect}
|
|
127
127
|
selectedOfferDetails={selectedOfferDetails}
|
|
128
|
+
injectedTags={injectedTags}
|
|
128
129
|
/>
|
|
129
130
|
<CapInput.TextArea
|
|
130
131
|
setInputRef={this.setInputRef}
|
|
@@ -177,6 +178,7 @@ NewCallTask.propTypes = {
|
|
|
177
178
|
selectedOfferDetails: PropTypes.array,
|
|
178
179
|
messageDetails: PropTypes.object,
|
|
179
180
|
mode: PropTypes.string,
|
|
181
|
+
injectedTags: PropTypes.object,
|
|
180
182
|
};
|
|
181
183
|
|
|
182
184
|
export default injectIntl(NewCallTask);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { injectIntl } from 'react-intl';
|
|
3
|
+
import '@testing-library/jest-dom';
|
|
4
|
+
import { Provider } from 'react-redux';
|
|
5
|
+
import { browserHistory } from 'react-router';
|
|
6
|
+
import NewCallTask from '../index';
|
|
7
|
+
import configureStore from '../../../store';
|
|
8
|
+
import mockData from './mockData'
|
|
9
|
+
import {
|
|
10
|
+
render,
|
|
11
|
+
} from '../../../utils/test-utils';
|
|
12
|
+
import { Router } from "express";
|
|
13
|
+
const ComponentToRender = injectIntl(NewCallTask);
|
|
14
|
+
|
|
15
|
+
const renderComponent = (props) => {
|
|
16
|
+
const store = configureStore({}, browserHistory);
|
|
17
|
+
return render(
|
|
18
|
+
<Router>
|
|
19
|
+
<Provider store={store}>
|
|
20
|
+
<ComponentToRender {...props} />
|
|
21
|
+
</Provider>
|
|
22
|
+
</Router>,
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
describe("test for NewCallTask", () => {
|
|
27
|
+
const onCallTaskSubmit = jest.fn();
|
|
28
|
+
const props = {
|
|
29
|
+
...mockData,
|
|
30
|
+
onCallTaskSubmit,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
it("New call task", async () => {
|
|
34
|
+
renderComponent(props);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const mockData= {
|
|
2
|
+
injectedTags: {},
|
|
3
|
+
templateData: {},
|
|
4
|
+
messageDetails: {},
|
|
5
|
+
isLoading: true,
|
|
6
|
+
selectedOfferDetails: [],
|
|
7
|
+
location: {
|
|
8
|
+
pathname: "/NewCallTask",
|
|
9
|
+
query: {
|
|
10
|
+
type: false,
|
|
11
|
+
module: "default",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
match: {
|
|
15
|
+
path: '/NewCallTask',
|
|
16
|
+
url: '/creatives/ui/v2',
|
|
17
|
+
isExact: true,
|
|
18
|
+
params: {},
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '@capillarytech/cap-ui-library';
|
|
17
17
|
import { injectIntl, intlShape } from 'react-intl';
|
|
18
18
|
import { createStructuredSelector } from 'reselect';
|
|
19
|
-
import { makeSelectMetaEntities, isLoadingMetaEntities } from '../Cap/selectors';
|
|
19
|
+
import { makeSelectMetaEntities, isLoadingMetaEntities, setInjectedTags } from '../Cap/selectors';
|
|
20
20
|
import * as globalActions from '../Cap/actions';
|
|
21
21
|
import * as actions from "./actions";
|
|
22
22
|
import makeSelectCallTask from './selectors';
|
|
@@ -71,7 +71,7 @@ export class CallTask extends React.Component { // eslint-disable-line react/pre
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
const { intl, onCallTaskSubmit, templateData, loadingMetaEntities, metaEntities, selectedOfferDetails, messageDetails } = this.props;
|
|
74
|
+
const { intl, onCallTaskSubmit, templateData, loadingMetaEntities, metaEntities, selectedOfferDetails, messageDetails, injectedTags } = this.props;
|
|
75
75
|
const { formatMessage } = intl;
|
|
76
76
|
const { mode } = this.state;
|
|
77
77
|
return (
|
|
@@ -85,6 +85,7 @@ export class CallTask extends React.Component { // eslint-disable-line react/pre
|
|
|
85
85
|
onCallTaskSubmit={onCallTaskSubmit}
|
|
86
86
|
selectedOfferDetails={selectedOfferDetails}
|
|
87
87
|
messageDetails={messageDetails}
|
|
88
|
+
injectedTags={injectedTags || {}}
|
|
88
89
|
/>
|
|
89
90
|
:
|
|
90
91
|
<div>
|
|
@@ -144,6 +145,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
144
145
|
CallTask: makeSelectCallTask(),
|
|
145
146
|
metaEntities: makeSelectMetaEntities(),
|
|
146
147
|
loadingMetaEntities: isLoadingMetaEntities(),
|
|
148
|
+
injectedTags: setInjectedTags(),
|
|
147
149
|
});
|
|
148
150
|
|
|
149
151
|
function mapDispatchToProps(dispatch) {
|
|
@@ -1690,7 +1690,7 @@ export const response = {
|
|
|
1690
1690
|
},
|
|
1691
1691
|
submitAction: "addSecondaryCtaIos",
|
|
1692
1692
|
supportedEvents: [
|
|
1693
|
-
"addSecondaryCtaIos"
|
|
1693
|
+
"addSecondaryCtaIos",
|
|
1694
1694
|
],
|
|
1695
1695
|
disabled: true,
|
|
1696
1696
|
hoverText: "This section is being revamped. Till then it will remain disabled.",
|