@capillarytech/creatives-library 8.0.26 → 8.0.27

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 (50) hide show
  1. package/containers/Cap/selectors.js +1 -2
  2. package/containers/Cap/tests/__snapshots__/index.test.js.snap +8 -0
  3. package/containers/Cap/tests/selectors.test.js +28 -0
  4. package/containers/LanguageProvider/tests/index.test.js +8 -30
  5. package/package.json +5 -8
  6. package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +5 -2
  7. package/tests/store.test.js +5 -4
  8. package/utils/ApiCaller.js +0 -12
  9. package/utils/test-utils.js +4 -8
  10. package/utils/tests/cdnTransformation.test.js +1 -1
  11. package/v2Components/CapDeviceContent/tests/index.test.js +5 -12
  12. package/v2Components/Ckeditor/tests/index.test.js +3 -15
  13. package/v2Components/FormBuilder/tests/index.test.js +3 -2
  14. package/v2Components/NavigationBar/tests/index.test.js +3 -2
  15. package/v2Components/NewCallTask/tests/index.test.js +3 -2
  16. package/v2Containers/Cap/index.js +0 -5
  17. package/v2Containers/Cap/tests/Cap.test.js +7 -16
  18. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +8 -0
  19. package/v2Containers/Cap/tests/selectors.test.js +26 -27
  20. package/v2Containers/CreativesContainer/index.js +1 -1
  21. package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +3 -2
  22. package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +9 -9
  23. package/v2Containers/Email/tests/sagas.test.js +27 -23
  24. package/v2Containers/InApp/tests/index.test.js +3 -11
  25. package/v2Containers/InApp/tests/sagas.test.js +10 -13
  26. package/v2Containers/LanguageProvider/tests/index.test.js +11 -19
  27. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +90 -287
  28. package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +58 -116
  29. package/v2Containers/Line/Container/ImageCarousel/tests/content.test.js +3 -2
  30. package/v2Containers/Line/Container/ImageCarousel/tests/index.test.js +3 -2
  31. package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +396 -254
  32. package/v2Containers/Line/Container/Wrapper/tests/index.test.js +3 -11
  33. package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +215 -395
  34. package/v2Containers/Line/Container/tests/index.test.js +4 -3
  35. package/v2Containers/MobilePush/Edit/index.js +7 -8
  36. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +133186 -146971
  37. package/v2Containers/Rcs/tests/index.test.js +4 -12
  38. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +169 -31
  39. package/v2Containers/SmsTrai/Create/tests/index.test.js +10 -15
  40. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +1457 -817
  41. package/v2Containers/SmsTrai/Edit/tests/index.test.js +3 -14
  42. package/v2Containers/TagList/tests/TagList.test.js +3 -2
  43. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +20 -14
  44. package/v2Containers/TemplatesV2/index.js +55 -80
  45. package/v2Containers/TemplatesV2/tests/index.test.js +4 -3
  46. package/v2Containers/Viber/tests/index.test.js +3 -10
  47. package/v2Containers/Whatsapp/index.js +0 -1
  48. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +32562 -5611
  49. package/v2Containers/Whatsapp/tests/index.test.js +12 -31
  50. package/v2Containers/Zalo/tests/index.test.js +3 -11
@@ -1,27 +1,16 @@
1
1
  import React from 'react';
2
+ import { createBrowserHistory } from 'history';
2
3
  import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
3
4
  import { initialReducer } from '../../../../initialReducer';
4
5
  import { Provider } from 'react-redux';
5
6
  import { mountWithIntl } from '../../../../../app/helpers/intl-enzym-test-helpers';
6
7
  import { SmsTraiEdit } from '../index';
7
8
  import { mockData } from './mockData';
8
- import history from '../../../../utils/history';
9
9
 
10
-
11
-
12
-
13
-
14
- jest.mock('../../../TagList/index.js', () => ({
15
- __esModule: true,
16
- default: (props) => (
17
- <div className="tag-mock" {...props}>
18
- TagList
19
- </div>
20
- ),
21
- }));
22
10
  let store;
11
+ let browserHistory = createBrowserHistory();
23
12
  beforeAll(() => {
24
- store = configureStore({}, initialReducer, history);
13
+ store = configureStore({}, initialReducer, browserHistory);
25
14
  });
26
15
 
27
16
  describe('Creatives SmsTraiEdit test/>', () => {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import "@testing-library/jest-dom";
3
+ import { createBrowserHistory } from 'history';
3
4
  import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
4
5
  import { initialReducer } from '../../../initialReducer';
5
6
  import { injectIntl } from "react-intl";
@@ -8,12 +9,12 @@ import { TagList } from '../index';
8
9
  import { TagListData, eventContextTags } from './mockdata';
9
10
  import { Provider } from 'react-redux';
10
11
  import { screen, render } from '../../../utils/test-utils';
11
- import history from '../../../utils/history';
12
12
  const { getByText } = screen;
13
13
 
14
14
 
15
15
  const initializeTagList = (props) => {
16
- const store = configureStore({}, initialReducer, history);
16
+ const browserHistory = createBrowserHistory();
17
+ const store = configureStore({}, initialReducer, browserHistory);
17
18
  const Component = injectIntl(TagList);
18
19
 
19
20
  const propsObj = {
@@ -193,7 +193,7 @@ exports[`Test Templates container Should render temlates when whatsapp templates
193
193
  <div
194
194
  className="action-container"
195
195
  >
196
- <_Class
196
+ <_class
197
197
  className="search-text"
198
198
  disabled={false}
199
199
  labelPosition="top"
@@ -426,7 +426,7 @@ exports[`Test Templates container Should render temlates when whatsapp templates
426
426
  <div
427
427
  className="action-container"
428
428
  >
429
- <_Class
429
+ <_class
430
430
  className="search-text"
431
431
  disabled={false}
432
432
  labelPosition="top"
@@ -785,7 +785,7 @@ exports[`Test Templates container Test max templates exceeded 1`] = `
785
785
  <div
786
786
  className="action-container"
787
787
  >
788
- <_Class
788
+ <_class
789
789
  className="search-text"
790
790
  disabled={false}
791
791
  labelPosition="top"
@@ -1033,7 +1033,9 @@ Click {{unsubscribe}} to unsubscribe
1033
1033
  <React.Fragment />
1034
1034
  </React.Fragment>,
1035
1035
  "extra": Array [
1036
- <React.Fragment>
1036
+ <CapTooltip
1037
+ title=""
1038
+ >
1037
1039
  <CapIcon
1038
1040
  className="view-whatsapp"
1039
1041
  onClick={[Function]}
@@ -1044,7 +1046,7 @@ Click {{unsubscribe}} to unsubscribe
1044
1046
  }
1045
1047
  type="eye"
1046
1048
  />
1047
- </React.Fragment>,
1049
+ </CapTooltip>,
1048
1050
  <CapDropdown
1049
1051
  overlay={
1050
1052
  <CapMenu>
@@ -1240,7 +1242,7 @@ exports[`Test Templates container Test max templates not exceeded 1`] = `
1240
1242
  <div
1241
1243
  className="action-container"
1242
1244
  >
1243
- <_Class
1245
+ <_class
1244
1246
  className="search-text"
1245
1247
  disabled={false}
1246
1248
  labelPosition="top"
@@ -1470,7 +1472,9 @@ Click {{unsubscribe}} to unsubscribe
1470
1472
  <React.Fragment />
1471
1473
  </React.Fragment>,
1472
1474
  "extra": Array [
1473
- <React.Fragment>
1475
+ <CapTooltip
1476
+ title=""
1477
+ >
1474
1478
  <CapIcon
1475
1479
  className="view-whatsapp"
1476
1480
  onClick={[Function]}
@@ -1481,7 +1485,7 @@ Click {{unsubscribe}} to unsubscribe
1481
1485
  }
1482
1486
  type="eye"
1483
1487
  />
1484
- </React.Fragment>,
1488
+ </CapTooltip>,
1485
1489
  <CapDropdown
1486
1490
  overlay={
1487
1491
  <CapMenu>
@@ -1677,7 +1681,7 @@ exports[`Test Templates container Test max templates warning 1`] = `
1677
1681
  <div
1678
1682
  className="action-container"
1679
1683
  >
1680
- <_Class
1684
+ <_class
1681
1685
  className="search-text"
1682
1686
  disabled={false}
1683
1687
  labelPosition="top"
@@ -1907,7 +1911,9 @@ Click {{unsubscribe}} to unsubscribe
1907
1911
  <React.Fragment />
1908
1912
  </React.Fragment>,
1909
1913
  "extra": Array [
1910
- <React.Fragment>
1914
+ <CapTooltip
1915
+ title=""
1916
+ >
1911
1917
  <CapIcon
1912
1918
  className="view-whatsapp"
1913
1919
  onClick={[Function]}
@@ -1918,7 +1924,7 @@ Click {{unsubscribe}} to unsubscribe
1918
1924
  }
1919
1925
  type="eye"
1920
1926
  />
1921
- </React.Fragment>,
1927
+ </CapTooltip>,
1922
1928
  <CapDropdown
1923
1929
  overlay={
1924
1930
  <CapMenu>
@@ -2114,7 +2120,7 @@ exports[`Test Templates container Test removing all whatsapp filterss 1`] = `
2114
2120
  <div
2115
2121
  className="action-container"
2116
2122
  >
2117
- <_Class
2123
+ <_class
2118
2124
  className="search-text"
2119
2125
  disabled={false}
2120
2126
  labelPosition="top"
@@ -2373,7 +2379,7 @@ exports[`Test Templates container Test removing all whatsapp filterss 2`] = `
2373
2379
  <div
2374
2380
  className="action-container"
2375
2381
  >
2376
- <_Class
2382
+ <_class
2377
2383
  className="search-text"
2378
2384
  disabled={false}
2379
2385
  labelPosition="top"
@@ -2606,7 +2612,7 @@ exports[`Test Templates container Test removing single filter 1`] = `
2606
2612
  <div
2607
2613
  className="action-container"
2608
2614
  >
2609
- <_Class
2615
+ <_class
2610
2616
  className="search-text"
2611
2617
  disabled={false}
2612
2618
  labelPosition="top"
@@ -11,9 +11,7 @@ import { connect } from 'react-redux';
11
11
  import { injectIntl, intlShape, FormattedMessage } from 'react-intl';
12
12
  import { createStructuredSelector } from 'reselect';
13
13
  import { bindActionCreators, compose } from 'redux';
14
- import {
15
- CapTab, CapCustomCard, CapButton, CapHeader, CapSpin, CapIcon, CapTooltip,
16
- } from '@capillarytech/cap-ui-library';
14
+ import { CapTab, CapCustomCard, CapButton, CapHeader, CapSpin, CapIcon, CapTooltip } from '@capillarytech/cap-ui-library';
17
15
  import { find, get } from 'lodash';
18
16
  import isEmpty from 'lodash/isEmpty';
19
17
  import Helmet from 'react-helmet';
@@ -33,12 +31,10 @@ import FTP from '../FTP';
33
31
  import Gallery from '../Assets/Gallery';
34
32
  import withStyles from '../../hoc/withStyles';
35
33
  import styles, { CapTabStyle } from './TemplatesV2.style';
36
- import {
37
- CREATIVES_UI_VIEW, LOYALTY, WHATSAPP, RCS, LINE, EMAIL, ASSETS, JP_LOCALE_HIDE_FEATURE, ZALO, INAPP,
38
- } from '../App/constants';
34
+ import { CREATIVES_UI_VIEW, LOYALTY, WHATSAPP, RCS, LINE, EMAIL, ASSETS, JP_LOCALE_HIDE_FEATURE, ZALO, INAPP } from '../App/constants';
39
35
  import AccessForbidden from '../../v2Components/AccessForbidden';
40
36
  import { getObjFromQueryParams } from '../../utils/v2common';
41
- import { makeSelectAuthenticated, selectCurrentOrgDetails } from "../Cap/selectors";
37
+ import { makeSelectAuthenticated, selectCurrentOrgDetails } from "../../v2Containers/Cap/selectors";
42
38
  import injectSaga from '../../utils/injectSaga';
43
39
  import injectReducer from '../../utils/injectReducer';
44
40
 
@@ -124,15 +120,13 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
124
120
  // eslint-disable-next-line no-param-reassign
125
121
  pane.disabled = true;
126
122
  if (pane.key === 'facebook' && showDisabledFBInfo) {
127
- pane.tab = (
128
- <CapTooltip
129
- title={
130
- intl.formatMessage(messages.facebookDisableinfo)
131
- }
132
- >
133
- {intl.formatMessage(messages.facebook)}
134
- </CapTooltip>
135
- );
123
+ pane.tab = (<CapTooltip
124
+ title={
125
+ intl.formatMessage(messages.facebookDisableinfo)
126
+ }
127
+ >
128
+ {intl.formatMessage(messages.facebook)}
129
+ </CapTooltip>);
136
130
  }
137
131
  }
138
132
  return pane;
@@ -185,18 +179,16 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
185
179
  this.setState({selectedChannel: nextProps.channel, panes });
186
180
  }
187
181
  }
188
-
189
- getTemplateDataForGrid = ({
190
- templates, handlers, filterContent, channel, isLoading, loadingTip,
191
- }) => {
182
+ getTemplateDataForGrid = ({templates, handlers, filterContent, channel, isLoading, loadingTip}) => {
192
183
  const currentChannel = channel.toUpperCase();
193
184
  const cardDataList = templates.map((template) => {
194
- const templateData = {
195
- key: `${currentChannel}-card-${template.name}`,
196
- title: <span title={template.name}>{template.name}</span>,
197
- extra: [<CapIcon type="eye" onClick={() => { if (this.props.isFullMode) { handlers.handlePreviewClick(template); } else { this.props.handlePeviewTemplate(template); } }} />],
198
- hoverOption: <CapButton onClick={(e) => handlers.handleEditClick(e, template._id)}>{this.props.intl.formatMessage(this.props.isFullMode ? messages.edit : messages.select)}</CapButton>,
199
- };
185
+ const templateData =
186
+ {
187
+ key: `${currentChannel}-card-${template.name}`,
188
+ title: <span title={template.name} >{template.name}</span>,
189
+ extra: [<CapIcon type="eye" onClick={() => { if (this.props.isFullMode) { handlers.handlePreviewClick(template); } else { this.props.handlePeviewTemplate(template); } }} />],
190
+ hoverOption: <CapButton onClick={(e) => handlers.handleEditClick(e, template._id)}>{this.props.intl.formatMessage(this.props.isFullMode ? messages.edit : messages.select)}</CapButton>,
191
+ };
200
192
  if (currentChannel === "SMS") {
201
193
  templateData.content = template.versions.base['sms-editor'];
202
194
  } else if (currentChannel === "EMAIL") {
@@ -204,21 +196,17 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
204
196
  }
205
197
  return templateData;
206
198
  });
207
- return (
208
- <div>
209
- {filterContent}
210
- <CapSpin spinning={isLoading} tip={loadingTip}>
211
- <div className="pagination-container">
212
- <CapCustomCardList key={`${currentChannel}-card-list`} cardList={cardDataList} type={currentChannel} />
213
- </div>
214
- </CapSpin>
199
+ return (<div>
200
+ {filterContent}
201
+ <CapSpin spinning={isLoading} tip={loadingTip}>
202
+ <div className="pagination-container">
203
+ <CapCustomCardList key={`${currentChannel}-card-list`} cardList={cardDataList} type={currentChannel} />
204
+ </div>
205
+ </CapSpin>
215
206
 
216
- </div>
217
- );
207
+ </div>);
218
208
  }
219
-
220
- getGalleryComponent = (location) => <Gallery location={location} isFullMode={this.props.isFullMode} />
221
-
209
+ getGalleryComponent = (location) => <Gallery location={location} isFullMode={this.props.isFullMode}/>
222
210
  getCallTaskComponent = () => (
223
211
  <CallTask
224
212
  onCreateNew={this.props.createNew}
@@ -228,13 +216,11 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
228
216
  );
229
217
 
230
218
  getFacebookComponent = () => {
231
- const {
232
- messageDetails, cap, onFacebookSubmit,
219
+ const { messageDetails, cap, onFacebookSubmit,
233
220
  messageStrategy,
234
221
  showDisabledFBInfo,
235
222
  orgUnitId,
236
- onSelectTemplate,
237
- } = this.props;
223
+ onSelectTemplate } = this.props;
238
224
  return (
239
225
  <Facebook
240
226
  {...this.props}
@@ -248,21 +234,18 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
248
234
  />
249
235
  );
250
236
  }
251
-
252
237
  getViberComponent =() => (
253
238
  <Viber
254
239
  {...this.props}
255
240
  isCreateFlow
256
- >
257
- </Viber>
241
+ ></Viber>
258
242
  )
259
-
260
243
  getLineComponent = () => (
261
244
  <Line
262
245
  {...this.props}
263
246
  isCreateFlow
264
- />
265
- )
247
+ />
248
+ )
266
249
 
267
250
  getFTPComponent = () => (
268
251
  <FTP mode={this.props.FTPMode} {...this.props} />
@@ -293,22 +276,20 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
293
276
  case 'assets':
294
277
  return this.getGalleryComponent(location);
295
278
  default:
296
- return (
297
- <Templates
298
- key={channel}
299
- location={location}
300
- route={{name: channel}}
301
- router={this.props.router}
302
- isFullMode={this.props.isFullMode}
303
- createNew={this.props.createNew}
304
- onSelectTemplate={(id) => this.props.onSelectTemplate(this.selectTemplate(id))}
305
- renderNewCardGrid={this.getTemplateDataForGrid}
306
- handlePeviewTemplate={this.props.handlePeviewTemplate}
307
- messageStrategy={this.props.messageStrategy}
308
- smsRegister={smsRegister}
309
- hideTestAndPreviewBtn={this.props.hideTestAndPreviewBtn}
310
- />
311
- );
279
+ return (<Templates
280
+ key={channel}
281
+ location={location}
282
+ route={{name: channel}}
283
+ router={this.props.router}
284
+ isFullMode={this.props.isFullMode}
285
+ createNew={this.props.createNew}
286
+ onSelectTemplate={(id) => this.props.onSelectTemplate(this.selectTemplate(id))}
287
+ renderNewCardGrid={this.getTemplateDataForGrid}
288
+ handlePeviewTemplate={this.props.handlePeviewTemplate}
289
+ messageStrategy={this.props.messageStrategy}
290
+ smsRegister={smsRegister}
291
+ hideTestAndPreviewBtn={this.props.hideTestAndPreviewBtn}
292
+ />);
312
293
  }
313
294
  }
314
295
 
@@ -330,18 +311,14 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
330
311
  const panes = this.setChannelContent(selectedChannel, this.state.panes);
331
312
  this.setState({panes, selectedChannel}, () => { if (!this.props.isFullMode) this.props.onChannelChange(selectedChannel); });
332
313
  }
333
-
334
314
  selectTemplate = (id) => find(this.props.TemplatesList, {_id: id})
335
315
 
336
316
  isLoading() {
337
317
  return this.props.Templates.loadingTemplates;
338
318
  }
339
-
340
319
  render() {
341
- const {
342
- isFullMode, className, cap = {}, authData = {},Global={},
343
- } = this.props;
344
- const { accessiblePermissions = []} = cap.user || authData.user || Global.user || {};
320
+ const { isFullMode, className, cap = {}, Global = {}} = this.props;
321
+ const { accessiblePermissions = []} = cap.user || Global.user || {};
345
322
  let isCreativeAccessible = true;
346
323
  if (!accessiblePermissions.includes(CREATIVES_UI_VIEW)) {
347
324
  isCreativeAccessible = false;
@@ -349,16 +326,14 @@ export class TemplatesV2 extends React.Component { // eslint-disable-line react/
349
326
  return (
350
327
  !isCreativeAccessible ? <AccessForbidden /> : (
351
328
  <div className={`${className} creatives-templates-container ${isFullMode ? 'fullmode' : 'library-mode'}`} data-testid="cap-wrapper">
352
- {isFullMode && (
353
- <Helmet
354
- title={this.props.intl.formatMessage(messages.creatives)}
355
- meta={[
356
- { name: 'description', content: this.props.intl.formatMessage(messages.creativesDesc) },
357
- ]}
358
- />
359
- )}
329
+ {isFullMode && <Helmet
330
+ title={this.props.intl.formatMessage(messages.creatives)}
331
+ meta={[
332
+ { name: 'description', content: this.props.intl.formatMessage(messages.creativesDesc) },
333
+ ]}
334
+ />}
360
335
  <div className="component-wrapper">
361
- {isFullMode && <CapHeader title={<FormattedMessage {...messages.creatives} />} description={<FormattedMessage {...messages.creativesDesc} />} />}
336
+ {isFullMode && <CapHeader title={<FormattedMessage {...messages.creatives}/>} description={<FormattedMessage {...messages.creativesDesc}/>}/>}
362
337
  <StyledCapTab
363
338
  panes={this.state.panes}
364
339
  onChange={this.channelChange}
@@ -4,18 +4,19 @@ import '@testing-library/jest-dom';
4
4
  import cloneDeep from 'lodash/cloneDeep';
5
5
  import { Provider } from 'react-redux';
6
6
  import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
7
- import history from '../../../utils/history';
7
+ import { createBrowserHistory } from 'history';
8
8
  import { initialReducer } from '../../../initialReducer';
9
9
  import {
10
10
  render,
11
11
  screen,
12
12
  } from '../../../utils/test-utils';
13
13
  import { TemplatesV2 } from '../index';
14
- import { Templates, authData, currentOrgDetails, } from './mockData';
14
+ import { Templates, authData, currentOrgDetails } from './mockData';
15
15
 
16
16
  const ComponentToRender = injectIntl(TemplatesV2);
17
17
  const renderComponent = (props) => {
18
- const store = configureStore({}, initialReducer, history);
18
+ const browserHistory = createBrowserHistory();
19
+ const store = configureStore({}, initialReducer, browserHistory);
19
20
  return render(
20
21
  <Provider store={store}>
21
22
  <ComponentToRender {...props} />
@@ -3,7 +3,7 @@ import { injectIntl } from 'react-intl';
3
3
  import '@testing-library/jest-dom';
4
4
  import { Provider } from 'react-redux';
5
5
  import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
6
- import history from '../../../utils/history';
6
+ import { createBrowserHistory } from 'history';
7
7
  import { initialReducer } from '../../../initialReducer';
8
8
  import { Viber } from '../index';
9
9
  import { render, screen, fireEvent } from '../../../utils/test-utils';
@@ -22,18 +22,11 @@ const mockActions = {
22
22
  const mockGlobalActions = {
23
23
  fetchSchemaForEntity: jest.fn(),
24
24
  };
25
- jest.mock('../../../v2Containers/TagList/index.js', () => ({
26
- __esModule: true,
27
- default: (props) => (
28
- <div className="tag-mock" {...props}>
29
- TagList
30
- </div>
31
- ),
32
- }));
33
25
 
34
26
  let store;
27
+ let browserHistory = createBrowserHistory();
35
28
  beforeAll(() => {
36
- store = configureStore({}, initialReducer, history);
29
+ store = configureStore({}, initialReducer, browserHistory);
37
30
  });
38
31
 
39
32
  const ComponentToRender = injectIntl(Viber);
@@ -904,7 +904,6 @@ const isAuthenticationTemplate = isEqual(templateCategory, WHATSAPP_CATEGORIES.a
904
904
  checked={unsubscribeRequired}
905
905
  disabled={isDisabled}
906
906
  autoFocus={true}
907
- data-testid="whatsapp-unsubscribe-checkbox"
908
907
  >
909
908
  <CapTooltip
910
909
  placement="bottom"