@capillarytech/creatives-library 8.0.26 → 8.0.27
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/containers/Cap/selectors.js +1 -2
- package/containers/Cap/tests/__snapshots__/index.test.js.snap +8 -0
- package/containers/Cap/tests/selectors.test.js +28 -0
- package/containers/LanguageProvider/tests/index.test.js +8 -30
- package/package.json +5 -8
- package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +5 -2
- package/tests/store.test.js +5 -4
- package/utils/ApiCaller.js +0 -12
- package/utils/test-utils.js +4 -8
- package/utils/tests/cdnTransformation.test.js +1 -1
- package/v2Components/CapDeviceContent/tests/index.test.js +5 -12
- package/v2Components/Ckeditor/tests/index.test.js +3 -15
- package/v2Components/FormBuilder/tests/index.test.js +3 -2
- package/v2Components/NavigationBar/tests/index.test.js +3 -2
- package/v2Components/NewCallTask/tests/index.test.js +3 -2
- package/v2Containers/Cap/index.js +0 -5
- package/v2Containers/Cap/tests/Cap.test.js +7 -16
- package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +8 -0
- package/v2Containers/Cap/tests/selectors.test.js +26 -27
- package/v2Containers/CreativesContainer/index.js +1 -1
- package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +3 -2
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +9 -9
- package/v2Containers/Email/tests/sagas.test.js +27 -23
- package/v2Containers/InApp/tests/index.test.js +3 -11
- package/v2Containers/InApp/tests/sagas.test.js +10 -13
- package/v2Containers/LanguageProvider/tests/index.test.js +11 -19
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +90 -287
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +58 -116
- package/v2Containers/Line/Container/ImageCarousel/tests/content.test.js +3 -2
- package/v2Containers/Line/Container/ImageCarousel/tests/index.test.js +3 -2
- package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +396 -254
- package/v2Containers/Line/Container/Wrapper/tests/index.test.js +3 -11
- package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +215 -395
- package/v2Containers/Line/Container/tests/index.test.js +4 -3
- package/v2Containers/MobilePush/Edit/index.js +7 -8
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +133186 -146971
- package/v2Containers/Rcs/tests/index.test.js +4 -12
- package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +169 -31
- package/v2Containers/SmsTrai/Create/tests/index.test.js +10 -15
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +1457 -817
- package/v2Containers/SmsTrai/Edit/tests/index.test.js +3 -14
- package/v2Containers/TagList/tests/TagList.test.js +3 -2
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +20 -14
- package/v2Containers/TemplatesV2/index.js +55 -80
- package/v2Containers/TemplatesV2/tests/index.test.js +4 -3
- package/v2Containers/Viber/tests/index.test.js +3 -10
- package/v2Containers/Whatsapp/index.js +0 -1
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +32562 -5611
- package/v2Containers/Whatsapp/tests/index.test.js +12 -31
- package/v2Containers/Zalo/tests/index.test.js +3 -11
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Provider } from 'react-redux';
|
|
3
|
+
import { createBrowserHistory } from 'history';
|
|
3
4
|
import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
|
|
4
5
|
import { initialReducer } from '../../../initialReducer';
|
|
5
6
|
import { mountWithIntl } from '../../../../app/helpers/intl-enzym-test-helpers';
|
|
6
7
|
import { Rcs } from '../index';
|
|
7
8
|
import { mockData } from './mockData';
|
|
8
|
-
import history from '../../../utils/history';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
jest.mock('../../../v2Containers/TagList/index.js', () => ({
|
|
12
|
-
__esModule: true,
|
|
13
|
-
default: (props) => (
|
|
14
|
-
<div className="tag-mock" {...props}>
|
|
15
|
-
TagList
|
|
16
|
-
</div>
|
|
17
|
-
),
|
|
18
|
-
}));
|
|
19
10
|
let store;
|
|
11
|
+
let browserHistory = createBrowserHistory();
|
|
20
12
|
beforeAll(() => {
|
|
21
|
-
store = configureStore({}, initialReducer,
|
|
13
|
+
store = configureStore({}, initialReducer, browserHistory);
|
|
22
14
|
});
|
|
23
15
|
|
|
24
16
|
jest.mock('../../CreativesContainer', () => ({
|
|
@@ -209,7 +201,7 @@ describe('Creatives rcs test/>', () => {
|
|
|
209
201
|
isEditFlow: true,
|
|
210
202
|
isDltEnabled: true,
|
|
211
203
|
});
|
|
212
|
-
renderedComponent.find('CapButton.add-dlt-btn').
|
|
204
|
+
renderedComponent.find('CapButton.add-dlt-btn').simulate('click');
|
|
213
205
|
expect(renderedComponent).toMatchSnapshot();
|
|
214
206
|
});
|
|
215
207
|
|
|
@@ -4,7 +4,24 @@ exports[`Creatives SmsTraiCreate test/> done button should be disabled if blank
|
|
|
4
4
|
<SmsTraiCreate
|
|
5
5
|
actions={
|
|
6
6
|
Object {
|
|
7
|
-
"checkDuplicatesInDb": [MockFunction]
|
|
7
|
+
"checkDuplicatesInDb": [MockFunction] {
|
|
8
|
+
"calls": Array [
|
|
9
|
+
Array [
|
|
10
|
+
Array [
|
|
11
|
+
Object {
|
|
12
|
+
"template_id": "12345678912345678901",
|
|
13
|
+
"template_name": "CAP71871_12",
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
],
|
|
17
|
+
],
|
|
18
|
+
"results": Array [
|
|
19
|
+
Object {
|
|
20
|
+
"type": "return",
|
|
21
|
+
"value": undefined,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
8
25
|
"clearCreateResponse": [MockFunction],
|
|
9
26
|
"createSMSTRAITemplates": [MockFunction],
|
|
10
27
|
"doneCheckingDuplicates": [MockFunction],
|
|
@@ -169,6 +186,7 @@ exports[`Creatives SmsTraiCreate test/> done button should be disabled if blank
|
|
|
169
186
|
"creatives.components.TemplatePreview.smsFormatType": "Message has unicode characters",
|
|
170
187
|
"creatives.components.TemplatePreview.smsIcon": "Sms Icon",
|
|
171
188
|
"creatives.components.TemplatePreview.unicodeIconTooltip": "This message has unicode characters. This may affect the cost per message.",
|
|
189
|
+
"creatives.components.TestPage.header": "Looks like youas are lost!",
|
|
172
190
|
"creatives.components.Toastr.header": "This is the Toastr component !",
|
|
173
191
|
"creatives.components.ToastrMessage.close": "close",
|
|
174
192
|
"creatives.components.ToastrMessage.header": "This is the ToastrMessage component !",
|
|
@@ -853,6 +871,9 @@ exports[`Creatives SmsTraiCreate test/> done button should be disabled if blank
|
|
|
853
871
|
"creatives.containers.Templates.wechatHeader": "WECHAT",
|
|
854
872
|
"creatives.containers.Templates.yesText": "Yes",
|
|
855
873
|
"creatives.containers.Templates.zipUploadFailed": "Failed to upload zip file",
|
|
874
|
+
"creatives.containers.Testv2.descriptionTestv2": "Description of Testv2",
|
|
875
|
+
"creatives.containers.Testv2.header": "This is Testv2 container !",
|
|
876
|
+
"creatives.containers.Testv2.testv2": "Testv2",
|
|
856
877
|
"creatives.containers.View.descriptionView": "Description of View",
|
|
857
878
|
"creatives.containers.View.header": "This is View container !",
|
|
858
879
|
"creatives.containers.View.view": "View",
|
|
@@ -1859,6 +1880,10 @@ new message content.",
|
|
|
1859
1880
|
"creatives.containersV2.TemplatesV2.viber": "Viber",
|
|
1860
1881
|
"creatives.containersV2.TemplatesV2.wechat": "Wechat",
|
|
1861
1882
|
"creatives.containersV2.TemplatesV2.whatsapp": "WhatsApp",
|
|
1883
|
+
"creatives.containersV2.TestPage.header": "Looks like youas are lost!",
|
|
1884
|
+
"creatives.containersV2.Testv2.descriptionTestv2": "Description of Testv2",
|
|
1885
|
+
"creatives.containersV2.Testv2.header": "This is Testv2 container !",
|
|
1886
|
+
"creatives.containersV2.Testv2.testv2": "Testv2",
|
|
1862
1887
|
"creatives.containersV2.View.descriptionView": "Description of View",
|
|
1863
1888
|
"creatives.containersV2.View.header": "This is View container !",
|
|
1864
1889
|
"creatives.containersV2.View.view": "View",
|
|
@@ -2298,25 +2323,49 @@ new message content.",
|
|
|
2298
2323
|
type="h4"
|
|
2299
2324
|
>
|
|
2300
2325
|
<div
|
|
2301
|
-
className="CapHeading-vrvcag-0
|
|
2326
|
+
className="upload-file-title CapHeading-vrvcag-0 hlVFZb"
|
|
2302
2327
|
type="h4"
|
|
2303
2328
|
>
|
|
2304
2329
|
Upload file
|
|
2305
2330
|
</div>
|
|
2306
2331
|
</CapHeading>
|
|
2307
2332
|
<CapSpin
|
|
2308
|
-
spinning={
|
|
2333
|
+
spinning={true}
|
|
2309
2334
|
>
|
|
2310
2335
|
<Spin
|
|
2311
2336
|
size="default"
|
|
2312
|
-
spinning={
|
|
2337
|
+
spinning={true}
|
|
2313
2338
|
wrapperClassName=""
|
|
2314
2339
|
>
|
|
2315
2340
|
<div
|
|
2316
2341
|
className="ant-spin-nested-loading"
|
|
2317
2342
|
>
|
|
2318
2343
|
<div
|
|
2319
|
-
|
|
2344
|
+
key="loading"
|
|
2345
|
+
>
|
|
2346
|
+
<div
|
|
2347
|
+
className="ant-spin ant-spin-spinning"
|
|
2348
|
+
>
|
|
2349
|
+
<span
|
|
2350
|
+
className="ant-spin-dot ant-spin-dot-spin"
|
|
2351
|
+
>
|
|
2352
|
+
<i
|
|
2353
|
+
className="ant-spin-dot-item"
|
|
2354
|
+
/>
|
|
2355
|
+
<i
|
|
2356
|
+
className="ant-spin-dot-item"
|
|
2357
|
+
/>
|
|
2358
|
+
<i
|
|
2359
|
+
className="ant-spin-dot-item"
|
|
2360
|
+
/>
|
|
2361
|
+
<i
|
|
2362
|
+
className="ant-spin-dot-item"
|
|
2363
|
+
/>
|
|
2364
|
+
</span>
|
|
2365
|
+
</div>
|
|
2366
|
+
</div>
|
|
2367
|
+
<div
|
|
2368
|
+
className="ant-spin-container ant-spin-blur"
|
|
2320
2369
|
key="container"
|
|
2321
2370
|
>
|
|
2322
2371
|
<Dropzone
|
|
@@ -2376,7 +2425,7 @@ new message content.",
|
|
|
2376
2425
|
type="h2"
|
|
2377
2426
|
>
|
|
2378
2427
|
<div
|
|
2379
|
-
className="
|
|
2428
|
+
className="drop-zone-text-1 CapHeading-vrvcag-0 eHvyRg"
|
|
2380
2429
|
type="h2"
|
|
2381
2430
|
>
|
|
2382
2431
|
Drag and drop a CSV file here
|
|
@@ -2387,7 +2436,7 @@ new message content.",
|
|
|
2387
2436
|
type="h3"
|
|
2388
2437
|
>
|
|
2389
2438
|
<div
|
|
2390
|
-
className="
|
|
2439
|
+
className="drop-zone-text-2 CapHeading-vrvcag-0 kolsfA"
|
|
2391
2440
|
type="h3"
|
|
2392
2441
|
>
|
|
2393
2442
|
OR
|
|
@@ -2449,7 +2498,7 @@ new message content.",
|
|
|
2449
2498
|
type="h4"
|
|
2450
2499
|
>
|
|
2451
2500
|
<div
|
|
2452
|
-
className="CapHeading-vrvcag-0
|
|
2501
|
+
className="CapHeading-vrvcag-0 hlVFZb"
|
|
2453
2502
|
type="h4"
|
|
2454
2503
|
>
|
|
2455
2504
|
Upload Instructions
|
|
@@ -2964,7 +3013,7 @@ new message content.",
|
|
|
2964
3013
|
key=".2"
|
|
2965
3014
|
>
|
|
2966
3015
|
<div
|
|
2967
|
-
className="Create__SMSTraiFooter-sc-7ip2ax-0
|
|
3016
|
+
className="Create__SMSTraiFooter-sc-7ip2ax-0 cEyOCB"
|
|
2968
3017
|
>
|
|
2969
3018
|
<CapButton
|
|
2970
3019
|
className="done-button"
|
|
@@ -3181,6 +3230,7 @@ exports[`Creatives SmsTraiCreate test/> invalid file drop 1`] = `
|
|
|
3181
3230
|
"creatives.components.TemplatePreview.smsFormatType": "Message has unicode characters",
|
|
3182
3231
|
"creatives.components.TemplatePreview.smsIcon": "Sms Icon",
|
|
3183
3232
|
"creatives.components.TemplatePreview.unicodeIconTooltip": "This message has unicode characters. This may affect the cost per message.",
|
|
3233
|
+
"creatives.components.TestPage.header": "Looks like youas are lost!",
|
|
3184
3234
|
"creatives.components.Toastr.header": "This is the Toastr component !",
|
|
3185
3235
|
"creatives.components.ToastrMessage.close": "close",
|
|
3186
3236
|
"creatives.components.ToastrMessage.header": "This is the ToastrMessage component !",
|
|
@@ -3865,6 +3915,9 @@ exports[`Creatives SmsTraiCreate test/> invalid file drop 1`] = `
|
|
|
3865
3915
|
"creatives.containers.Templates.wechatHeader": "WECHAT",
|
|
3866
3916
|
"creatives.containers.Templates.yesText": "Yes",
|
|
3867
3917
|
"creatives.containers.Templates.zipUploadFailed": "Failed to upload zip file",
|
|
3918
|
+
"creatives.containers.Testv2.descriptionTestv2": "Description of Testv2",
|
|
3919
|
+
"creatives.containers.Testv2.header": "This is Testv2 container !",
|
|
3920
|
+
"creatives.containers.Testv2.testv2": "Testv2",
|
|
3868
3921
|
"creatives.containers.View.descriptionView": "Description of View",
|
|
3869
3922
|
"creatives.containers.View.header": "This is View container !",
|
|
3870
3923
|
"creatives.containers.View.view": "View",
|
|
@@ -4871,6 +4924,10 @@ new message content.",
|
|
|
4871
4924
|
"creatives.containersV2.TemplatesV2.viber": "Viber",
|
|
4872
4925
|
"creatives.containersV2.TemplatesV2.wechat": "Wechat",
|
|
4873
4926
|
"creatives.containersV2.TemplatesV2.whatsapp": "WhatsApp",
|
|
4927
|
+
"creatives.containersV2.TestPage.header": "Looks like youas are lost!",
|
|
4928
|
+
"creatives.containersV2.Testv2.descriptionTestv2": "Description of Testv2",
|
|
4929
|
+
"creatives.containersV2.Testv2.header": "This is Testv2 container !",
|
|
4930
|
+
"creatives.containersV2.Testv2.testv2": "Testv2",
|
|
4874
4931
|
"creatives.containersV2.View.descriptionView": "Description of View",
|
|
4875
4932
|
"creatives.containersV2.View.header": "This is View container !",
|
|
4876
4933
|
"creatives.containersV2.View.view": "View",
|
|
@@ -5310,25 +5367,49 @@ new message content.",
|
|
|
5310
5367
|
type="h4"
|
|
5311
5368
|
>
|
|
5312
5369
|
<div
|
|
5313
|
-
className="CapHeading-vrvcag-0
|
|
5370
|
+
className="upload-file-title CapHeading-vrvcag-0 hlVFZb"
|
|
5314
5371
|
type="h4"
|
|
5315
5372
|
>
|
|
5316
5373
|
Upload file
|
|
5317
5374
|
</div>
|
|
5318
5375
|
</CapHeading>
|
|
5319
5376
|
<CapSpin
|
|
5320
|
-
spinning={
|
|
5377
|
+
spinning={true}
|
|
5321
5378
|
>
|
|
5322
5379
|
<Spin
|
|
5323
5380
|
size="default"
|
|
5324
|
-
spinning={
|
|
5381
|
+
spinning={true}
|
|
5325
5382
|
wrapperClassName=""
|
|
5326
5383
|
>
|
|
5327
5384
|
<div
|
|
5328
5385
|
className="ant-spin-nested-loading"
|
|
5329
5386
|
>
|
|
5330
5387
|
<div
|
|
5331
|
-
|
|
5388
|
+
key="loading"
|
|
5389
|
+
>
|
|
5390
|
+
<div
|
|
5391
|
+
className="ant-spin ant-spin-spinning"
|
|
5392
|
+
>
|
|
5393
|
+
<span
|
|
5394
|
+
className="ant-spin-dot ant-spin-dot-spin"
|
|
5395
|
+
>
|
|
5396
|
+
<i
|
|
5397
|
+
className="ant-spin-dot-item"
|
|
5398
|
+
/>
|
|
5399
|
+
<i
|
|
5400
|
+
className="ant-spin-dot-item"
|
|
5401
|
+
/>
|
|
5402
|
+
<i
|
|
5403
|
+
className="ant-spin-dot-item"
|
|
5404
|
+
/>
|
|
5405
|
+
<i
|
|
5406
|
+
className="ant-spin-dot-item"
|
|
5407
|
+
/>
|
|
5408
|
+
</span>
|
|
5409
|
+
</div>
|
|
5410
|
+
</div>
|
|
5411
|
+
<div
|
|
5412
|
+
className="ant-spin-container ant-spin-blur"
|
|
5332
5413
|
key="container"
|
|
5333
5414
|
>
|
|
5334
5415
|
<Dropzone
|
|
@@ -5388,7 +5469,7 @@ new message content.",
|
|
|
5388
5469
|
type="h2"
|
|
5389
5470
|
>
|
|
5390
5471
|
<div
|
|
5391
|
-
className="
|
|
5472
|
+
className="drop-zone-text-1 CapHeading-vrvcag-0 eHvyRg"
|
|
5392
5473
|
type="h2"
|
|
5393
5474
|
>
|
|
5394
5475
|
Drag and drop a CSV file here
|
|
@@ -5399,7 +5480,7 @@ new message content.",
|
|
|
5399
5480
|
type="h3"
|
|
5400
5481
|
>
|
|
5401
5482
|
<div
|
|
5402
|
-
className="
|
|
5483
|
+
className="drop-zone-text-2 CapHeading-vrvcag-0 kolsfA"
|
|
5403
5484
|
type="h3"
|
|
5404
5485
|
>
|
|
5405
5486
|
OR
|
|
@@ -5461,7 +5542,7 @@ new message content.",
|
|
|
5461
5542
|
type="h4"
|
|
5462
5543
|
>
|
|
5463
5544
|
<div
|
|
5464
|
-
className="CapHeading-vrvcag-0
|
|
5545
|
+
className="CapHeading-vrvcag-0 hlVFZb"
|
|
5465
5546
|
type="h4"
|
|
5466
5547
|
>
|
|
5467
5548
|
Upload Instructions
|
|
@@ -5976,7 +6057,7 @@ new message content.",
|
|
|
5976
6057
|
key=".2"
|
|
5977
6058
|
>
|
|
5978
6059
|
<div
|
|
5979
|
-
className="Create__SMSTraiFooter-sc-7ip2ax-0
|
|
6060
|
+
className="Create__SMSTraiFooter-sc-7ip2ax-0 cEyOCB"
|
|
5980
6061
|
>
|
|
5981
6062
|
<CapButton
|
|
5982
6063
|
className="done-button"
|
|
@@ -6193,6 +6274,7 @@ exports[`Creatives SmsTraiCreate test/> renders UI 1`] = `
|
|
|
6193
6274
|
"creatives.components.TemplatePreview.smsFormatType": "Message has unicode characters",
|
|
6194
6275
|
"creatives.components.TemplatePreview.smsIcon": "Sms Icon",
|
|
6195
6276
|
"creatives.components.TemplatePreview.unicodeIconTooltip": "This message has unicode characters. This may affect the cost per message.",
|
|
6277
|
+
"creatives.components.TestPage.header": "Looks like youas are lost!",
|
|
6196
6278
|
"creatives.components.Toastr.header": "This is the Toastr component !",
|
|
6197
6279
|
"creatives.components.ToastrMessage.close": "close",
|
|
6198
6280
|
"creatives.components.ToastrMessage.header": "This is the ToastrMessage component !",
|
|
@@ -6877,6 +6959,9 @@ exports[`Creatives SmsTraiCreate test/> renders UI 1`] = `
|
|
|
6877
6959
|
"creatives.containers.Templates.wechatHeader": "WECHAT",
|
|
6878
6960
|
"creatives.containers.Templates.yesText": "Yes",
|
|
6879
6961
|
"creatives.containers.Templates.zipUploadFailed": "Failed to upload zip file",
|
|
6962
|
+
"creatives.containers.Testv2.descriptionTestv2": "Description of Testv2",
|
|
6963
|
+
"creatives.containers.Testv2.header": "This is Testv2 container !",
|
|
6964
|
+
"creatives.containers.Testv2.testv2": "Testv2",
|
|
6880
6965
|
"creatives.containers.View.descriptionView": "Description of View",
|
|
6881
6966
|
"creatives.containers.View.header": "This is View container !",
|
|
6882
6967
|
"creatives.containers.View.view": "View",
|
|
@@ -7883,6 +7968,10 @@ new message content.",
|
|
|
7883
7968
|
"creatives.containersV2.TemplatesV2.viber": "Viber",
|
|
7884
7969
|
"creatives.containersV2.TemplatesV2.wechat": "Wechat",
|
|
7885
7970
|
"creatives.containersV2.TemplatesV2.whatsapp": "WhatsApp",
|
|
7971
|
+
"creatives.containersV2.TestPage.header": "Looks like youas are lost!",
|
|
7972
|
+
"creatives.containersV2.Testv2.descriptionTestv2": "Description of Testv2",
|
|
7973
|
+
"creatives.containersV2.Testv2.header": "This is Testv2 container !",
|
|
7974
|
+
"creatives.containersV2.Testv2.testv2": "Testv2",
|
|
7886
7975
|
"creatives.containersV2.View.descriptionView": "Description of View",
|
|
7887
7976
|
"creatives.containersV2.View.header": "This is View container !",
|
|
7888
7977
|
"creatives.containersV2.View.view": "View",
|
|
@@ -8322,7 +8411,7 @@ new message content.",
|
|
|
8322
8411
|
type="h4"
|
|
8323
8412
|
>
|
|
8324
8413
|
<div
|
|
8325
|
-
className="CapHeading-vrvcag-0
|
|
8414
|
+
className="upload-file-title CapHeading-vrvcag-0 hlVFZb"
|
|
8326
8415
|
type="h4"
|
|
8327
8416
|
>
|
|
8328
8417
|
Upload file
|
|
@@ -8400,7 +8489,7 @@ new message content.",
|
|
|
8400
8489
|
type="h2"
|
|
8401
8490
|
>
|
|
8402
8491
|
<div
|
|
8403
|
-
className="
|
|
8492
|
+
className="drop-zone-text-1 CapHeading-vrvcag-0 eHvyRg"
|
|
8404
8493
|
type="h2"
|
|
8405
8494
|
>
|
|
8406
8495
|
Drag and drop a CSV file here
|
|
@@ -8411,7 +8500,7 @@ new message content.",
|
|
|
8411
8500
|
type="h3"
|
|
8412
8501
|
>
|
|
8413
8502
|
<div
|
|
8414
|
-
className="
|
|
8503
|
+
className="drop-zone-text-2 CapHeading-vrvcag-0 kolsfA"
|
|
8415
8504
|
type="h3"
|
|
8416
8505
|
>
|
|
8417
8506
|
OR
|
|
@@ -8473,7 +8562,7 @@ new message content.",
|
|
|
8473
8562
|
type="h4"
|
|
8474
8563
|
>
|
|
8475
8564
|
<div
|
|
8476
|
-
className="CapHeading-vrvcag-0
|
|
8565
|
+
className="CapHeading-vrvcag-0 hlVFZb"
|
|
8477
8566
|
type="h4"
|
|
8478
8567
|
>
|
|
8479
8568
|
Upload Instructions
|
|
@@ -8988,7 +9077,7 @@ new message content.",
|
|
|
8988
9077
|
key=".2"
|
|
8989
9078
|
>
|
|
8990
9079
|
<div
|
|
8991
|
-
className="Create__SMSTraiFooter-sc-7ip2ax-0
|
|
9080
|
+
className="Create__SMSTraiFooter-sc-7ip2ax-0 cEyOCB"
|
|
8992
9081
|
>
|
|
8993
9082
|
<CapButton
|
|
8994
9083
|
className="done-button"
|
|
@@ -9040,7 +9129,24 @@ exports[`Creatives SmsTraiCreate test/> valid file drop 1`] = `
|
|
|
9040
9129
|
<SmsTraiCreate
|
|
9041
9130
|
actions={
|
|
9042
9131
|
Object {
|
|
9043
|
-
"checkDuplicatesInDb": [MockFunction]
|
|
9132
|
+
"checkDuplicatesInDb": [MockFunction] {
|
|
9133
|
+
"calls": Array [
|
|
9134
|
+
Array [
|
|
9135
|
+
Array [
|
|
9136
|
+
Object {
|
|
9137
|
+
"template_id": "12345678912345678901",
|
|
9138
|
+
"template_name": "CAP71871_12",
|
|
9139
|
+
},
|
|
9140
|
+
],
|
|
9141
|
+
],
|
|
9142
|
+
],
|
|
9143
|
+
"results": Array [
|
|
9144
|
+
Object {
|
|
9145
|
+
"type": "return",
|
|
9146
|
+
"value": undefined,
|
|
9147
|
+
},
|
|
9148
|
+
],
|
|
9149
|
+
},
|
|
9044
9150
|
"clearCreateResponse": [MockFunction],
|
|
9045
9151
|
"createSMSTRAITemplates": [MockFunction],
|
|
9046
9152
|
"doneCheckingDuplicates": [MockFunction],
|
|
@@ -9205,6 +9311,7 @@ exports[`Creatives SmsTraiCreate test/> valid file drop 1`] = `
|
|
|
9205
9311
|
"creatives.components.TemplatePreview.smsFormatType": "Message has unicode characters",
|
|
9206
9312
|
"creatives.components.TemplatePreview.smsIcon": "Sms Icon",
|
|
9207
9313
|
"creatives.components.TemplatePreview.unicodeIconTooltip": "This message has unicode characters. This may affect the cost per message.",
|
|
9314
|
+
"creatives.components.TestPage.header": "Looks like youas are lost!",
|
|
9208
9315
|
"creatives.components.Toastr.header": "This is the Toastr component !",
|
|
9209
9316
|
"creatives.components.ToastrMessage.close": "close",
|
|
9210
9317
|
"creatives.components.ToastrMessage.header": "This is the ToastrMessage component !",
|
|
@@ -9889,6 +9996,9 @@ exports[`Creatives SmsTraiCreate test/> valid file drop 1`] = `
|
|
|
9889
9996
|
"creatives.containers.Templates.wechatHeader": "WECHAT",
|
|
9890
9997
|
"creatives.containers.Templates.yesText": "Yes",
|
|
9891
9998
|
"creatives.containers.Templates.zipUploadFailed": "Failed to upload zip file",
|
|
9999
|
+
"creatives.containers.Testv2.descriptionTestv2": "Description of Testv2",
|
|
10000
|
+
"creatives.containers.Testv2.header": "This is Testv2 container !",
|
|
10001
|
+
"creatives.containers.Testv2.testv2": "Testv2",
|
|
9892
10002
|
"creatives.containers.View.descriptionView": "Description of View",
|
|
9893
10003
|
"creatives.containers.View.header": "This is View container !",
|
|
9894
10004
|
"creatives.containers.View.view": "View",
|
|
@@ -10895,6 +11005,10 @@ new message content.",
|
|
|
10895
11005
|
"creatives.containersV2.TemplatesV2.viber": "Viber",
|
|
10896
11006
|
"creatives.containersV2.TemplatesV2.wechat": "Wechat",
|
|
10897
11007
|
"creatives.containersV2.TemplatesV2.whatsapp": "WhatsApp",
|
|
11008
|
+
"creatives.containersV2.TestPage.header": "Looks like youas are lost!",
|
|
11009
|
+
"creatives.containersV2.Testv2.descriptionTestv2": "Description of Testv2",
|
|
11010
|
+
"creatives.containersV2.Testv2.header": "This is Testv2 container !",
|
|
11011
|
+
"creatives.containersV2.Testv2.testv2": "Testv2",
|
|
10898
11012
|
"creatives.containersV2.View.descriptionView": "Description of View",
|
|
10899
11013
|
"creatives.containersV2.View.header": "This is View container !",
|
|
10900
11014
|
"creatives.containersV2.View.view": "View",
|
|
@@ -11334,25 +11448,49 @@ new message content.",
|
|
|
11334
11448
|
type="h4"
|
|
11335
11449
|
>
|
|
11336
11450
|
<div
|
|
11337
|
-
className="CapHeading-vrvcag-0
|
|
11451
|
+
className="upload-file-title CapHeading-vrvcag-0 hlVFZb"
|
|
11338
11452
|
type="h4"
|
|
11339
11453
|
>
|
|
11340
11454
|
Upload file
|
|
11341
11455
|
</div>
|
|
11342
11456
|
</CapHeading>
|
|
11343
11457
|
<CapSpin
|
|
11344
|
-
spinning={
|
|
11458
|
+
spinning={true}
|
|
11345
11459
|
>
|
|
11346
11460
|
<Spin
|
|
11347
11461
|
size="default"
|
|
11348
|
-
spinning={
|
|
11462
|
+
spinning={true}
|
|
11349
11463
|
wrapperClassName=""
|
|
11350
11464
|
>
|
|
11351
11465
|
<div
|
|
11352
11466
|
className="ant-spin-nested-loading"
|
|
11353
11467
|
>
|
|
11354
11468
|
<div
|
|
11355
|
-
|
|
11469
|
+
key="loading"
|
|
11470
|
+
>
|
|
11471
|
+
<div
|
|
11472
|
+
className="ant-spin ant-spin-spinning"
|
|
11473
|
+
>
|
|
11474
|
+
<span
|
|
11475
|
+
className="ant-spin-dot ant-spin-dot-spin"
|
|
11476
|
+
>
|
|
11477
|
+
<i
|
|
11478
|
+
className="ant-spin-dot-item"
|
|
11479
|
+
/>
|
|
11480
|
+
<i
|
|
11481
|
+
className="ant-spin-dot-item"
|
|
11482
|
+
/>
|
|
11483
|
+
<i
|
|
11484
|
+
className="ant-spin-dot-item"
|
|
11485
|
+
/>
|
|
11486
|
+
<i
|
|
11487
|
+
className="ant-spin-dot-item"
|
|
11488
|
+
/>
|
|
11489
|
+
</span>
|
|
11490
|
+
</div>
|
|
11491
|
+
</div>
|
|
11492
|
+
<div
|
|
11493
|
+
className="ant-spin-container ant-spin-blur"
|
|
11356
11494
|
key="container"
|
|
11357
11495
|
>
|
|
11358
11496
|
<Dropzone
|
|
@@ -11412,7 +11550,7 @@ new message content.",
|
|
|
11412
11550
|
type="h2"
|
|
11413
11551
|
>
|
|
11414
11552
|
<div
|
|
11415
|
-
className="
|
|
11553
|
+
className="drop-zone-text-1 CapHeading-vrvcag-0 eHvyRg"
|
|
11416
11554
|
type="h2"
|
|
11417
11555
|
>
|
|
11418
11556
|
Drag and drop a CSV file here
|
|
@@ -11423,7 +11561,7 @@ new message content.",
|
|
|
11423
11561
|
type="h3"
|
|
11424
11562
|
>
|
|
11425
11563
|
<div
|
|
11426
|
-
className="
|
|
11564
|
+
className="drop-zone-text-2 CapHeading-vrvcag-0 kolsfA"
|
|
11427
11565
|
type="h3"
|
|
11428
11566
|
>
|
|
11429
11567
|
OR
|
|
@@ -11485,7 +11623,7 @@ new message content.",
|
|
|
11485
11623
|
type="h4"
|
|
11486
11624
|
>
|
|
11487
11625
|
<div
|
|
11488
|
-
className="CapHeading-vrvcag-0
|
|
11626
|
+
className="CapHeading-vrvcag-0 hlVFZb"
|
|
11489
11627
|
type="h4"
|
|
11490
11628
|
>
|
|
11491
11629
|
Upload Instructions
|
|
@@ -12000,7 +12138,7 @@ new message content.",
|
|
|
12000
12138
|
key=".2"
|
|
12001
12139
|
>
|
|
12002
12140
|
<div
|
|
12003
|
-
className="Create__SMSTraiFooter-sc-7ip2ax-0
|
|
12141
|
+
className="Create__SMSTraiFooter-sc-7ip2ax-0 cEyOCB"
|
|
12004
12142
|
>
|
|
12005
12143
|
<CapButton
|
|
12006
12144
|
className="done-button"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { mountWithIntl } from
|
|
2
|
+
import { mountWithIntl } from '../../../../../app/helpers/intl-enzym-test-helpers';
|
|
3
3
|
import { SmsTraiCreate } from '../index';
|
|
4
|
-
import { SAMPLE_CSV } from '../constants';
|
|
4
|
+
import { SAMPLE_CSV, DOWNLOAD_ISSUES_CSV } from '../constants';
|
|
5
5
|
import { mockData } from './mockData';
|
|
6
6
|
|
|
7
7
|
let file = [];
|
|
@@ -26,20 +26,15 @@ describe('Creatives SmsTraiCreate test/>', () => {
|
|
|
26
26
|
const onCreateComplete = jest.fn();
|
|
27
27
|
const onShowTemplates = jest.fn();
|
|
28
28
|
const setAttribute = jest.fn();
|
|
29
|
-
const
|
|
30
|
-
const setup = (props) => (
|
|
31
|
-
<SmsTraiCreate
|
|
32
|
-
actions={{
|
|
33
|
-
clearCreateResponse, createSMSTRAITemplates, checkDuplicatesInDb, doneCheckingDuplicates,
|
|
34
|
-
}}
|
|
35
|
-
onCreateComplete={onCreateComplete}
|
|
36
|
-
onShowTemplates={onShowTemplates}
|
|
37
|
-
traiSms={traiSms}
|
|
38
|
-
{...props} />
|
|
39
|
-
);
|
|
29
|
+
const traiSms = mockData.traiSms;
|
|
40
30
|
beforeEach(() => {
|
|
41
31
|
renderedComponent = mountWithIntl(
|
|
42
|
-
|
|
32
|
+
<SmsTraiCreate
|
|
33
|
+
actions={{ clearCreateResponse, createSMSTRAITemplates, checkDuplicatesInDb, doneCheckingDuplicates }}
|
|
34
|
+
onCreateComplete={onCreateComplete}
|
|
35
|
+
onShowTemplates={onShowTemplates}
|
|
36
|
+
traiSms={traiSms}
|
|
37
|
+
/>,
|
|
43
38
|
);
|
|
44
39
|
});
|
|
45
40
|
|
|
@@ -73,7 +68,7 @@ describe('Creatives SmsTraiCreate test/>', () => {
|
|
|
73
68
|
const event = { target: { setAttribute } };
|
|
74
69
|
createSMSTRAITemplates.mockImplementation((obj, callback) => {
|
|
75
70
|
callback();
|
|
76
|
-
})
|
|
71
|
+
})
|
|
77
72
|
renderHelper(mockData.validFile);
|
|
78
73
|
const dropZone = renderedComponent.find('Dropzone').props();
|
|
79
74
|
await dropZone.onDrop([file]);
|