@capillarytech/creatives-library 8.0.159-alpha.1 → 8.0.160

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,5 +1,223 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode with ID 1`] = `
4
+ <SlideBoxContent__CreativesWrapper>
5
+ <ForwardRef
6
+ cap={Object {}}
7
+ editor="default"
8
+ eventContextTags={Object {}}
9
+ getDefaultTags=""
10
+ handleCloseTestAndPreview={[MockFunction]}
11
+ handleTestAndPreview={[MockFunction]}
12
+ isLoyaltyModule={false}
13
+ isTestAndPreviewMode={true}
14
+ key="cretives-container-email-edit"
15
+ location={
16
+ Object {
17
+ "pathname": "/email/edit",
18
+ "query": Object {
19
+ "module": "library",
20
+ "type": "embedded",
21
+ },
22
+ }
23
+ }
24
+ moduleType="email"
25
+ onValidationFail={[MockFunction]}
26
+ params={
27
+ Object {
28
+ "id": "123",
29
+ }
30
+ }
31
+ route={
32
+ Object {
33
+ "name": "email",
34
+ }
35
+ }
36
+ showLiquidErrorInFooter={false}
37
+ showTemplateName={[MockFunction]}
38
+ showTestAndPreviewSlidebox={true}
39
+ templateData={
40
+ Object {
41
+ "_id": "123",
42
+ "type": "EMAIL",
43
+ "versions": Object {
44
+ "base": Object {
45
+ "content": Object {},
46
+ },
47
+ },
48
+ }
49
+ }
50
+ />
51
+ </SlideBoxContent__CreativesWrapper>
52
+ `;
53
+
54
+ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode with ID 2`] = `
55
+ <SlideBoxContent__CreativesWrapper>
56
+ <ForwardRef
57
+ cap={Object {}}
58
+ editor="default"
59
+ eventContextTags={Object {}}
60
+ getDefaultTags=""
61
+ handleCloseTestAndPreview={[MockFunction]}
62
+ handleTestAndPreview={[MockFunction]}
63
+ isLoyaltyModule={false}
64
+ isTestAndPreviewMode={false}
65
+ key="cretives-container-email-edit"
66
+ location={
67
+ Object {
68
+ "pathname": "/email/edit",
69
+ "query": Object {
70
+ "module": "library",
71
+ "type": "embedded",
72
+ },
73
+ }
74
+ }
75
+ moduleType="email"
76
+ onValidationFail={[MockFunction]}
77
+ params={
78
+ Object {
79
+ "id": "123",
80
+ }
81
+ }
82
+ route={
83
+ Object {
84
+ "name": "email",
85
+ }
86
+ }
87
+ showLiquidErrorInFooter={false}
88
+ showTemplateName={[MockFunction]}
89
+ showTestAndPreviewSlidebox={false}
90
+ templateData={
91
+ Object {
92
+ "_id": "123",
93
+ "type": "EMAIL",
94
+ "versions": Object {
95
+ "base": Object {
96
+ "content": Object {},
97
+ },
98
+ },
99
+ }
100
+ }
101
+ />
102
+ </SlideBoxContent__CreativesWrapper>
103
+ `;
104
+
105
+ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode without ID 1`] = `
106
+ <SlideBoxContent__CreativesWrapper>
107
+ <ForwardRef
108
+ cap={Object {}}
109
+ editor="default"
110
+ eventContextTags={Object {}}
111
+ getDefaultTags=""
112
+ handleCloseTestAndPreview={[MockFunction]}
113
+ handleTestAndPreview={[MockFunction]}
114
+ isLoyaltyModule={false}
115
+ isTestAndPreviewMode={true}
116
+ key="cretives-container-email-edit"
117
+ location={
118
+ Object {
119
+ "pathname": "/email/edit",
120
+ "query": Object {
121
+ "module": "library",
122
+ "type": "embedded",
123
+ },
124
+ }
125
+ }
126
+ moduleType="email"
127
+ onValidationFail={[MockFunction]}
128
+ params={
129
+ Object {
130
+ "id": undefined,
131
+ }
132
+ }
133
+ route={
134
+ Object {
135
+ "name": "email",
136
+ }
137
+ }
138
+ showLiquidErrorInFooter={false}
139
+ showTemplateName={[MockFunction]}
140
+ showTestAndPreviewSlidebox={true}
141
+ templateData={
142
+ Object {
143
+ "type": "EMAIL",
144
+ "versions": Object {
145
+ "base": Object {
146
+ "content": Object {},
147
+ },
148
+ },
149
+ }
150
+ }
151
+ />
152
+ </SlideBoxContent__CreativesWrapper>
153
+ `;
154
+
155
+ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIFE Should handle isTestAndPreviewMode IIFE in Email edit mode without ID 2`] = `
156
+ <SlideBoxContent__CreativesWrapper>
157
+ <ForwardRef
158
+ cap={Object {}}
159
+ editor="default"
160
+ eventContextTags={Object {}}
161
+ getDefaultTags=""
162
+ handleCloseTestAndPreview={[MockFunction]}
163
+ handleTestAndPreview={[MockFunction]}
164
+ isLoyaltyModule={false}
165
+ isTestAndPreviewMode={false}
166
+ key="cretives-container-email-edit"
167
+ location={
168
+ Object {
169
+ "pathname": "/email/edit",
170
+ "query": Object {
171
+ "module": "library",
172
+ "type": "embedded",
173
+ },
174
+ }
175
+ }
176
+ moduleType="email"
177
+ onValidationFail={[MockFunction]}
178
+ params={
179
+ Object {
180
+ "id": undefined,
181
+ }
182
+ }
183
+ route={
184
+ Object {
185
+ "name": "email",
186
+ }
187
+ }
188
+ showLiquidErrorInFooter={false}
189
+ showTemplateName={[MockFunction]}
190
+ showTestAndPreviewSlidebox={false}
191
+ templateData={
192
+ Object {
193
+ "type": "EMAIL",
194
+ "versions": Object {
195
+ "base": Object {
196
+ "content": Object {},
197
+ },
198
+ },
199
+ }
200
+ }
201
+ />
202
+ </SlideBoxContent__CreativesWrapper>
203
+ `;
204
+
205
+ exports[`Test SlideBoxContent container Should handle isTestAndPreviewMode IIFE implementation correctly 1`] = `
206
+ <SlideBoxContent__CreativesWrapper>
207
+ <ForwardRef
208
+ onCreateComplete={[MockFunction]}
209
+ />
210
+ </SlideBoxContent__CreativesWrapper>
211
+ `;
212
+
213
+ exports[`Test SlideBoxContent container Should handle isTestAndPreviewMode IIFE implementation correctly 2`] = `
214
+ <SlideBoxContent__CreativesWrapper>
215
+ <ForwardRef
216
+ onCreateComplete={[MockFunction]}
217
+ />
218
+ </SlideBoxContent__CreativesWrapper>
219
+ `;
220
+
3
221
  exports[`Test SlideBoxContent container Should render correct component for line channel preview mode 1`] = `
4
222
  <SlideBoxContent__CreativesWrapper>
5
223
  <InjectIntl(TemplatePreview)
@@ -1053,3 +1271,1726 @@ exports[`Test SlideBoxContent container Should render correct component for what
1053
1271
  />
1054
1272
  </SlideBoxContent__CreativesWrapper>
1055
1273
  `;
1274
+
1275
+ exports[`Test SlideBoxContent container Should render correctly with isTestAndPreviewMode disabled 1`] = `
1276
+ <SlideBoxContent__CreativesWrapper>
1277
+ <ForwardRef
1278
+ onCreateComplete={[MockFunction]}
1279
+ />
1280
+ </SlideBoxContent__CreativesWrapper>
1281
+ `;
1282
+
1283
+ exports[`Test SlideBoxContent container Should render correctly with isTestAndPreviewMode disabled 2`] = `
1284
+ <SlideBoxContent__CreativesWrapper>
1285
+ <Connect(UserIsAuthenticated(Connect(InjectIntl(EmailWrapper))))
1286
+ date={0}
1287
+ getCmsTemplatesInProgress={false}
1288
+ isTestAndPreviewMode={false}
1289
+ key="creatives-email-wrapper"
1290
+ templateData={
1291
+ Object {
1292
+ "mode": "create",
1293
+ }
1294
+ }
1295
+ type=""
1296
+ />
1297
+ </SlideBoxContent__CreativesWrapper>
1298
+ `;
1299
+
1300
+ exports[`Test SlideBoxContent container Should render correctly with isTestAndPreviewMode disabled 3`] = `
1301
+ <SlideBoxContent__CreativesWrapper>
1302
+ <InjectIntl(TemplatePreview)
1303
+ channel="viber"
1304
+ charCounterEnabled={false}
1305
+ content={
1306
+ Object {
1307
+ "viberPreviewContent": Object {
1308
+ "buttonText": undefined,
1309
+ "messageContent": "test",
1310
+ },
1311
+ }
1312
+ }
1313
+ showCount={true}
1314
+ templateData={
1315
+ Object {
1316
+ "_id": "6646ef8af3c82f686462cf91",
1317
+ "createdAt": "2024-05-17T05:47:54.636Z",
1318
+ "createdBy": "50685415",
1319
+ "isActive": true,
1320
+ "name": "test temp_2",
1321
+ "orgId": 1231,
1322
+ "type": "VIBER",
1323
+ "updatedAt": "2024-05-17T12:05:52.950Z",
1324
+ "updatedBy": "50685415",
1325
+ "versions": Object {
1326
+ "base": Object {
1327
+ "content": Object {
1328
+ "content": Object {
1329
+ "text": "test",
1330
+ },
1331
+ "destinations": Array [
1332
+ Object {
1333
+ "to": Object {
1334
+ "phoneNumber": "{{viber_user_id}}",
1335
+ },
1336
+ },
1337
+ ],
1338
+ },
1339
+ },
1340
+ "history": Array [],
1341
+ },
1342
+ }
1343
+ }
1344
+ viberBrandName=""
1345
+ />
1346
+ </SlideBoxContent__CreativesWrapper>
1347
+ `;
1348
+
1349
+ exports[`Test SlideBoxContent container Should render correctly with isTestAndPreviewMode enabled 1`] = `
1350
+ <SlideBoxContent__CreativesWrapper>
1351
+ <ForwardRef
1352
+ onCreateComplete={[MockFunction]}
1353
+ />
1354
+ </SlideBoxContent__CreativesWrapper>
1355
+ `;
1356
+
1357
+ exports[`Test SlideBoxContent container Should render correctly with isTestAndPreviewMode enabled 2`] = `
1358
+ <SlideBoxContent__CreativesWrapper>
1359
+ <Connect(UserIsAuthenticated(Connect(InjectIntl(EmailWrapper))))
1360
+ date={0}
1361
+ getCmsTemplatesInProgress={false}
1362
+ isTestAndPreviewMode={true}
1363
+ key="creatives-email-wrapper"
1364
+ templateData={
1365
+ Object {
1366
+ "mode": "create",
1367
+ }
1368
+ }
1369
+ type=""
1370
+ />
1371
+ </SlideBoxContent__CreativesWrapper>
1372
+ `;
1373
+
1374
+ exports[`Test SlideBoxContent container Should render correctly with isTestAndPreviewMode enabled 3`] = `
1375
+ <SlideBoxContent__CreativesWrapper>
1376
+ <InjectIntl(TemplatePreview)
1377
+ channel="viber"
1378
+ charCounterEnabled={false}
1379
+ content={
1380
+ Object {
1381
+ "viberPreviewContent": Object {
1382
+ "buttonText": undefined,
1383
+ "messageContent": "test",
1384
+ },
1385
+ }
1386
+ }
1387
+ showCount={true}
1388
+ templateData={
1389
+ Object {
1390
+ "_id": "6646ef8af3c82f686462cf91",
1391
+ "createdAt": "2024-05-17T05:47:54.636Z",
1392
+ "createdBy": "50685415",
1393
+ "isActive": true,
1394
+ "name": "test temp_2",
1395
+ "orgId": 1231,
1396
+ "type": "VIBER",
1397
+ "updatedAt": "2024-05-17T12:05:52.950Z",
1398
+ "updatedBy": "50685415",
1399
+ "versions": Object {
1400
+ "base": Object {
1401
+ "content": Object {
1402
+ "content": Object {
1403
+ "text": "test",
1404
+ },
1405
+ "destinations": Array [
1406
+ Object {
1407
+ "to": Object {
1408
+ "phoneNumber": "{{viber_user_id}}",
1409
+ },
1410
+ },
1411
+ ],
1412
+ },
1413
+ },
1414
+ "history": Array [],
1415
+ },
1416
+ }
1417
+ }
1418
+ viberBrandName=""
1419
+ />
1420
+ </SlideBoxContent__CreativesWrapper>
1421
+ `;
1422
+
1423
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle FACEBOOK channel preview content 1`] = `
1424
+ <SlideBoxContent__CreativesWrapper>
1425
+ <InjectIntl(TemplatePreview)
1426
+ channel="facebook"
1427
+ charCounterEnabled={false}
1428
+ content={
1429
+ Object {
1430
+ "accessToken": "token",
1431
+ "accountId": "123",
1432
+ "callToAction": "Click",
1433
+ "displayLink": "example.com",
1434
+ "pageAccessToken": "page-token",
1435
+ "pageId": "page-123",
1436
+ "previewData": Array [
1437
+ Object {
1438
+ "imageData": Object {
1439
+ "imageSrc": "image.jpg",
1440
+ },
1441
+ "linkDesc": "Description",
1442
+ "linkHeadLine": "Headline",
1443
+ "subType": "single",
1444
+ "videoData": Object {},
1445
+ "webSiteLink": "example.com",
1446
+ },
1447
+ ],
1448
+ "primaryText": "Hello",
1449
+ "selectedAd": "image",
1450
+ }
1451
+ }
1452
+ showCount={true}
1453
+ templateData={
1454
+ Object {
1455
+ "type": "FACEBOOK",
1456
+ "versions": Object {
1457
+ "base": Object {
1458
+ "content": Object {
1459
+ "FacebookAd": Array [
1460
+ Object {
1461
+ "callToAction": "Click",
1462
+ "displayLink": "example.com",
1463
+ "imgSrc": "image.jpg",
1464
+ "linkDesc": "Description",
1465
+ "linkHeadLine": "Headline",
1466
+ "primaryText": "Hello",
1467
+ "subType": "single",
1468
+ "type": "image",
1469
+ "webSiteLink": "example.com",
1470
+ },
1471
+ ],
1472
+ "pageOrgUnitId": "123",
1473
+ },
1474
+ },
1475
+ },
1476
+ }
1477
+ }
1478
+ viberBrandName=""
1479
+ />
1480
+ </SlideBoxContent__CreativesWrapper>
1481
+ `;
1482
+
1483
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle LINE channel preview content with flex type 1`] = `
1484
+ <SlideBoxContent__CreativesWrapper>
1485
+ <InjectIntl(TemplatePreview)
1486
+ channel="line"
1487
+ charCounterEnabled={false}
1488
+ content={
1489
+ Array [
1490
+ Object {
1491
+ "actionUrl": undefined,
1492
+ "baseUrl": undefined,
1493
+ "imageCarousel": Array [
1494
+ Object {
1495
+ "actionLabel": "Click",
1496
+ "imageUrl": "image.jpg",
1497
+ },
1498
+ ],
1499
+ "messageContent": undefined,
1500
+ "previewImageUrl": undefined,
1501
+ "selectedSticker": Object {
1502
+ "animatedStickerUrl": undefined,
1503
+ "packageId": undefined,
1504
+ "stickerId": undefined,
1505
+ "stickerUrl": undefined,
1506
+ },
1507
+ "type": "image_carousel",
1508
+ "video": undefined,
1509
+ },
1510
+ ]
1511
+ }
1512
+ showCount={true}
1513
+ templateData={
1514
+ Object {
1515
+ "type": "LINE",
1516
+ "versions": Object {
1517
+ "base": Object {
1518
+ "content": Object {
1519
+ "messages": Array [
1520
+ Object {
1521
+ "contents": Object {
1522
+ "contents": Array [
1523
+ Object {
1524
+ "footer": Object {
1525
+ "contents": Array [
1526
+ Object {
1527
+ "action": Object {
1528
+ "label": "Click",
1529
+ },
1530
+ },
1531
+ ],
1532
+ },
1533
+ "hero": Object {
1534
+ "url": "image.jpg",
1535
+ },
1536
+ },
1537
+ ],
1538
+ },
1539
+ "type": "flex",
1540
+ },
1541
+ ],
1542
+ },
1543
+ },
1544
+ },
1545
+ }
1546
+ }
1547
+ viberBrandName=""
1548
+ />
1549
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
1550
+ location={
1551
+ Object {
1552
+ "pathname": "/sms/edit",
1553
+ "query": Object {
1554
+ "isEditFromCampaigns": undefined,
1555
+ "module": "library",
1556
+ "type": "embedded",
1557
+ },
1558
+ "search": "",
1559
+ }
1560
+ }
1561
+ onCreateComplete={[MockFunction]}
1562
+ params={
1563
+ Object {
1564
+ "id": undefined,
1565
+ "mode": undefined,
1566
+ }
1567
+ }
1568
+ route={
1569
+ Object {
1570
+ "name": "edit_text",
1571
+ }
1572
+ }
1573
+ templateData={
1574
+ Object {
1575
+ "type": "LINE",
1576
+ "versions": Object {
1577
+ "base": Object {
1578
+ "content": Object {
1579
+ "messages": Array [
1580
+ Object {
1581
+ "contents": Object {
1582
+ "contents": Array [
1583
+ Object {
1584
+ "footer": Object {
1585
+ "contents": Array [
1586
+ Object {
1587
+ "action": Object {
1588
+ "label": "Click",
1589
+ },
1590
+ },
1591
+ ],
1592
+ },
1593
+ "hero": Object {
1594
+ "url": "image.jpg",
1595
+ },
1596
+ },
1597
+ ],
1598
+ },
1599
+ "type": "flex",
1600
+ },
1601
+ ],
1602
+ },
1603
+ },
1604
+ },
1605
+ }
1606
+ }
1607
+ />
1608
+ </SlideBoxContent__CreativesWrapper>
1609
+ `;
1610
+
1611
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle LINE channel preview content with template type 1`] = `
1612
+ <SlideBoxContent__CreativesWrapper>
1613
+ <InjectIntl(TemplatePreview)
1614
+ channel="line"
1615
+ charCounterEnabled={false}
1616
+ content={
1617
+ Array [
1618
+ Object {
1619
+ "actionUrl": undefined,
1620
+ "baseUrl": undefined,
1621
+ "imageCarousel": Array [
1622
+ Object {
1623
+ "actionLabel": "Click",
1624
+ "imageUrl": "image.jpg",
1625
+ },
1626
+ ],
1627
+ "messageContent": undefined,
1628
+ "previewImageUrl": undefined,
1629
+ "selectedSticker": Object {
1630
+ "animatedStickerUrl": undefined,
1631
+ "packageId": undefined,
1632
+ "stickerId": undefined,
1633
+ "stickerUrl": undefined,
1634
+ },
1635
+ "type": "image_carousel",
1636
+ "video": undefined,
1637
+ },
1638
+ ]
1639
+ }
1640
+ showCount={true}
1641
+ templateData={
1642
+ Object {
1643
+ "type": "LINE",
1644
+ "versions": Object {
1645
+ "base": Object {
1646
+ "content": Object {
1647
+ "messages": Array [
1648
+ Object {
1649
+ "template": Object {
1650
+ "columns": Array [
1651
+ Object {
1652
+ "action": Object {
1653
+ "label": "Click",
1654
+ },
1655
+ "imageUrl": "image.jpg",
1656
+ },
1657
+ ],
1658
+ },
1659
+ },
1660
+ ],
1661
+ },
1662
+ },
1663
+ },
1664
+ }
1665
+ }
1666
+ viberBrandName=""
1667
+ />
1668
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
1669
+ location={
1670
+ Object {
1671
+ "pathname": "/sms/edit",
1672
+ "query": Object {
1673
+ "isEditFromCampaigns": undefined,
1674
+ "module": "library",
1675
+ "type": "embedded",
1676
+ },
1677
+ "search": "",
1678
+ }
1679
+ }
1680
+ onCreateComplete={[MockFunction]}
1681
+ params={
1682
+ Object {
1683
+ "id": undefined,
1684
+ "mode": undefined,
1685
+ }
1686
+ }
1687
+ route={
1688
+ Object {
1689
+ "name": "edit_text",
1690
+ }
1691
+ }
1692
+ templateData={
1693
+ Object {
1694
+ "type": "LINE",
1695
+ "versions": Object {
1696
+ "base": Object {
1697
+ "content": Object {
1698
+ "messages": Array [
1699
+ Object {
1700
+ "template": Object {
1701
+ "columns": Array [
1702
+ Object {
1703
+ "action": Object {
1704
+ "label": "Click",
1705
+ },
1706
+ "imageUrl": "image.jpg",
1707
+ },
1708
+ ],
1709
+ },
1710
+ },
1711
+ ],
1712
+ },
1713
+ },
1714
+ },
1715
+ }
1716
+ }
1717
+ />
1718
+ </SlideBoxContent__CreativesWrapper>
1719
+ `;
1720
+
1721
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle RCS channel preview content 1`] = `
1722
+ <SlideBoxContent__CreativesWrapper>
1723
+ <InjectIntl(TemplatePreview)
1724
+ channel="rcs"
1725
+ charCounterEnabled={false}
1726
+ content={
1727
+ Object {
1728
+ "rcsPreviewContent": Object {
1729
+ "buttonText": "Click",
1730
+ "rcsDesc": "Description",
1731
+ "rcsImageSrc": "image.jpg",
1732
+ "rcsTitle": "Title",
1733
+ },
1734
+ }
1735
+ }
1736
+ showCount={true}
1737
+ templateData={
1738
+ Object {
1739
+ "type": "RCS",
1740
+ "versions": Object {
1741
+ "base": Object {
1742
+ "content": Object {
1743
+ "RCS": Object {
1744
+ "cardContent": Array [
1745
+ Object {
1746
+ "description": "Description",
1747
+ "media": Object {
1748
+ "mediaUrl": "image.jpg",
1749
+ },
1750
+ "suggestions": Array [
1751
+ Object {
1752
+ "text": "Click",
1753
+ },
1754
+ ],
1755
+ "title": "Title",
1756
+ },
1757
+ ],
1758
+ },
1759
+ },
1760
+ },
1761
+ },
1762
+ }
1763
+ }
1764
+ viberBrandName=""
1765
+ />
1766
+ </SlideBoxContent__CreativesWrapper>
1767
+ `;
1768
+
1769
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle SMS channel preview content with DLT enabled 1`] = `
1770
+ <SlideBoxContent__CreativesWrapper>
1771
+ <InjectIntl(TemplatePreview)
1772
+ channel="sms"
1773
+ charCounterEnabled={true}
1774
+ showCount={true}
1775
+ templateData={
1776
+ Object {
1777
+ "type": "SMS",
1778
+ "versions": Object {
1779
+ "base": Object {
1780
+ "updated-sms-editor": Array [
1781
+ "Hello",
1782
+ "World",
1783
+ ],
1784
+ },
1785
+ },
1786
+ }
1787
+ }
1788
+ viberBrandName=""
1789
+ />
1790
+ </SlideBoxContent__CreativesWrapper>
1791
+ `;
1792
+
1793
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle SMS channel preview content without DLT 1`] = `
1794
+ <SlideBoxContent__CreativesWrapper>
1795
+ <InjectIntl(TemplatePreview)
1796
+ channel="sms"
1797
+ charCounterEnabled={true}
1798
+ content="Hello World"
1799
+ showCount={true}
1800
+ templateData={
1801
+ Object {
1802
+ "type": "SMS",
1803
+ "versions": Object {
1804
+ "base": Object {
1805
+ "sms-editor": "Hello World",
1806
+ },
1807
+ },
1808
+ }
1809
+ }
1810
+ viberBrandName=""
1811
+ />
1812
+ </SlideBoxContent__CreativesWrapper>
1813
+ `;
1814
+
1815
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle VIBER channel preview content with all content types 1`] = `
1816
+ <SlideBoxContent__CreativesWrapper>
1817
+ <InjectIntl(TemplatePreview)
1818
+ channel="viber"
1819
+ charCounterEnabled={false}
1820
+ content={
1821
+ Object {
1822
+ "viberPreviewContent": Object {
1823
+ "buttonText": "Click Me",
1824
+ "imageURL": "image.jpg",
1825
+ "messageContent": "Hello World",
1826
+ "videoParams": Object {
1827
+ "viberVideoPreviewImg": "thumbnail.jpg",
1828
+ "viberVideoSrc": "video.mp4",
1829
+ },
1830
+ },
1831
+ }
1832
+ }
1833
+ showCount={true}
1834
+ templateData={
1835
+ Object {
1836
+ "type": "VIBER",
1837
+ "versions": Object {
1838
+ "base": Object {
1839
+ "content": Object {
1840
+ "content": Object {
1841
+ "button": Object {
1842
+ "text": "Click Me",
1843
+ },
1844
+ "image": Object {
1845
+ "url": "image.jpg",
1846
+ },
1847
+ "text": "Hello World",
1848
+ "video": Object {
1849
+ "thumbnailUrl": "thumbnail.jpg",
1850
+ "url": "video.mp4",
1851
+ },
1852
+ },
1853
+ },
1854
+ },
1855
+ },
1856
+ }
1857
+ }
1858
+ viberBrandName=""
1859
+ />
1860
+ </SlideBoxContent__CreativesWrapper>
1861
+ `;
1862
+
1863
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle VIBER channel preview content with only image 1`] = `
1864
+ <SlideBoxContent__CreativesWrapper>
1865
+ <InjectIntl(TemplatePreview)
1866
+ channel="viber"
1867
+ charCounterEnabled={false}
1868
+ content={
1869
+ Object {
1870
+ "viberPreviewContent": Object {
1871
+ "buttonText": undefined,
1872
+ "imageURL": "image.jpg",
1873
+ "messageContent": "",
1874
+ },
1875
+ }
1876
+ }
1877
+ showCount={true}
1878
+ templateData={
1879
+ Object {
1880
+ "type": "VIBER",
1881
+ "versions": Object {
1882
+ "base": Object {
1883
+ "content": Object {
1884
+ "content": Object {
1885
+ "image": Object {
1886
+ "url": "image.jpg",
1887
+ },
1888
+ },
1889
+ },
1890
+ },
1891
+ },
1892
+ }
1893
+ }
1894
+ viberBrandName=""
1895
+ />
1896
+ </SlideBoxContent__CreativesWrapper>
1897
+ `;
1898
+
1899
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle VIBER channel preview content with only text 1`] = `
1900
+ <SlideBoxContent__CreativesWrapper>
1901
+ <InjectIntl(TemplatePreview)
1902
+ channel="viber"
1903
+ charCounterEnabled={false}
1904
+ content={
1905
+ Object {
1906
+ "viberPreviewContent": Object {
1907
+ "buttonText": undefined,
1908
+ "messageContent": "Hello World",
1909
+ },
1910
+ }
1911
+ }
1912
+ showCount={true}
1913
+ templateData={
1914
+ Object {
1915
+ "type": "VIBER",
1916
+ "versions": Object {
1917
+ "base": Object {
1918
+ "content": Object {
1919
+ "content": Object {
1920
+ "text": "Hello World",
1921
+ },
1922
+ },
1923
+ },
1924
+ },
1925
+ }
1926
+ }
1927
+ viberBrandName=""
1928
+ />
1929
+ </SlideBoxContent__CreativesWrapper>
1930
+ `;
1931
+
1932
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle VIBER channel preview content with only video 1`] = `
1933
+ <SlideBoxContent__CreativesWrapper>
1934
+ <InjectIntl(TemplatePreview)
1935
+ channel="viber"
1936
+ charCounterEnabled={false}
1937
+ content={
1938
+ Object {
1939
+ "viberPreviewContent": Object {
1940
+ "buttonText": undefined,
1941
+ "messageContent": "",
1942
+ "videoParams": Object {
1943
+ "viberVideoPreviewImg": "thumbnail.jpg",
1944
+ "viberVideoSrc": "video.mp4",
1945
+ },
1946
+ },
1947
+ }
1948
+ }
1949
+ showCount={true}
1950
+ templateData={
1951
+ Object {
1952
+ "type": "VIBER",
1953
+ "versions": Object {
1954
+ "base": Object {
1955
+ "content": Object {
1956
+ "content": Object {
1957
+ "video": Object {
1958
+ "thumbnailUrl": "thumbnail.jpg",
1959
+ "url": "video.mp4",
1960
+ },
1961
+ },
1962
+ },
1963
+ },
1964
+ },
1965
+ }
1966
+ }
1967
+ viberBrandName=""
1968
+ />
1969
+ </SlideBoxContent__CreativesWrapper>
1970
+ `;
1971
+
1972
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function for LINE messages type detection Should detect image type in LINE messages 1`] = `
1973
+ <SlideBoxContent__CreativesWrapper>
1974
+ <InjectIntl(TemplatePreview)
1975
+ channel="line"
1976
+ charCounterEnabled={false}
1977
+ content={
1978
+ Array [
1979
+ Object {
1980
+ "actionUrl": undefined,
1981
+ "baseUrl": undefined,
1982
+ "imageCarousel": Array [
1983
+ Object {
1984
+ "actionLabel": undefined,
1985
+ "imageUrl": undefined,
1986
+ },
1987
+ ],
1988
+ "messageContent": undefined,
1989
+ "previewImageUrl": "image.jpg",
1990
+ "selectedSticker": Object {
1991
+ "animatedStickerUrl": undefined,
1992
+ "packageId": undefined,
1993
+ "stickerId": undefined,
1994
+ "stickerUrl": undefined,
1995
+ },
1996
+ "type": "image",
1997
+ "video": undefined,
1998
+ },
1999
+ ]
2000
+ }
2001
+ showCount={true}
2002
+ templateData={
2003
+ Object {
2004
+ "type": "LINE",
2005
+ "versions": Object {
2006
+ "base": Object {
2007
+ "content": Object {
2008
+ "messages": Array [
2009
+ Object {
2010
+ "previewImageUrl": "image.jpg",
2011
+ },
2012
+ ],
2013
+ },
2014
+ },
2015
+ },
2016
+ }
2017
+ }
2018
+ viberBrandName=""
2019
+ />
2020
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2021
+ location={
2022
+ Object {
2023
+ "pathname": "/sms/edit",
2024
+ "query": Object {
2025
+ "isEditFromCampaigns": undefined,
2026
+ "module": "library",
2027
+ "type": "embedded",
2028
+ },
2029
+ "search": "",
2030
+ }
2031
+ }
2032
+ onCreateComplete={[MockFunction]}
2033
+ params={
2034
+ Object {
2035
+ "id": undefined,
2036
+ "mode": undefined,
2037
+ }
2038
+ }
2039
+ route={
2040
+ Object {
2041
+ "name": "edit_text",
2042
+ }
2043
+ }
2044
+ templateData={
2045
+ Object {
2046
+ "type": "LINE",
2047
+ "versions": Object {
2048
+ "base": Object {
2049
+ "content": Object {
2050
+ "messages": Array [
2051
+ Object {
2052
+ "previewImageUrl": "image.jpg",
2053
+ },
2054
+ ],
2055
+ },
2056
+ },
2057
+ },
2058
+ }
2059
+ }
2060
+ />
2061
+ </SlideBoxContent__CreativesWrapper>
2062
+ `;
2063
+
2064
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function for LINE messages type detection Should detect image_carousel type in LINE messages with contents 1`] = `
2065
+ <SlideBoxContent__CreativesWrapper>
2066
+ <InjectIntl(TemplatePreview)
2067
+ channel="line"
2068
+ charCounterEnabled={false}
2069
+ content={
2070
+ Array [
2071
+ Object {
2072
+ "actionUrl": undefined,
2073
+ "baseUrl": undefined,
2074
+ "imageCarousel": Array [
2075
+ Object {
2076
+ "actionLabel": undefined,
2077
+ "imageUrl": undefined,
2078
+ },
2079
+ ],
2080
+ "messageContent": undefined,
2081
+ "previewImageUrl": undefined,
2082
+ "selectedSticker": Object {
2083
+ "animatedStickerUrl": undefined,
2084
+ "packageId": undefined,
2085
+ "stickerId": undefined,
2086
+ "stickerUrl": undefined,
2087
+ },
2088
+ "type": "image_carousel",
2089
+ "video": undefined,
2090
+ },
2091
+ ]
2092
+ }
2093
+ showCount={true}
2094
+ templateData={
2095
+ Object {
2096
+ "type": "LINE",
2097
+ "versions": Object {
2098
+ "base": Object {
2099
+ "content": Object {
2100
+ "messages": Array [
2101
+ Object {
2102
+ "contents": Object {},
2103
+ },
2104
+ ],
2105
+ },
2106
+ },
2107
+ },
2108
+ }
2109
+ }
2110
+ viberBrandName=""
2111
+ />
2112
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2113
+ location={
2114
+ Object {
2115
+ "pathname": "/sms/edit",
2116
+ "query": Object {
2117
+ "isEditFromCampaigns": undefined,
2118
+ "module": "library",
2119
+ "type": "embedded",
2120
+ },
2121
+ "search": "",
2122
+ }
2123
+ }
2124
+ onCreateComplete={[MockFunction]}
2125
+ params={
2126
+ Object {
2127
+ "id": undefined,
2128
+ "mode": undefined,
2129
+ }
2130
+ }
2131
+ route={
2132
+ Object {
2133
+ "name": "edit_text",
2134
+ }
2135
+ }
2136
+ templateData={
2137
+ Object {
2138
+ "type": "LINE",
2139
+ "versions": Object {
2140
+ "base": Object {
2141
+ "content": Object {
2142
+ "messages": Array [
2143
+ Object {
2144
+ "contents": Object {},
2145
+ },
2146
+ ],
2147
+ },
2148
+ },
2149
+ },
2150
+ }
2151
+ }
2152
+ />
2153
+ </SlideBoxContent__CreativesWrapper>
2154
+ `;
2155
+
2156
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function for LINE messages type detection Should detect image_carousel type in LINE messages with template 1`] = `
2157
+ <SlideBoxContent__CreativesWrapper>
2158
+ <InjectIntl(TemplatePreview)
2159
+ channel="line"
2160
+ charCounterEnabled={false}
2161
+ content={
2162
+ Array [
2163
+ Object {
2164
+ "actionUrl": undefined,
2165
+ "baseUrl": undefined,
2166
+ "imageCarousel": Array [
2167
+ Object {
2168
+ "actionLabel": undefined,
2169
+ "imageUrl": undefined,
2170
+ },
2171
+ ],
2172
+ "messageContent": undefined,
2173
+ "previewImageUrl": undefined,
2174
+ "selectedSticker": Object {
2175
+ "animatedStickerUrl": undefined,
2176
+ "packageId": undefined,
2177
+ "stickerId": undefined,
2178
+ "stickerUrl": undefined,
2179
+ },
2180
+ "type": "image_carousel",
2181
+ "video": undefined,
2182
+ },
2183
+ ]
2184
+ }
2185
+ showCount={true}
2186
+ templateData={
2187
+ Object {
2188
+ "type": "LINE",
2189
+ "versions": Object {
2190
+ "base": Object {
2191
+ "content": Object {
2192
+ "messages": Array [
2193
+ Object {
2194
+ "template": Object {},
2195
+ },
2196
+ ],
2197
+ },
2198
+ },
2199
+ },
2200
+ }
2201
+ }
2202
+ viberBrandName=""
2203
+ />
2204
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2205
+ location={
2206
+ Object {
2207
+ "pathname": "/sms/edit",
2208
+ "query": Object {
2209
+ "isEditFromCampaigns": undefined,
2210
+ "module": "library",
2211
+ "type": "embedded",
2212
+ },
2213
+ "search": "",
2214
+ }
2215
+ }
2216
+ onCreateComplete={[MockFunction]}
2217
+ params={
2218
+ Object {
2219
+ "id": undefined,
2220
+ "mode": undefined,
2221
+ }
2222
+ }
2223
+ route={
2224
+ Object {
2225
+ "name": "edit_text",
2226
+ }
2227
+ }
2228
+ templateData={
2229
+ Object {
2230
+ "type": "LINE",
2231
+ "versions": Object {
2232
+ "base": Object {
2233
+ "content": Object {
2234
+ "messages": Array [
2235
+ Object {
2236
+ "template": Object {},
2237
+ },
2238
+ ],
2239
+ },
2240
+ },
2241
+ },
2242
+ }
2243
+ }
2244
+ />
2245
+ </SlideBoxContent__CreativesWrapper>
2246
+ `;
2247
+
2248
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function for LINE messages type detection Should detect imagemap type in LINE messages 1`] = `
2249
+ <SlideBoxContent__CreativesWrapper>
2250
+ <InjectIntl(TemplatePreview)
2251
+ channel="line"
2252
+ charCounterEnabled={false}
2253
+ content={
2254
+ Array [
2255
+ Object {
2256
+ "actionUrl": undefined,
2257
+ "baseUrl": "base.jpg",
2258
+ "imageCarousel": Array [
2259
+ Object {
2260
+ "actionLabel": undefined,
2261
+ "imageUrl": undefined,
2262
+ },
2263
+ ],
2264
+ "messageContent": undefined,
2265
+ "previewImageUrl": undefined,
2266
+ "selectedSticker": Object {
2267
+ "animatedStickerUrl": undefined,
2268
+ "packageId": undefined,
2269
+ "stickerId": undefined,
2270
+ "stickerUrl": undefined,
2271
+ },
2272
+ "type": "imagemap",
2273
+ "video": undefined,
2274
+ },
2275
+ ]
2276
+ }
2277
+ showCount={true}
2278
+ templateData={
2279
+ Object {
2280
+ "type": "LINE",
2281
+ "versions": Object {
2282
+ "base": Object {
2283
+ "content": Object {
2284
+ "messages": Array [
2285
+ Object {
2286
+ "baseUrl": "base.jpg",
2287
+ },
2288
+ ],
2289
+ },
2290
+ },
2291
+ },
2292
+ }
2293
+ }
2294
+ viberBrandName=""
2295
+ />
2296
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2297
+ location={
2298
+ Object {
2299
+ "pathname": "/sms/edit",
2300
+ "query": Object {
2301
+ "isEditFromCampaigns": undefined,
2302
+ "module": "library",
2303
+ "type": "embedded",
2304
+ },
2305
+ "search": "",
2306
+ }
2307
+ }
2308
+ onCreateComplete={[MockFunction]}
2309
+ params={
2310
+ Object {
2311
+ "id": undefined,
2312
+ "mode": undefined,
2313
+ }
2314
+ }
2315
+ route={
2316
+ Object {
2317
+ "name": "edit_text",
2318
+ }
2319
+ }
2320
+ templateData={
2321
+ Object {
2322
+ "type": "LINE",
2323
+ "versions": Object {
2324
+ "base": Object {
2325
+ "content": Object {
2326
+ "messages": Array [
2327
+ Object {
2328
+ "baseUrl": "base.jpg",
2329
+ },
2330
+ ],
2331
+ },
2332
+ },
2333
+ },
2334
+ }
2335
+ }
2336
+ />
2337
+ </SlideBoxContent__CreativesWrapper>
2338
+ `;
2339
+
2340
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function for LINE messages type detection Should detect sticker type in LINE messages 1`] = `
2341
+ <SlideBoxContent__CreativesWrapper>
2342
+ <InjectIntl(TemplatePreview)
2343
+ channel="line"
2344
+ charCounterEnabled={false}
2345
+ content={
2346
+ Array [
2347
+ Object {
2348
+ "actionUrl": undefined,
2349
+ "baseUrl": undefined,
2350
+ "imageCarousel": Array [
2351
+ Object {
2352
+ "actionLabel": undefined,
2353
+ "imageUrl": undefined,
2354
+ },
2355
+ ],
2356
+ "messageContent": undefined,
2357
+ "previewImageUrl": undefined,
2358
+ "selectedSticker": Object {
2359
+ "packageId": "456",
2360
+ "stickerId": "123",
2361
+ "stickerUrl": "sticker.jpg",
2362
+ },
2363
+ "type": "sticker",
2364
+ "video": undefined,
2365
+ },
2366
+ ]
2367
+ }
2368
+ showCount={true}
2369
+ templateData={
2370
+ Object {
2371
+ "type": "LINE",
2372
+ "versions": Object {
2373
+ "base": Object {
2374
+ "content": Object {
2375
+ "messages": Array [
2376
+ Object {
2377
+ "selectedSticker": Object {
2378
+ "packageId": "456",
2379
+ "stickerId": "123",
2380
+ "stickerUrl": "sticker.jpg",
2381
+ },
2382
+ },
2383
+ ],
2384
+ },
2385
+ },
2386
+ },
2387
+ }
2388
+ }
2389
+ viberBrandName=""
2390
+ />
2391
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2392
+ location={
2393
+ Object {
2394
+ "pathname": "/sms/edit",
2395
+ "query": Object {
2396
+ "isEditFromCampaigns": undefined,
2397
+ "module": "library",
2398
+ "type": "embedded",
2399
+ },
2400
+ "search": "",
2401
+ }
2402
+ }
2403
+ onCreateComplete={[MockFunction]}
2404
+ params={
2405
+ Object {
2406
+ "id": undefined,
2407
+ "mode": undefined,
2408
+ }
2409
+ }
2410
+ route={
2411
+ Object {
2412
+ "name": "edit_text",
2413
+ }
2414
+ }
2415
+ templateData={
2416
+ Object {
2417
+ "type": "LINE",
2418
+ "versions": Object {
2419
+ "base": Object {
2420
+ "content": Object {
2421
+ "messages": Array [
2422
+ Object {
2423
+ "selectedSticker": Object {
2424
+ "packageId": "456",
2425
+ "stickerId": "123",
2426
+ "stickerUrl": "sticker.jpg",
2427
+ },
2428
+ },
2429
+ ],
2430
+ },
2431
+ },
2432
+ },
2433
+ }
2434
+ }
2435
+ />
2436
+ </SlideBoxContent__CreativesWrapper>
2437
+ `;
2438
+
2439
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function for LINE messages type detection Should detect sticker type in LINE messages 2`] = `
2440
+ <SlideBoxContent__CreativesWrapper>
2441
+ <InjectIntl(TemplatePreview)
2442
+ channel="line"
2443
+ charCounterEnabled={false}
2444
+ content={
2445
+ Array [
2446
+ Object {
2447
+ "actionUrl": undefined,
2448
+ "baseUrl": undefined,
2449
+ "imageCarousel": Array [
2450
+ Object {
2451
+ "actionLabel": undefined,
2452
+ "imageUrl": undefined,
2453
+ },
2454
+ ],
2455
+ "messageContent": undefined,
2456
+ "previewImageUrl": undefined,
2457
+ "selectedSticker": Object {
2458
+ "animatedStickerUrl": undefined,
2459
+ "packageId": undefined,
2460
+ "stickerId": undefined,
2461
+ "stickerUrl": "sticker.jpg",
2462
+ },
2463
+ "type": "sticker",
2464
+ "video": undefined,
2465
+ },
2466
+ ]
2467
+ }
2468
+ showCount={true}
2469
+ templateData={
2470
+ Object {
2471
+ "type": "LINE",
2472
+ "versions": Object {
2473
+ "base": Object {
2474
+ "content": Object {
2475
+ "messages": Array [
2476
+ Object {
2477
+ "stickerUrl": "sticker.jpg",
2478
+ },
2479
+ ],
2480
+ },
2481
+ },
2482
+ },
2483
+ }
2484
+ }
2485
+ viberBrandName=""
2486
+ />
2487
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2488
+ location={
2489
+ Object {
2490
+ "pathname": "/sms/edit",
2491
+ "query": Object {
2492
+ "isEditFromCampaigns": undefined,
2493
+ "module": "library",
2494
+ "type": "embedded",
2495
+ },
2496
+ "search": "",
2497
+ }
2498
+ }
2499
+ onCreateComplete={[MockFunction]}
2500
+ params={
2501
+ Object {
2502
+ "id": undefined,
2503
+ "mode": undefined,
2504
+ }
2505
+ }
2506
+ route={
2507
+ Object {
2508
+ "name": "edit_text",
2509
+ }
2510
+ }
2511
+ templateData={
2512
+ Object {
2513
+ "type": "LINE",
2514
+ "versions": Object {
2515
+ "base": Object {
2516
+ "content": Object {
2517
+ "messages": Array [
2518
+ Object {
2519
+ "stickerUrl": "sticker.jpg",
2520
+ },
2521
+ ],
2522
+ },
2523
+ },
2524
+ },
2525
+ }
2526
+ }
2527
+ />
2528
+ </SlideBoxContent__CreativesWrapper>
2529
+ `;
2530
+
2531
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function for LINE messages type detection Should detect text type in LINE messages 1`] = `
2532
+ <SlideBoxContent__CreativesWrapper>
2533
+ <InjectIntl(TemplatePreview)
2534
+ channel="line"
2535
+ charCounterEnabled={false}
2536
+ content={
2537
+ Array [
2538
+ Object {
2539
+ "actionUrl": undefined,
2540
+ "baseUrl": undefined,
2541
+ "imageCarousel": Array [
2542
+ Object {
2543
+ "actionLabel": undefined,
2544
+ "imageUrl": undefined,
2545
+ },
2546
+ ],
2547
+ "messageContent": "Hello World",
2548
+ "previewImageUrl": undefined,
2549
+ "selectedSticker": Object {
2550
+ "animatedStickerUrl": undefined,
2551
+ "packageId": undefined,
2552
+ "stickerId": undefined,
2553
+ "stickerUrl": undefined,
2554
+ },
2555
+ "type": "text",
2556
+ "video": undefined,
2557
+ },
2558
+ ]
2559
+ }
2560
+ showCount={true}
2561
+ templateData={
2562
+ Object {
2563
+ "type": "LINE",
2564
+ "versions": Object {
2565
+ "base": Object {
2566
+ "content": Object {
2567
+ "messages": Array [
2568
+ Object {
2569
+ "text": "Hello World",
2570
+ },
2571
+ ],
2572
+ },
2573
+ },
2574
+ },
2575
+ }
2576
+ }
2577
+ viberBrandName=""
2578
+ />
2579
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2580
+ location={
2581
+ Object {
2582
+ "pathname": "/sms/edit",
2583
+ "query": Object {
2584
+ "isEditFromCampaigns": undefined,
2585
+ "module": "library",
2586
+ "type": "embedded",
2587
+ },
2588
+ "search": "",
2589
+ }
2590
+ }
2591
+ onCreateComplete={[MockFunction]}
2592
+ params={
2593
+ Object {
2594
+ "id": undefined,
2595
+ "mode": undefined,
2596
+ }
2597
+ }
2598
+ route={
2599
+ Object {
2600
+ "name": "edit_text",
2601
+ }
2602
+ }
2603
+ templateData={
2604
+ Object {
2605
+ "type": "LINE",
2606
+ "versions": Object {
2607
+ "base": Object {
2608
+ "content": Object {
2609
+ "messages": Array [
2610
+ Object {
2611
+ "text": "Hello World",
2612
+ },
2613
+ ],
2614
+ },
2615
+ },
2616
+ },
2617
+ }
2618
+ }
2619
+ />
2620
+ </SlideBoxContent__CreativesWrapper>
2621
+ `;
2622
+
2623
+ exports[`Test SlideBoxContent container getChannelPreviewContent utility function for LINE messages type detection Should detect video type in LINE messages 1`] = `
2624
+ <SlideBoxContent__CreativesWrapper>
2625
+ <InjectIntl(TemplatePreview)
2626
+ channel="line"
2627
+ charCounterEnabled={false}
2628
+ content={
2629
+ Array [
2630
+ Object {
2631
+ "actionUrl": "example.com",
2632
+ "baseUrl": undefined,
2633
+ "imageCarousel": Array [
2634
+ Object {
2635
+ "actionLabel": undefined,
2636
+ "imageUrl": undefined,
2637
+ },
2638
+ ],
2639
+ "messageContent": undefined,
2640
+ "previewImageUrl": undefined,
2641
+ "selectedSticker": Object {
2642
+ "animatedStickerUrl": undefined,
2643
+ "packageId": undefined,
2644
+ "stickerId": undefined,
2645
+ "stickerUrl": undefined,
2646
+ },
2647
+ "type": "image_carousel",
2648
+ "video": "video.mp4",
2649
+ },
2650
+ ]
2651
+ }
2652
+ showCount={true}
2653
+ templateData={
2654
+ Object {
2655
+ "type": "LINE",
2656
+ "versions": Object {
2657
+ "base": Object {
2658
+ "content": Object {
2659
+ "messages": Array [
2660
+ Object {
2661
+ "video": Object {
2662
+ "externalLink": Object {
2663
+ "linkUri": "example.com",
2664
+ },
2665
+ "originalContentUrl": "video.mp4",
2666
+ },
2667
+ },
2668
+ ],
2669
+ },
2670
+ },
2671
+ },
2672
+ }
2673
+ }
2674
+ viberBrandName=""
2675
+ />
2676
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2677
+ location={
2678
+ Object {
2679
+ "pathname": "/sms/edit",
2680
+ "query": Object {
2681
+ "isEditFromCampaigns": undefined,
2682
+ "module": "library",
2683
+ "type": "embedded",
2684
+ },
2685
+ "search": "",
2686
+ }
2687
+ }
2688
+ onCreateComplete={[MockFunction]}
2689
+ params={
2690
+ Object {
2691
+ "id": undefined,
2692
+ "mode": undefined,
2693
+ }
2694
+ }
2695
+ route={
2696
+ Object {
2697
+ "name": "edit_text",
2698
+ }
2699
+ }
2700
+ templateData={
2701
+ Object {
2702
+ "type": "LINE",
2703
+ "versions": Object {
2704
+ "base": Object {
2705
+ "content": Object {
2706
+ "messages": Array [
2707
+ Object {
2708
+ "video": Object {
2709
+ "externalLink": Object {
2710
+ "linkUri": "example.com",
2711
+ },
2712
+ "originalContentUrl": "video.mp4",
2713
+ },
2714
+ },
2715
+ ],
2716
+ },
2717
+ },
2718
+ },
2719
+ }
2720
+ }
2721
+ />
2722
+ </SlideBoxContent__CreativesWrapper>
2723
+ `;
2724
+
2725
+ exports[`Test SlideBoxContent container getLineType utility function Should handle LINE channel in create mode with full mode 1`] = `
2726
+ <SlideBoxContent__CreativesWrapper>
2727
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2728
+ createNew={true}
2729
+ isFullMode={true}
2730
+ location={
2731
+ Object {
2732
+ "pathname": "/sms/edit",
2733
+ "query": Object {
2734
+ "isEditFromCampaigns": undefined,
2735
+ "module": "default",
2736
+ "type": false,
2737
+ },
2738
+ "search": "",
2739
+ }
2740
+ }
2741
+ onCreateComplete={[MockFunction]}
2742
+ templateData={null}
2743
+ />
2744
+ </SlideBoxContent__CreativesWrapper>
2745
+ `;
2746
+
2747
+ exports[`Test SlideBoxContent container getLineType utility function Should handle LINE channel in edit mode with full mode 1`] = `
2748
+ <SlideBoxContent__CreativesWrapper>
2749
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2750
+ isFullMode={true}
2751
+ location={
2752
+ Object {
2753
+ "pathname": "/sms/edit",
2754
+ "query": Object {
2755
+ "isEditFromCampaigns": undefined,
2756
+ "module": "default",
2757
+ "type": false,
2758
+ },
2759
+ "search": "",
2760
+ }
2761
+ }
2762
+ onCreateComplete={[MockFunction]}
2763
+ params={
2764
+ Object {
2765
+ "id": undefined,
2766
+ "mode": undefined,
2767
+ }
2768
+ }
2769
+ route={
2770
+ Object {
2771
+ "name": "edit_text",
2772
+ }
2773
+ }
2774
+ templateData={
2775
+ Object {
2776
+ "type": "LINE",
2777
+ }
2778
+ }
2779
+ />
2780
+ </SlideBoxContent__CreativesWrapper>
2781
+ `;
2782
+
2783
+ exports[`Test SlideBoxContent container getLineType utility function Should handle LINE channel in non-full mode with default template 1`] = `
2784
+ <SlideBoxContent__CreativesWrapper>
2785
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2786
+ createNew={true}
2787
+ isFullMode={false}
2788
+ location={
2789
+ Object {
2790
+ "pathname": "/sms/edit",
2791
+ "query": Object {
2792
+ "isEditFromCampaigns": undefined,
2793
+ "module": "library",
2794
+ "type": "embedded",
2795
+ },
2796
+ "search": "",
2797
+ }
2798
+ }
2799
+ onCreateComplete={[MockFunction]}
2800
+ templateData={
2801
+ Object {
2802
+ "isDefault": true,
2803
+ }
2804
+ }
2805
+ />
2806
+ </SlideBoxContent__CreativesWrapper>
2807
+ `;
2808
+
2809
+ exports[`Test SlideBoxContent container getLineType utility function Should handle LINE channel in non-full mode with template data 1`] = `
2810
+ <SlideBoxContent__CreativesWrapper>
2811
+ <Connect(Connect(UserIsAuthenticated(InjectIntl(CreativesCommon))))
2812
+ isFullMode={false}
2813
+ location={
2814
+ Object {
2815
+ "pathname": "/sms/edit",
2816
+ "query": Object {
2817
+ "isEditFromCampaigns": undefined,
2818
+ "module": "library",
2819
+ "type": "embedded",
2820
+ },
2821
+ "search": "",
2822
+ }
2823
+ }
2824
+ onCreateComplete={[MockFunction]}
2825
+ params={
2826
+ Object {
2827
+ "id": "123",
2828
+ "mode": undefined,
2829
+ }
2830
+ }
2831
+ route={
2832
+ Object {
2833
+ "name": "edit_text",
2834
+ }
2835
+ }
2836
+ templateData={
2837
+ Object {
2838
+ "_id": "123",
2839
+ "isDefault": true,
2840
+ "versions": Object {
2841
+ "base": Object {
2842
+ "content": Object {
2843
+ "messages": Array [
2844
+ Object {
2845
+ "text": "test",
2846
+ },
2847
+ ],
2848
+ },
2849
+ },
2850
+ },
2851
+ }
2852
+ }
2853
+ />
2854
+ </SlideBoxContent__CreativesWrapper>
2855
+ `;
2856
+
2857
+ exports[`Test SlideBoxContent container getViber utility function Should handle VIBER channel in create mode 1`] = `
2858
+ <SlideBoxContent__CreativesWrapper>
2859
+ <ForwardRef
2860
+ createNew={true}
2861
+ location={
2862
+ Object {
2863
+ "pathname": "/sms/edit",
2864
+ "query": Object {
2865
+ "isEditFromCampaigns": undefined,
2866
+ "module": "library",
2867
+ "type": "embedded",
2868
+ },
2869
+ "search": "",
2870
+ }
2871
+ }
2872
+ onCreateComplete={[MockFunction]}
2873
+ templateData={null}
2874
+ />
2875
+ </SlideBoxContent__CreativesWrapper>
2876
+ `;
2877
+
2878
+ exports[`Test SlideBoxContent container getViber utility function Should handle VIBER channel in edit mode 1`] = `
2879
+ <SlideBoxContent__CreativesWrapper>
2880
+ <ForwardRef
2881
+ createNew={true}
2882
+ location={
2883
+ Object {
2884
+ "pathname": "/sms/edit",
2885
+ "query": Object {
2886
+ "isEditFromCampaigns": undefined,
2887
+ "module": "library",
2888
+ "type": "embedded",
2889
+ },
2890
+ "search": "",
2891
+ }
2892
+ }
2893
+ onCreateComplete={[MockFunction]}
2894
+ params={
2895
+ Object {
2896
+ "id": undefined,
2897
+ }
2898
+ }
2899
+ templateData={
2900
+ Object {
2901
+ "type": "VIBER",
2902
+ }
2903
+ }
2904
+ />
2905
+ </SlideBoxContent__CreativesWrapper>
2906
+ `;
2907
+
2908
+ exports[`Test SlideBoxContent container getViber utility function Should handle non-VIBER channel 1`] = `
2909
+ <SlideBoxContent__CreativesWrapper>
2910
+ <SmsWrapper
2911
+ getDefaultTags=""
2912
+ isComponent={true}
2913
+ isCreateSms={true}
2914
+ location={
2915
+ Object {
2916
+ "pathname": "/sms/edit",
2917
+ "query": Object {
2918
+ "isEditFromCampaigns": undefined,
2919
+ "module": "library",
2920
+ "type": "embedded",
2921
+ },
2922
+ "search": "",
2923
+ }
2924
+ }
2925
+ onCreateComplete={[MockFunction]}
2926
+ route={
2927
+ Object {
2928
+ "name": "sms",
2929
+ }
2930
+ }
2931
+ />
2932
+ </SlideBoxContent__CreativesWrapper>
2933
+ `;
2934
+
2935
+ exports[`Test SlideBoxContent container getWechatTemplateType utility function Should return MAP_TEMPLATE when mode is not CREATE and msgcontent is not RICH_MEDIA_WECHAT 1`] = `
2936
+ <SlideBoxContent__CreativesWrapper>
2937
+ <Connect(InjectIntl(Wrapper))
2938
+ mode="editTemplate"
2939
+ query={
2940
+ Object {
2941
+ "isEditFromCampaigns": undefined,
2942
+ "module": "library",
2943
+ "type": "embedded",
2944
+ }
2945
+ }
2946
+ templateData={
2947
+ Object {
2948
+ "definition": Object {
2949
+ "msgcontent": "OTHER",
2950
+ },
2951
+ }
2952
+ }
2953
+ templateType="mapTemplate"
2954
+ />
2955
+ </SlideBoxContent__CreativesWrapper>
2956
+ `;
2957
+
2958
+ exports[`Test SlideBoxContent container getWechatTemplateType utility function Should return RICH_MEDIA when mode is not CREATE and msgcontent is RICH_MEDIA_WECHAT 1`] = `
2959
+ <SlideBoxContent__CreativesWrapper>
2960
+ <Connect(InjectIntl(Wrapper))
2961
+ mode="editTemplate"
2962
+ query={
2963
+ Object {
2964
+ "isEditFromCampaigns": undefined,
2965
+ "module": "library",
2966
+ "type": "embedded",
2967
+ }
2968
+ }
2969
+ templateData={
2970
+ Object {
2971
+ "definition": Object {
2972
+ "msgcontent": "RICH_MEDIA_WECHAT",
2973
+ },
2974
+ }
2975
+ }
2976
+ templateType="richMedia"
2977
+ />
2978
+ </SlideBoxContent__CreativesWrapper>
2979
+ `;
2980
+
2981
+ exports[`Test SlideBoxContent container getWechatTemplateType utility function Should return weChatTemplateType when mode is CREATE 1`] = `
2982
+ <SlideBoxContent__CreativesWrapper>
2983
+ <Connect(InjectIntl(Wrapper))
2984
+ mode="createTemplate"
2985
+ query={
2986
+ Object {
2987
+ "isEditFromCampaigns": undefined,
2988
+ "module": "library",
2989
+ "type": "embedded",
2990
+ }
2991
+ }
2992
+ templateData={null}
2993
+ templateType="richMedia"
2994
+ />
2995
+ </SlideBoxContent__CreativesWrapper>
2996
+ `;