@capillarytech/creatives-library 8.0.345-alpha.12 → 8.0.345-alpha.14
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/constants/unified.js +0 -29
- package/package.json +1 -1
- package/services/tests/api.test.js +0 -13
- package/utils/commonUtils.js +1 -19
- package/v2Components/CapActionButton/constants.js +0 -7
- package/v2Components/CapActionButton/index.js +109 -167
- package/v2Components/CapActionButton/index.scss +6 -157
- package/v2Components/CapActionButton/messages.js +3 -19
- package/v2Components/CapActionButton/tests/index.test.js +17 -41
- package/v2Components/CapTagList/index.js +0 -10
- package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +49 -70
- package/v2Components/CommonTestAndPreview/DeliverySettings/DeliverySettings.scss +2 -8
- package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +21 -207
- package/v2Components/CommonTestAndPreview/DeliverySettings/constants.js +0 -16
- package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +10 -85
- package/v2Components/CommonTestAndPreview/DeliverySettings/messages.js +0 -30
- package/v2Components/CommonTestAndPreview/DeliverySettings/utils/parseSenderDetailsResponse.js +11 -79
- package/v2Components/CommonTestAndPreview/SendTestMessage.js +5 -10
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +15 -160
- package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +76 -341
- package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +4 -133
- package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +0 -11
- package/v2Components/CommonTestAndPreview/constants.js +2 -38
- package/v2Components/CommonTestAndPreview/index.js +186 -676
- package/v2Components/CommonTestAndPreview/messages.js +3 -49
- package/v2Components/CommonTestAndPreview/sagas.js +6 -15
- package/v2Components/CommonTestAndPreview/tests/CustomValuesEditor.test.js +284 -308
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/ModifyDeliverySettings.test.js +65 -231
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/index.test.js +5 -118
- package/v2Components/CommonTestAndPreview/tests/DeliverySettings/utils/parseSenderDetailsResponse.test.js +0 -341
- package/v2Components/CommonTestAndPreview/tests/PreviewSection.test.js +1 -8
- package/v2Components/CommonTestAndPreview/tests/SendTestMessage.test.js +13 -34
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/RcsPreviewContent.test.js +283 -281
- package/v2Components/CommonTestAndPreview/tests/UnifiedPreview/index.test.js +1 -199
- package/v2Components/CommonTestAndPreview/tests/index.test.js +4 -132
- package/v2Components/CommonTestAndPreview/tests/sagas.test.js +2 -2
- package/v2Components/FormBuilder/index.js +10 -8
- package/v2Components/TemplatePreview/_templatePreview.scss +23 -33
- package/v2Components/TemplatePreview/index.js +28 -143
- package/v2Components/TemplatePreview/tests/index.test.js +0 -142
- package/v2Components/TestAndPreviewSlidebox/index.js +1 -13
- package/v2Components/TestAndPreviewSlidebox/sagas.js +4 -11
- package/v2Components/TestAndPreviewSlidebox/tests/saga.test.js +1 -3
- package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -36
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +1 -10
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +4 -29
- package/v2Containers/CreativesContainer/constants.js +0 -9
- package/v2Containers/CreativesContainer/index.js +103 -300
- package/v2Containers/CreativesContainer/index.scss +1 -51
- package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +34 -78
- package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +16 -79
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +0 -8
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +98 -357
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +15 -20
- package/v2Containers/CreativesContainer/tests/index.test.js +9 -71
- package/v2Containers/Email/reducer.js +11 -3
- package/v2Containers/Email/sagas.js +9 -5
- package/v2Containers/Email/tests/__snapshots__/reducer.test.js.snap +4 -0
- package/v2Containers/Email/tests/sagas.test.js +21 -3
- package/v2Containers/Rcs/constants.js +8 -119
- package/v2Containers/Rcs/index.js +812 -2375
- package/v2Containers/Rcs/index.scss +6 -276
- package/v2Containers/Rcs/messages.js +3 -38
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +70345 -98302
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap +5 -0
- package/v2Containers/Rcs/tests/index.test.js +121 -152
- package/v2Containers/Rcs/tests/mockData.js +0 -38
- package/v2Containers/Rcs/tests/utils.test.js +30 -646
- package/v2Containers/Rcs/utils.js +11 -478
- package/v2Containers/Sms/Create/index.js +40 -100
- package/v2Containers/SmsTrai/Create/index.js +4 -9
- package/v2Containers/SmsTrai/Edit/constants.js +0 -2
- package/v2Containers/SmsTrai/Edit/index.js +130 -636
- package/v2Containers/SmsTrai/Edit/messages.js +4 -14
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +2296 -4249
- package/v2Containers/SmsWrapper/index.js +8 -37
- package/v2Containers/TagList/index.js +0 -6
- package/v2Containers/Templates/_templates.scss +2 -163
- package/v2Containers/Templates/actions.js +0 -11
- package/v2Containers/Templates/constants.js +0 -2
- package/v2Containers/Templates/index.js +54 -119
- package/v2Containers/Templates/sagas.js +12 -57
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +1079 -1043
- package/v2Containers/Templates/tests/sagas.test.js +123 -193
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +1 -72
- package/v2Containers/TemplatesV2/index.js +23 -86
- package/v2Containers/Whatsapp/index.js +20 -3
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34 -578
- package/utils/rcsPayloadUtils.js +0 -92
- package/utils/templateVarUtils.js +0 -201
- package/utils/tests/templateVarUtils.test.js +0 -204
- package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js.rej +0 -18
- package/v2Components/CommonTestAndPreview/previewApiUtils.js +0 -59
- package/v2Components/CommonTestAndPreview/tests/previewApiUtils.test.js +0 -67
- package/v2Components/SmsFallback/SmsFallbackLocalSelector.js +0 -87
- package/v2Components/SmsFallback/constants.js +0 -73
- package/v2Components/SmsFallback/index.js +0 -955
- package/v2Components/SmsFallback/index.scss +0 -265
- package/v2Components/SmsFallback/messages.js +0 -78
- package/v2Components/SmsFallback/smsFallbackUtils.js +0 -118
- package/v2Components/SmsFallback/tests/SmsFallbackLocalSelector.test.js +0 -50
- package/v2Components/SmsFallback/tests/rcsSmsFallback.acceptance.test.js +0 -147
- package/v2Components/SmsFallback/tests/smsFallbackHandlers.test.js +0 -304
- package/v2Components/SmsFallback/tests/smsFallbackUi.test.js +0 -197
- package/v2Components/SmsFallback/tests/smsFallbackUtils.test.js +0 -277
- package/v2Components/SmsFallback/tests/useLocalTemplateList.test.js +0 -422
- package/v2Components/SmsFallback/useLocalTemplateList.js +0 -92
- package/v2Components/TemplatePreview/constants.js +0 -2
- package/v2Components/VarSegmentMessageEditor/constants.js +0 -2
- package/v2Components/VarSegmentMessageEditor/index.js +0 -125
- package/v2Components/VarSegmentMessageEditor/index.scss +0 -46
- package/v2Containers/CreativesContainer/CreativesSlideBoxWrapper.js +0 -43
- package/v2Containers/CreativesContainer/embeddedSlideboxUtils.js +0 -67
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.localTemplates.test.js +0 -90
- package/v2Containers/CreativesContainer/tests/embeddedSlideboxUtils.test.js +0 -258
- package/v2Containers/CreativesContainer/tests/useLocalTemplatesProp.test.js +0 -125
- package/v2Containers/Rcs/index.js.rej +0 -1336
- package/v2Containers/Rcs/index.scss.rej +0 -74
- package/v2Containers/Rcs/rcsLibraryHydrationUtils.js +0 -225
- package/v2Containers/Rcs/tests/__snapshots__/utils.test.js.snap.rej +0 -128
- package/v2Containers/Rcs/tests/rcsLibraryHydrationUtils.test.js +0 -318
- package/v2Containers/Sms/smsFormDataHelpers.js +0 -67
- package/v2Containers/Sms/tests/smsFormDataHelpers.test.js +0 -253
- package/v2Containers/SmsTrai/Edit/index.scss +0 -121
- package/v2Containers/Templates/TemplatesActionBar.js +0 -101
- package/v2Containers/Templates/tests/TemplatesActionBar.test.js +0 -120
- package/v2Containers/Templates/tests/smsTemplatesListApi.test.js +0 -180
- package/v2Containers/Templates/utils/smsTemplatesListApi.js +0 -79
- package/v2Containers/TemplatesV2/tests/TemplatesV2.localTemplates.test.js +0 -131
|
@@ -2,43 +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
5
|
.#{$classPrefix} {
|
|
43
6
|
&.creatives-library-mode{
|
|
44
7
|
.sms-create-container, .sms-email-container{
|
|
@@ -117,18 +80,5 @@ $classPrefix: add-creatives-section;
|
|
|
117
80
|
}
|
|
118
81
|
|
|
119
82
|
.template-footer-width {
|
|
120
|
-
width: 100
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.slidebox-footer-actions {
|
|
124
|
-
display: flex;
|
|
125
|
-
flex-wrap: nowrap;
|
|
126
|
-
align-items: center;
|
|
127
|
-
gap: 0.75rem;
|
|
128
|
-
min-width: 0;
|
|
129
|
-
|
|
130
|
-
.ant-btn,
|
|
131
|
-
button {
|
|
132
|
-
flex-shrink: 0;
|
|
133
|
-
}
|
|
83
|
+
width: 100%;;
|
|
134
84
|
}
|
|
@@ -531,106 +531,62 @@ describe('shouldCheckValidation (line 79)', () => {
|
|
|
531
531
|
});
|
|
532
532
|
});
|
|
533
533
|
|
|
534
|
-
describe('SlideBoxFooter —
|
|
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
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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
|
-
|
|
556
|
-
|
|
557
|
-
|
|
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('
|
|
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
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
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
|
-
|
|
579
|
-
|
|
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
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
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
|
-
|
|
609
|
-
|
|
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('
|
|
615
|
-
const
|
|
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
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
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
|
-
|
|
632
|
-
|
|
633
|
-
const createBtn = screen.getByRole('button', { name: /create/i });
|
|
634
|
-
expect(createBtn).toBeInTheDocument();
|
|
589
|
+
screen.getByRole('button', { name: /edit/i }).click();
|
|
590
|
+
expect(onEditTemplate).toHaveBeenCalled();
|
|
635
591
|
});
|
|
636
592
|
});
|
|
@@ -73,111 +73,48 @@ describe('Test SlideBoxHeader container', () => {
|
|
|
73
73
|
expect(renderedComponent).toMatchSnapshot();
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
it('
|
|
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="
|
|
82
|
-
templateData={{ name: '
|
|
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('
|
|
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="
|
|
117
|
-
channel="
|
|
118
|
-
templateData={{
|
|
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('
|
|
105
|
+
it('Should render wechat map template create steps (mapTemplateCreate path)', () => {
|
|
145
106
|
renderedComponent = shallowWithIntl(
|
|
146
107
|
<SlideBoxHeader
|
|
147
|
-
slidBoxContent="
|
|
148
|
-
channel="
|
|
149
|
-
templateData={{
|
|
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(Connect(InjectIntl(withStyles__StyledComponent))))
|
|
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(Connect(InjectIntl(withStyles__StyledComponent))))
|
|
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>
|