@capillarytech/creatives-library 7.10.10 → 7.10.12

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.
@@ -20,6 +20,7 @@ describe('Creatives SmsTraiEdit test/>', () => {
20
20
  const fetchSchemaForEntity = jest.fn();
21
21
  const formatMessage = jest.fn();
22
22
  const handleClose = jest.fn();
23
+ const getFormSubscriptionData = jest.fn();
23
24
  const params = {
24
25
  id: mockData.templateDetails._id,
25
26
  };
@@ -37,17 +38,23 @@ describe('Creatives SmsTraiEdit test/>', () => {
37
38
  }}
38
39
  globalActions={{ fetchSchemaForEntity }}
39
40
  handleClose={handleClose}
41
+ getFormSubscriptionData={getFormSubscriptionData}
40
42
  params={params}
41
43
  templateDetails={templateDetails}
42
44
  location={location}
43
45
  intl={{ formatMessage }}
46
+ isFullMode={true}
44
47
  />
45
48
  </Provider>,
46
49
  );
47
50
  });
48
51
  it('should render', () => {
52
+ const event = { target: { value: "test1", id: "1" } };
49
53
  expect(renderedComponent).toMatchSnapshot();
50
- });
54
+ renderedComponent.find("TextArea").at(0).props().onChange(event);
55
+ renderedComponent.update();
56
+ expect(renderedComponent).toMatchSnapshot();
57
+ })
51
58
  it('should save', () => {
52
59
  renderedComponent.find('button.create-msg').props().onClick();
53
60
  renderedComponent.update();
@@ -207,11 +207,13 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
207
207
  }
208
208
  }
209
209
  }
210
- checkDLTfeatureEnable = () => {
210
+
211
+ checkDLTfeatureEnable() {
211
212
  const {smsRegister, isFullMode} = this.props;
212
213
  const isTraiDlt = commonUtil.isTraiDLTEnable(isFullMode, smsRegister);
213
214
  return isTraiDlt;
214
215
  }
216
+
215
217
  componentDidMount() {
216
218
  if (this.props.location.query.type === 'embedded' && this.isEnabledInLibraryModule("setLocale")) {
217
219
  this.setLocale();