cap-creatives-ui 8.0.280 → 8.0.321
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/pr-title-check.yml +88 -0
- package/app/constants/unified.js +21 -1
- package/app/containers/App/constants.js +0 -1
- package/app/containers/Login/test/index.test.js +123 -0
- package/app/containers/Login/test/selectors.test.js +165 -0
- package/app/initialState.js +0 -2
- package/app/services/api.js +6 -0
- package/app/services/tests/api.test.js +7 -0
- package/app/services/tests/getSchema.test.js +95 -0
- package/app/utils/common.js +23 -9
- package/app/utils/commonUtils.js +64 -93
- package/app/utils/tagValidations.js +83 -219
- package/app/utils/templateVarUtils.js +172 -0
- package/app/utils/tests/common.test.js +265 -323
- package/app/utils/tests/commonUtil.test.js +461 -118
- package/app/utils/tests/commonUtils.test.js +581 -0
- package/app/utils/tests/messageUtils.test.js +95 -0
- package/app/utils/tests/smsCharCount.test.js +304 -0
- package/app/utils/tests/smsCharCountV2.test.js +213 -10
- package/app/utils/tests/tagValidations.test.js +474 -357
- package/app/utils/tests/templateVarUtils.test.js +160 -0
- package/app/v2Components/CapDeviceContent/index.js +10 -7
- package/app/v2Components/CapTagList/index.js +32 -24
- package/app/v2Components/CapTagList/style.scss +48 -0
- package/app/v2Components/CapTagListWithInput/__tests__/CapTagListWithInput.test.js +63 -0
- package/app/v2Components/CapTagListWithInput/index.js +8 -0
- package/app/v2Components/CapWhatsappCTA/index.js +2 -0
- package/app/v2Components/CapWhatsappCarouselButton/index.js +32 -14
- package/app/v2Components/CapWhatsappCarouselButton/tests/index.test.js +120 -2
- package/app/v2Components/CommonTestAndPreview/CustomValuesEditor.js +70 -49
- package/app/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +39 -0
- package/app/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +606 -0
- package/app/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.scss +36 -0
- package/app/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +79 -0
- package/app/v2Components/CommonTestAndPreview/DeliverySettings/index.js +314 -0
- package/app/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +141 -0
- package/app/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +156 -0
- package/app/v2Components/CommonTestAndPreview/SendTestMessage.js +57 -1
- package/app/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +20 -1
- package/app/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +133 -4
- package/app/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +210 -4
- package/app/v2Components/CommonTestAndPreview/actions.js +20 -0
- package/app/v2Components/CommonTestAndPreview/constants.js +57 -1
- package/app/v2Components/CommonTestAndPreview/index.js +878 -156
- package/app/v2Components/CommonTestAndPreview/messages.js +41 -3
- package/app/v2Components/CommonTestAndPreview/previewApiUtils.js +59 -0
- package/app/v2Components/CommonTestAndPreview/reducer.js +47 -0
- package/app/v2Components/CommonTestAndPreview/sagas.js +75 -5
- package/app/v2Components/CommonTestAndPreview/selectors.js +51 -0
- package/app/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +352 -0
- package/app/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +1156 -0
- package/app/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +334 -0
- package/app/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +576 -0
- package/app/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +156 -0
- package/app/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +199 -1
- package/app/v2Components/CommonTestAndPreview/tests/actions.test.js +50 -0
- package/app/v2Components/CommonTestAndPreview/tests/constants.test.js +18 -7
- package/app/v2Components/CommonTestAndPreview/tests/index.test.js +914 -5
- package/app/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +67 -0
- package/app/v2Components/CommonTestAndPreview/tests/reducer.test.js +118 -0
- package/app/v2Components/CommonTestAndPreview/tests/sagas.test.js +146 -378
- package/app/v2Components/CommonTestAndPreview/tests/selectors.test.js +146 -0
- package/app/v2Components/ErrorInfoNote/index.js +24 -26
- package/app/v2Components/FormBuilder/index.js +182 -204
- package/app/v2Components/FormBuilder/messages.js +4 -8
- package/app/v2Components/HtmlEditor/HTMLEditor.js +7 -6
- package/app/v2Components/HtmlEditor/__tests__/HTMLEditor.apiErrors.test.js +1 -1
- package/app/v2Components/HtmlEditor/__tests__/HTMLEditor.test.js +928 -17
- package/app/v2Components/HtmlEditor/components/CodeEditorPane/index.js +4 -2
- package/app/v2Components/HtmlEditor/hooks/__tests__/useValidation.test.js +452 -3
- package/app/v2Components/HtmlEditor/hooks/useValidation.js +12 -9
- package/app/v2Components/HtmlEditor/utils/__tests__/htmlValidator.enhanced.test.js +132 -0
- package/app/v2Components/HtmlEditor/utils/htmlValidator.js +4 -2
- package/app/v2Components/SmsFallback/SmsFallbackLocalSelector.js +87 -0
- package/app/v2Components/SmsFallback/constants.js +73 -0
- package/app/v2Components/SmsFallback/index.js +956 -0
- package/app/v2Components/SmsFallback/index.scss +265 -0
- package/app/v2Components/SmsFallback/messages.js +78 -0
- package/app/v2Components/SmsFallback/smsFallbackUtils.js +107 -0
- package/app/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +50 -0
- package/app/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +147 -0
- package/app/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +304 -0
- package/app/v2Components/SmsFallback/tests/smsFallbackUi.test.js +197 -0
- package/app/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +261 -0
- package/app/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +422 -0
- package/app/v2Components/SmsFallback/useLocalTemplateList.js +92 -0
- package/app/v2Components/TestAndPreviewSlidebox/index.js +22 -1
- package/app/v2Components/TestAndPreviewSlidebox/sagas.js +11 -4
- package/app/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +3 -1
- package/app/v2Components/VarSegmentMessageEditor/constants.js +2 -0
- package/app/v2Components/VarSegmentMessageEditor/index.js +125 -0
- package/app/v2Components/VarSegmentMessageEditor/index.scss +46 -0
- package/app/v2Containers/BeeEditor/index.js +3 -0
- package/app/v2Containers/BeePopupEditor/index.js +9 -2
- package/app/v2Containers/Cap/mockData.js +0 -14
- package/app/v2Containers/Cap/reducer.js +3 -55
- package/app/v2Containers/Cap/tests/reducer.test.js +0 -102
- package/app/v2Containers/CommunicationFlow/CommunicationFlow.js +291 -0
- package/app/v2Containers/CommunicationFlow/CommunicationFlow.scss +25 -0
- package/app/v2Containers/CommunicationFlow/Tests/CommunicationFlow.test.js +255 -0
- package/app/v2Containers/CommunicationFlow/constants.js +200 -0
- package/app/v2Containers/CommunicationFlow/index.js +102 -0
- package/app/v2Containers/CommunicationFlow/messages.js +346 -0
- package/app/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/ChannelSelectionStep.js +522 -0
- package/app/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/ChannelSelectionStep.scss +170 -0
- package/app/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/Tests/ChannelSelectionStep.test.js +796 -0
- package/app/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/index.js +5 -0
- package/app/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/CommunicationStrategyStep.js +95 -0
- package/app/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/Tests/CommunicationStrategyStep.test.js +133 -0
- package/app/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/index.js +5 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/DeliverySettingsSection.js +289 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/DeliverySettingsSection.scss +70 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/SenderDetails.js +319 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/SenderDetails.scss +69 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/DeliverySettingsSection.test.js +616 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/SenderDetails.test.js +577 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/Tests/deliverySettingsConfig.test.js +1111 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/deliverySettingsConfig.js +696 -0
- package/app/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/index.js +7 -0
- package/app/v2Containers/CommunicationFlow/steps/DynamicControlsStep/DynamicControlsStep.js +102 -0
- package/app/v2Containers/CommunicationFlow/steps/DynamicControlsStep/DynamicControlsStep.scss +36 -0
- package/app/v2Containers/CommunicationFlow/steps/DynamicControlsStep/Tests/DynamicControlsStep.test.js +91 -0
- package/app/v2Containers/CommunicationFlow/steps/DynamicControlsStep/index.js +5 -0
- package/app/v2Containers/CommunicationFlow/steps/MessageTypeStep/MessageTypeStep.js +86 -0
- package/app/v2Containers/CommunicationFlow/steps/MessageTypeStep/Tests/MessageTypeStep.test.js +100 -0
- package/app/v2Containers/CommunicationFlow/steps/MessageTypeStep/index.js +5 -0
- package/app/v2Containers/CommunicationFlow/utils/getEnabledSteps.js +30 -0
- package/app/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +43 -0
- package/app/v2Containers/CreativesContainer/SlideBoxContent.js +127 -11
- package/app/v2Containers/CreativesContainer/SlideBoxFooter.js +62 -9
- package/app/v2Containers/CreativesContainer/SlideBoxHeader.js +29 -4
- package/app/v2Containers/CreativesContainer/constants.js +24 -0
- package/app/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +67 -0
- package/app/v2Containers/CreativesContainer/index.js +346 -71
- package/app/v2Containers/CreativesContainer/index.scss +51 -1
- package/app/v2Containers/CreativesContainer/messages.js +12 -0
- package/app/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +90 -0
- package/app/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +69 -1
- package/app/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +443 -0
- package/app/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +110 -0
- package/app/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +147 -4
- package/app/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +363 -0
- package/app/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +57 -10
- package/app/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +258 -0
- package/app/v2Containers/CreativesContainer/tests/index.test.js +71 -9
- package/app/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +125 -0
- package/app/v2Containers/Email/index.js +2 -5
- package/app/v2Containers/EmailWrapper/components/EmailHTMLEditor.js +58 -77
- package/app/v2Containers/EmailWrapper/components/EmailWrapperView.js +3 -0
- package/app/v2Containers/EmailWrapper/components/__tests__/EmailHTMLEditor.test.js +158 -89
- package/app/v2Containers/EmailWrapper/components/__tests__/EmailWrapperView.test.js +16 -1
- package/app/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +17 -12
- package/app/v2Containers/EmailWrapper/index.js +4 -0
- package/app/v2Containers/EmailWrapper/tests/useEmailWrapper.edgeCases.test.js +1 -0
- package/app/v2Containers/EmailWrapper/tests/useEmailWrapper.test.js +133 -0
- package/app/v2Containers/FTP/index.js +2 -51
- package/app/v2Containers/FTP/messages.js +0 -4
- package/app/v2Containers/InApp/__tests__/InAppHTMLEditor.test.js +110 -155
- package/app/v2Containers/InApp/index.js +297 -118
- package/app/v2Containers/InApp/tests/index.test.js +17 -6
- package/app/v2Containers/InApp/tests/mockData.js +1 -1
- package/app/v2Containers/InAppWrapper/hooks/__tests__/useInAppWrapper.test.js +19 -0
- package/app/v2Containers/InAppWrapper/hooks/useInAppWrapper.js +3 -0
- package/app/v2Containers/InAppWrapper/index.js +3 -0
- package/app/v2Containers/InappAdvance/index.js +5 -104
- package/app/v2Containers/InappAdvance/tests/index.test.js +2 -0
- package/app/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +24 -3
- package/app/v2Containers/Line/Container/Text/index.js +0 -1
- package/app/v2Containers/MobilePush/Create/index.js +105 -28
- package/app/v2Containers/MobilePush/Create/messages.js +4 -0
- package/app/v2Containers/MobilePush/Edit/index.js +250 -68
- package/app/v2Containers/MobilePush/Edit/messages.js +4 -0
- package/app/v2Containers/MobilePushNew/components/PlatformContentFields.js +36 -12
- package/app/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +68 -27
- package/app/v2Containers/MobilePushNew/index.js +78 -35
- package/app/v2Containers/MobilePushNew/messages.js +8 -0
- package/app/v2Containers/MobilepushWrapper/index.js +11 -1
- package/app/v2Containers/Rcs/constants.js +32 -1
- package/app/v2Containers/Rcs/index.js +963 -916
- package/app/v2Containers/Rcs/index.scss +85 -6
- package/app/v2Containers/Rcs/messages.js +10 -1
- package/app/v2Containers/Rcs/rcsLibraryHydrationUtils.js +205 -0
- package/app/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +41136 -1566
- package/app/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +0 -5
- package/app/v2Containers/Rcs/tests/index.test.js +41 -38
- package/app/v2Containers/Rcs/tests/mockData.js +38 -0
- package/app/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +251 -0
- package/app/v2Containers/Rcs/tests/utils.test.js +379 -1
- package/app/v2Containers/Rcs/utils.js +358 -10
- package/app/v2Containers/Sms/Create/index.js +122 -39
- package/app/v2Containers/Sms/Create/messages.js +4 -0
- package/app/v2Containers/Sms/Edit/index.js +37 -3
- package/app/v2Containers/Sms/commonMethods.js +3 -6
- package/app/v2Containers/Sms/smsFormDataHelpers.js +67 -0
- package/app/v2Containers/Sms/tests/commonMethods.test.js +122 -0
- package/app/v2Containers/Sms/tests/smsFormDataHelpers.test.js +253 -0
- package/app/v2Containers/SmsTrai/Create/index.js +9 -4
- package/app/v2Containers/SmsTrai/Create/index.scss +1 -1
- package/app/v2Containers/SmsTrai/Edit/constants.js +2 -0
- package/app/v2Containers/SmsTrai/Edit/index.js +667 -160
- package/app/v2Containers/SmsTrai/Edit/index.scss +121 -0
- package/app/v2Containers/SmsTrai/Edit/messages.js +9 -4
- package/app/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +4590 -2436
- package/app/v2Containers/SmsWrapper/index.js +41 -8
- package/app/v2Containers/TagList/index.js +63 -2
- package/app/v2Containers/TagList/messages.js +8 -0
- package/app/v2Containers/TagList/tests/TagList.test.js +122 -20
- package/app/v2Containers/TagList/tests/mockdata.js +17 -0
- package/app/v2Containers/Templates/TemplatesActionBar.js +101 -0
- package/app/v2Containers/Templates/_templates.scss +61 -2
- package/app/v2Containers/Templates/actions.js +11 -0
- package/app/v2Containers/Templates/constants.js +2 -0
- package/app/v2Containers/Templates/index.js +90 -40
- package/app/v2Containers/Templates/reducer.js +3 -1
- package/app/v2Containers/Templates/sagas.js +57 -12
- package/app/v2Containers/Templates/tests/TemplatesActionBar.test.js +120 -0
- package/app/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1043 -1079
- package/app/v2Containers/Templates/tests/reducer.test.js +12 -0
- package/app/v2Containers/Templates/tests/sagas.test.js +193 -12
- package/app/v2Containers/Templates/tests/smsTemplatesListApi.test.js +180 -0
- package/app/v2Containers/Templates/utils/smsTemplatesListApi.js +79 -0
- package/app/v2Containers/TemplatesV2/TemplatesV2.style.js +72 -1
- package/app/v2Containers/TemplatesV2/index.js +147 -49
- package/app/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +131 -0
- package/app/v2Containers/Viber/index.js +9 -10
- package/app/v2Containers/Viber/index.scss +1 -1
- package/app/v2Containers/WebPush/Create/components/BrandIconSection.test.js +264 -0
- package/app/v2Containers/WebPush/Create/components/MessageSection.js +78 -19
- package/app/v2Containers/WebPush/Create/components/MessageSection.test.js +82 -0
- package/app/v2Containers/WebPush/Create/components/__snapshots__/BrandIconSection.test.js.snap +187 -0
- package/app/v2Containers/WebPush/Create/components/__snapshots__/MessageSection.test.js.snap +25 -17
- package/app/v2Containers/WebPush/Create/hooks/useAiraTriggerPosition.js +80 -0
- package/app/v2Containers/WebPush/Create/hooks/useAiraTriggerPosition.test.js +210 -0
- package/app/v2Containers/WebPush/Create/hooks/useTagManagement.js +1 -5
- package/app/v2Containers/WebPush/Create/hooks/useTagManagement.test.js +0 -7
- package/app/v2Containers/WebPush/Create/index.js +36 -6
- package/app/v2Containers/WebPush/Create/index.scss +5 -0
- package/app/v2Containers/WebPush/Create/messages.js +8 -1
- package/app/v2Containers/WebPush/Create/preview/tests/NotificationContainer.test.js +269 -0
- package/app/v2Containers/WebPush/Create/utils/validation.js +31 -15
- package/app/v2Containers/WebPush/Create/utils/validation.test.js +72 -24
- package/app/v2Containers/Whatsapp/index.js +28 -53
- package/app/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +26939 -3982
- package/app/v2Containers/Whatsapp/tests/index.test.js +172 -0
- package/app/v2Containers/Zalo/index.js +5 -11
- package/package.json +2 -2
- package/version +9 -0
|
@@ -72,4 +72,114 @@ describe('Test SlideBoxHeader container', () => {
|
|
|
72
72
|
renderFunction("ZALO", "editTemplate", zaloEditTemplateData, true);
|
|
73
73
|
expect(renderedComponent).toMatchSnapshot();
|
|
74
74
|
});
|
|
75
|
+
|
|
76
|
+
it('renders templateNameRenderProp when isFullMode and shouldShowTemplateName are both true', () => {
|
|
77
|
+
const templateNameRenderProp = jest.fn().mockReturnValue(null);
|
|
78
|
+
renderedComponent = shallowWithIntl(
|
|
79
|
+
<SlideBoxHeader
|
|
80
|
+
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' }}
|
|
101
|
+
onCreateComplete={onCreateComplete}
|
|
102
|
+
isFullMode={false}
|
|
103
|
+
shouldShowTemplateName
|
|
104
|
+
templateNameRenderProp={templateNameRenderProp}
|
|
105
|
+
moduleType="journey"
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
expect(templateNameRenderProp).not.toHaveBeenCalled();
|
|
109
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('does not call templateNameRenderProp when shouldShowTemplateName is false (showTemplateNameHeader=false)', () => {
|
|
113
|
+
const templateNameRenderProp = jest.fn().mockReturnValue(null);
|
|
114
|
+
renderedComponent = shallowWithIntl(
|
|
115
|
+
<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' }}
|
|
136
|
+
onCreateComplete={onCreateComplete}
|
|
137
|
+
isFullMode={false}
|
|
138
|
+
moduleType="journey"
|
|
139
|
+
/>
|
|
140
|
+
);
|
|
141
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it('hides edit header for InApp edit with fullMode (shouldShowInAppEditHeader=false, isInAppCreate guard)', () => {
|
|
145
|
+
renderedComponent = shallowWithIntl(
|
|
146
|
+
<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}
|
|
178
|
+
onCreateComplete={onCreateComplete}
|
|
179
|
+
isFullMode={false}
|
|
180
|
+
moduleType="journey"
|
|
181
|
+
/>
|
|
182
|
+
);
|
|
183
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
184
|
+
});
|
|
75
185
|
});
|
package/app/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap
CHANGED
|
@@ -202,6 +202,114 @@ exports[`Test SlideBoxContent container Email component isTestAndPreviewMode IIF
|
|
|
202
202
|
</SlideBoxContent__CreativesWrapper>
|
|
203
203
|
`;
|
|
204
204
|
|
|
205
|
+
exports[`Test SlideBoxContent container InApp vs InAppWrapper rendering conditions renders InApp when isFullMode=false and loyalty module enabled 1`] = `
|
|
206
|
+
<SlideBoxContent__CreativesWrapper>
|
|
207
|
+
<Component
|
|
208
|
+
getDefaultTags=""
|
|
209
|
+
isFullMode={false}
|
|
210
|
+
key="creatives-inapp-create"
|
|
211
|
+
location={
|
|
212
|
+
Object {
|
|
213
|
+
"pathname": "/inapp/create",
|
|
214
|
+
"query": Object {
|
|
215
|
+
"isEditFromCampaigns": undefined,
|
|
216
|
+
"module": "library",
|
|
217
|
+
"type": "embedded",
|
|
218
|
+
},
|
|
219
|
+
"search": "",
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
onCreateComplete={[MockFunction]}
|
|
223
|
+
templateData={
|
|
224
|
+
Object {
|
|
225
|
+
"mode": "create",
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/>
|
|
229
|
+
</SlideBoxContent__CreativesWrapper>
|
|
230
|
+
`;
|
|
231
|
+
|
|
232
|
+
exports[`Test SlideBoxContent container InApp vs InAppWrapper rendering conditions renders InApp when not full mode, not loyalty and new editor disabled 1`] = `
|
|
233
|
+
<SlideBoxContent__CreativesWrapper>
|
|
234
|
+
<Component
|
|
235
|
+
getDefaultTags=""
|
|
236
|
+
isFullMode={false}
|
|
237
|
+
key="creatives-inapp-create"
|
|
238
|
+
location={
|
|
239
|
+
Object {
|
|
240
|
+
"pathname": "/inapp/create",
|
|
241
|
+
"query": Object {
|
|
242
|
+
"isEditFromCampaigns": undefined,
|
|
243
|
+
"module": "library",
|
|
244
|
+
"type": "embedded",
|
|
245
|
+
},
|
|
246
|
+
"search": "",
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
onCreateComplete={[MockFunction]}
|
|
250
|
+
templateData={
|
|
251
|
+
Object {
|
|
252
|
+
"mode": "create",
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/>
|
|
256
|
+
</SlideBoxContent__CreativesWrapper>
|
|
257
|
+
`;
|
|
258
|
+
|
|
259
|
+
exports[`Test SlideBoxContent container InApp vs InAppWrapper rendering conditions renders InAppWrapper when full mode and new editor enabled 1`] = `
|
|
260
|
+
<SlideBoxContent__CreativesWrapper>
|
|
261
|
+
<Component
|
|
262
|
+
getDefaultTags=""
|
|
263
|
+
isFullMode={true}
|
|
264
|
+
key="creatives-inapp-create"
|
|
265
|
+
location={
|
|
266
|
+
Object {
|
|
267
|
+
"pathname": "/inapp/create",
|
|
268
|
+
"query": Object {
|
|
269
|
+
"isEditFromCampaigns": undefined,
|
|
270
|
+
"module": "default",
|
|
271
|
+
"type": false,
|
|
272
|
+
},
|
|
273
|
+
"search": "",
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
onCreateComplete={[MockFunction]}
|
|
277
|
+
templateData={
|
|
278
|
+
Object {
|
|
279
|
+
"mode": "create",
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/>
|
|
283
|
+
</SlideBoxContent__CreativesWrapper>
|
|
284
|
+
`;
|
|
285
|
+
|
|
286
|
+
exports[`Test SlideBoxContent container InApp vs InAppWrapper rendering conditions renders InAppWrapper when isFullMode=true and new editor disabled 1`] = `
|
|
287
|
+
<SlideBoxContent__CreativesWrapper>
|
|
288
|
+
<Component
|
|
289
|
+
getDefaultTags=""
|
|
290
|
+
isFullMode={true}
|
|
291
|
+
key="creatives-inapp-create"
|
|
292
|
+
location={
|
|
293
|
+
Object {
|
|
294
|
+
"pathname": "/inapp/create",
|
|
295
|
+
"query": Object {
|
|
296
|
+
"isEditFromCampaigns": undefined,
|
|
297
|
+
"module": "default",
|
|
298
|
+
"type": false,
|
|
299
|
+
},
|
|
300
|
+
"search": "",
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
onCreateComplete={[MockFunction]}
|
|
304
|
+
templateData={
|
|
305
|
+
Object {
|
|
306
|
+
"mode": "create",
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/>
|
|
310
|
+
</SlideBoxContent__CreativesWrapper>
|
|
311
|
+
`;
|
|
312
|
+
|
|
205
313
|
exports[`Test SlideBoxContent container Should handle isTestAndPreviewMode IIFE implementation correctly 1`] = `
|
|
206
314
|
<SlideBoxContent__CreativesWrapper>
|
|
207
315
|
<ForwardRef
|
|
@@ -751,6 +859,11 @@ exports[`Test SlideBoxContent container Should render correct component for rcs
|
|
|
751
859
|
}
|
|
752
860
|
}
|
|
753
861
|
onCreateComplete={[MockFunction]}
|
|
862
|
+
templateData={
|
|
863
|
+
Object {
|
|
864
|
+
"mode": "create",
|
|
865
|
+
}
|
|
866
|
+
}
|
|
754
867
|
/>
|
|
755
868
|
</SlideBoxContent__CreativesWrapper>
|
|
756
869
|
`;
|
|
@@ -860,6 +973,7 @@ exports[`Test SlideBoxContent container Should render correct component for rcs
|
|
|
860
973
|
<Connect(UserIsAuthenticated(Connect(InjectIntl(withStyles__StyledComponent))))
|
|
861
974
|
FTPMode="create"
|
|
862
975
|
channel="rcs"
|
|
976
|
+
localTemplatesConfig={Object {}}
|
|
863
977
|
loyaltyMetaData={Object {}}
|
|
864
978
|
messageDetails={Object {}}
|
|
865
979
|
onCreateComplete={[MockFunction]}
|
|
@@ -1103,17 +1217,26 @@ exports[`Test SlideBoxContent container Should render correct component for what
|
|
|
1103
1217
|
|
|
1104
1218
|
exports[`Test SlideBoxContent container Should render correct component for whatsapp channel create mode 2`] = `
|
|
1105
1219
|
<SlideBoxContent__CreativesWrapper>
|
|
1106
|
-
<
|
|
1107
|
-
date={0}
|
|
1220
|
+
<Component
|
|
1108
1221
|
getDefaultTags=""
|
|
1109
|
-
key="creatives-inapp-
|
|
1222
|
+
key="creatives-inapp-create"
|
|
1223
|
+
location={
|
|
1224
|
+
Object {
|
|
1225
|
+
"pathname": "/inapp/create",
|
|
1226
|
+
"query": Object {
|
|
1227
|
+
"isEditFromCampaigns": undefined,
|
|
1228
|
+
"module": "library",
|
|
1229
|
+
"type": "embedded",
|
|
1230
|
+
},
|
|
1231
|
+
"search": "",
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1110
1234
|
onCreateComplete={[MockFunction]}
|
|
1111
1235
|
templateData={
|
|
1112
1236
|
Object {
|
|
1113
1237
|
"mode": "create",
|
|
1114
1238
|
}
|
|
1115
1239
|
}
|
|
1116
|
-
type=""
|
|
1117
1240
|
/>
|
|
1118
1241
|
</SlideBoxContent__CreativesWrapper>
|
|
1119
1242
|
`;
|
|
@@ -1259,6 +1382,7 @@ exports[`Test SlideBoxContent container Should render correct component for what
|
|
|
1259
1382
|
<Connect(UserIsAuthenticated(Connect(InjectIntl(withStyles__StyledComponent))))
|
|
1260
1383
|
FTPMode="create"
|
|
1261
1384
|
channel="whatsapp"
|
|
1385
|
+
localTemplatesConfig={Object {}}
|
|
1262
1386
|
loyaltyMetaData={Object {}}
|
|
1263
1387
|
messageDetails={Object {}}
|
|
1264
1388
|
onCreateComplete={[MockFunction]}
|
|
@@ -1281,9 +1405,11 @@ exports[`Test SlideBoxContent container Should render correctly with isTestAndPr
|
|
|
1281
1405
|
<Connect(UserIsAuthenticated(Component))
|
|
1282
1406
|
date={0}
|
|
1283
1407
|
getCmsTemplatesInProgress={false}
|
|
1408
|
+
isAnonymousType={false}
|
|
1284
1409
|
isEditEmail={false}
|
|
1285
1410
|
isTestAndPreviewMode={false}
|
|
1286
1411
|
key="creatives-email-wrapper"
|
|
1412
|
+
restrictPersonalization={false}
|
|
1287
1413
|
templateData={
|
|
1288
1414
|
Object {
|
|
1289
1415
|
"mode": "create",
|
|
@@ -1357,9 +1483,11 @@ exports[`Test SlideBoxContent container Should render correctly with isTestAndPr
|
|
|
1357
1483
|
<Connect(UserIsAuthenticated(Component))
|
|
1358
1484
|
date={0}
|
|
1359
1485
|
getCmsTemplatesInProgress={false}
|
|
1486
|
+
isAnonymousType={false}
|
|
1360
1487
|
isEditEmail={false}
|
|
1361
1488
|
isTestAndPreviewMode={true}
|
|
1362
1489
|
key="creatives-email-wrapper"
|
|
1490
|
+
restrictPersonalization={false}
|
|
1363
1491
|
templateData={
|
|
1364
1492
|
Object {
|
|
1365
1493
|
"mode": "create",
|
|
@@ -1423,6 +1551,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should han
|
|
|
1423
1551
|
<SlideBoxContent__CreativesWrapper>
|
|
1424
1552
|
<_default
|
|
1425
1553
|
getDefaultTags=""
|
|
1554
|
+
isAnonymousType={false}
|
|
1426
1555
|
location={
|
|
1427
1556
|
Object {
|
|
1428
1557
|
"pathname": "/webpush/create",
|
|
@@ -1435,6 +1564,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should han
|
|
|
1435
1564
|
}
|
|
1436
1565
|
}
|
|
1437
1566
|
onCreateComplete={[MockFunction]}
|
|
1567
|
+
restrictPersonalization={false}
|
|
1438
1568
|
supportedTags={
|
|
1439
1569
|
Array [
|
|
1440
1570
|
"tag1",
|
|
@@ -1449,6 +1579,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should han
|
|
|
1449
1579
|
<SlideBoxContent__CreativesWrapper>
|
|
1450
1580
|
<_default
|
|
1451
1581
|
getDefaultTags=""
|
|
1582
|
+
isAnonymousType={false}
|
|
1452
1583
|
location={
|
|
1453
1584
|
Object {
|
|
1454
1585
|
"pathname": "/webpush/edit",
|
|
@@ -1466,6 +1597,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should han
|
|
|
1466
1597
|
"id": "123",
|
|
1467
1598
|
}
|
|
1468
1599
|
}
|
|
1600
|
+
restrictPersonalization={false}
|
|
1469
1601
|
supportedTags={
|
|
1470
1602
|
Array [
|
|
1471
1603
|
"tag1",
|
|
@@ -1500,6 +1632,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should han
|
|
|
1500
1632
|
forwardedTags={Object {}}
|
|
1501
1633
|
getDefaultTags=""
|
|
1502
1634
|
handleClose={[MockFunction]}
|
|
1635
|
+
isAnonymousType={false}
|
|
1503
1636
|
isFullMode={true}
|
|
1504
1637
|
location={
|
|
1505
1638
|
Object {
|
|
@@ -1513,6 +1646,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should han
|
|
|
1513
1646
|
}
|
|
1514
1647
|
}
|
|
1515
1648
|
onCreateComplete={[MockFunction]}
|
|
1649
|
+
restrictPersonalization={false}
|
|
1516
1650
|
selectedOfferDetails={Array []}
|
|
1517
1651
|
supportedTags={
|
|
1518
1652
|
Array [
|
|
@@ -1531,6 +1665,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should han
|
|
|
1531
1665
|
forwardedTags={Object {}}
|
|
1532
1666
|
getDefaultTags=""
|
|
1533
1667
|
handleClose={[MockFunction]}
|
|
1668
|
+
isAnonymousType={false}
|
|
1534
1669
|
isFullMode={true}
|
|
1535
1670
|
location={
|
|
1536
1671
|
Object {
|
|
@@ -1549,6 +1684,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should han
|
|
|
1549
1684
|
"id": "123",
|
|
1550
1685
|
}
|
|
1551
1686
|
}
|
|
1687
|
+
restrictPersonalization={false}
|
|
1552
1688
|
selectedOfferDetails={Array []}
|
|
1553
1689
|
supportedTags={
|
|
1554
1690
|
Array [
|
|
@@ -1579,6 +1715,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should ren
|
|
|
1579
1715
|
<SlideBoxContent__CreativesWrapper>
|
|
1580
1716
|
<_default
|
|
1581
1717
|
getDefaultTags=""
|
|
1718
|
+
isAnonymousType={false}
|
|
1582
1719
|
location={
|
|
1583
1720
|
Object {
|
|
1584
1721
|
"pathname": "/webpush/create",
|
|
@@ -1591,6 +1728,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should ren
|
|
|
1591
1728
|
}
|
|
1592
1729
|
}
|
|
1593
1730
|
onCreateComplete={[MockFunction]}
|
|
1731
|
+
restrictPersonalization={false}
|
|
1594
1732
|
supportedTags={Array []}
|
|
1595
1733
|
/>
|
|
1596
1734
|
</SlideBoxContent__CreativesWrapper>
|
|
@@ -1600,6 +1738,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should ren
|
|
|
1600
1738
|
<SlideBoxContent__CreativesWrapper>
|
|
1601
1739
|
<_default
|
|
1602
1740
|
getDefaultTags=""
|
|
1741
|
+
isAnonymousType={false}
|
|
1603
1742
|
location={
|
|
1604
1743
|
Object {
|
|
1605
1744
|
"pathname": "/webpush/edit",
|
|
@@ -1617,6 +1756,7 @@ exports[`Test SlideBoxContent container WebPush channel functionality Should ren
|
|
|
1617
1756
|
"id": "123",
|
|
1618
1757
|
}
|
|
1619
1758
|
}
|
|
1759
|
+
restrictPersonalization={false}
|
|
1620
1760
|
supportedTags={Array []}
|
|
1621
1761
|
templateData={
|
|
1622
1762
|
Object {
|
|
@@ -3211,6 +3351,7 @@ exports[`Test SlideBoxContent container getViber utility function Should handle
|
|
|
3211
3351
|
<SlideBoxContent__CreativesWrapper>
|
|
3212
3352
|
<SmsWrapper
|
|
3213
3353
|
getDefaultTags=""
|
|
3354
|
+
isAnonymousType={false}
|
|
3214
3355
|
isComponent={true}
|
|
3215
3356
|
isCreateSms={true}
|
|
3216
3357
|
location={
|
|
@@ -3225,11 +3366,13 @@ exports[`Test SlideBoxContent container getViber utility function Should handle
|
|
|
3225
3366
|
}
|
|
3226
3367
|
}
|
|
3227
3368
|
onCreateComplete={[MockFunction]}
|
|
3369
|
+
restrictPersonalization={false}
|
|
3228
3370
|
route={
|
|
3229
3371
|
Object {
|
|
3230
3372
|
"name": "sms",
|
|
3231
3373
|
}
|
|
3232
3374
|
}
|
|
3375
|
+
templateData={null}
|
|
3233
3376
|
/>
|
|
3234
3377
|
</SlideBoxContent__CreativesWrapper>
|
|
3235
3378
|
`;
|