@capillarytech/creatives-library 7.12.40 → 7.12.42
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 +1 -1
- package/v2Components/CapWhatsappCTA/constants.js +0 -5
- package/v2Components/CapWhatsappCTA/index.js +13 -12
- package/v2Components/CapWhatsappCTA/index.scss +15 -0
- package/v2Components/CapWhatsappCTA/messages.js +0 -4
- package/v2Components/CapWhatsappCTA/tests/index.test.js +152 -0
- package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +191 -19
- package/v2Components/TemplatePreview/tests/index.test.js +52 -5
- package/v2Containers/CreativesContainer/index.js +7 -2
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +29 -0
- package/v2Containers/CreativesContainer/tests/index.test.js +47 -14
- package/v2Containers/Whatsapp/constants.js +10 -7
- package/v2Containers/Whatsapp/index.js +79 -52
- package/v2Containers/Whatsapp/messages.js +6 -2
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +131090 -16937
- package/v2Containers/Whatsapp/tests/__snapshots__/utils.test.js.snap +100 -0
- package/v2Containers/Whatsapp/tests/index.test.js +270 -27
- package/v2Containers/Whatsapp/tests/mockData.js +186 -89
- package/v2Containers/Whatsapp/tests/utils.test.js +8 -0
- package/v2Containers/Whatsapp/utils.js +16 -14
- package/v2Containers/mockdata.js +177 -5
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
exports[`Test utils test getWhatsappContent 1`] = `
|
|
4
4
|
Object {
|
|
5
5
|
"charCount": 46,
|
|
6
|
+
"ctaData": Array [
|
|
7
|
+
Object {
|
|
8
|
+
"index": 0,
|
|
9
|
+
"phone_number": "+919738752617",
|
|
10
|
+
"text": "Call",
|
|
11
|
+
"type": "PHONE_NUMBER",
|
|
12
|
+
},
|
|
13
|
+
Object {
|
|
14
|
+
"index": 1,
|
|
15
|
+
"text": "More info",
|
|
16
|
+
"type": "STATIC_URL",
|
|
17
|
+
"url": "https://fast.com/",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
6
20
|
"templateMsg": <React.Fragment>
|
|
7
21
|
<CapLabel
|
|
8
22
|
type="label9"
|
|
@@ -14,9 +28,44 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
14
28
|
}
|
|
15
29
|
`;
|
|
16
30
|
|
|
31
|
+
exports[`Test utils test getWhatsappContent 2`] = `
|
|
32
|
+
Object {
|
|
33
|
+
"charCount": 3,
|
|
34
|
+
"ctaData": Array [
|
|
35
|
+
Object {
|
|
36
|
+
"index": 0,
|
|
37
|
+
"phone_number": "",
|
|
38
|
+
"text": "",
|
|
39
|
+
"type": "PHONE_NUMBER",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
"templateMsg": <React.Fragment>
|
|
43
|
+
<CapLabel
|
|
44
|
+
type="label9"
|
|
45
|
+
>
|
|
46
|
+
test
|
|
47
|
+
</CapLabel>
|
|
48
|
+
</React.Fragment>,
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
17
52
|
exports[`Test utils test getWhatsappContent for preview 1`] = `
|
|
18
53
|
Object {
|
|
19
54
|
"charCount": 46,
|
|
55
|
+
"ctaData": Array [
|
|
56
|
+
Object {
|
|
57
|
+
"index": 0,
|
|
58
|
+
"phone_number": "+919738752617",
|
|
59
|
+
"text": "Call",
|
|
60
|
+
"type": "PHONE_NUMBER",
|
|
61
|
+
},
|
|
62
|
+
Object {
|
|
63
|
+
"index": 1,
|
|
64
|
+
"text": "More info",
|
|
65
|
+
"type": "STATIC_URL",
|
|
66
|
+
"url": "https://fast.com/",
|
|
67
|
+
},
|
|
68
|
+
],
|
|
20
69
|
"templateMsg": <React.Fragment>
|
|
21
70
|
<CapLabel
|
|
22
71
|
type="label5"
|
|
@@ -27,3 +76,54 @@ Click {{unsubscribe}} to unsubscribe
|
|
|
27
76
|
</React.Fragment>,
|
|
28
77
|
}
|
|
29
78
|
`;
|
|
79
|
+
|
|
80
|
+
exports[`Test utils test getWhatsappCta 1`] = `
|
|
81
|
+
Array [
|
|
82
|
+
<CapLabel
|
|
83
|
+
style={
|
|
84
|
+
Object {
|
|
85
|
+
"marginTop": "12px",
|
|
86
|
+
"textAlign": "center",
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
type="label21"
|
|
90
|
+
>
|
|
91
|
+
<CapIcon
|
|
92
|
+
size="xs"
|
|
93
|
+
svgProps={
|
|
94
|
+
Object {
|
|
95
|
+
"style": Object {
|
|
96
|
+
"marginRight": "4px",
|
|
97
|
+
},
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
type="call"
|
|
101
|
+
/>
|
|
102
|
+
Call
|
|
103
|
+
</CapLabel>,
|
|
104
|
+
<CapLabel
|
|
105
|
+
style={
|
|
106
|
+
Object {
|
|
107
|
+
"marginTop": "12px",
|
|
108
|
+
"textAlign": "center",
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
type="label21"
|
|
112
|
+
>
|
|
113
|
+
<CapIcon
|
|
114
|
+
size="xs"
|
|
115
|
+
svgProps={
|
|
116
|
+
Object {
|
|
117
|
+
"style": Object {
|
|
118
|
+
"marginRight": "4px",
|
|
119
|
+
},
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
type="launch"
|
|
123
|
+
/>
|
|
124
|
+
More info
|
|
125
|
+
</CapLabel>,
|
|
126
|
+
]
|
|
127
|
+
`;
|
|
128
|
+
|
|
129
|
+
exports[`Test utils test getWhatsappCta 2`] = `Array []`;
|
|
@@ -5,15 +5,17 @@ import { Provider } from 'react-redux';
|
|
|
5
5
|
import { mountWithIntl } from '../../../../app/helpers/intl-enzym-test-helpers';
|
|
6
6
|
import { Whatsapp } from '../index';
|
|
7
7
|
import { mockData } from './mockData';
|
|
8
|
+
import * as constants from '../constants';
|
|
8
9
|
|
|
9
10
|
let store;
|
|
10
11
|
beforeAll(() => {
|
|
11
12
|
store = configureStore({}, browserHistory);
|
|
12
13
|
});
|
|
13
14
|
|
|
14
|
-
describe('Creatives Whatsapp
|
|
15
|
+
describe('Creatives Whatsapp test1/>', () => {
|
|
15
16
|
let renderedComponent;
|
|
16
17
|
const createWhatsappTemplate = jest.fn();
|
|
18
|
+
const getFormData = jest.fn();
|
|
17
19
|
const clearCreateResponse = jest.fn();
|
|
18
20
|
const getTemplateDetails = jest.fn();
|
|
19
21
|
const resetEditTemplate = jest.fn();
|
|
@@ -25,12 +27,10 @@ describe('Creatives Whatsapp test/>', () => {
|
|
|
25
27
|
const params = {
|
|
26
28
|
id: mockData.editData1.templateDetails._id,
|
|
27
29
|
};
|
|
28
|
-
const editData1 = mockData
|
|
29
|
-
const editData2 = mockData.editData2;
|
|
30
|
-
const editData3 = mockData.editData3;
|
|
30
|
+
const { editData1, editData2, editData3, editdata4, editdata5 } = mockData;
|
|
31
31
|
const accountData = mockData.accountData;
|
|
32
32
|
|
|
33
|
-
const renderHelper = (args) => {
|
|
33
|
+
const renderHelper = (args, isFullMode = true) => {
|
|
34
34
|
renderedComponent = mountWithIntl(
|
|
35
35
|
<Provider store={store}>
|
|
36
36
|
<Whatsapp
|
|
@@ -43,12 +43,14 @@ describe('Creatives Whatsapp test/>', () => {
|
|
|
43
43
|
globalActions={{ fetchSchemaForEntity }}
|
|
44
44
|
onCreateComplete={onCreateComplete}
|
|
45
45
|
handleClose={handleClose}
|
|
46
|
+
getFormData={getFormData}
|
|
46
47
|
params={args.params}
|
|
47
48
|
editData={args.editData}
|
|
49
|
+
templateData={args.templateData}
|
|
48
50
|
accountData={accountData}
|
|
49
51
|
location={location}
|
|
50
52
|
intl={{ formatMessage }}
|
|
51
|
-
isFullMode={
|
|
53
|
+
isFullMode={isFullMode}
|
|
52
54
|
isEditFlow={args.isEditFlow || false}
|
|
53
55
|
loadingTags={args.loadingTags}
|
|
54
56
|
metaEntities={[]}
|
|
@@ -56,22 +58,13 @@ describe('Creatives Whatsapp test/>', () => {
|
|
|
56
58
|
/>
|
|
57
59
|
</Provider>,
|
|
58
60
|
);
|
|
59
|
-
}
|
|
61
|
+
};
|
|
60
62
|
|
|
61
63
|
it('should render create mode', () => {
|
|
62
64
|
renderHelper({});
|
|
63
65
|
expect(renderedComponent).toMatchSnapshot();
|
|
64
66
|
});
|
|
65
67
|
|
|
66
|
-
it('test addVariable in create mode', () => {
|
|
67
|
-
renderHelper({});
|
|
68
|
-
renderedComponent
|
|
69
|
-
.find('CapHeader').at(1)
|
|
70
|
-
.props().suffix
|
|
71
|
-
.props.onClick();
|
|
72
|
-
expect(renderedComponent).toMatchSnapshot();
|
|
73
|
-
});
|
|
74
|
-
|
|
75
68
|
it('template name change', () => {
|
|
76
69
|
renderHelper({});
|
|
77
70
|
const templateNameRenderHelper = (val) => {
|
|
@@ -155,12 +148,154 @@ describe('Creatives Whatsapp test/>', () => {
|
|
|
155
148
|
expect(renderedComponent).toMatchSnapshot();
|
|
156
149
|
});
|
|
157
150
|
|
|
158
|
-
it('
|
|
151
|
+
it('should render edit mode in various cases', () => {
|
|
152
|
+
let event = { target: { value: '5454', id: '{{1}}_1' } };
|
|
153
|
+
renderHelper({
|
|
154
|
+
params,
|
|
155
|
+
editData: editData1,
|
|
156
|
+
isEditFlow: true,
|
|
157
|
+
loadingTags: false,
|
|
158
|
+
});
|
|
159
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
160
|
+
renderHelper({
|
|
161
|
+
params,
|
|
162
|
+
editData: editData2,
|
|
163
|
+
isEditFlow: true,
|
|
164
|
+
loadingTags: false,
|
|
165
|
+
});
|
|
166
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
167
|
+
renderHelper({
|
|
168
|
+
params,
|
|
169
|
+
editData: editData3,
|
|
170
|
+
isEditFlow: true,
|
|
171
|
+
loadingTags: false,
|
|
172
|
+
});
|
|
173
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
174
|
+
renderHelper({
|
|
175
|
+
params,
|
|
176
|
+
editData: editData1,
|
|
177
|
+
isEditFlow: true,
|
|
178
|
+
loadingTags: false,
|
|
179
|
+
});
|
|
180
|
+
renderedComponent
|
|
181
|
+
.find('textarea.TextArea__StyledTextArea-sc-177dfyt-2')
|
|
182
|
+
.at(1)
|
|
183
|
+
.simulate('change', event);
|
|
184
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
185
|
+
renderHelper(
|
|
186
|
+
{
|
|
187
|
+
params,
|
|
188
|
+
templateData: editdata4,
|
|
189
|
+
isEditFlow: true,
|
|
190
|
+
loadingTags: false,
|
|
191
|
+
},
|
|
192
|
+
false,
|
|
193
|
+
);
|
|
194
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
195
|
+
renderedComponent.find('CapButton.whatsapp-create-btn').props().onClick();
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it('test addVariable in create mode', () => {
|
|
199
|
+
renderHelper({});
|
|
200
|
+
renderedComponent.find('CapHeader').at(1).props().suffix.props.onClick();
|
|
201
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it('add cta', () => {
|
|
205
|
+
renderHelper({});
|
|
206
|
+
let event = { target: { value: 'CTA' } };
|
|
207
|
+
renderedComponent
|
|
208
|
+
.find('CapRadioGroup.whatsapp-btn-radio-group')
|
|
209
|
+
.props()
|
|
210
|
+
.onChange(event);
|
|
211
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
212
|
+
});
|
|
213
|
+
it('check unsubscribe', () => {
|
|
214
|
+
renderHelper({});
|
|
215
|
+
let event = { target: { checked: true } };
|
|
216
|
+
renderedComponent
|
|
217
|
+
.find('CapCheckbox.whatsapp-unsubscribe-checkbox')
|
|
218
|
+
.props()
|
|
219
|
+
.onChange(event);
|
|
220
|
+
renderedComponent.update();
|
|
221
|
+
expect(
|
|
222
|
+
renderedComponent
|
|
223
|
+
.find('CapCheckbox.whatsapp-unsubscribe-checkbox')
|
|
224
|
+
.props().checked,
|
|
225
|
+
).toBe(true);
|
|
226
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
227
|
+
});
|
|
228
|
+
it('should render edit mode in various cases', () => {
|
|
229
|
+
renderHelper(
|
|
230
|
+
{
|
|
231
|
+
params,
|
|
232
|
+
templateData: editdata5,
|
|
233
|
+
isEditFlow: true,
|
|
234
|
+
loadingTags: false,
|
|
235
|
+
},
|
|
236
|
+
false,
|
|
237
|
+
);
|
|
238
|
+
renderedComponent.update();
|
|
239
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
describe('Creatives Whatsapp test2/>', () => {
|
|
244
|
+
let renderedComponent;
|
|
245
|
+
const createWhatsappTemplate = jest.fn();
|
|
246
|
+
const getFormData = jest.fn();
|
|
247
|
+
const clearCreateResponse = jest.fn();
|
|
248
|
+
const getTemplateDetails = jest.fn();
|
|
249
|
+
const resetEditTemplate = jest.fn();
|
|
250
|
+
const fetchSchemaForEntity = jest.fn();
|
|
251
|
+
const handleClose = jest.fn();
|
|
252
|
+
const onCreateComplete = jest.fn();
|
|
253
|
+
const formatMessage = jest.fn();
|
|
254
|
+
const location = mockData.location;
|
|
255
|
+
const params = {
|
|
256
|
+
id: mockData.editData1.templateDetails._id,
|
|
257
|
+
};
|
|
258
|
+
const { editData1, editData2, editData3, editdata4, editdata5 } = mockData;
|
|
259
|
+
const accountData = mockData.accountData;
|
|
260
|
+
|
|
261
|
+
const renderHelper = (args, isFullMode = true) => {
|
|
262
|
+
renderedComponent = mountWithIntl(
|
|
263
|
+
<Provider store={store}>
|
|
264
|
+
<Whatsapp
|
|
265
|
+
actions={{
|
|
266
|
+
createWhatsappTemplate,
|
|
267
|
+
clearCreateResponse,
|
|
268
|
+
getTemplateDetails,
|
|
269
|
+
resetEditTemplate,
|
|
270
|
+
}}
|
|
271
|
+
globalActions={{ fetchSchemaForEntity }}
|
|
272
|
+
onCreateComplete={onCreateComplete}
|
|
273
|
+
handleClose={handleClose}
|
|
274
|
+
getFormData={getFormData}
|
|
275
|
+
params={args.params}
|
|
276
|
+
editData={args.editData}
|
|
277
|
+
templateData={args.templateData}
|
|
278
|
+
accountData={accountData}
|
|
279
|
+
location={location}
|
|
280
|
+
intl={{ formatMessage }}
|
|
281
|
+
isFullMode={isFullMode}
|
|
282
|
+
isEditFlow={args.isEditFlow || false}
|
|
283
|
+
loadingTags={args.loadingTags}
|
|
284
|
+
metaEntities={[]}
|
|
285
|
+
getDefaultTags={true}
|
|
286
|
+
/>
|
|
287
|
+
</Provider>,
|
|
288
|
+
);
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
it('set all valid values and send for approval 1', () => {
|
|
292
|
+
constants.INITIAL_CTA_DATA = [];
|
|
159
293
|
renderHelper({});
|
|
160
294
|
let event = { target: { value: 'template_name' } };
|
|
161
295
|
createWhatsappTemplate.mockImplementation((obj, callback) => {
|
|
162
296
|
callback();
|
|
163
297
|
});
|
|
298
|
+
|
|
164
299
|
renderedComponent
|
|
165
300
|
.find('#whatsapp_template_name_input')
|
|
166
301
|
.at(3)
|
|
@@ -178,21 +313,129 @@ describe('Creatives Whatsapp test/>', () => {
|
|
|
178
313
|
.find('TextArea#whatsapp-create-template-message-input')
|
|
179
314
|
.at(1)
|
|
180
315
|
.simulate('change', event);
|
|
181
|
-
|
|
316
|
+
event = { target: { checked: true } };
|
|
317
|
+
renderedComponent
|
|
318
|
+
.find('CapCheckbox.whatsapp-unsubscribe-checkbox')
|
|
319
|
+
.props()
|
|
320
|
+
.onChange(event);
|
|
321
|
+
renderedComponent.update();
|
|
322
|
+
event = { target: { value: 'CTA' } };
|
|
323
|
+
renderedComponent
|
|
324
|
+
.find('CapRadioGroup.whatsapp-btn-radio-group')
|
|
325
|
+
.props()
|
|
326
|
+
.onChange(event);
|
|
327
|
+
renderedComponent.update();
|
|
328
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
182
329
|
});
|
|
183
330
|
|
|
184
|
-
it('
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
331
|
+
it('set all valid values and send for approval 2', () => {
|
|
332
|
+
constants.INITIAL_CTA_DATA = [
|
|
333
|
+
{
|
|
334
|
+
index: 0,
|
|
335
|
+
ctaType: 'WEBSITE',
|
|
336
|
+
text: 'Visit',
|
|
337
|
+
phone_number: '',
|
|
338
|
+
urlType: 'STATIC_URL',
|
|
339
|
+
url: 'https://www.google.com',
|
|
340
|
+
isSaved: true,
|
|
341
|
+
},
|
|
342
|
+
];
|
|
343
|
+
renderHelper({});
|
|
344
|
+
let event = { target: { value: 'template_name' } };
|
|
345
|
+
createWhatsappTemplate.mockImplementation((obj, callback) => {
|
|
346
|
+
callback();
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
renderedComponent
|
|
350
|
+
.find('#whatsapp_template_name_input')
|
|
351
|
+
.at(3)
|
|
352
|
+
.simulate('change', event);
|
|
353
|
+
renderedComponent
|
|
354
|
+
.find('CapSelect#select-whatsapp-category')
|
|
355
|
+
.props()
|
|
356
|
+
.onChange('APPOINTMENT_UPDATE');
|
|
357
|
+
renderedComponent
|
|
358
|
+
.find('CapSelect#select-whatsapp-language')
|
|
359
|
+
.props()
|
|
360
|
+
.onChange('en');
|
|
361
|
+
event = { target: { value: 'Hi {{1}}' } };
|
|
362
|
+
renderedComponent
|
|
363
|
+
.find('TextArea#whatsapp-create-template-message-input')
|
|
364
|
+
.at(1)
|
|
365
|
+
.simulate('change', event);
|
|
366
|
+
event = { target: { checked: true } };
|
|
367
|
+
renderedComponent
|
|
368
|
+
.find('CapCheckbox.whatsapp-unsubscribe-checkbox')
|
|
369
|
+
.props()
|
|
370
|
+
.onChange(event);
|
|
371
|
+
renderedComponent.update();
|
|
372
|
+
event = { target: { value: 'CTA' } };
|
|
373
|
+
renderedComponent
|
|
374
|
+
.find('CapRadioGroup.whatsapp-btn-radio-group')
|
|
375
|
+
.props()
|
|
376
|
+
.onChange(event);
|
|
377
|
+
renderedComponent.update();
|
|
378
|
+
renderedComponent.find('CapButton.whatsapp-create-btn').props().onClick();
|
|
191
379
|
expect(renderedComponent).toMatchSnapshot();
|
|
192
|
-
|
|
193
|
-
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
it('set all valid values and send for approval 3', () => {
|
|
383
|
+
constants.INITIAL_CTA_DATA = [
|
|
384
|
+
{
|
|
385
|
+
index: 0,
|
|
386
|
+
ctaType: 'WEBSITE',
|
|
387
|
+
text: 'Visit',
|
|
388
|
+
phone_number: '',
|
|
389
|
+
urlType: 'STATIC_URL',
|
|
390
|
+
url: 'https://www.google.com',
|
|
391
|
+
isSaved: true,
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
index: 1,
|
|
395
|
+
ctaType: 'PHONE_NUMBER',
|
|
396
|
+
text: 'Call us',
|
|
397
|
+
phone_number: '9112345',
|
|
398
|
+
urlType: 'STATIC_URL',
|
|
399
|
+
url: '',
|
|
400
|
+
isSaved: true,
|
|
401
|
+
},
|
|
402
|
+
];
|
|
403
|
+
renderHelper({});
|
|
404
|
+
let event = { target: { value: 'template_name' } };
|
|
405
|
+
createWhatsappTemplate.mockImplementation((obj, callback) => {
|
|
406
|
+
callback();
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
renderedComponent
|
|
410
|
+
.find('#whatsapp_template_name_input')
|
|
411
|
+
.at(3)
|
|
412
|
+
.simulate('change', event);
|
|
413
|
+
renderedComponent
|
|
414
|
+
.find('CapSelect#select-whatsapp-category')
|
|
415
|
+
.props()
|
|
416
|
+
.onChange('APPOINTMENT_UPDATE');
|
|
417
|
+
renderedComponent
|
|
418
|
+
.find('CapSelect#select-whatsapp-language')
|
|
419
|
+
.props()
|
|
420
|
+
.onChange('en');
|
|
421
|
+
event = { target: { value: 'Hi {{1}}' } };
|
|
422
|
+
renderedComponent
|
|
423
|
+
.find('TextArea#whatsapp-create-template-message-input')
|
|
194
424
|
.at(1)
|
|
195
425
|
.simulate('change', event);
|
|
426
|
+
event = { target: { checked: true } };
|
|
427
|
+
renderedComponent
|
|
428
|
+
.find('CapCheckbox.whatsapp-unsubscribe-checkbox')
|
|
429
|
+
.props()
|
|
430
|
+
.onChange(event);
|
|
431
|
+
renderedComponent.update();
|
|
432
|
+
event = { target: { value: 'CTA' } };
|
|
433
|
+
renderedComponent
|
|
434
|
+
.find('CapRadioGroup.whatsapp-btn-radio-group')
|
|
435
|
+
.props()
|
|
436
|
+
.onChange(event);
|
|
437
|
+
renderedComponent.update();
|
|
438
|
+
renderedComponent.find('CapButton.whatsapp-create-btn').props().onClick();
|
|
196
439
|
expect(renderedComponent).toMatchSnapshot();
|
|
197
440
|
});
|
|
198
441
|
});
|