@capillarytech/creatives-library 7.14.41 → 7.15.3

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 (51) hide show
  1. package/containers/Cap/tests/__snapshots__/index.test.js.snap +4 -193
  2. package/containers/LanguageProvider/index.js +0 -2
  3. package/containers/LanguageProvider/tests/index.test.js +0 -1
  4. package/i18n.js +8 -11
  5. package/package.json +1 -1
  6. package/reducers.js +0 -2
  7. package/services/api.js +1 -9
  8. package/translations/en.json +4 -192
  9. package/translations/zh.json +3 -191
  10. package/v2Components/CapActionButton/index.js +0 -1
  11. package/v2Components/CapVideoUpload/index.scss +5 -0
  12. package/v2Components/FormBuilder/index.js +4 -28
  13. package/v2Containers/Assets/Gallery/index.js +1 -1
  14. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +4 -193
  15. package/v2Containers/CreativesContainer/constants.js +0 -2
  16. package/v2Containers/CreativesContainer/index.js +2 -2
  17. package/v2Containers/CreativesContainer/selectors.js +2 -2
  18. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +0 -8
  19. package/v2Containers/CreativesContainer/tests/index.test.js +0 -28
  20. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +12 -582
  21. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +8 -386
  22. package/v2Containers/Line/Container/Text/index.js +2 -3
  23. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +68 -3285
  24. package/v2Containers/Line/Container/index.js +1 -1
  25. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +72 -3474
  26. package/v2Containers/Rcs/index.js +0 -3
  27. package/v2Containers/Rcs/messages.js +1 -1
  28. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +253 -9383
  29. package/v2Containers/Sms/Create/actions.js +0 -9
  30. package/v2Containers/Sms/Create/constants.js +0 -2
  31. package/v2Containers/Sms/Create/index.js +0 -12
  32. package/v2Containers/Sms/Create/sagas.js +3 -19
  33. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +16 -772
  34. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +32 -1544
  35. package/v2Containers/Templates/index.js +3 -2
  36. package/v2Containers/Templates/messages.js +2 -2
  37. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +0 -16
  38. package/v2Containers/TemplatesV2/index.js +1 -1
  39. package/v2Containers/Viber/index.js +0 -1
  40. package/v2Containers/Whatsapp/index.js +1 -0
  41. package/v2Containers/Whatsapp/messages.js +1 -1
  42. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +284 -13755
  43. package/v2Containers/mockdata.js +0 -128
  44. package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +0 -420
  45. package/tests/integration/TemplateCreation/api-response.js +0 -1663
  46. package/tests/integration/TemplateCreation/helper.js +0 -23
  47. package/tests/integration/TemplateCreation/mocks/initialState.js +0 -428
  48. package/tests/integration/TemplateCreation/msw-handler.js +0 -48
  49. package/translations/ja-JP.json +0 -2013
  50. package/v2Containers/Sms/Create/tests/sagas.test.js +0 -82
  51. package/v2Containers/SmsTrai/Create/tests/selectors.test.js +0 -10
@@ -817,118 +817,6 @@ export default {
817
817
  },
818
818
  ],
819
819
  },
820
- smsTemplates: {
821
- getAllTemplatesInProgress: false,
822
- weCrmAccountFetchingError: false,
823
- weCRMtemplates: [],
824
- userList: {
825
- orgUsers: [
826
- {
827
- userId: 50012994,
828
- firstName: 'firstUser',
829
- lastName: '',
830
- loginName: 'firstUser@capillarytech.com',
831
- email: 'firstUser@capillarytech.com',
832
- mobile: '918888802132',
833
- isMobileValidated: 0,
834
- isEmailValidated: 0,
835
- },
836
- ],
837
- capUsers: [
838
- {
839
- userId: 15000449,
840
- firstName: 'Ashish',
841
- lastName: 'Karan fd',
842
- loginName: 'cap@coin.com',
843
- email: 'cap@coin.com',
844
- mobile: '919957676767',
845
- isMobileValidated: 1,
846
- isEmailValidated: 1,
847
- },
848
- ],
849
- },
850
- templateError: {},
851
- fetchingWeCrmAccounts: false,
852
- fetchingUserList: false,
853
- isSearch: false,
854
- userListFetchError: false,
855
- templates: [
856
- {
857
- _id: '623c39e970387f3cf5f8fd70',
858
- name: 'testtest',
859
- type: 'SMS',
860
- versions: {
861
- $init: true,
862
- history: [],
863
- base: {
864
- },
865
- },
866
- isActive: true,
867
- orgId: 50146,
868
- createdBy: '15000449',
869
- updatedBy: '15000449',
870
- createdAt: '2022-03-24T09:29:13.376Z',
871
- updatedAt: '2022-03-29T11:15:53.175Z',
872
- totalCount: 10,
873
- },
874
- ],
875
- },
876
- emailTemplates: {
877
- getAllTemplatesInProgress: false,
878
- weCrmAccountFetchingError: false,
879
- weCRMtemplates: [],
880
- userList: {
881
- orgUsers: [
882
- {
883
- userId: 50012994,
884
- firstName: 'firstUser',
885
- lastName: '',
886
- loginName: 'firstUser@capillarytech.com',
887
- email: 'firstUser@capillarytech.com',
888
- mobile: '918888802132',
889
- isMobileValidated: 0,
890
- isEmailValidated: 0,
891
- },
892
- ],
893
- capUsers: [
894
- {
895
- userId: 15000449,
896
- firstName: 'Ashish',
897
- lastName: 'Karan fd',
898
- loginName: 'cap@coin.com',
899
- email: 'cap@coin.com',
900
- mobile: '919957676767',
901
- isMobileValidated: 1,
902
- isEmailValidated: 1,
903
- },
904
- ],
905
- },
906
- templateError: {},
907
- fetchingWeCrmAccounts: false,
908
- fetchingUserList: false,
909
- isSearch: false,
910
- userListFetchError: false,
911
- templates: [
912
- {
913
- _id: '623c39e970387f3cf5f8fd70',
914
- name: 'testtest',
915
- type: 'EMAIL',
916
- versions: {
917
- $init: true,
918
- history: [],
919
- base: {
920
- },
921
- },
922
- isActive: true,
923
- orgId: 50146,
924
- createdBy: '15000449',
925
- updatedBy: '15000449',
926
- createdAt: '2022-03-24T09:29:13.376Z',
927
- updatedAt: '2022-03-29T11:15:53.175Z',
928
- totalCount: 10,
929
- },
930
- ],
931
- },
932
820
  whatsappEditTemplateData: {
933
821
  mode: 'edit',
934
822
  _id: '620e213d39bd394c58aeaaca',
@@ -1120,22 +1008,6 @@ export default {
1120
1008
  channel: 'RCS',
1121
1009
  validity: true,
1122
1010
  },
1123
- smsEditTemplateData: {
1124
- mode: 'edit',
1125
- _id: '620e213d39bd394c58aeaaca',
1126
- modeType: '',
1127
- type: 'SMS',
1128
- channel: 'SMS',
1129
- validity: true,
1130
- },
1131
- emailEditTemplateData: {
1132
- mode: 'edit',
1133
- _id: '620e213d39bd394c58aeaaca',
1134
- modeType: '',
1135
- type: 'EMAIL',
1136
- channel: 'EMAIL',
1137
- validity: true,
1138
- },
1139
1011
  getWhatsappContentOutput: '1234567890\nClick {{unsubscribe}} to unsubscribe',
1140
1012
  getWhatsappStatusOutput1: {
1141
1013
  key: 'approved',
@@ -1,420 +0,0 @@
1
- import React from 'react';
2
- import { BrowserRouter as Router } from 'react-router-dom';
3
- import { Provider } from 'react-redux';
4
- import { createMemoryHistory } from 'history';
5
- import userEvent from '@testing-library/user-event';
6
- import { server } from './msw-handler';
7
- import {
8
- render,
9
- fireEvent,
10
- screen,
11
- within,
12
- } from '../../../utils/test-utils';
13
-
14
- import configureStore from '../../../store';
15
- import { mockInitialState } from './mocks/initialState';
16
- import TemplatesV2 from '../../../v2Containers/TemplatesV2';
17
- import globalMessages from '../../../v2Containers/Cap/messages';
18
- import * as helper from './helper';
19
-
20
- jest.mock('@capillarytech/cap-ui-utils', () => ({
21
- ...jest.requireActual('@capillarytech/cap-ui-utils'),
22
- GA: {
23
- ...jest.requireActual('@capillarytech/cap-ui-utils').GA,
24
- initialize: jest.fn(),
25
- setCustomDimension: jest.fn(),
26
- getCallerName: jest.fn(),
27
- tracker: {
28
- trackException: jest.fn(),
29
- },
30
- },
31
- }));
32
-
33
- jest.setTimeout(60000);
34
-
35
- let history;
36
-
37
- const initializeCreatives = () => {
38
- const store = configureStore(mockInitialState, history);
39
- history = createMemoryHistory();
40
- history.push('creatives/ui/v2');
41
- render(
42
- <Provider store={store}>
43
- <Router history={history}>
44
- <TemplatesV2 />
45
- </Router>
46
- </Provider>,
47
- );
48
- };
49
-
50
- // establish API mocking before all tests
51
- beforeEach(() => {
52
- server.listen();
53
- localStorage.clear();
54
- localStorage.setItem('token', true);
55
- });
56
-
57
- // clean up once the tests are done
58
- afterAll(() => {
59
- server.resetHandlers();
60
- server.close();
61
- jest.resetAllMocks();
62
- delete window?.capAuth;
63
- });
64
-
65
- const delay = (ms) => new Promise((res) => setTimeout(res, ms));
66
-
67
- describe("Creatives testing template creation", () => {
68
- it("Should navigate from creatives home page and create template in RCS channel", async () => {
69
- initializeCreatives();
70
- const creativesScreen = await helper.getCreativesScreen();
71
- expect(creativesScreen.getByText(globalMessages.creatives.defaultMessage, {})).toBeInTheDocument();
72
-
73
- // for navigation among different channels
74
- const rcs = creativesScreen.getByRole('tab', {
75
- name: /rcs/i,
76
- });
77
- const whatsapp = creativesScreen.getByRole('tab', {
78
- name: /whatsapp/i,
79
- });
80
- const wechat = creativesScreen.getByRole('tab', {
81
- name: /wechat/i,
82
- });
83
- const facebook = creativesScreen.getByRole('tab', {
84
- name: /facebook/i,
85
- });
86
- const mpush = creativesScreen.getByRole('tab', {
87
- name: /push notification/i,
88
- });
89
- const line = creativesScreen.getByRole('tab', {
90
- name: /line/i,
91
- });
92
- const email = creativesScreen.getByRole('tab', {
93
- name: globalMessages.email.defaultMessage,
94
- });
95
- await userEvent.click(whatsapp);
96
- expect(creativesScreen.getByText(
97
- /Whatsapp accounts are not setup for your brand/i)
98
- ).toBeInTheDocument();
99
- await userEvent.click(line);
100
- //assertions for template filters for line channel
101
- expect(creativesScreen.getByText(/rich video message/i)).toBeInTheDocument();
102
- userEvent.click(creativesScreen.getByText(/rich video message/i));
103
- expect(creativesScreen.getByText(/card message/i)).toBeInTheDocument();
104
- userEvent.click(creativesScreen.getByText(/card message/i));
105
- expect(creativesScreen.getByText(/Rich message/i)).toBeInTheDocument();
106
- userEvent.click(creativesScreen.getByText(/Rich message/i));
107
- expect(creativesScreen.getByText(/image/i)).toBeInTheDocument();
108
- userEvent.click(creativesScreen.getByText(/image/i));
109
- expect(creativesScreen.getByText(/text/i)).toBeInTheDocument();
110
- userEvent.click(creativesScreen.getByText(/text/i));
111
- await userEvent.click(facebook);
112
- await userEvent.click(wechat);
113
- expect(creativesScreen.getByText(/wechat account/i)).toBeInTheDocument();
114
- await userEvent.click(mpush);
115
- expect(
116
- creativesScreen.getByText(/push notifications are not setup for your brand/i)
117
- ).toBeInTheDocument();
118
- await userEvent.click(email);
119
-
120
- //start of rcs template creation
121
- await userEvent.click(rcs);
122
- const createButton = creativesScreen.getByRole('button', {
123
- name: /create new/i,
124
- });
125
- await userEvent.click(createButton);
126
- expect(creativesScreen.getByText(/Creative name/i, {})).toBeInTheDocument();
127
- const templateNameInput = await creativesScreen.findByTestId(
128
- /template_name/,
129
- {},
130
- );
131
-
132
- // Enter a template name
133
- fireEvent.change(templateNameInput, {
134
- target: { value: 'rcs_test_template' },
135
- });
136
- const imageRadioBtn = creativesScreen.getByText(/image/i);
137
- fireEvent.click(imageRadioBtn);
138
- const imageUploader = await creativesScreen.findByText(/drag and drop image here/i);
139
- expect(imageUploader).toBeInTheDocument();
140
- const noneRadioBtn = await creativesScreen.findByText(/none/i);
141
- fireEvent.click(noneRadioBtn);
142
- expect(imageUploader).not.toBeInTheDocument();
143
-
144
- // Enter the template title
145
- const templateTitleInput = await creativesScreen.findByTestId(
146
- /template_title/,
147
- {},
148
- );
149
- fireEvent.change(templateTitleInput, {
150
- target: { value: 'rcs_template_title' },
151
- });
152
-
153
- // Enter the text in template text area
154
- const templateTextInput = await creativesScreen.findByTestId(
155
- /rcs_text_area/,
156
- {},
157
- );
158
- fireEvent.change(templateTextInput, {
159
- target: { value: 'rcs_template_text' },
160
- });
161
-
162
- // click on Done button
163
- const doneButton = creativesScreen.getByRole('button', {
164
- name: globalMessages.done.defaultMessage,
165
- });
166
- await userEvent.click(doneButton);
167
- expect(createButton).toBeInTheDocument();
168
- });
169
-
170
- it("Should navigate from creatives home page and create template in RCS channel with CTA buttons", async () => {
171
- initializeCreatives();
172
- const creativesScreen = await helper.getCreativesScreen();
173
- const rcs = creativesScreen.getByRole('tab', {
174
- name: /rcs/i,
175
- });
176
- await userEvent.click(rcs);
177
- const createButton = creativesScreen.getByRole('button', {
178
- name: /create new/i,
179
- });
180
- await userEvent.click(createButton);
181
- const templateNameInput = await creativesScreen.findByTestId(
182
- /template_name/,
183
- {},
184
- );
185
- //Enter a template name
186
- fireEvent.change(templateNameInput, {
187
- target: { value: 'rcs_test_template' },
188
- });
189
- const templateTitleInput = await creativesScreen.findByTestId(
190
- /template_title/,
191
- {},
192
- );
193
- //Enter a template title
194
- fireEvent.change(templateTitleInput, {
195
- target: { value: 'rcs_template_title' },
196
- });
197
- const templateTextInput = await creativesScreen.findByTestId(
198
- /rcs_text_area/,
199
- {},
200
- );
201
- //Enter a template text area
202
- fireEvent.change(templateTextInput, {
203
- target: { value: 'rcs_template_text' },
204
- });
205
- const ctaCheckBox = creativesScreen.getByText(/call to action/i);
206
- fireEvent.click(ctaCheckBox);
207
- const doneButton = creativesScreen.getByRole('button', {
208
- name: globalMessages.done.defaultMessage,
209
- });
210
- //done button will be disabled cta button is not configured
211
- expect(doneButton).toBeDisabled();
212
-
213
- //configuring cta button
214
- //accessing cta button textBox by char limit
215
- const textLimit = creativesScreen.getByText(/0 \/ 20/i);
216
- const ctaBtnText = textLimit.parentElement.previousSibling;
217
-
218
- //configuring CTA button text and URL
219
- fireEvent.change(ctaBtnText, {
220
- target: { value: 'cta_button' },
221
- });
222
- const ctaLink = await creativesScreen.findByTestId(
223
- /cta_btn_link/,
224
- {},
225
- );
226
- fireEvent.change(ctaLink, {
227
- target: { value: 'invalid url' },
228
- });
229
- const urlError = creativesScreen.getByText(/button url is not valid/i);
230
- expect(urlError).toBeInTheDocument();
231
- fireEvent.change(ctaLink, {
232
- target: { value: 'https://capillarytech.com/' },
233
- });
234
- expect(urlError).not.toBeInTheDocument();
235
- //saving the template
236
- fireEvent.click(doneButton);
237
- expect(createButton).toBeInTheDocument();
238
- });
239
-
240
- it("Should navigate from creatives home page and create template in Viber channel", async () => {
241
- initializeCreatives();
242
- const creativesScreen = await helper.getCreativesScreen();
243
- expect(creativesScreen.getByText(/Creatives/i, {})).toBeInTheDocument();
244
- const viberTab = creativesScreen.getByRole('tab', {
245
- name: /viber/i,
246
- });
247
-
248
- // navigating to Viber channel
249
- await userEvent.click(viberTab);
250
- const createButton = creativesScreen.getByRole('button', {
251
- name: /create new/i,
252
- });
253
- await userEvent.click(createButton);
254
- const doneButton = creativesScreen.getByRole('button', {
255
- name: globalMessages.done.defaultMessage,
256
- });
257
- //should be disabled as template is not yet confiured
258
- expect(doneButton).toBeDisabled();
259
-
260
- // enter template name
261
- const templateNameInput = await creativesScreen.findByTestId(
262
- /template_name/,
263
- {},
264
- );
265
- fireEvent.change(templateNameInput, {
266
- target: { value: 'viber_test_template' },
267
- });
268
- fireEvent.change(templateNameInput, {
269
- target: { value: '' },
270
- });
271
- // error case assertion
272
- expect(creativesScreen.getByText(/Template title can not be empty/i)).toBeInTheDocument();
273
- fireEvent.change(templateNameInput, {
274
- target: { value: 'viber_test_template' },
275
- });
276
-
277
- const templateTextInput = await creativesScreen.getByText(
278
- /Text message/,
279
- {},
280
- );
281
- const msgBox = templateTextInput.parentElement.nextSibling.firstChild;
282
- //Enter a template text message
283
- fireEvent.change(msgBox, {
284
- target: { value: 'viber_template_message' },
285
- });
286
-
287
- //assertions for error cases in template message
288
- fireEvent.change(msgBox, {
289
- target: { value: ' ' },
290
- });
291
- expect(creativesScreen.getByText(/template content can not be empty/i)).toBeInTheDocument();
292
- fireEvent.change(msgBox, {
293
- target: { value: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' },
294
- });
295
- expect(creativesScreen.getByText(/Template content can not be more than 1000/i)).toBeInTheDocument();
296
- fireEvent.change(msgBox, {
297
- target: { value: ' viber_test_template}}} ' },
298
- });
299
- expect(creativesScreen.getByText(/Invalid label, please close all curly braces/i)).toBeInTheDocument();
300
- fireEvent.change(msgBox, {
301
- target: { value: 'viber_test_template' },
302
- });
303
- const addLabel = creativesScreen.getByRole('button', {
304
- name: globalMessages.addLabels.defaultMessage,
305
- });
306
- // first click opens the popup, and second click closes it, clicking twice is intentional
307
- userEvent.click(addLabel);
308
- userEvent.click(addLabel);
309
- const imageUploader = creativesScreen.getByRole('button', {
310
- name: /drag and drop image here or your computer gallery/i,
311
- });
312
- expect(within(imageUploader).getByRole('button', {
313
- name: /your computer/i,
314
- })).toBeInTheDocument();
315
- const galleryBtn = within(imageUploader).getByRole('button', {
316
- name: globalMessages.gallery.defaultMessage,
317
- });
318
-
319
- //configuring CTA button
320
- const btnText = creativesScreen.getByText(/button text/i);
321
- const btnTextBox = btnText.nextSibling.firstChild;
322
- fireEvent.change(btnTextBox, {
323
- target: { value: 'button' },
324
- });
325
- const btnUrl = creativesScreen.getByText(/button url/i);
326
- const btnUrlBox = btnUrl.nextSibling.firstChild;
327
- fireEvent.change(btnUrlBox, {
328
- target: { value: 'button' },
329
- });
330
- expect(
331
- creativesScreen.getByText(/button url is not valid/i)
332
- ).toBeInTheDocument();
333
- fireEvent.change(btnUrlBox, {
334
- target: { value: 'https://capillarytech.com/' },
335
- });
336
- await userEvent.click(galleryBtn);
337
- delay(10000);
338
- expect(
339
- screen.getByText(/loading gallery.../i)
340
- ).toBeInTheDocument();
341
- expect(
342
- screen.getByRole('button', {
343
- name: /close/i,
344
- })
345
- ).toBeInTheDocument();
346
- await userEvent.click(doneButton);
347
- expect(createButton).toBeInTheDocument();
348
- });
349
-
350
- it("Should navigate from creatives home page and create template in Line channel", async () => {
351
- initializeCreatives();
352
- const creativesScreen = await helper.getCreativesScreen();
353
- expect(creativesScreen.getByText(/Creatives/i, {})).toBeInTheDocument();
354
- const LineTab = creativesScreen.getByRole('tab', {
355
- name: /Line/i,
356
- });
357
-
358
- // navigating to Viber channel
359
- await userEvent.click(LineTab);
360
- const createButton = creativesScreen.getByRole('button', {
361
- name: /create new/i,
362
- });
363
- fireEvent.click(createButton);
364
- const doneButton = creativesScreen.getByRole('button', {
365
- name: globalMessages.done.defaultMessage,
366
- });
367
- //should be disabled as template is not yet confiured
368
- expect(doneButton).toBeDisabled();
369
- // enter template name
370
- const templateNameInput = creativesScreen.getByTestId(
371
- /template_name/, {});
372
- fireEvent.change(templateNameInput, {
373
- target: { value: 'line_test_template' },
374
- });
375
- fireEvent.change(templateNameInput, {
376
- target: { value: '' },
377
- });
378
- // error case assertion
379
- expect(creativesScreen.getByText(/Template title can not be empty/i)).toBeInTheDocument();
380
- fireEvent.change(templateNameInput, {
381
- target: { value: 'line_test_template' },
382
- });
383
-
384
- const templateTextInput = await creativesScreen.getByText(
385
- /Text message/,
386
- {},
387
-
388
- );
389
- const msgBox = templateTextInput.parentElement.nextSibling.firstChild;
390
- //Enter a template text message
391
- fireEvent.change(msgBox, {
392
- target: { value: 'viber_template_message' },
393
- });
394
-
395
- //assertions for error cases in template message
396
- fireEvent.change(msgBox, {
397
- target: { value: ' ' },
398
- });
399
- expect(creativesScreen.getByText(/template content can not be empty/i)).toBeInTheDocument();
400
- fireEvent.change(msgBox, {
401
- target: { value: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.' },
402
- });
403
- expect(creativesScreen.getByText(/Template content can not be more than 1600/i)).toBeInTheDocument();
404
- fireEvent.change(msgBox, {
405
- target: { value: ' viber_test_template}}} ' },
406
- });
407
- expect(creativesScreen.getByText(/Invalid label, please close all curly braces/i)).toBeInTheDocument();
408
- fireEvent.change(msgBox, {
409
- target: { value: 'viber_test_template' },
410
- });
411
- const addLabel = creativesScreen.getByRole('button', {
412
- name: globalMessages.addLabels.defaultMessage,
413
- });
414
- userEvent.click(addLabel);
415
- userEvent.click(addLabel);
416
- //saving the template
417
- await userEvent.click(doneButton);
418
- expect(createButton).toBeInTheDocument();
419
- });
420
- });