@capillarytech/creatives-library 7.11.13 → 7.11.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.
@@ -98,6 +98,15 @@ describe('Creatives Whatsapp test/>', () => {
98
98
  expect(renderedComponent).toMatchSnapshot();
99
99
  });
100
100
 
101
+ it('template language change', () => {
102
+ renderHelper({});
103
+ renderedComponent
104
+ .find('CapSelect#select-whatsapp-language')
105
+ .props()
106
+ .onChange('en');
107
+ expect(renderedComponent).toMatchSnapshot();
108
+ });
109
+
101
110
  it('template message', () => {
102
111
  renderHelper({});
103
112
  const templateMessageRenderHelper = (val) => {
@@ -160,6 +169,10 @@ describe('Creatives Whatsapp test/>', () => {
160
169
  .find('CapSelect#select-whatsapp-category')
161
170
  .props()
162
171
  .onChange('APPOINTMENT_UPDATE');
172
+ renderedComponent
173
+ .find('CapSelect#select-whatsapp-language')
174
+ .props()
175
+ .onChange('en');
163
176
  event = { target: { value: 'Hi {{1}}' } };
164
177
  renderedComponent
165
178
  .find('TextArea#whatsapp-create-template-message-input')
@@ -1,20 +1,25 @@
1
- import { getWhatsappContent, getWhatsappStatus, getWhatsappCategory} from '../utils';
1
+ import {
2
+ getWhatsappContent,
3
+ getWhatsappStatus,
4
+ getWhatsappCategory,
5
+ } from '../utils';
2
6
  import mockdata from '../../mockdata';
3
7
 
4
8
  const {
5
- previewTemplateData,
6
- getWhatsappContentOutput,
7
- getWhatsappStatusOutput,
8
- getWhatsappCategoryOutput,
9
+ whatsappPreviewTemplateData,
10
+ getWhatsappStatusOutput,
11
+ getWhatsappCategoryOutput,
9
12
  } = mockdata;
10
13
 
11
14
  describe('Test utils', () => {
12
15
  it('test getWhatsappContent', () => {
13
- expect(getWhatsappContent(previewTemplateData)).toMatchSnapshot();
16
+ expect(getWhatsappContent(whatsappPreviewTemplateData)).toMatchSnapshot();
14
17
  });
15
18
 
16
19
  it('test getWhatsappContent for preview', () => {
17
- expect(getWhatsappContent(previewTemplateData, true)).toMatchSnapshot();
20
+ expect(
21
+ getWhatsappContent(whatsappPreviewTemplateData, true),
22
+ ).toMatchSnapshot();
18
23
  });
19
24
 
20
25
  it('test getWhatsappStatus', () => {
@@ -22,6 +27,8 @@ describe('Test utils', () => {
22
27
  });
23
28
 
24
29
  it('test getWhatsappCategory', () => {
25
- expect(getWhatsappCategory('ALERT_UPDATE')).toEqual(getWhatsappCategoryOutput);
30
+ expect(getWhatsappCategory('ALERT_UPDATE')).toEqual(
31
+ getWhatsappCategoryOutput,
32
+ );
26
33
  });
27
34
  });