@capillarytech/creatives-library 8.0.201 → 8.0.202

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.
@@ -1,486 +1,5 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`Test SlideBoxContent container Additional Channel Coverage Should handle Zalo channel 1`] = `
4
- <SlideBoxContent__CreativesWrapper>
5
- <ForwardRef
6
- getDefaultTags=""
7
- hostName=""
8
- location={
9
- Object {
10
- "pathname": "/zalo/edit",
11
- "query": Object {
12
- "isEditFromCampaigns": undefined,
13
- "module": "library",
14
- "type": "embedded",
15
- },
16
- "search": "",
17
- }
18
- }
19
- templateData={
20
- Object {
21
- "type": "ZALO",
22
- "versions": Object {
23
- "base": Object {
24
- "content": Object {
25
- "message": "Zalo message",
26
- },
27
- },
28
- },
29
- }
30
- }
31
- />
32
- </SlideBoxContent__CreativesWrapper>
33
- `;
34
-
35
- exports[`Test SlideBoxContent container Additional Channel Coverage Should handle complex LINE template with multiple message types 1`] = `
36
- <SlideBoxContent__CreativesWrapper>
37
- <InjectIntl(TemplatePreview)
38
- channel="line"
39
- charCounterEnabled={false}
40
- content={
41
- Array [
42
- Object {
43
- "actionUrl": undefined,
44
- "baseUrl": undefined,
45
- "imageCarousel": Array [
46
- Object {
47
- "actionLabel": undefined,
48
- "imageUrl": undefined,
49
- },
50
- ],
51
- "messageContent": "Hello",
52
- "previewImageUrl": "https://example.com/image.jpg",
53
- "selectedSticker": Object {
54
- "animatedStickerUrl": undefined,
55
- "packageId": undefined,
56
- "stickerId": undefined,
57
- "stickerUrl": undefined,
58
- },
59
- "type": "text",
60
- "video": undefined,
61
- },
62
- Object {
63
- "actionUrl": undefined,
64
- "baseUrl": undefined,
65
- "imageCarousel": Array [
66
- Object {
67
- "actionLabel": undefined,
68
- "imageUrl": undefined,
69
- },
70
- ],
71
- "messageContent": undefined,
72
- "previewImageUrl": undefined,
73
- "selectedSticker": Object {
74
- "packageId": "456",
75
- "stickerId": "123",
76
- "stickerUrl": "https://example.com/sticker.png",
77
- },
78
- "type": "sticker",
79
- "video": undefined,
80
- },
81
- Object {
82
- "actionUrl": undefined,
83
- "baseUrl": "https://example.com/map",
84
- "imageCarousel": Array [
85
- Object {
86
- "actionLabel": undefined,
87
- "imageUrl": undefined,
88
- },
89
- ],
90
- "messageContent": undefined,
91
- "previewImageUrl": undefined,
92
- "selectedSticker": Object {
93
- "animatedStickerUrl": undefined,
94
- "packageId": undefined,
95
- "stickerId": undefined,
96
- "stickerUrl": undefined,
97
- },
98
- "type": "imagemap",
99
- "video": undefined,
100
- },
101
- ]
102
- }
103
- showCount={true}
104
- templateData={
105
- Object {
106
- "type": "LINE",
107
- "versions": Object {
108
- "base": Object {
109
- "content": Object {
110
- "messages": Array [
111
- Object {
112
- "previewImageUrl": "https://example.com/image.jpg",
113
- "text": "Hello",
114
- },
115
- Object {
116
- "selectedSticker": Object {
117
- "packageId": "456",
118
- "stickerId": "123",
119
- "stickerUrl": "https://example.com/sticker.png",
120
- },
121
- },
122
- Object {
123
- "baseUrl": "https://example.com/map",
124
- },
125
- ],
126
- },
127
- },
128
- },
129
- }
130
- }
131
- viberBrandName=""
132
- />
133
- <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
134
- location={
135
- Object {
136
- "pathname": "/sms/edit",
137
- "query": Object {
138
- "isEditFromCampaigns": undefined,
139
- "module": "library",
140
- "type": "embedded",
141
- },
142
- "search": "",
143
- }
144
- }
145
- onCreateComplete={[MockFunction]}
146
- params={
147
- Object {
148
- "id": undefined,
149
- "mode": undefined,
150
- }
151
- }
152
- route={
153
- Object {
154
- "name": "edit_text",
155
- }
156
- }
157
- templateData={
158
- Object {
159
- "type": "LINE",
160
- "versions": Object {
161
- "base": Object {
162
- "content": Object {
163
- "messages": Array [
164
- Object {
165
- "previewImageUrl": "https://example.com/image.jpg",
166
- "text": "Hello",
167
- },
168
- Object {
169
- "selectedSticker": Object {
170
- "packageId": "456",
171
- "stickerId": "123",
172
- "stickerUrl": "https://example.com/sticker.png",
173
- },
174
- },
175
- Object {
176
- "baseUrl": "https://example.com/map",
177
- },
178
- ],
179
- },
180
- },
181
- },
182
- }
183
- }
184
- />
185
- </SlideBoxContent__CreativesWrapper>
186
- `;
187
-
188
- exports[`Test SlideBoxContent container Additional Channel Coverage Should handle createTemplate mode with different options 1`] = `
189
- <SlideBoxContent__CreativesWrapper>
190
- <SmsWrapper
191
- getDefaultTags=""
192
- isComponent={true}
193
- isCreateSms={true}
194
- isFullMode={true}
195
- location={
196
- Object {
197
- "pathname": "/sms/edit",
198
- "query": Object {
199
- "isEditFromCampaigns": undefined,
200
- "module": "default",
201
- "type": false,
202
- },
203
- "search": "",
204
- }
205
- }
206
- onCreateComplete={[MockFunction]}
207
- route={
208
- Object {
209
- "name": "sms",
210
- }
211
- }
212
- smsRegister="DLT"
213
- />
214
- </SlideBoxContent__CreativesWrapper>
215
- `;
216
-
217
- exports[`Test SlideBoxContent container Additional Channel Coverage Should handle templates mode for various channels 1`] = `
218
- <SlideBoxContent__CreativesWrapper>
219
- <Connect(UserIsAuthenticated(Connect(InjectIntl(withStyles__StyledComponent))))
220
- FTPMode="create"
221
- channel=""
222
- loyaltyMetaData={Object {}}
223
- messageDetails={Object {}}
224
- onCreateComplete={[MockFunction]}
225
- slidBoxContent="templates"
226
- />
227
- </SlideBoxContent__CreativesWrapper>
228
- `;
229
-
230
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle Call Task channel 1`] = `
231
- <SlideBoxContent__CreativesWrapper>
232
- <ForwardRef
233
- messageDetails={Object {}}
234
- mode="edit"
235
- templateData={
236
- Object {
237
- "type": "CALL_TASK",
238
- "versions": Object {
239
- "base": Object {
240
- "content": Object {
241
- "message": "Call task message",
242
- },
243
- },
244
- },
245
- }
246
- }
247
- />
248
- </SlideBoxContent__CreativesWrapper>
249
- `;
250
-
251
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle Email channel with different modes 1`] = `
252
- <SlideBoxContent__CreativesWrapper>
253
- <ForwardRef
254
- getDefaultTags=""
255
- isFullMode={true}
256
- key="cretives-container-email-edit"
257
- location={
258
- Object {
259
- "pathname": "/email/edit",
260
- "query": Object {
261
- "module": "library",
262
- "type": "embedded",
263
- },
264
- }
265
- }
266
- params={
267
- Object {
268
- "id": "email-123",
269
- }
270
- }
271
- route={
272
- Object {
273
- "name": "email",
274
- }
275
- }
276
- templateData={
277
- Object {
278
- "_id": "email-123",
279
- "type": "EMAIL",
280
- "versions": Object {
281
- "base": Object {
282
- "content": Object {
283
- "html_content": "<p>Test content</p>",
284
- "subject": "Test Email",
285
- },
286
- },
287
- },
288
- }
289
- }
290
- />
291
- </SlideBoxContent__CreativesWrapper>
292
- `;
293
-
294
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle FTP channel 1`] = `
295
- <SlideBoxContent__CreativesWrapper>
296
- <ForwardRef
297
- messageDetails={Object {}}
298
- mode="edit"
299
- />
300
- </SlideBoxContent__CreativesWrapper>
301
- `;
302
-
303
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle InApp channel preview 1`] = `
304
- <SlideBoxContent__CreativesWrapper>
305
- <MobilePushPreviewV2
306
- channel="INAPP"
307
- templateData={
308
- Object {
309
- "type": "INAPP",
310
- "versions": Object {
311
- "base": Object {
312
- "content": Object {
313
- "message": "Test InApp message",
314
- },
315
- },
316
- },
317
- }
318
- }
319
- />
320
- </SlideBoxContent__CreativesWrapper>
321
- `;
322
-
323
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle LINE channel with video content 1`] = `
324
- <SlideBoxContent__CreativesWrapper>
325
- <InjectIntl(TemplatePreview)
326
- channel="line"
327
- charCounterEnabled={false}
328
- content={
329
- Array [
330
- Object {
331
- "actionUrl": "https://example.com/link",
332
- "baseUrl": undefined,
333
- "imageCarousel": Array [
334
- Object {
335
- "actionLabel": undefined,
336
- "imageUrl": undefined,
337
- },
338
- ],
339
- "messageContent": undefined,
340
- "previewImageUrl": undefined,
341
- "selectedSticker": Object {
342
- "animatedStickerUrl": undefined,
343
- "packageId": undefined,
344
- "stickerId": undefined,
345
- "stickerUrl": undefined,
346
- },
347
- "type": "image_carousel",
348
- "video": "https://example.com/video.mp4",
349
- },
350
- ]
351
- }
352
- showCount={true}
353
- templateData={
354
- Object {
355
- "type": "LINE",
356
- "versions": Object {
357
- "base": Object {
358
- "content": Object {
359
- "messages": Array [
360
- Object {
361
- "video": Object {
362
- "externalLink": Object {
363
- "linkUri": "https://example.com/link",
364
- },
365
- "originalContentUrl": "https://example.com/video.mp4",
366
- },
367
- },
368
- ],
369
- },
370
- },
371
- },
372
- }
373
- }
374
- viberBrandName=""
375
- />
376
- <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
377
- location={
378
- Object {
379
- "pathname": "/sms/edit",
380
- "query": Object {
381
- "isEditFromCampaigns": undefined,
382
- "module": "library",
383
- "type": "embedded",
384
- },
385
- "search": "",
386
- }
387
- }
388
- onCreateComplete={[MockFunction]}
389
- params={
390
- Object {
391
- "id": undefined,
392
- "mode": undefined,
393
- }
394
- }
395
- route={
396
- Object {
397
- "name": "edit_text",
398
- }
399
- }
400
- templateData={
401
- Object {
402
- "type": "LINE",
403
- "versions": Object {
404
- "base": Object {
405
- "content": Object {
406
- "messages": Array [
407
- Object {
408
- "video": Object {
409
- "externalLink": Object {
410
- "linkUri": "https://example.com/link",
411
- },
412
- "originalContentUrl": "https://example.com/video.mp4",
413
- },
414
- },
415
- ],
416
- },
417
- },
418
- },
419
- }
420
- }
421
- />
422
- </SlideBoxContent__CreativesWrapper>
423
- `;
424
-
425
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle SMS channel with DLT content processing 1`] = `
426
- <SlideBoxContent__CreativesWrapper>
427
- <InjectIntl(TemplatePreview)
428
- channel="sms"
429
- charCounterEnabled={true}
430
- content="Fallback SMS content"
431
- showCount={true}
432
- templateData={
433
- Object {
434
- "type": "SMS",
435
- "versions": Object {
436
- "base": Object {
437
- "sms-editor": "Fallback SMS content",
438
- "updated-sms-editor": Array [
439
- "Line 1",
440
- "Line 2",
441
- "Line 3",
442
- ],
443
- },
444
- },
445
- }
446
- }
447
- viberBrandName=""
448
- />
449
- </SlideBoxContent__CreativesWrapper>
450
- `;
451
-
452
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle WeChat channel in different modes 1`] = `
453
- <SlideBoxContent__CreativesWrapper>
454
- <Connect(InjectIntl(Wrapper))
455
- mode="editTemplate"
456
- query={
457
- Object {
458
- "isEditFromCampaigns": undefined,
459
- "module": "library",
460
- "type": "embedded",
461
- }
462
- }
463
- templateData={
464
- Object {
465
- "type": "WECHAT",
466
- "versions": Object {
467
- "base": Object {
468
- "content": Object {
469
- "msgcontent": "RICH_MEDIA_WECHAT",
470
- },
471
- },
472
- },
473
- }
474
- }
475
- templateType="mapTemplate"
476
- />
477
- </SlideBoxContent__CreativesWrapper>
478
- `;
479
-
480
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle default case in getChannelPreviewContent 1`] = `<SlideBoxContent__CreativesWrapper />`;
481
-
482
- exports[`Test SlideBoxContent container Edge Cases for Uncovered Lines Should handle getLineType with LINE channel and empty templateData 1`] = `<SlideBoxContent__CreativesWrapper />`;
483
-
484
3
  exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode with ID 1`] = `
485
4
  <SlideBoxContent__CreativesWrapper>
486
5
  <ForwardRef
@@ -683,252 +202,6 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
683
202
  </SlideBoxContent__CreativesWrapper>
684
203
  `;
685
204
 
686
- exports[`Test SlideBoxContent container Mobile Push with Loyalty Module Should render MobilePushNew for loyalty module in full mode (create) 1`] = `
687
- <SlideBoxContent__CreativesWrapper>
688
- <ForwardRef
689
- date={0}
690
- getDefaultTags=""
691
- isFullMode={true}
692
- key="creatives-mobilepush-wrapper"
693
- onCreateComplete={[MockFunction]}
694
- query={
695
- Object {
696
- "isEditFromCampaigns": undefined,
697
- "module": "default",
698
- "type": false,
699
- }
700
- }
701
- templateData={
702
- Object {
703
- "mode": "create",
704
- "type": "MOBILEPUSH",
705
- }
706
- }
707
- type=""
708
- />
709
- </SlideBoxContent__CreativesWrapper>
710
- `;
711
-
712
- exports[`Test SlideBoxContent container Mobile Push with Loyalty Module Should render MobilePushNew for loyalty module in full mode (edit) 1`] = `
713
- <SlideBoxContent__CreativesWrapper>
714
- <ForwardRef
715
- getDefaultTags=""
716
- isFullMode={true}
717
- location={
718
- Object {
719
- "pathname": "/mobilepush/edit/",
720
- "query": Object {
721
- "isEditFromCampaigns": undefined,
722
- "module": "default",
723
- "type": false,
724
- },
725
- }
726
- }
727
- params={
728
- Object {
729
- "id": "test-id",
730
- }
731
- }
732
- route={
733
- Object {
734
- "name": "mobilepush",
735
- }
736
- }
737
- templateData={
738
- Object {
739
- "_id": "test-id",
740
- "type": "MOBILEPUSH",
741
- }
742
- }
743
- type=""
744
- />
745
- </SlideBoxContent__CreativesWrapper>
746
- `;
747
-
748
- exports[`Test SlideBoxContent container Mobile Push with Loyalty Module Should render MobilePushNew for non-loyalty module in full mode (create) 1`] = `
749
- <SlideBoxContent__CreativesWrapper>
750
- <ForwardRef
751
- date={0}
752
- getDefaultTags=""
753
- isFullMode={true}
754
- key="creatives-mobilepush-wrapper"
755
- onCreateComplete={[MockFunction]}
756
- query={
757
- Object {
758
- "isEditFromCampaigns": undefined,
759
- "module": "default",
760
- "type": false,
761
- }
762
- }
763
- templateData={
764
- Object {
765
- "mode": "create",
766
- "type": "MOBILEPUSH",
767
- }
768
- }
769
- type=""
770
- />
771
- </SlideBoxContent__CreativesWrapper>
772
- `;
773
-
774
- exports[`Test SlideBoxContent container Mobile Push with Loyalty Module Should render MobilePushNew for non-loyalty module in full mode (edit) 1`] = `
775
- <SlideBoxContent__CreativesWrapper>
776
- <ForwardRef
777
- getDefaultTags=""
778
- isFullMode={true}
779
- location={
780
- Object {
781
- "pathname": "/mobilepush/edit/",
782
- "query": Object {
783
- "isEditFromCampaigns": undefined,
784
- "module": "default",
785
- "type": false,
786
- },
787
- }
788
- }
789
- params={
790
- Object {
791
- "id": "test-id",
792
- }
793
- }
794
- route={
795
- Object {
796
- "name": "mobilepush",
797
- }
798
- }
799
- templateData={
800
- Object {
801
- "_id": "test-id",
802
- "type": "MOBILEPUSH",
803
- }
804
- }
805
- type=""
806
- />
807
- </SlideBoxContent__CreativesWrapper>
808
- `;
809
-
810
- exports[`Test SlideBoxContent container Mobile Push with Loyalty Module Should render MobilePushNew for non-loyalty module in library mode (create) 1`] = `
811
- <SlideBoxContent__CreativesWrapper>
812
- <ForwardRef
813
- date={0}
814
- getDefaultTags=""
815
- isFullMode={false}
816
- key="creatives-mobilepush-wrapper"
817
- onCreateComplete={[MockFunction]}
818
- query={
819
- Object {
820
- "isEditFromCampaigns": undefined,
821
- "module": "library",
822
- "type": "embedded",
823
- }
824
- }
825
- templateData={
826
- Object {
827
- "mode": "create",
828
- "type": "MOBILEPUSH",
829
- }
830
- }
831
- type=""
832
- />
833
- </SlideBoxContent__CreativesWrapper>
834
- `;
835
-
836
- exports[`Test SlideBoxContent container Mobile Push with Loyalty Module Should render MobilePushNew for non-loyalty module in library mode (edit) 1`] = `
837
- <SlideBoxContent__CreativesWrapper>
838
- <ForwardRef
839
- getDefaultTags=""
840
- isFullMode={false}
841
- location={
842
- Object {
843
- "pathname": "/mobilepush/edit/",
844
- "query": Object {
845
- "isEditFromCampaigns": undefined,
846
- "module": "library",
847
- "type": "embedded",
848
- },
849
- }
850
- }
851
- params={
852
- Object {
853
- "id": "test-id",
854
- }
855
- }
856
- route={
857
- Object {
858
- "name": "mobilepush",
859
- }
860
- }
861
- templateData={
862
- Object {
863
- "_id": "test-id",
864
- "type": "MOBILEPUSH",
865
- }
866
- }
867
- type=""
868
- />
869
- </SlideBoxContent__CreativesWrapper>
870
- `;
871
-
872
- exports[`Test SlideBoxContent container Mobile Push with Loyalty Module Should render MobilepushWrapper for loyalty module in library mode (create) 1`] = `
873
- <SlideBoxContent__CreativesWrapper>
874
- <Connect(MobilepushWrapper)
875
- date={0}
876
- isFullMode={false}
877
- key="creatives-mobilepush-wrapper"
878
- query={
879
- Object {
880
- "isEditFromCampaigns": undefined,
881
- "module": "library",
882
- "type": "embedded",
883
- }
884
- }
885
- templateData={
886
- Object {
887
- "mode": "create",
888
- "type": "MOBILEPUSH",
889
- }
890
- }
891
- type=""
892
- />
893
- </SlideBoxContent__CreativesWrapper>
894
- `;
895
-
896
- exports[`Test SlideBoxContent container Mobile Push with Loyalty Module Should render MobliPushEdit for loyalty module in library mode (edit) 1`] = `
897
- <SlideBoxContent__CreativesWrapper>
898
- <ForwardRef
899
- getDefaultTags=""
900
- isFullMode={false}
901
- location={
902
- Object {
903
- "pathname": "/mobilepush/edit/",
904
- "query": Object {
905
- "isEditFromCampaigns": undefined,
906
- "module": "library",
907
- "type": "embedded",
908
- },
909
- }
910
- }
911
- params={
912
- Object {
913
- "id": "test-id",
914
- }
915
- }
916
- route={
917
- Object {
918
- "name": "mobilepush",
919
- }
920
- }
921
- templateData={
922
- Object {
923
- "_id": "test-id",
924
- "type": "MOBILEPUSH",
925
- }
926
- }
927
- type=""
928
- />
929
- </SlideBoxContent__CreativesWrapper>
930
- `;
931
-
932
205
  exports[`Test SlideBoxContent container Should handle isTestAndPreviewMode IIFE implementation correctly 1`] = `
933
206
  <SlideBoxContent__CreativesWrapper>
934
207
  <ForwardRef