@capillarytech/creatives-library 8.0.257 → 8.0.259

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.
Files changed (155) hide show
  1. package/constants/unified.js +1 -0
  2. package/package.json +1 -1
  3. package/services/api.js +5 -0
  4. package/translations/en.json +4 -3
  5. package/utils/common.js +6 -0
  6. package/utils/imageUrlUpload.js +141 -0
  7. package/utils/tests/transformerUtils.test.js +297 -0
  8. package/utils/transformerUtils.js +40 -0
  9. package/v2Components/CapImageUpload/constants.js +2 -0
  10. package/v2Components/CapImageUpload/index.js +65 -16
  11. package/v2Components/CapImageUpload/index.scss +4 -1
  12. package/v2Components/CapImageUpload/messages.js +5 -1
  13. package/v2Components/CapImageUrlUpload/constants.js +26 -0
  14. package/v2Components/CapImageUrlUpload/index.js +365 -0
  15. package/v2Components/CapImageUrlUpload/index.scss +35 -0
  16. package/v2Components/CapImageUrlUpload/messages.js +47 -0
  17. package/v2Components/HtmlEditor/hooks/__tests__/useValidation.test.js +17 -16
  18. package/v2Containers/App/constants.js +5 -0
  19. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +4 -3
  20. package/v2Containers/CreativesContainer/SlideBoxContent.js +56 -2
  21. package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -0
  22. package/v2Containers/CreativesContainer/constants.js +3 -0
  23. package/v2Containers/CreativesContainer/index.js +168 -0
  24. package/v2Containers/CreativesContainer/messages.js +4 -0
  25. package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +210 -0
  26. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +304 -0
  27. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +36 -12
  28. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +8 -6
  29. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +100 -75
  30. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +72 -54
  31. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +250 -178
  32. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +16 -12
  33. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +48 -36
  34. package/v2Containers/Templates/ChannelTypeIllustration.js +13 -1
  35. package/v2Containers/Templates/_templates.scss +205 -0
  36. package/v2Containers/Templates/actions.js +2 -1
  37. package/v2Containers/Templates/constants.js +1 -0
  38. package/v2Containers/Templates/index.js +274 -34
  39. package/v2Containers/Templates/messages.js +24 -0
  40. package/v2Containers/Templates/reducer.js +2 -0
  41. package/v2Containers/Templates/tests/index.test.js +10 -0
  42. package/v2Containers/TemplatesV2/index.js +15 -7
  43. package/v2Containers/TemplatesV2/messages.js +4 -0
  44. package/v2Containers/WebPush/Create/components/BrandIconSection.js +108 -0
  45. package/v2Containers/WebPush/Create/components/ButtonForm.js +172 -0
  46. package/v2Containers/WebPush/Create/components/ButtonItem.js +101 -0
  47. package/v2Containers/WebPush/Create/components/ButtonList.js +145 -0
  48. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.js +164 -0
  49. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.test.js +463 -0
  50. package/v2Containers/WebPush/Create/components/FormActions.js +54 -0
  51. package/v2Containers/WebPush/Create/components/FormActions.test.js +163 -0
  52. package/v2Containers/WebPush/Create/components/MediaSection.js +142 -0
  53. package/v2Containers/WebPush/Create/components/MediaSection.test.js +341 -0
  54. package/v2Containers/WebPush/Create/components/MessageSection.js +103 -0
  55. package/v2Containers/WebPush/Create/components/MessageSection.test.js +268 -0
  56. package/v2Containers/WebPush/Create/components/NotificationTitleSection.js +87 -0
  57. package/v2Containers/WebPush/Create/components/NotificationTitleSection.test.js +210 -0
  58. package/v2Containers/WebPush/Create/components/TemplateNameSection.js +54 -0
  59. package/v2Containers/WebPush/Create/components/TemplateNameSection.test.js +143 -0
  60. package/v2Containers/WebPush/Create/components/__snapshots__/ButtonsLinksSection.test.js.snap +86 -0
  61. package/v2Containers/WebPush/Create/components/__snapshots__/FormActions.test.js.snap +16 -0
  62. package/v2Containers/WebPush/Create/components/__snapshots__/MediaSection.test.js.snap +41 -0
  63. package/v2Containers/WebPush/Create/components/__snapshots__/MessageSection.test.js.snap +54 -0
  64. package/v2Containers/WebPush/Create/components/__snapshots__/NotificationTitleSection.test.js.snap +37 -0
  65. package/v2Containers/WebPush/Create/components/__snapshots__/TemplateNameSection.test.js.snap +21 -0
  66. package/v2Containers/WebPush/Create/components/_buttons.scss +246 -0
  67. package/v2Containers/WebPush/Create/components/tests/ButtonForm.test.js +554 -0
  68. package/v2Containers/WebPush/Create/components/tests/ButtonItem.test.js +607 -0
  69. package/v2Containers/WebPush/Create/components/tests/ButtonList.test.js +633 -0
  70. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonForm.test.js.snap +666 -0
  71. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonItem.test.js.snap +74 -0
  72. package/v2Containers/WebPush/Create/components/tests/__snapshots__/ButtonList.test.js.snap +78 -0
  73. package/v2Containers/WebPush/Create/hooks/useButtonManagement.js +138 -0
  74. package/v2Containers/WebPush/Create/hooks/useButtonManagement.test.js +406 -0
  75. package/v2Containers/WebPush/Create/hooks/useCharacterCount.js +30 -0
  76. package/v2Containers/WebPush/Create/hooks/useCharacterCount.test.js +151 -0
  77. package/v2Containers/WebPush/Create/hooks/useImageUpload.js +104 -0
  78. package/v2Containers/WebPush/Create/hooks/useImageUpload.test.js +538 -0
  79. package/v2Containers/WebPush/Create/hooks/useTagManagement.js +122 -0
  80. package/v2Containers/WebPush/Create/hooks/useTagManagement.test.js +633 -0
  81. package/v2Containers/WebPush/Create/index.js +1148 -0
  82. package/v2Containers/WebPush/Create/index.scss +134 -0
  83. package/v2Containers/WebPush/Create/messages.js +203 -0
  84. package/v2Containers/WebPush/Create/preview/DevicePreviewContent.js +228 -0
  85. package/v2Containers/WebPush/Create/preview/NotificationContainer.js +294 -0
  86. package/v2Containers/WebPush/Create/preview/PreviewContent.js +90 -0
  87. package/v2Containers/WebPush/Create/preview/PreviewControls.js +305 -0
  88. package/v2Containers/WebPush/Create/preview/PreviewDisclaimer.js +23 -0
  89. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +155 -0
  90. package/v2Containers/WebPush/Create/preview/assets/Light.svg +53 -0
  91. package/v2Containers/WebPush/Create/preview/assets/Top.svg +5 -0
  92. package/v2Containers/WebPush/Create/preview/assets/android-arrow-down.svg +9 -0
  93. package/v2Containers/WebPush/Create/preview/assets/android-arrow-up.svg +9 -0
  94. package/v2Containers/WebPush/Create/preview/assets/chrome-icon.png +0 -0
  95. package/v2Containers/WebPush/Create/preview/assets/edge-icon.png +0 -0
  96. package/v2Containers/WebPush/Create/preview/assets/firefox-icon.svg +106 -0
  97. package/v2Containers/WebPush/Create/preview/assets/iOS.svg +26 -0
  98. package/v2Containers/WebPush/Create/preview/assets/macos-arrow-down-icon.svg +9 -0
  99. package/v2Containers/WebPush/Create/preview/assets/macos-triple-dot-icon.svg +9 -0
  100. package/v2Containers/WebPush/Create/preview/assets/opera-icon.svg +18 -0
  101. package/v2Containers/WebPush/Create/preview/assets/safari-icon.svg +29 -0
  102. package/v2Containers/WebPush/Create/preview/assets/windows-close-icon.svg +9 -0
  103. package/v2Containers/WebPush/Create/preview/assets/windows-triple-dot-icon.svg +9 -0
  104. package/v2Containers/WebPush/Create/preview/components/AndroidMobileChromeHeader.js +47 -0
  105. package/v2Containers/WebPush/Create/preview/components/AndroidMobileExpanded.js +141 -0
  106. package/v2Containers/WebPush/Create/preview/components/IOSHeader.js +45 -0
  107. package/v2Containers/WebPush/Create/preview/components/NotificationExpandedContent.js +68 -0
  108. package/v2Containers/WebPush/Create/preview/components/NotificationHeader.js +61 -0
  109. package/v2Containers/WebPush/Create/preview/components/WindowsChromeExpanded.js +99 -0
  110. package/v2Containers/WebPush/Create/preview/components/tests/AndroidMobileExpanded.test.js +733 -0
  111. package/v2Containers/WebPush/Create/preview/components/tests/WindowsChromeExpanded.test.js +571 -0
  112. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/AndroidMobileExpanded.test.js.snap +81 -0
  113. package/v2Containers/WebPush/Create/preview/components/tests/__snapshots__/WindowsChromeExpanded.test.js.snap +81 -0
  114. package/v2Containers/WebPush/Create/preview/config/notificationMappings.js +50 -0
  115. package/v2Containers/WebPush/Create/preview/constants.js +637 -0
  116. package/v2Containers/WebPush/Create/preview/notification-container.scss +79 -0
  117. package/v2Containers/WebPush/Create/preview/preview.scss +351 -0
  118. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-chrome.scss +370 -0
  119. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-edge.scss +12 -0
  120. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-firefox.scss +12 -0
  121. package/v2Containers/WebPush/Create/preview/styles/_android-mobile-opera.scss +12 -0
  122. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-chrome.scss +47 -0
  123. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-edge.scss +11 -0
  124. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-firefox.scss +11 -0
  125. package/v2Containers/WebPush/Create/preview/styles/_android-tablet-opera.scss +11 -0
  126. package/v2Containers/WebPush/Create/preview/styles/_base.scss +207 -0
  127. package/v2Containers/WebPush/Create/preview/styles/_ios.scss +153 -0
  128. package/v2Containers/WebPush/Create/preview/styles/_ipados.scss +107 -0
  129. package/v2Containers/WebPush/Create/preview/styles/_macos-chrome.scss +101 -0
  130. package/v2Containers/WebPush/Create/preview/styles/_windows-chrome.scss +229 -0
  131. package/v2Containers/WebPush/Create/preview/tests/DevicePreviewContent.test.js +909 -0
  132. package/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +1081 -0
  133. package/v2Containers/WebPush/Create/preview/tests/PreviewControls.test.js +723 -0
  134. package/v2Containers/WebPush/Create/preview/tests/WebPushPreview.test.js +1327 -0
  135. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/DevicePreviewContent.test.js.snap +131 -0
  136. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/NotificationContainer.test.js.snap +112 -0
  137. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/PreviewControls.test.js.snap +144 -0
  138. package/v2Containers/WebPush/Create/preview/tests/__snapshots__/WebPushPreview.test.js.snap +129 -0
  139. package/v2Containers/WebPush/Create/utils/payloadBuilder.js +96 -0
  140. package/v2Containers/WebPush/Create/utils/payloadBuilder.test.js +396 -0
  141. package/v2Containers/WebPush/Create/utils/previewUtils.js +89 -0
  142. package/v2Containers/WebPush/Create/utils/urlValidation.js +115 -0
  143. package/v2Containers/WebPush/Create/utils/urlValidation.test.js +449 -0
  144. package/v2Containers/WebPush/Create/utils/validation.js +75 -0
  145. package/v2Containers/WebPush/Create/utils/validation.test.js +283 -0
  146. package/v2Containers/WebPush/actions.js +60 -0
  147. package/v2Containers/WebPush/constants.js +132 -0
  148. package/v2Containers/WebPush/index.js +2 -0
  149. package/v2Containers/WebPush/reducer.js +104 -0
  150. package/v2Containers/WebPush/sagas.js +119 -0
  151. package/v2Containers/WebPush/selectors.js +65 -0
  152. package/v2Containers/WebPush/tests/reducer.test.js +863 -0
  153. package/v2Containers/WebPush/tests/sagas.test.js +566 -0
  154. package/v2Containers/WebPush/tests/selectors.test.js +960 -0
  155. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +1272 -734
@@ -24,6 +24,24 @@ jest.mock('../../../v2Components/FormBuilder', () => ({
24
24
  ),
25
25
  }));
26
26
 
27
+ jest.mock('../../WebPush/Create/preview/DevicePreviewContent', () => ({
28
+ __esModule: true,
29
+ default: (props) => (
30
+ <div className="DevicePreviewContent-mock" {...props}>
31
+ DevicePreviewContent
32
+ </div>
33
+ ),
34
+ }));
35
+
36
+ jest.mock('../../WebPush', () => ({
37
+ __esModule: true,
38
+ default: (props) => (
39
+ <div className="WebPush-mock" {...props}>
40
+ WebPush
41
+ </div>
42
+ ),
43
+ }));
44
+
27
45
  describe('Test SlideBoxContent container', () => {
28
46
  const onCreateComplete = jest.fn();
29
47
  let renderedComponent;
@@ -700,4 +718,196 @@ describe('Test SlideBoxContent container', () => {
700
718
  expect(renderedComponent).toMatchSnapshot();
701
719
  });
702
720
  });
721
+
722
+ describe('WebPush channel functionality', () => {
723
+ it('Should render correct component for webpush channel create mode', () => {
724
+ renderFunction('WEBPUSH', 'createTemplate', { mode: 'create' });
725
+ expect(renderedComponent).toMatchSnapshot();
726
+ });
727
+
728
+ it('Should render correct component for webpush channel edit mode', () => {
729
+ const webpushEditTemplateData = {
730
+ type: 'WEBPUSH',
731
+ _id: '123',
732
+ versions: {
733
+ base: {
734
+ content: {
735
+ webpush: {
736
+ title: 'Test Title',
737
+ message: 'Test Message',
738
+ }
739
+ }
740
+ }
741
+ }
742
+ };
743
+ renderFunction('WEBPUSH', 'editTemplate', webpushEditTemplateData);
744
+ expect(renderedComponent).toMatchSnapshot();
745
+ });
746
+
747
+ it('Should render correct component for webpush channel preview mode with all fields', () => {
748
+ const webpushPreviewTemplateData = {
749
+ type: 'WEBPUSH',
750
+ versions: {
751
+ base: {
752
+ content: {
753
+ webpush: {
754
+ title: 'Test Notification Title',
755
+ message: 'Test notification body text',
756
+ image: 'https://example.com/image.jpg',
757
+ brandIcon: 'https://example.com/brand-icon.png',
758
+ onClickAction: {
759
+ url: 'https://example.com'
760
+ }
761
+ }
762
+ }
763
+ }
764
+ }
765
+ };
766
+ renderFunction('WEBPUSH', 'preview', webpushPreviewTemplateData);
767
+ expect(renderedComponent).toMatchSnapshot();
768
+ });
769
+
770
+ it('Should render correct component for webpush channel preview mode with minimal fields', () => {
771
+ const webpushPreviewTemplateData = {
772
+ type: 'WEBPUSH',
773
+ versions: {
774
+ base: {
775
+ content: {
776
+ webpush: {
777
+ title: 'Test Title',
778
+ message: 'Test Message'
779
+ }
780
+ }
781
+ }
782
+ }
783
+ };
784
+ renderFunction('WEBPUSH', 'preview', webpushPreviewTemplateData);
785
+ expect(renderedComponent).toMatchSnapshot();
786
+ });
787
+
788
+ it('Should render correct component for webpush channel preview mode with empty fields', () => {
789
+ const webpushPreviewTemplateData = {
790
+ type: 'WEBPUSH',
791
+ versions: {
792
+ base: {
793
+ content: {
794
+ webpush: {}
795
+ }
796
+ }
797
+ }
798
+ };
799
+ renderFunction('WEBPUSH', 'preview', webpushPreviewTemplateData);
800
+ expect(renderedComponent).toMatchSnapshot();
801
+ });
802
+
803
+ it('Should render correct component for webpush channel preview mode with missing onClickAction url', () => {
804
+ const webpushPreviewTemplateData = {
805
+ type: 'WEBPUSH',
806
+ versions: {
807
+ base: {
808
+ content: {
809
+ webpush: {
810
+ title: 'Test Title',
811
+ message: 'Test Message',
812
+ onClickAction: {}
813
+ }
814
+ }
815
+ }
816
+ }
817
+ };
818
+ renderFunction('WEBPUSH', 'preview', webpushPreviewTemplateData);
819
+ expect(renderedComponent).toMatchSnapshot();
820
+ });
821
+
822
+ it('Should render correct component for webpush channel preview mode with null onClickAction', () => {
823
+ const webpushPreviewTemplateData = {
824
+ type: 'WEBPUSH',
825
+ versions: {
826
+ base: {
827
+ content: {
828
+ webpush: {
829
+ title: 'Test Title',
830
+ message: 'Test Message',
831
+ onClickAction: null
832
+ }
833
+ }
834
+ }
835
+ }
836
+ };
837
+ renderFunction('WEBPUSH', 'preview', webpushPreviewTemplateData);
838
+ expect(renderedComponent).toMatchSnapshot();
839
+ });
840
+
841
+ it('Should handle supportedTags prop in webpush create mode', () => {
842
+ renderFunction('WEBPUSH', 'createTemplate', { mode: 'create' }, {
843
+ supportedTags: ['tag1', 'tag2']
844
+ });
845
+ expect(renderedComponent).toMatchSnapshot();
846
+ });
847
+
848
+ it('Should handle supportedTags prop in webpush edit mode', () => {
849
+ const webpushEditTemplateData = {
850
+ type: 'WEBPUSH',
851
+ _id: '123',
852
+ versions: {
853
+ base: {
854
+ content: {
855
+ webpush: {
856
+ title: 'Test Title',
857
+ message: 'Test Message',
858
+ }
859
+ }
860
+ }
861
+ }
862
+ };
863
+ renderFunction('WEBPUSH', 'editTemplate', webpushEditTemplateData, {
864
+ supportedTags: ['tag1', 'tag2']
865
+ });
866
+ expect(renderedComponent).toMatchSnapshot();
867
+ });
868
+
869
+ it('Should handle webpush create mode with all props', () => {
870
+ renderFunction('WEBPUSH', 'createTemplate', { mode: 'create' }, {
871
+ isFullMode: true,
872
+ handleClose: jest.fn(),
873
+ onCreateComplete: jest.fn(),
874
+ creativesMode: 'test',
875
+ getDefaultTags: 'outbound',
876
+ forwardedTags: {},
877
+ supportedTags: ['tag1'],
878
+ selectedOfferDetails: [],
879
+ eventContextTags: {}
880
+ });
881
+ expect(renderedComponent).toMatchSnapshot();
882
+ });
883
+
884
+ it('Should handle webpush edit mode with all props', () => {
885
+ const webpushEditTemplateData = {
886
+ type: 'WEBPUSH',
887
+ _id: '123',
888
+ versions: {
889
+ base: {
890
+ content: {
891
+ webpush: {
892
+ title: 'Test Title',
893
+ message: 'Test Message',
894
+ }
895
+ }
896
+ }
897
+ }
898
+ };
899
+ renderFunction('WEBPUSH', 'editTemplate', webpushEditTemplateData, {
900
+ isFullMode: true,
901
+ handleClose: jest.fn(),
902
+ onCreateComplete: jest.fn(),
903
+ creativesMode: 'test',
904
+ getDefaultTags: 'outbound',
905
+ forwardedTags: {},
906
+ supportedTags: ['tag1'],
907
+ selectedOfferDetails: [],
908
+ eventContextTags: {}
909
+ });
910
+ expect(renderedComponent).toMatchSnapshot();
911
+ });
912
+ });
703
913
  });
@@ -1413,6 +1413,310 @@ exports[`Test SlideBoxContent container Should render correctly with isTestAndPr
1413
1413
  </SlideBoxContent__CreativesWrapper>
1414
1414
  `;
1415
1415
 
1416
+ exports[`Test SlideBoxContent container WebPush channel functionality Should handle supportedTags prop in webpush create mode 1`] = `
1417
+ <SlideBoxContent__CreativesWrapper>
1418
+ <_default
1419
+ getDefaultTags=""
1420
+ location={
1421
+ Object {
1422
+ "pathname": "/webpush/create",
1423
+ "query": Object {
1424
+ "isEditFromCampaigns": undefined,
1425
+ "module": "library",
1426
+ "type": "embedded",
1427
+ },
1428
+ "search": "",
1429
+ }
1430
+ }
1431
+ onCreateComplete={[MockFunction]}
1432
+ supportedTags={
1433
+ Array [
1434
+ "tag1",
1435
+ "tag2",
1436
+ ]
1437
+ }
1438
+ />
1439
+ </SlideBoxContent__CreativesWrapper>
1440
+ `;
1441
+
1442
+ exports[`Test SlideBoxContent container WebPush channel functionality Should handle supportedTags prop in webpush edit mode 1`] = `
1443
+ <SlideBoxContent__CreativesWrapper>
1444
+ <_default
1445
+ getDefaultTags=""
1446
+ location={
1447
+ Object {
1448
+ "pathname": "/webpush/edit",
1449
+ "query": Object {
1450
+ "isEditFromCampaigns": undefined,
1451
+ "module": "library",
1452
+ "type": "embedded",
1453
+ },
1454
+ "search": "",
1455
+ }
1456
+ }
1457
+ onCreateComplete={[MockFunction]}
1458
+ params={
1459
+ Object {
1460
+ "id": "123",
1461
+ }
1462
+ }
1463
+ supportedTags={
1464
+ Array [
1465
+ "tag1",
1466
+ "tag2",
1467
+ ]
1468
+ }
1469
+ templateData={
1470
+ Object {
1471
+ "_id": "123",
1472
+ "type": "WEBPUSH",
1473
+ "versions": Object {
1474
+ "base": Object {
1475
+ "content": Object {
1476
+ "webpush": Object {
1477
+ "message": "Test Message",
1478
+ "title": "Test Title",
1479
+ },
1480
+ },
1481
+ },
1482
+ },
1483
+ }
1484
+ }
1485
+ />
1486
+ </SlideBoxContent__CreativesWrapper>
1487
+ `;
1488
+
1489
+ exports[`Test SlideBoxContent container WebPush channel functionality Should handle webpush create mode with all props 1`] = `
1490
+ <SlideBoxContent__CreativesWrapper>
1491
+ <_default
1492
+ creativesMode="test"
1493
+ eventContextTags={Object {}}
1494
+ forwardedTags={Object {}}
1495
+ getDefaultTags=""
1496
+ handleClose={[MockFunction]}
1497
+ isFullMode={true}
1498
+ location={
1499
+ Object {
1500
+ "pathname": "/webpush/create",
1501
+ "query": Object {
1502
+ "isEditFromCampaigns": undefined,
1503
+ "module": "default",
1504
+ "type": false,
1505
+ },
1506
+ "search": "",
1507
+ }
1508
+ }
1509
+ onCreateComplete={[MockFunction]}
1510
+ selectedOfferDetails={Array []}
1511
+ supportedTags={
1512
+ Array [
1513
+ "tag1",
1514
+ ]
1515
+ }
1516
+ />
1517
+ </SlideBoxContent__CreativesWrapper>
1518
+ `;
1519
+
1520
+ exports[`Test SlideBoxContent container WebPush channel functionality Should handle webpush edit mode with all props 1`] = `
1521
+ <SlideBoxContent__CreativesWrapper>
1522
+ <_default
1523
+ creativesMode="test"
1524
+ eventContextTags={Object {}}
1525
+ forwardedTags={Object {}}
1526
+ getDefaultTags=""
1527
+ handleClose={[MockFunction]}
1528
+ isFullMode={true}
1529
+ location={
1530
+ Object {
1531
+ "pathname": "/webpush/edit",
1532
+ "query": Object {
1533
+ "isEditFromCampaigns": undefined,
1534
+ "module": "default",
1535
+ "type": false,
1536
+ },
1537
+ "search": "",
1538
+ }
1539
+ }
1540
+ onCreateComplete={[MockFunction]}
1541
+ params={
1542
+ Object {
1543
+ "id": "123",
1544
+ }
1545
+ }
1546
+ selectedOfferDetails={Array []}
1547
+ supportedTags={
1548
+ Array [
1549
+ "tag1",
1550
+ ]
1551
+ }
1552
+ templateData={
1553
+ Object {
1554
+ "_id": "123",
1555
+ "type": "WEBPUSH",
1556
+ "versions": Object {
1557
+ "base": Object {
1558
+ "content": Object {
1559
+ "webpush": Object {
1560
+ "message": "Test Message",
1561
+ "title": "Test Title",
1562
+ },
1563
+ },
1564
+ },
1565
+ },
1566
+ }
1567
+ }
1568
+ />
1569
+ </SlideBoxContent__CreativesWrapper>
1570
+ `;
1571
+
1572
+ exports[`Test SlideBoxContent container WebPush channel functionality Should render correct component for webpush channel create mode 1`] = `
1573
+ <SlideBoxContent__CreativesWrapper>
1574
+ <_default
1575
+ getDefaultTags=""
1576
+ location={
1577
+ Object {
1578
+ "pathname": "/webpush/create",
1579
+ "query": Object {
1580
+ "isEditFromCampaigns": undefined,
1581
+ "module": "library",
1582
+ "type": "embedded",
1583
+ },
1584
+ "search": "",
1585
+ }
1586
+ }
1587
+ onCreateComplete={[MockFunction]}
1588
+ supportedTags={Array []}
1589
+ />
1590
+ </SlideBoxContent__CreativesWrapper>
1591
+ `;
1592
+
1593
+ exports[`Test SlideBoxContent container WebPush channel functionality Should render correct component for webpush channel edit mode 1`] = `
1594
+ <SlideBoxContent__CreativesWrapper>
1595
+ <_default
1596
+ getDefaultTags=""
1597
+ location={
1598
+ Object {
1599
+ "pathname": "/webpush/edit",
1600
+ "query": Object {
1601
+ "isEditFromCampaigns": undefined,
1602
+ "module": "library",
1603
+ "type": "embedded",
1604
+ },
1605
+ "search": "",
1606
+ }
1607
+ }
1608
+ onCreateComplete={[MockFunction]}
1609
+ params={
1610
+ Object {
1611
+ "id": "123",
1612
+ }
1613
+ }
1614
+ supportedTags={Array []}
1615
+ templateData={
1616
+ Object {
1617
+ "_id": "123",
1618
+ "type": "WEBPUSH",
1619
+ "versions": Object {
1620
+ "base": Object {
1621
+ "content": Object {
1622
+ "webpush": Object {
1623
+ "message": "Test Message",
1624
+ "title": "Test Title",
1625
+ },
1626
+ },
1627
+ },
1628
+ },
1629
+ }
1630
+ }
1631
+ />
1632
+ </SlideBoxContent__CreativesWrapper>
1633
+ `;
1634
+
1635
+ exports[`Test SlideBoxContent container WebPush channel functionality Should render correct component for webpush channel preview mode with all fields 1`] = `
1636
+ <SlideBoxContent__CreativesWrapper>
1637
+ <div
1638
+ className="webpush-preview-container"
1639
+ >
1640
+ <_default
1641
+ brandIconSrc="https://example.com/brand-icon.png"
1642
+ imageSrc="https://example.com/image.jpg"
1643
+ layoutMode="compact"
1644
+ notificationBody="Test notification body text"
1645
+ notificationTitle="Test Notification Title"
1646
+ url="https://example.com"
1647
+ />
1648
+ </div>
1649
+ </SlideBoxContent__CreativesWrapper>
1650
+ `;
1651
+
1652
+ exports[`Test SlideBoxContent container WebPush channel functionality Should render correct component for webpush channel preview mode with empty fields 1`] = `
1653
+ <SlideBoxContent__CreativesWrapper>
1654
+ <div
1655
+ className="webpush-preview-container"
1656
+ >
1657
+ <_default
1658
+ brandIconSrc=""
1659
+ imageSrc=""
1660
+ layoutMode="compact"
1661
+ notificationBody=""
1662
+ notificationTitle=""
1663
+ url=""
1664
+ />
1665
+ </div>
1666
+ </SlideBoxContent__CreativesWrapper>
1667
+ `;
1668
+
1669
+ exports[`Test SlideBoxContent container WebPush channel functionality Should render correct component for webpush channel preview mode with minimal fields 1`] = `
1670
+ <SlideBoxContent__CreativesWrapper>
1671
+ <div
1672
+ className="webpush-preview-container"
1673
+ >
1674
+ <_default
1675
+ brandIconSrc=""
1676
+ imageSrc=""
1677
+ layoutMode="compact"
1678
+ notificationBody="Test Message"
1679
+ notificationTitle="Test Title"
1680
+ url=""
1681
+ />
1682
+ </div>
1683
+ </SlideBoxContent__CreativesWrapper>
1684
+ `;
1685
+
1686
+ exports[`Test SlideBoxContent container WebPush channel functionality Should render correct component for webpush channel preview mode with missing onClickAction url 1`] = `
1687
+ <SlideBoxContent__CreativesWrapper>
1688
+ <div
1689
+ className="webpush-preview-container"
1690
+ >
1691
+ <_default
1692
+ brandIconSrc=""
1693
+ imageSrc=""
1694
+ layoutMode="compact"
1695
+ notificationBody="Test Message"
1696
+ notificationTitle="Test Title"
1697
+ url=""
1698
+ />
1699
+ </div>
1700
+ </SlideBoxContent__CreativesWrapper>
1701
+ `;
1702
+
1703
+ exports[`Test SlideBoxContent container WebPush channel functionality Should render correct component for webpush channel preview mode with null onClickAction 1`] = `
1704
+ <SlideBoxContent__CreativesWrapper>
1705
+ <div
1706
+ className="webpush-preview-container"
1707
+ >
1708
+ <_default
1709
+ brandIconSrc=""
1710
+ imageSrc=""
1711
+ layoutMode="compact"
1712
+ notificationBody="Test Message"
1713
+ notificationTitle="Test Title"
1714
+ url=""
1715
+ />
1716
+ </div>
1717
+ </SlideBoxContent__CreativesWrapper>
1718
+ `;
1719
+
1416
1720
  exports[`Test SlideBoxContent container getChannelPreviewContent utility function Should handle FACEBOOK channel preview content 1`] = `
1417
1721
  <SlideBoxContent__CreativesWrapper>
1418
1722
  <InjectIntl(TemplatePreview)