@capillarytech/creatives-library 7.12.44 → 7.12.46
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/config/app.js +0 -1
- package/package.json +1 -1
- package/v2Containers/Cap/tests/index.test.js +2 -2
- package/v2Containers/CreativesContainer/SlideBoxContent.js +8 -7
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +30 -20
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +303 -12
- package/v2Containers/Line/Container/ImageCarousel/Content.js +15 -29
- package/v2Containers/Line/Container/ImageCarousel/constants.js +3 -0
- package/v2Containers/Line/Container/ImageCarousel/index.js +24 -35
- package/v2Containers/Line/Container/ImageCarousel/messages.js +4 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +9851 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +21113 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/content.test.js +71 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/index.test.js +58 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/mockData.js +1322 -0
- package/v2Containers/Line/Container/ImageCarousel/tests/utils.test.js +13 -0
- package/v2Containers/Line/Container/ImageCarousel/utils.js +12 -0
- package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +84451 -0
- package/v2Containers/Line/Container/Wrapper/tests/index.test.js +58 -0
- package/v2Containers/Line/Container/Wrapper/tests/mockData.js +171 -0
- package/v2Containers/Line/Container/index.js +2 -0
- package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +59589 -0
- package/v2Containers/Line/Container/tests/index.test.js +105 -0
- package/v2Containers/Line/Container/tests/mockData.js +1334 -0
- package/v2Containers/Templates/constants.js +1 -1
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +381 -1
- package/v2Containers/Templates/tests/index.test.js +7 -1
- package/v2Containers/mockdata.js +68 -11
package/config/app.js
CHANGED
|
@@ -17,7 +17,6 @@ const config = {
|
|
|
17
17
|
},
|
|
18
18
|
development: {
|
|
19
19
|
api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/creatives',
|
|
20
|
-
//api_endpoint: 'http://localhost:2022/arya/api/v1/creatives',
|
|
21
20
|
campaigns_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/campaigns',
|
|
22
21
|
campaigns_api_org_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/iris/v2/org/campaign',
|
|
23
22
|
auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
|
package/package.json
CHANGED
|
@@ -3,9 +3,9 @@ import { injectIntl } from 'react-intl';
|
|
|
3
3
|
|
|
4
4
|
import * as actions from '../actions';
|
|
5
5
|
import {Cap} from '../index';
|
|
6
|
-
import
|
|
6
|
+
import mockData from '../../mockdata';
|
|
7
7
|
import { shallowWithIntl } from '../../../helpers/intl-enzym-test-helpers';
|
|
8
|
-
const { match, location, capGlobal, language } =
|
|
8
|
+
const { match, location, capGlobal, language } = mockData;
|
|
9
9
|
|
|
10
10
|
jest.mock('@capillarytech/cap-ui-utils', () => ({
|
|
11
11
|
GA: {
|
|
@@ -6,7 +6,6 @@ import cloneDeep from 'lodash/cloneDeep';
|
|
|
6
6
|
import TemplatesV2 from '../TemplatesV2';
|
|
7
7
|
import TemplatePreview from '../../v2Components/TemplatePreview';
|
|
8
8
|
import SmsWrapper from '../SmsWrapper';
|
|
9
|
-
import isEmpty from 'lodash/isEmpty';
|
|
10
9
|
// import SmsEdit from '../Sms/Edit';
|
|
11
10
|
import Email from '../Email';
|
|
12
11
|
import EmailWrapper from '../EmailWrapper';
|
|
@@ -240,9 +239,10 @@ export function SlideBoxContent(props) {
|
|
|
240
239
|
baseUrl,
|
|
241
240
|
video,
|
|
242
241
|
template,
|
|
243
|
-
contents,
|
|
242
|
+
contents = {},
|
|
243
|
+
type = '',
|
|
244
244
|
}) => {
|
|
245
|
-
const isNewLineFormat =
|
|
245
|
+
const isNewLineFormat = type === 'flex';
|
|
246
246
|
const {
|
|
247
247
|
originalContentUrl,
|
|
248
248
|
externalLink: {
|
|
@@ -262,10 +262,11 @@ export function SlideBoxContent(props) {
|
|
|
262
262
|
previewContent.video = originalContentUrl;
|
|
263
263
|
previewContent.actionUrl = linkUri;
|
|
264
264
|
if (isNewLineFormat) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
265
|
+
const { contents: flexContent = [] } = contents;
|
|
266
|
+
previewContent.imageCarousel = flexContent.map((data) => ({
|
|
267
|
+
imageUrl: get(data, "hero.url", ""),
|
|
268
|
+
actionLabel: get(data, "footer.contents[0].action.label", ""),
|
|
269
|
+
}));
|
|
269
270
|
} else {
|
|
270
271
|
previewContent.imageCarousel = get(template, 'columns', [{}]).map(({ imageUrl, action: { label: actionLabel } = {} }) => ({ imageUrl, actionLabel }) );
|
|
271
272
|
}
|
|
@@ -4,11 +4,22 @@ import { shallowWithIntl } from '../../../helpers/intl-enzym-test-helpers';
|
|
|
4
4
|
import { SlideBoxContent } from '../SlideBoxContent';
|
|
5
5
|
import mockdata from '../../mockdata';
|
|
6
6
|
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const {
|
|
8
|
+
whatsappEditTemplateData,
|
|
9
|
+
whatsappPreviewTemplateData,
|
|
10
|
+
rcsEditTemplateData,
|
|
11
|
+
rcsPreviewTemplateData,
|
|
12
|
+
linePreviewTemplateData1,
|
|
13
|
+
linePreviewTemplateData2,
|
|
14
|
+
} = mockdata;
|
|
15
|
+
|
|
16
|
+
jest.mock('../../../v2Components/FormBuilder', () => ({
|
|
10
17
|
__esModule: true,
|
|
11
|
-
default: (props) =>
|
|
18
|
+
default: (props) => (
|
|
19
|
+
<div className="FormBuilder-mock" {...props}>
|
|
20
|
+
FormBuilder
|
|
21
|
+
</div>
|
|
22
|
+
),
|
|
12
23
|
}));
|
|
13
24
|
|
|
14
25
|
describe('Test SlideBoxContent container', () => {
|
|
@@ -22,58 +33,57 @@ describe('Test SlideBoxContent container', () => {
|
|
|
22
33
|
currentChannel={channel}
|
|
23
34
|
templateData={templateData}
|
|
24
35
|
onCreateComplete={onCreateComplete}
|
|
25
|
-
|
|
36
|
+
/>,
|
|
26
37
|
);
|
|
27
38
|
};
|
|
28
39
|
|
|
29
40
|
it('Should render correct component for whatsapp channel create mode', () => {
|
|
30
|
-
renderFunction(
|
|
41
|
+
renderFunction('WHATSAPP', 'createTemplate', { mode: 'create' });
|
|
31
42
|
expect(renderedComponent).toMatchSnapshot();
|
|
32
43
|
});
|
|
33
44
|
|
|
34
45
|
it('Should render correct component for whatsapp channel edit mode', () => {
|
|
35
|
-
renderFunction(
|
|
46
|
+
renderFunction('WHATSAPP', 'editTemplate', whatsappEditTemplateData);
|
|
36
47
|
expect(renderedComponent).toMatchSnapshot();
|
|
37
48
|
});
|
|
38
49
|
|
|
39
50
|
it('Should render correct component for whatsapp channel preview mode', () => {
|
|
40
|
-
renderFunction(
|
|
51
|
+
renderFunction('WHATSAPP', 'preview', whatsappPreviewTemplateData);
|
|
41
52
|
expect(renderedComponent).toMatchSnapshot();
|
|
42
53
|
});
|
|
43
54
|
|
|
44
55
|
it('Should render correct component for whatsapp channel templates mode', () => {
|
|
45
|
-
renderFunction(
|
|
56
|
+
renderFunction('WHATSAPP', 'templates');
|
|
46
57
|
expect(renderedComponent).toMatchSnapshot();
|
|
47
58
|
});
|
|
48
59
|
|
|
49
60
|
it('Should render correct component for rcs channel create mode', () => {
|
|
50
|
-
renderFunction(
|
|
61
|
+
renderFunction('RCS', 'createTemplate', { mode: 'create' });
|
|
51
62
|
expect(renderedComponent).toMatchSnapshot();
|
|
52
63
|
});
|
|
53
64
|
|
|
54
65
|
it('Should render correct component for rcs channel edit mode', () => {
|
|
55
|
-
renderFunction(
|
|
66
|
+
renderFunction('RCs', 'editTemplate', rcsEditTemplateData);
|
|
56
67
|
expect(renderedComponent).toMatchSnapshot();
|
|
57
68
|
});
|
|
58
69
|
|
|
59
70
|
it('Should render correct component for rcs channel preview mode', () => {
|
|
60
|
-
renderFunction(
|
|
71
|
+
renderFunction('RCS', 'preview', rcsPreviewTemplateData);
|
|
61
72
|
expect(renderedComponent).toMatchSnapshot();
|
|
62
73
|
});
|
|
63
74
|
|
|
64
75
|
it('Should render correct component for rcs channel templates mode', () => {
|
|
65
|
-
renderFunction(
|
|
66
|
-
expect(renderedComponent).toMatchSnapshot();
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('Should render correct component for line channel edit mode', () => {
|
|
70
|
-
renderFunction("LINE", "editTemplate", lineEditTemplateData);
|
|
76
|
+
renderFunction('RCS', 'templates');
|
|
71
77
|
expect(renderedComponent).toMatchSnapshot();
|
|
72
78
|
});
|
|
73
79
|
|
|
74
80
|
it('Should render correct component for line channel preview mode', () => {
|
|
75
|
-
renderFunction(
|
|
81
|
+
renderFunction('LINE', 'preview', linePreviewTemplateData1);
|
|
82
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
83
|
+
renderFunction('LINE', 'preview', linePreviewTemplateData2);
|
|
84
|
+
expect(renderedComponent).toMatchSnapshot();
|
|
85
|
+
delete linePreviewTemplateData2.versions.base.content.messages[0].contents;
|
|
86
|
+
renderFunction('LINE', 'preview', linePreviewTemplateData2);
|
|
76
87
|
expect(renderedComponent).toMatchSnapshot();
|
|
77
88
|
});
|
|
78
|
-
|
|
79
89
|
});
|
|
@@ -1,7 +1,90 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Test SlideBoxContent container Should render correct component for line channel
|
|
3
|
+
exports[`Test SlideBoxContent container Should render correct component for line channel preview mode 1`] = `
|
|
4
4
|
<SlideBoxContent__CreativesWrapper>
|
|
5
|
+
<InjectIntl(TemplatePreview)
|
|
6
|
+
channel="line"
|
|
7
|
+
charCounterEnabled={false}
|
|
8
|
+
content={
|
|
9
|
+
Array [
|
|
10
|
+
Object {
|
|
11
|
+
"actionUrl": undefined,
|
|
12
|
+
"baseUrl": undefined,
|
|
13
|
+
"imageCarousel": Array [
|
|
14
|
+
Object {
|
|
15
|
+
"actionLabel": "Demo Old 2",
|
|
16
|
+
"imageUrl": "https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/f374edfe-1fd4-4b15-a6f7-74d5d86.jpeg",
|
|
17
|
+
},
|
|
18
|
+
Object {
|
|
19
|
+
"actionLabel": undefined,
|
|
20
|
+
"imageUrl": "",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
"messageContent": undefined,
|
|
24
|
+
"previewImageUrl": undefined,
|
|
25
|
+
"selectedSticker": Object {
|
|
26
|
+
"animatedStickerUrl": undefined,
|
|
27
|
+
"packageId": undefined,
|
|
28
|
+
"stickerId": undefined,
|
|
29
|
+
"stickerUrl": undefined,
|
|
30
|
+
},
|
|
31
|
+
"type": "image_carousel",
|
|
32
|
+
"video": undefined,
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
showCount={true}
|
|
37
|
+
templateData={
|
|
38
|
+
Object {
|
|
39
|
+
"_id": "62a810e4d4715c768d6ee9cf",
|
|
40
|
+
"createdAt": "2022-06-14T04:39:00.665Z",
|
|
41
|
+
"createdBy": "15000449",
|
|
42
|
+
"definition": Object {
|
|
43
|
+
"mode": "template",
|
|
44
|
+
},
|
|
45
|
+
"isActive": true,
|
|
46
|
+
"mode": "preview",
|
|
47
|
+
"name": "Demo Old Template 2(Multiple images)",
|
|
48
|
+
"orgId": 1604,
|
|
49
|
+
"totalCount": 1,
|
|
50
|
+
"type": "LINE",
|
|
51
|
+
"updatedAt": "2022-06-14T04:39:00.665Z",
|
|
52
|
+
"updatedBy": "15000449",
|
|
53
|
+
"updatedByName": "Ashish Karan fd",
|
|
54
|
+
"versions": Object {
|
|
55
|
+
"$init": true,
|
|
56
|
+
"base": Object {
|
|
57
|
+
"content": Object {
|
|
58
|
+
"messages": Array [
|
|
59
|
+
Object {
|
|
60
|
+
"altText": "Demo Old Template 2(Multiple images)",
|
|
61
|
+
"template": Object {
|
|
62
|
+
"columns": Array [
|
|
63
|
+
Object {
|
|
64
|
+
"action": Object {
|
|
65
|
+
"label": "Demo Old 2",
|
|
66
|
+
"type": "uri",
|
|
67
|
+
"uri": "https://www.demo.com",
|
|
68
|
+
},
|
|
69
|
+
"imageUrl": "https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/f374edfe-1fd4-4b15-a6f7-74d5d86.jpeg",
|
|
70
|
+
},
|
|
71
|
+
Object {
|
|
72
|
+
"imageUrl": "",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
"type": "image_carousel",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
"to": "{{line_id}}",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
"history": Array [],
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
viberBrandName=""
|
|
87
|
+
/>
|
|
5
88
|
<Connect(UserIsAuthenticated(Connect(InjectIntl(CreativesCommon))))
|
|
6
89
|
location={
|
|
7
90
|
Object {
|
|
@@ -17,8 +100,8 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
17
100
|
onCreateComplete={[MockFunction]}
|
|
18
101
|
params={
|
|
19
102
|
Object {
|
|
20
|
-
"id": "
|
|
21
|
-
"mode":
|
|
103
|
+
"id": "62a810e4d4715c768d6ee9cf",
|
|
104
|
+
"mode": "template",
|
|
22
105
|
}
|
|
23
106
|
}
|
|
24
107
|
route={
|
|
@@ -28,19 +111,58 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
28
111
|
}
|
|
29
112
|
templateData={
|
|
30
113
|
Object {
|
|
31
|
-
"_id": "
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
114
|
+
"_id": "62a810e4d4715c768d6ee9cf",
|
|
115
|
+
"createdAt": "2022-06-14T04:39:00.665Z",
|
|
116
|
+
"createdBy": "15000449",
|
|
117
|
+
"definition": Object {
|
|
118
|
+
"mode": "template",
|
|
119
|
+
},
|
|
120
|
+
"isActive": true,
|
|
121
|
+
"mode": "preview",
|
|
122
|
+
"name": "Demo Old Template 2(Multiple images)",
|
|
123
|
+
"orgId": 1604,
|
|
124
|
+
"totalCount": 1,
|
|
35
125
|
"type": "LINE",
|
|
36
|
-
"
|
|
126
|
+
"updatedAt": "2022-06-14T04:39:00.665Z",
|
|
127
|
+
"updatedBy": "15000449",
|
|
128
|
+
"updatedByName": "Ashish Karan fd",
|
|
129
|
+
"versions": Object {
|
|
130
|
+
"$init": true,
|
|
131
|
+
"base": Object {
|
|
132
|
+
"content": Object {
|
|
133
|
+
"messages": Array [
|
|
134
|
+
Object {
|
|
135
|
+
"altText": "Demo Old Template 2(Multiple images)",
|
|
136
|
+
"template": Object {
|
|
137
|
+
"columns": Array [
|
|
138
|
+
Object {
|
|
139
|
+
"action": Object {
|
|
140
|
+
"label": "Demo Old 2",
|
|
141
|
+
"type": "uri",
|
|
142
|
+
"uri": "https://www.demo.com",
|
|
143
|
+
},
|
|
144
|
+
"imageUrl": "https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/f374edfe-1fd4-4b15-a6f7-74d5d86.jpeg",
|
|
145
|
+
},
|
|
146
|
+
Object {
|
|
147
|
+
"imageUrl": "",
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
"type": "image_carousel",
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
"to": "{{line_id}}",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
"history": Array [],
|
|
158
|
+
},
|
|
37
159
|
}
|
|
38
160
|
}
|
|
39
161
|
/>
|
|
40
162
|
</SlideBoxContent__CreativesWrapper>
|
|
41
163
|
`;
|
|
42
164
|
|
|
43
|
-
exports[`Test SlideBoxContent container Should render correct component for line channel preview mode
|
|
165
|
+
exports[`Test SlideBoxContent container Should render correct component for line channel preview mode 2`] = `
|
|
44
166
|
<SlideBoxContent__CreativesWrapper>
|
|
45
167
|
<InjectIntl(TemplatePreview)
|
|
46
168
|
channel="line"
|
|
@@ -55,6 +177,14 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
55
177
|
"actionLabel": "ggg",
|
|
56
178
|
"imageUrl": "https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/b9f2aa7a-3f1a-4a20-a737-8d50841.jpeg",
|
|
57
179
|
},
|
|
180
|
+
Object {
|
|
181
|
+
"actionLabel": "",
|
|
182
|
+
"imageUrl": "",
|
|
183
|
+
},
|
|
184
|
+
Object {
|
|
185
|
+
"actionLabel": "",
|
|
186
|
+
"imageUrl": "",
|
|
187
|
+
},
|
|
58
188
|
],
|
|
59
189
|
"messageContent": undefined,
|
|
60
190
|
"previewImageUrl": undefined,
|
|
@@ -75,16 +205,20 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
75
205
|
"_id": "629f7ecf134738019b2e332e",
|
|
76
206
|
"createdAt": "2022-06-07T16:37:35.447Z",
|
|
77
207
|
"createdBy": "15000449",
|
|
208
|
+
"definition": Object {
|
|
209
|
+
"mode": "template",
|
|
210
|
+
},
|
|
78
211
|
"isActive": true,
|
|
79
212
|
"mode": "preview",
|
|
80
213
|
"name": "ggg1",
|
|
81
214
|
"orgId": 1604,
|
|
82
|
-
"totalCount":
|
|
215
|
+
"totalCount": 1,
|
|
83
216
|
"type": "LINE",
|
|
84
217
|
"updatedAt": "2022-06-07T16:42:02.243Z",
|
|
85
218
|
"updatedBy": "15000449",
|
|
86
219
|
"updatedByName": "Ashish Karan fd",
|
|
87
220
|
"versions": Object {
|
|
221
|
+
"$init": true,
|
|
88
222
|
"base": Object {
|
|
89
223
|
"content": Object {
|
|
90
224
|
"messages": Array [
|
|
@@ -119,6 +253,21 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
119
253
|
},
|
|
120
254
|
"type": "bubble",
|
|
121
255
|
},
|
|
256
|
+
Object {
|
|
257
|
+
"footer": Object {
|
|
258
|
+
"contents": Array [
|
|
259
|
+
Object {},
|
|
260
|
+
],
|
|
261
|
+
"layout": "vertical",
|
|
262
|
+
"spacing": "xs",
|
|
263
|
+
"type": "box",
|
|
264
|
+
},
|
|
265
|
+
"hero": Object {},
|
|
266
|
+
"type": "bubble",
|
|
267
|
+
},
|
|
268
|
+
Object {
|
|
269
|
+
"type": "bubble",
|
|
270
|
+
},
|
|
122
271
|
],
|
|
123
272
|
"type": "carousel",
|
|
124
273
|
},
|
|
@@ -150,7 +299,7 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
150
299
|
params={
|
|
151
300
|
Object {
|
|
152
301
|
"id": "629f7ecf134738019b2e332e",
|
|
153
|
-
"mode":
|
|
302
|
+
"mode": "template",
|
|
154
303
|
}
|
|
155
304
|
}
|
|
156
305
|
route={
|
|
@@ -163,16 +312,20 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
163
312
|
"_id": "629f7ecf134738019b2e332e",
|
|
164
313
|
"createdAt": "2022-06-07T16:37:35.447Z",
|
|
165
314
|
"createdBy": "15000449",
|
|
315
|
+
"definition": Object {
|
|
316
|
+
"mode": "template",
|
|
317
|
+
},
|
|
166
318
|
"isActive": true,
|
|
167
319
|
"mode": "preview",
|
|
168
320
|
"name": "ggg1",
|
|
169
321
|
"orgId": 1604,
|
|
170
|
-
"totalCount":
|
|
322
|
+
"totalCount": 1,
|
|
171
323
|
"type": "LINE",
|
|
172
324
|
"updatedAt": "2022-06-07T16:42:02.243Z",
|
|
173
325
|
"updatedBy": "15000449",
|
|
174
326
|
"updatedByName": "Ashish Karan fd",
|
|
175
327
|
"versions": Object {
|
|
328
|
+
"$init": true,
|
|
176
329
|
"base": Object {
|
|
177
330
|
"content": Object {
|
|
178
331
|
"messages": Array [
|
|
@@ -207,6 +360,21 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
207
360
|
},
|
|
208
361
|
"type": "bubble",
|
|
209
362
|
},
|
|
363
|
+
Object {
|
|
364
|
+
"footer": Object {
|
|
365
|
+
"contents": Array [
|
|
366
|
+
Object {},
|
|
367
|
+
],
|
|
368
|
+
"layout": "vertical",
|
|
369
|
+
"spacing": "xs",
|
|
370
|
+
"type": "box",
|
|
371
|
+
},
|
|
372
|
+
"hero": Object {},
|
|
373
|
+
"type": "bubble",
|
|
374
|
+
},
|
|
375
|
+
Object {
|
|
376
|
+
"type": "bubble",
|
|
377
|
+
},
|
|
210
378
|
],
|
|
211
379
|
"type": "carousel",
|
|
212
380
|
},
|
|
@@ -224,6 +392,129 @@ exports[`Test SlideBoxContent container Should render correct component for line
|
|
|
224
392
|
</SlideBoxContent__CreativesWrapper>
|
|
225
393
|
`;
|
|
226
394
|
|
|
395
|
+
exports[`Test SlideBoxContent container Should render correct component for line channel preview mode 3`] = `
|
|
396
|
+
<SlideBoxContent__CreativesWrapper>
|
|
397
|
+
<InjectIntl(TemplatePreview)
|
|
398
|
+
channel="line"
|
|
399
|
+
charCounterEnabled={false}
|
|
400
|
+
content={
|
|
401
|
+
Array [
|
|
402
|
+
Object {
|
|
403
|
+
"actionUrl": undefined,
|
|
404
|
+
"baseUrl": undefined,
|
|
405
|
+
"imageCarousel": Array [],
|
|
406
|
+
"messageContent": undefined,
|
|
407
|
+
"previewImageUrl": undefined,
|
|
408
|
+
"selectedSticker": Object {
|
|
409
|
+
"animatedStickerUrl": undefined,
|
|
410
|
+
"packageId": undefined,
|
|
411
|
+
"stickerId": undefined,
|
|
412
|
+
"stickerUrl": undefined,
|
|
413
|
+
},
|
|
414
|
+
"type": "image_carousel",
|
|
415
|
+
"video": undefined,
|
|
416
|
+
},
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
showCount={true}
|
|
420
|
+
templateData={
|
|
421
|
+
Object {
|
|
422
|
+
"_id": "629f7ecf134738019b2e332e",
|
|
423
|
+
"createdAt": "2022-06-07T16:37:35.447Z",
|
|
424
|
+
"createdBy": "15000449",
|
|
425
|
+
"definition": Object {
|
|
426
|
+
"mode": "template",
|
|
427
|
+
},
|
|
428
|
+
"isActive": true,
|
|
429
|
+
"mode": "preview",
|
|
430
|
+
"name": "ggg1",
|
|
431
|
+
"orgId": 1604,
|
|
432
|
+
"totalCount": 1,
|
|
433
|
+
"type": "LINE",
|
|
434
|
+
"updatedAt": "2022-06-07T16:42:02.243Z",
|
|
435
|
+
"updatedBy": "15000449",
|
|
436
|
+
"updatedByName": "Ashish Karan fd",
|
|
437
|
+
"versions": Object {
|
|
438
|
+
"$init": true,
|
|
439
|
+
"base": Object {
|
|
440
|
+
"content": Object {
|
|
441
|
+
"messages": Array [
|
|
442
|
+
Object {
|
|
443
|
+
"altText": "ggg",
|
|
444
|
+
"type": "flex",
|
|
445
|
+
},
|
|
446
|
+
],
|
|
447
|
+
"to": "{{line_id}}",
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
"history": Array [],
|
|
451
|
+
},
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
viberBrandName=""
|
|
455
|
+
/>
|
|
456
|
+
<Connect(UserIsAuthenticated(Connect(InjectIntl(CreativesCommon))))
|
|
457
|
+
location={
|
|
458
|
+
Object {
|
|
459
|
+
"pathname": "/sms/edit",
|
|
460
|
+
"query": Object {
|
|
461
|
+
"isEditFromCampaigns": undefined,
|
|
462
|
+
"module": "library",
|
|
463
|
+
"type": "embedded",
|
|
464
|
+
},
|
|
465
|
+
"search": "",
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
onCreateComplete={[MockFunction]}
|
|
469
|
+
params={
|
|
470
|
+
Object {
|
|
471
|
+
"id": "629f7ecf134738019b2e332e",
|
|
472
|
+
"mode": "template",
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
route={
|
|
476
|
+
Object {
|
|
477
|
+
"name": "edit_text",
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
templateData={
|
|
481
|
+
Object {
|
|
482
|
+
"_id": "629f7ecf134738019b2e332e",
|
|
483
|
+
"createdAt": "2022-06-07T16:37:35.447Z",
|
|
484
|
+
"createdBy": "15000449",
|
|
485
|
+
"definition": Object {
|
|
486
|
+
"mode": "template",
|
|
487
|
+
},
|
|
488
|
+
"isActive": true,
|
|
489
|
+
"mode": "preview",
|
|
490
|
+
"name": "ggg1",
|
|
491
|
+
"orgId": 1604,
|
|
492
|
+
"totalCount": 1,
|
|
493
|
+
"type": "LINE",
|
|
494
|
+
"updatedAt": "2022-06-07T16:42:02.243Z",
|
|
495
|
+
"updatedBy": "15000449",
|
|
496
|
+
"updatedByName": "Ashish Karan fd",
|
|
497
|
+
"versions": Object {
|
|
498
|
+
"$init": true,
|
|
499
|
+
"base": Object {
|
|
500
|
+
"content": Object {
|
|
501
|
+
"messages": Array [
|
|
502
|
+
Object {
|
|
503
|
+
"altText": "ggg",
|
|
504
|
+
"type": "flex",
|
|
505
|
+
},
|
|
506
|
+
],
|
|
507
|
+
"to": "{{line_id}}",
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
"history": Array [],
|
|
511
|
+
},
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
/>
|
|
515
|
+
</SlideBoxContent__CreativesWrapper>
|
|
516
|
+
`;
|
|
517
|
+
|
|
227
518
|
exports[`Test SlideBoxContent container Should render correct component for rcs channel create mode 1`] = `
|
|
228
519
|
<SlideBoxContent__CreativesWrapper>
|
|
229
520
|
<Connect(UserIsAuthenticated(Connect(InjectIntl(CreativesCommon))))
|