@capillarytech/creatives-library 9.0.15-alpha.1 → 9.0.16

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 (132) hide show
  1. package/constants/unified.js +0 -29
  2. package/global-styles.js +1 -1
  3. package/package.json +1 -1
  4. package/services/tests/api.test.js +20 -35
  5. package/utils/commonUtils.js +1 -19
  6. package/v2Components/CapActionButton/constants.js +0 -7
  7. package/v2Components/CapActionButton/index.js +109 -168
  8. package/v2Components/CapActionButton/index.scss +5 -156
  9. package/v2Components/CapActionButton/messages.js +3 -19
  10. package/v2Components/CapActionButton/tests/index.test.js +18 -42
  11. package/v2Components/CapImageUpload/index.js +2 -2
  12. package/v2Components/CapTagList/index.js +0 -10
  13. package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +48 -70
  14. package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +2 -8
  15. package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +21 -214
  16. package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +0 -16
  17. package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +9 -83
  18. package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +0 -30
  19. package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +11 -60
  20. package/v2Components/CommonTestAndPreview/SendTestMessage.js +5 -10
  21. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +23 -201
  22. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +76 -355
  23. package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +8 -155
  24. package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +0 -11
  25. package/v2Components/CommonTestAndPreview/constants.js +2 -38
  26. package/v2Components/CommonTestAndPreview/index.js +222 -761
  27. package/v2Components/CommonTestAndPreview/messages.js +3 -45
  28. package/v2Components/CommonTestAndPreview/sagas.js +6 -25
  29. package/v2Components/CommonTestAndPreview/tests/CommonTestAndPreview.addTestCustomer.test.js +0 -1
  30. package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +267 -284
  31. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +65 -231
  32. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +5 -118
  33. package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +0 -341
  34. package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +1 -8
  35. package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +13 -34
  36. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +283 -281
  37. package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +1 -199
  38. package/v2Components/CommonTestAndPreview/tests/index.test.js +4 -133
  39. package/v2Components/CommonTestAndPreview/tests/sagas.test.js +24 -31
  40. package/v2Components/TemplatePreview/_templatePreview.scss +22 -41
  41. package/v2Components/TemplatePreview/index.js +31 -143
  42. package/v2Components/TemplatePreview/tests/index.test.js +0 -142
  43. package/v2Components/TestAndPreviewSlidebox/CustomValuesEditor.js +6 -6
  44. package/v2Components/TestAndPreviewSlidebox/index.js +1 -13
  45. package/v2Components/TestAndPreviewSlidebox/sagas.js +4 -11
  46. package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +1 -3
  47. package/v2Containers/CommunicationFlow/Tests/CommunicationFlow.test.js +1 -4
  48. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/DeliverySettingsSection.test.js +0 -4
  49. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/SenderDetails.test.js +20 -20
  50. package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -36
  51. package/v2Containers/CreativesContainer/SlideBoxFooter.js +5 -14
  52. package/v2Containers/CreativesContainer/SlideBoxHeader.js +5 -36
  53. package/v2Containers/CreativesContainer/constants.js +0 -11
  54. package/v2Containers/CreativesContainer/index.js +104 -323
  55. package/v2Containers/CreativesContainer/index.scss +1 -83
  56. package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +34 -79
  57. package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +16 -79
  58. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -8
  59. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +90 -333
  60. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +15 -20
  61. package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
  62. package/v2Containers/Email/index.js +5 -2
  63. package/v2Containers/MobilePush/Create/test/saga.test.js +2 -2
  64. package/v2Containers/Rcs/constants.js +11 -131
  65. package/v2Containers/Rcs/index.js +810 -2605
  66. package/v2Containers/Rcs/index.scss +8 -289
  67. package/v2Containers/Rcs/messages.js +3 -34
  68. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +38537 -73535
  69. package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +8 -0
  70. package/v2Containers/Rcs/tests/index.test.js +36 -147
  71. package/v2Containers/Rcs/tests/mockData.js +0 -38
  72. package/v2Containers/Rcs/tests/utils.test.js +30 -646
  73. package/v2Containers/Rcs/utils.js +11 -478
  74. package/v2Containers/Sms/Create/index.js +48 -115
  75. package/v2Containers/SmsTrai/Create/index.js +4 -9
  76. package/v2Containers/SmsTrai/Edit/constants.js +0 -2
  77. package/v2Containers/SmsTrai/Edit/index.js +169 -678
  78. package/v2Containers/SmsTrai/Edit/messages.js +4 -14
  79. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +2854 -5455
  80. package/v2Containers/SmsWrapper/index.js +8 -37
  81. package/v2Containers/TagList/index.js +0 -6
  82. package/v2Containers/Templates/_templates.scss +12 -171
  83. package/v2Containers/Templates/actions.js +0 -11
  84. package/v2Containers/Templates/constants.js +0 -2
  85. package/v2Containers/Templates/index.js +55 -125
  86. package/v2Containers/Templates/sagas.js +13 -57
  87. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1015 -1060
  88. package/v2Containers/Templates/tests/sagas.test.js +16 -199
  89. package/v2Containers/TemplatesV2/TemplatesV2.style.js +1 -72
  90. package/v2Containers/TemplatesV2/index.js +23 -86
  91. package/v2Containers/WeChat/MapTemplates/test/saga.test.js +9 -9
  92. package/v2Containers/Whatsapp/index.js +20 -3
  93. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34 -578
  94. package/utils/rcsPayloadUtils.js +0 -92
  95. package/utils/templateVarUtils.js +0 -201
  96. package/utils/tests/rcsPayloadUtils.test.js +0 -226
  97. package/utils/tests/templateVarUtils.test.js +0 -204
  98. package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
  99. package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +0 -67
  100. package/v2Components/CommonTestAndPreview/utils.js +0 -84
  101. package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +0 -91
  102. package/v2Components/SmsFallback/constants.js +0 -94
  103. package/v2Components/SmsFallback/index.js +0 -958
  104. package/v2Components/SmsFallback/index.scss +0 -266
  105. package/v2Components/SmsFallback/messages.js +0 -78
  106. package/v2Components/SmsFallback/smsFallbackUtils.js +0 -120
  107. package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +0 -50
  108. package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +0 -147
  109. package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +0 -304
  110. package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +0 -208
  111. package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +0 -309
  112. package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +0 -422
  113. package/v2Components/SmsFallback/useLocalTemplateList.js +0 -92
  114. package/v2Components/TemplatePreview/constants.js +0 -2
  115. package/v2Components/VarSegmentMessageEditor/constants.js +0 -2
  116. package/v2Components/VarSegmentMessageEditor/index.js +0 -125
  117. package/v2Components/VarSegmentMessageEditor/index.scss +0 -46
  118. package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +0 -17
  119. package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +0 -79
  120. package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +0 -90
  121. package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +0 -258
  122. package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +0 -125
  123. package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +0 -227
  124. package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +0 -318
  125. package/v2Containers/Sms/smsFormDataHelpers.js +0 -67
  126. package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +0 -253
  127. package/v2Containers/SmsTrai/Edit/index.scss +0 -126
  128. package/v2Containers/Templates/TemplatesActionBar.js +0 -101
  129. package/v2Containers/Templates/tests/TemplatesActionBar.test.js +0 -120
  130. package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +0 -180
  131. package/v2Containers/Templates/utils/smsTemplatesListApi.js +0 -79
  132. package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +0 -131
@@ -2,74 +2,6 @@
2
2
 
3
3
  $classPrefix: add-creatives-section;
4
4
 
5
- /* Local SMS template picker: fill slidebox height; global .v2-pagination-container uses 100vh-20rem and leaves a dead zone inside slideboxes */
6
- .#{$classPrefix}.creatives-slidebox--local-sms-templates {
7
- .cap-slide-box-v2-container {
8
- display: flex;
9
- flex-direction: column;
10
- min-height: 0;
11
- max-height: 100vh;
12
- }
13
-
14
- .slidebox-content-container {
15
- flex: 1;
16
- min-height: 0;
17
- display: flex;
18
- flex-direction: column;
19
- overflow: hidden;
20
- }
21
-
22
- .slidebox-content-container > div {
23
- flex: 1;
24
- min-height: 0;
25
- display: flex;
26
- flex-direction: column;
27
- overflow: hidden;
28
- }
29
-
30
- /* TemplatesV2 root: fill slidebox so the template grid can flex instead of using 100vh-based pagination height */
31
- .slidebox-content-container .creatives-templates-container--local-sms.library-mode {
32
- flex: 1;
33
- min-height: 0;
34
- display: flex;
35
- flex-direction: column;
36
- overflow: hidden;
37
- height: auto;
38
- max-height: 100%;
39
- }
40
- }
41
-
42
- /*
43
- * Liquid-error spacing must stay inside the content column. margin-bottom on
44
- * .slidebox-content-container added to the in-flow height past 100vh, so the outer
45
- * .cap-slide-box-v2-container gained a second scrollbar. Dynamic margin/padding values
46
- * are passed via CSS custom properties from CreativesSlideBoxWrapper.js.
47
- */
48
- .creatives-slide-box-wrapper {
49
- .cap-slide-box-v2-container {
50
- .slidebox-header {
51
- margin-bottom: var(--slidebox-wrapper-margin, 0);
52
- &.has-footer {
53
- overflow-x: hidden;
54
- }
55
- }
56
- .slidebox-content-container {
57
- margin-bottom: 0;
58
- padding-bottom: var(--slidebox-wrapper-margin, 0);
59
- box-sizing: border-box;
60
- &.has-footer {
61
- overflow-x: hidden;
62
- }
63
- }
64
- .slidebox-footer {
65
- margin-bottom: var(--slidebox-footer-margin, 0);
66
- &.has-footer {
67
- overflow-x: hidden;
68
- }
69
- }
70
- }
71
- }
72
-
73
5
  .#{$classPrefix} {
74
6
  &.creatives-library-mode{
75
7
  .sms-create-container, .sms-email-container{
@@ -148,19 +80,5 @@ $classPrefix: add-creatives-section;
148
80
  }
149
81
 
150
82
  .template-footer-width {
151
- width: 100%;
152
- }
153
-
154
- .slidebox-footer-actions {
155
- display: flex;
156
- flex-wrap: nowrap;
157
- align-items: center;
158
- gap: 0.75rem;
159
- min-width: 0;
160
-
161
- .ant-btn,
162
- button {
163
- flex-shrink: 0;
164
- }
83
+ width: 100%;;
165
84
  }
166
-
@@ -531,107 +531,62 @@ describe('shouldCheckValidation (line 79)', () => {
531
531
  });
532
532
  });
533
533
 
534
- describe('SlideBoxFooter — isHtmlEditorValidationStateActive via issueCounts', () => {
534
+ describe('SlideBoxFooter — continue and preview states', () => {
535
535
  beforeEach(() => {
536
536
  jest.clearAllMocks();
537
- });
538
-
539
- it('activates via issueCounts.total > 0 even when validationComplete=false and hasErrors=false', () => {
540
537
  const { hasSupportCKEditor } = require('../../../utils/common');
541
538
  hasSupportCKEditor.mockReturnValue(false);
539
+ });
542
540
 
541
+ it('renders the Continue button when shouldShowContinueFooter returns true', () => {
543
542
  renderComponent({
544
543
  ...baseFooterProps,
545
- currentChannel: 'EMAIL',
546
- slidBoxContent: 'editTemplate',
547
- htmlEditorValidationState: {
548
- validationComplete: false,
549
- hasErrors: false,
550
- errorsAcknowledged: false,
551
- isContentEmpty: false,
552
- issueCounts: { html: 1, label: 0, liquid: 0, total: 1 },
553
- },
544
+ shouldShowDoneFooter: jest.fn().mockReturnValue(false),
545
+ shouldShowContinueFooter: jest.fn().mockReturnValue(true),
546
+ isContinueButtonDisabled: false,
547
+ // null lets the component fall back to messages.continue (has a valid id)
548
+ // The defaultProp {} has no id, which causes FormattedMessage to throw
549
+ continueButtonLabel: null,
554
550
  });
555
- // isHtmlEditorValidationStateActive = true (via issueCounts.total > 0)
556
- // isHTMLEditorModeInEdit = true, shouldCheckValidation = true
557
- // hasValidationErrors = false, shouldDisableButtons = false (no hasErrors)
558
- const updateBtn = screen.getByRole('button', { name: /update/i });
559
- expect(updateBtn).toBeEnabled();
551
+ const continueBtn = screen.getByRole('button', { name: /continue/i });
552
+ expect(continueBtn).toBeTruthy();
553
+ expect(continueBtn).toBeEnabled();
560
554
  });
561
555
 
562
- it('issueCounts.total=0 with validationComplete=false not activated (BEE edit mode)', () => {
563
- const { hasSupportCKEditor } = require('../../../utils/common');
564
- hasSupportCKEditor.mockReturnValue(false);
565
-
556
+ it('disables the Continue button when isContinueButtonDisabled is true', () => {
566
557
  renderComponent({
567
558
  ...baseFooterProps,
568
- currentChannel: 'EMAIL',
569
- slidBoxContent: 'editTemplate',
570
- htmlEditorValidationState: {
571
- validationComplete: false,
572
- hasErrors: false,
573
- errorsAcknowledged: false,
574
- isContentEmpty: false,
575
- issueCounts: { html: 0, label: 0, liquid: 0, total: 0 },
576
- },
559
+ shouldShowDoneFooter: jest.fn().mockReturnValue(false),
560
+ shouldShowContinueFooter: jest.fn().mockReturnValue(true),
561
+ isContinueButtonDisabled: true,
562
+ continueButtonLabel: null,
577
563
  });
578
- // isHtmlEditorValidationStateActive = false isHTMLEditorModeInEdit = false
579
- // isBEEEditor = true (isEditMode && !isHtmlEditorValidationStateActive)
580
- // shouldCheckValidation = false → button enabled
581
- const updateBtn = screen.getByRole('button', { name: /update/i });
582
- expect(updateBtn).toBeEnabled();
564
+ const continueBtn = screen.getByRole('button', { name: /continue/i });
565
+ expect(continueBtn).toBeDisabled();
583
566
  });
584
- });
585
-
586
- describe('SlideBoxFooter — isBEEEditor detection in create mode via emailCreateMode=editor', () => {
587
- beforeEach(() => {
588
- jest.clearAllMocks();
589
- });
590
-
591
- it('detects BEE editor when emailCreateMode=editor and selectedEmailCreateMode is not html_editor (create mode)', () => {
592
- const { hasSupportCKEditor } = require('../../../utils/common');
593
- hasSupportCKEditor.mockReturnValue(false);
594
567
 
568
+ it('renders the Edit button when slidBoxContent is preview', () => {
595
569
  renderComponent({
596
570
  ...baseFooterProps,
597
- currentChannel: 'EMAIL',
598
- slidBoxContent: 'createTemplate',
599
- emailCreateMode: 'editor',
600
- selectedEmailCreateMode: 'drag_drop',
601
- htmlEditorValidationState: {
602
- validationComplete: false,
603
- hasErrors: false,
604
- isContentEmpty: false,
605
- issueCounts: { html: 0, label: 0, liquid: 0, total: 0 },
606
- },
571
+ slidBoxContent: 'preview',
572
+ shouldShowDoneFooter: jest.fn().mockReturnValue(false),
573
+ shouldShowContinueFooter: jest.fn().mockReturnValue(false),
574
+ onEditTemplate: jest.fn(),
607
575
  });
608
- // selectedEmailCreateMode=drag_drop isBEEEditor = true (DRAG_DROP branch)
609
- // shouldCheckValidation = false → button not disabled by validation
610
- const createBtn = screen.getByRole('button', { name: /create/i });
611
- expect(createBtn).toBeInTheDocument();
576
+ const editBtn = screen.getByRole('button', { name: /edit/i });
577
+ expect(editBtn).toBeTruthy();
612
578
  });
613
579
 
614
- it('enables primary action button when emailCreateMode=editor but mode is not HTML editor (BEE editor path)', () => {
615
- const { hasSupportCKEditor } = require('../../../utils/common');
616
- hasSupportCKEditor.mockReturnValue(false);
617
-
580
+ it('calls onEditTemplate when the Edit button is clicked in preview mode', () => {
581
+ const onEditTemplate = jest.fn();
618
582
  renderComponent({
619
583
  ...baseFooterProps,
620
- currentChannel: 'EMAIL',
621
- slidBoxContent: 'createTemplate',
622
- emailCreateMode: 'editor',
623
- selectedEmailCreateMode: undefined,
624
- htmlEditorValidationState: {
625
- validationComplete: false,
626
- hasErrors: false,
627
- isContentEmpty: false,
628
- issueCounts: { html: 0, label: 0, liquid: 0, total: 0 },
629
- },
584
+ slidBoxContent: 'preview',
585
+ shouldShowDoneFooter: jest.fn().mockReturnValue(false),
586
+ shouldShowContinueFooter: jest.fn().mockReturnValue(false),
587
+ onEditTemplate,
630
588
  });
631
- // isHTMLEditorModeInCreate = false (selectedEmailCreateMode is undefined, not html_editor)
632
- // emailCreateMode === 'editor' && !isHTMLEditorMode → isBEEEditor = true
633
- const createBtn = screen.getByRole('button', { name: /create/i });
634
- expect(createBtn).toBeInTheDocument();
635
- expect(createBtn).not.toBeDisabled();
589
+ screen.getByRole('button', { name: /edit/i }).click();
590
+ expect(onEditTemplate).toHaveBeenCalled();
636
591
  });
637
592
  });
@@ -73,111 +73,48 @@ describe('Test SlideBoxHeader container', () => {
73
73
  expect(renderedComponent).toMatchSnapshot();
74
74
  });
75
75
 
76
- it('renders templateNameRenderProp when isFullMode and shouldShowTemplateName are both true', () => {
77
- const templateNameRenderProp = jest.fn().mockReturnValue(null);
76
+ it('Should render correct component for inapp channel edit mode (non-fullmode)', () => {
78
77
  renderedComponent = shallowWithIntl(
79
78
  <SlideBoxHeader
80
79
  slidBoxContent="editTemplate"
81
- channel="SMS"
82
- templateData={{ name: 'My Template' }}
83
- onCreateComplete={onCreateComplete}
84
- isFullMode
85
- shouldShowTemplateName
86
- templateNameRenderProp={templateNameRenderProp}
87
- moduleType="journey"
88
- />
89
- );
90
- expect(templateNameRenderProp).toHaveBeenCalled();
91
- expect(renderedComponent).toMatchSnapshot();
92
- });
93
-
94
- it('does not call templateNameRenderProp when isFullMode is false (showTemplateNameHeader=false)', () => {
95
- const templateNameRenderProp = jest.fn().mockReturnValue(null);
96
- renderedComponent = shallowWithIntl(
97
- <SlideBoxHeader
98
- slidBoxContent="editTemplate"
99
- channel="SMS"
100
- templateData={{ name: 'My Template' }}
80
+ channel="INAPP"
81
+ templateData={{ name: 'InApp Template' }}
101
82
  onCreateComplete={onCreateComplete}
102
83
  isFullMode={false}
103
- shouldShowTemplateName
104
- templateNameRenderProp={templateNameRenderProp}
105
84
  moduleType="journey"
106
85
  />
107
86
  );
108
- expect(templateNameRenderProp).not.toHaveBeenCalled();
109
87
  expect(renderedComponent).toMatchSnapshot();
110
88
  });
111
89
 
112
- it('does not call templateNameRenderProp when shouldShowTemplateName is false (showTemplateNameHeader=false)', () => {
113
- const templateNameRenderProp = jest.fn().mockReturnValue(null);
90
+ it('Should render correct component for inapp channel create mode', () => {
114
91
  renderedComponent = shallowWithIntl(
115
92
  <SlideBoxHeader
116
- slidBoxContent="editTemplate"
117
- channel="SMS"
118
- templateData={{ name: 'My Template' }}
119
- onCreateComplete={onCreateComplete}
120
- isFullMode
121
- shouldShowTemplateName={false}
122
- templateNameRenderProp={templateNameRenderProp}
123
- moduleType="journey"
124
- />
125
- );
126
- expect(templateNameRenderProp).not.toHaveBeenCalled();
127
- expect(renderedComponent).toMatchSnapshot();
128
- });
129
-
130
- it('shows edit header for InApp edit without fullMode (shouldShowInAppEditHeader=true)', () => {
131
- renderedComponent = shallowWithIntl(
132
- <SlideBoxHeader
133
- slidBoxContent="editTemplate"
134
- channel="inapp"
135
- templateData={{ name: 'InApp Tpl' }}
93
+ slidBoxContent="createTemplate"
94
+ channel="INAPP"
95
+ templateData={{}}
136
96
  onCreateComplete={onCreateComplete}
137
97
  isFullMode={false}
138
98
  moduleType="journey"
99
+ templateStep="modeSelection"
139
100
  />
140
101
  );
141
102
  expect(renderedComponent).toMatchSnapshot();
142
103
  });
143
104
 
144
- it('hides edit header for InApp edit with fullMode (shouldShowInAppEditHeader=false, isInAppCreate guard)', () => {
105
+ it('Should render wechat map template create steps (mapTemplateCreate path)', () => {
145
106
  renderedComponent = shallowWithIntl(
146
107
  <SlideBoxHeader
147
- slidBoxContent="editTemplate"
148
- channel="inapp"
149
- templateData={{ name: 'InApp Tpl' }}
150
- onCreateComplete={onCreateComplete}
151
- isFullMode
152
- moduleType="journey"
153
- />
154
- );
155
- expect(renderedComponent).toMatchSnapshot();
156
- });
157
-
158
- it('renders whatsappOverview=true header when WHATSAPP edit in fullMode', () => {
159
- renderedComponent = shallowWithIntl(
160
- <SlideBoxHeader
161
- slidBoxContent="editTemplate"
162
- channel="WHATSAPP"
163
- templateData={whatsappEditTemplateData}
164
- onCreateComplete={onCreateComplete}
165
- isFullMode
166
- moduleType="journey"
167
- />
168
- );
169
- expect(renderedComponent).toMatchSnapshot();
170
- });
171
-
172
- it('renders whatsappOverview=false header when WHATSAPP edit without fullMode', () => {
173
- renderedComponent = shallowWithIntl(
174
- <SlideBoxHeader
175
- slidBoxContent="editTemplate"
176
- channel="WHATSAPP"
177
- templateData={whatsappEditTemplateData}
108
+ slidBoxContent="createTemplate"
109
+ channel="WECHAT"
110
+ templateData={{}}
178
111
  onCreateComplete={onCreateComplete}
179
112
  isFullMode={false}
180
113
  moduleType="journey"
114
+ weChatTemplateType="mapTemplate"
115
+ templateStep="createTemplateContent"
116
+ onWeChatMaptemplateStepChange={jest.fn()}
117
+ weChatMaptemplateStep={0}
181
118
  />
182
119
  );
183
120
  expect(renderedComponent).toMatchSnapshot();
@@ -870,11 +870,6 @@ exports[`Test SlideBoxContent container Should render correct component for rcs
870
870
  }
871
871
  }
872
872
  onCreateComplete={[MockFunction]}
873
- templateData={
874
- Object {
875
- "mode": "create",
876
- }
877
- }
878
873
  waitEventContextTags={Object {}}
879
874
  />
880
875
  </SlideBoxContent__CreativesWrapper>
@@ -986,7 +981,6 @@ exports[`Test SlideBoxContent container Should render correct component for rcs
986
981
  <Connect(UserIsAuthenticated(Component))
987
982
  FTPMode="create"
988
983
  channel="rcs"
989
- localTemplatesConfig={Object {}}
990
984
  loyaltyMetaData={Object {}}
991
985
  messageDetails={Object {}}
992
986
  onCreateComplete={[MockFunction]}
@@ -1399,7 +1393,6 @@ exports[`Test SlideBoxContent container Should render correct component for what
1399
1393
  <Connect(UserIsAuthenticated(Component))
1400
1394
  FTPMode="create"
1401
1395
  channel="whatsapp"
1402
- localTemplatesConfig={Object {}}
1403
1396
  loyaltyMetaData={Object {}}
1404
1397
  messageDetails={Object {}}
1405
1398
  onCreateComplete={[MockFunction]}
@@ -3416,7 +3409,6 @@ exports[`Test SlideBoxContent container getViber utility function Should handle
3416
3409
  "name": "sms",
3417
3410
  }
3418
3411
  }
3419
- templateData={null}
3420
3412
  waitEventContextTags={Object {}}
3421
3413
  />
3422
3414
  </SlideBoxContent__CreativesWrapper>