@webex/calling 3.9.0-next.8 → 3.9.0-next.9
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/dist/CallHistory/CallHistory.js +51 -46
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/CallHistory.test.js +146 -147
- package/dist/CallHistory/CallHistory.test.js.map +1 -1
- package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
- package/dist/CallHistory/constants.js.map +1 -1
- package/dist/CallHistory/types.js.map +1 -1
- package/dist/CallSettings/CallSettings.js +8 -8
- package/dist/CallSettings/CallSettings.js.map +1 -1
- package/dist/CallSettings/CallSettings.test.js +1 -1
- package/dist/CallSettings/CallSettings.test.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.js +12 -11
- package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.test.js +9 -10
- package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.js +66 -59
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +108 -109
- package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/constants.js.map +1 -1
- package/dist/CallSettings/testFixtures.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +142 -85
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +184 -173
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/callRecordFixtures.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.js +2 -2
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.test.js +8 -7
- package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
- package/dist/CallingClient/calling/call.js +343 -320
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +405 -406
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +3 -4
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +67 -68
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/index.js.map +1 -1
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/callingClientFixtures.js.map +1 -1
- package/dist/CallingClient/constants.js +2 -1
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +7 -7
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +6 -6
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/line/types.js.map +1 -1
- package/dist/CallingClient/registration/index.js.map +1 -1
- package/dist/CallingClient/registration/register.js +239 -230
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +172 -173
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.js +5 -4
- package/dist/CallingClient/registration/webWorker.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.test.js +14 -14
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +2 -6
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -1
- package/dist/Contacts/ContactsClient.js +244 -238
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +89 -90
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Contacts/constants.js +2 -2
- package/dist/Contacts/constants.js.map +1 -1
- package/dist/Contacts/contactFixtures.js.map +1 -1
- package/dist/Contacts/types.js.map +1 -1
- package/dist/Errors/catalog/CallError.js +2 -2
- package/dist/Errors/catalog/CallError.js.map +1 -1
- package/dist/Errors/catalog/CallingDeviceError.js +2 -2
- package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
- package/dist/Errors/catalog/ExtendedError.js +3 -3
- package/dist/Errors/catalog/ExtendedError.js.map +1 -1
- package/dist/Errors/catalog/LineError.js +2 -2
- package/dist/Errors/catalog/LineError.js.map +1 -1
- package/dist/Errors/index.js.map +1 -1
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/impl/index.js +2 -2
- package/dist/Events/impl/index.js.map +1 -1
- package/dist/Events/types.js.map +1 -1
- package/dist/Logger/index.js.map +1 -1
- package/dist/Logger/index.test.js.map +1 -1
- package/dist/Logger/types.js.map +1 -1
- package/dist/Metrics/index.js +109 -46
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +8 -1
- package/dist/Metrics/types.js.map +1 -1
- package/dist/SDKConnector/index.js +0 -1
- package/dist/SDKConnector/index.js.map +1 -1
- package/dist/SDKConnector/index.test.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/SDKConnector/utils.js.map +1 -1
- package/dist/SDKConnector/utils.test.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.js +42 -39
- package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.test.js +119 -120
- package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.js +54 -47
- package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.test.js +73 -74
- package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/Voicemail.js +12 -11
- package/dist/Voicemail/Voicemail.js.map +1 -1
- package/dist/Voicemail/Voicemail.test.js +2 -2
- package/dist/Voicemail/Voicemail.test.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js +78 -70
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.test.js +184 -185
- package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/constants.js.map +1 -1
- package/dist/Voicemail/types.js.map +1 -1
- package/dist/Voicemail/voicemailFixture.js.map +1 -1
- package/dist/api.js.map +1 -1
- package/dist/common/Utils.js +80 -63
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +95 -104
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/index.js.map +1 -1
- package/dist/common/testUtil.js +1 -1
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/module/CallHistory/CallHistory.js +4 -0
- package/dist/module/CallSettings/UcmBackendConnector.js +1 -0
- package/dist/module/CallSettings/WxCallBackendConnector.js +7 -0
- package/dist/module/CallingClient/CallingClient.js +62 -20
- package/dist/module/CallingClient/calling/call.js +66 -43
- package/dist/module/CallingClient/constants.js +2 -1
- package/dist/module/CallingClient/registration/register.js +6 -3
- package/dist/module/CallingClient/registration/webWorker.js +2 -1
- package/dist/module/CallingClient/windowsChromiumIceWarmupUtils.js +1 -4
- package/dist/module/Contacts/ContactsClient.js +23 -17
- package/dist/module/Contacts/constants.js +1 -1
- package/dist/module/Metrics/index.js +42 -0
- package/dist/module/Metrics/types.js +7 -0
- package/dist/module/Voicemail/BroadworksBackendConnector.js +3 -0
- package/dist/module/Voicemail/UcmBackendConnector.js +6 -0
- package/dist/module/Voicemail/WxCallBackendConnector.js +8 -0
- package/dist/module/common/Utils.js +22 -8
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/CallSettings/WxCallBackendConnector.d.ts.map +1 -1
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +2 -1
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts +2 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
- package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts +2 -4
- package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts.map +1 -1
- package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
- package/dist/types/Contacts/constants.d.ts +1 -1
- package/dist/types/Contacts/constants.d.ts.map +1 -1
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +10 -2
- package/dist/types/Metrics/types.d.ts.map +1 -1
- package/dist/types/Voicemail/BroadworksBackendConnector.d.ts.map +1 -1
- package/dist/types/Voicemail/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -22,8 +22,7 @@ var _Logger = _interopRequireDefault(require("../Logger"));
|
|
|
22
22
|
var _constants2 = require("./constants");
|
|
23
23
|
var utils = _interopRequireWildcard(require("../common/Utils"));
|
|
24
24
|
var _contactFixtures = require("./contactFixtures");
|
|
25
|
-
function
|
|
26
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
27
26
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29
28
|
describe('ContactClient Tests', function () {
|
|
@@ -172,7 +171,7 @@ describe('ContactClient Tests', function () {
|
|
|
172
171
|
});
|
|
173
172
|
});
|
|
174
173
|
it.each(errorCodes)('%s', /*#__PURE__*/function () {
|
|
175
|
-
var _ref = (0, _asyncToGenerator2.default)(
|
|
174
|
+
var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(codeObj) {
|
|
176
175
|
var respPayload, contactsResponse;
|
|
177
176
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
178
177
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -219,12 +218,12 @@ describe('ContactClient Tests', function () {
|
|
|
219
218
|
});
|
|
220
219
|
}
|
|
221
220
|
expect(_Logger.default.info).toHaveBeenCalledWith(_constants.METHOD_START_MESSAGE, {
|
|
222
|
-
file: _constants2.
|
|
221
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
223
222
|
method: _constants2.METHODS.GET_CONTACTS
|
|
224
223
|
});
|
|
225
224
|
if (codeObj.payloadData) {
|
|
226
225
|
expect(_Logger.default.log).toHaveBeenCalledWith('Successfully fetched contacts and groups', {
|
|
227
|
-
file: _constants2.
|
|
226
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
228
227
|
method: _constants2.METHODS.GET_CONTACTS
|
|
229
228
|
});
|
|
230
229
|
} else {
|
|
@@ -236,7 +235,7 @@ describe('ContactClient Tests', function () {
|
|
|
236
235
|
method: _types.HTTP_METHODS.GET
|
|
237
236
|
});
|
|
238
237
|
expect(_Logger.default.info).toHaveBeenCalledWith(_constants.METHOD_START_MESSAGE, {
|
|
239
|
-
file: _constants2.
|
|
238
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
240
239
|
method: _constants2.METHODS.GET_CONTACTS
|
|
241
240
|
});
|
|
242
241
|
expect(_Logger.default.error).toHaveBeenCalled();
|
|
@@ -250,7 +249,7 @@ describe('ContactClient Tests', function () {
|
|
|
250
249
|
expect(serviceErrorCodeHandlerSpy).not.toBeCalled();
|
|
251
250
|
} else {
|
|
252
251
|
expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(codeObj.payloadData ? respPayload : expect.any(Error), {
|
|
253
|
-
file: _constants2.
|
|
252
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
254
253
|
method: _constants2.METHODS.GET_CONTACTS
|
|
255
254
|
});
|
|
256
255
|
}
|
|
@@ -264,7 +263,7 @@ describe('ContactClient Tests', function () {
|
|
|
264
263
|
return _ref.apply(this, arguments);
|
|
265
264
|
};
|
|
266
265
|
}());
|
|
267
|
-
it('create a contact group without encryptionKey', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
266
|
+
it('create a contact group without encryptionKey', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
268
267
|
var _contactsResponse$dat;
|
|
269
268
|
var successResponsePayload, contactsResponse;
|
|
270
269
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
@@ -316,23 +315,23 @@ describe('ContactClient Tests', function () {
|
|
|
316
315
|
expect(contactClient['groups'].length).toEqual(2);
|
|
317
316
|
expect(contactClient['groups'][1].displayName).toEqual('Top Contacts');
|
|
318
317
|
expect(_Logger.default.info).toHaveBeenCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with displayName: Top Contacts"), {
|
|
319
|
-
file: _constants2.
|
|
318
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
320
319
|
method: _constants2.METHODS.CREATE_CONTACT_GROUP
|
|
321
320
|
});
|
|
322
321
|
expect(_Logger.default.info).toHaveBeenCalledWith(_constants.METHOD_START_MESSAGE, {
|
|
323
|
-
file: _constants2.
|
|
322
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
324
323
|
method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
|
|
325
324
|
});
|
|
326
325
|
expect(_Logger.default.info).toHaveBeenCalledWith('Requesting kms for a new KRO and key', {
|
|
327
|
-
file: _constants2.
|
|
326
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
328
327
|
method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
|
|
329
328
|
});
|
|
330
329
|
expect(_Logger.default.log).toHaveBeenCalledWith("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
|
|
331
|
-
file: _constants2.
|
|
330
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
332
331
|
method: 'fetchEncryptionKeyUrl'
|
|
333
332
|
});
|
|
334
333
|
expect(_Logger.default.log).toHaveBeenCalledWith("Contact group Top Contacts successfully created", {
|
|
335
|
-
file: _constants2.
|
|
334
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
336
335
|
method: _constants2.METHODS.CREATE_CONTACT_GROUP
|
|
337
336
|
});
|
|
338
337
|
case 24:
|
|
@@ -341,7 +340,7 @@ describe('ContactClient Tests', function () {
|
|
|
341
340
|
}
|
|
342
341
|
}, _callee2);
|
|
343
342
|
})));
|
|
344
|
-
it('create a contact group with existing key info', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
343
|
+
it('create a contact group with existing key info', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
345
344
|
var _contactsResponse$dat2;
|
|
346
345
|
var successResponsePayload, infoSpy, contactsResponse;
|
|
347
346
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
@@ -362,15 +361,15 @@ describe('ContactClient Tests', function () {
|
|
|
362
361
|
expect(contactsResponse.statusCode).toEqual(201);
|
|
363
362
|
expect((_contactsResponse$dat2 = contactsResponse.data.group) === null || _contactsResponse$dat2 === void 0 ? void 0 : _contactsResponse$dat2.groupId).toBe(mockGroupResponse.groupId);
|
|
364
363
|
expect(infoSpy).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with displayName: Top Contacts"), {
|
|
365
|
-
file: _constants2.
|
|
364
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
366
365
|
method: _constants2.METHODS.CREATE_CONTACT_GROUP
|
|
367
366
|
});
|
|
368
367
|
expect(_Logger.default.log).toBeCalledWith("Contact group Top Contacts successfully created", {
|
|
369
|
-
file: _constants2.
|
|
368
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
370
369
|
method: _constants2.METHODS.CREATE_CONTACT_GROUP
|
|
371
370
|
});
|
|
372
371
|
expect(infoSpy).not.toBeCalledWith(_constants.METHOD_START_MESSAGE, {
|
|
373
|
-
file: _constants2.
|
|
372
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
374
373
|
method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
|
|
375
374
|
});
|
|
376
375
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -391,7 +390,7 @@ describe('ContactClient Tests', function () {
|
|
|
391
390
|
}
|
|
392
391
|
}, _callee3);
|
|
393
392
|
})));
|
|
394
|
-
it('create a contact group with same displayName', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
393
|
+
it('create a contact group with same displayName', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
395
394
|
var logSpy, contactsResponse;
|
|
396
395
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
397
396
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -407,11 +406,11 @@ describe('ContactClient Tests', function () {
|
|
|
407
406
|
expect(webex.request).not.toBeCalled();
|
|
408
407
|
expect(contactsResponse.statusCode).toBe(400);
|
|
409
408
|
expect(logSpy).toBeCalledOnceWith("Group name ".concat(mockGroupResponse.displayName, " already exists."), {
|
|
410
|
-
file: _constants2.
|
|
409
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
411
410
|
method: _constants2.METHODS.CREATE_CONTACT_GROUP
|
|
412
411
|
});
|
|
413
412
|
expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with displayName: ").concat(mockGroupResponse.displayName), {
|
|
414
|
-
file: _constants2.
|
|
413
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
415
414
|
method: _constants2.METHODS.CREATE_CONTACT_GROUP
|
|
416
415
|
});
|
|
417
416
|
expect(contactClient['groups']).toEqual(_contactFixtures.mockContactResponseBodyOne.groups);
|
|
@@ -421,13 +420,13 @@ describe('ContactClient Tests', function () {
|
|
|
421
420
|
}
|
|
422
421
|
}, _callee4);
|
|
423
422
|
})));
|
|
424
|
-
it('create a contact group - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
423
|
+
it('create a contact group - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
425
424
|
var loggerContext, warnSpy, errorSpy, contactsResponse;
|
|
426
425
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
427
426
|
while (1) switch (_context5.prev = _context5.next) {
|
|
428
427
|
case 0:
|
|
429
428
|
loggerContext = {
|
|
430
|
-
file: _constants2.
|
|
429
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
431
430
|
method: 'createContactGroup'
|
|
432
431
|
};
|
|
433
432
|
contactClient['groups'] = _contactFixtures.mockContactGroupListOne;
|
|
@@ -465,13 +464,13 @@ describe('ContactClient Tests', function () {
|
|
|
465
464
|
}
|
|
466
465
|
}, _callee5);
|
|
467
466
|
})));
|
|
468
|
-
it('delete a contact group - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
467
|
+
it('delete a contact group - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
469
468
|
var loggerContext, warnSpy, errorSpy, contactsResponse;
|
|
470
469
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
471
470
|
while (1) switch (_context6.prev = _context6.next) {
|
|
472
471
|
case 0:
|
|
473
472
|
loggerContext = {
|
|
474
|
-
file: _constants2.
|
|
473
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
475
474
|
method: 'deleteContactGroup'
|
|
476
475
|
};
|
|
477
476
|
contactClient['groups'] = _contactFixtures.mockContactGroupListOne;
|
|
@@ -504,7 +503,7 @@ describe('ContactClient Tests', function () {
|
|
|
504
503
|
}
|
|
505
504
|
}, _callee6);
|
|
506
505
|
})));
|
|
507
|
-
it('successful deletion of contact group', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
506
|
+
it('successful deletion of contact group', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
508
507
|
var successResponsePayload, response;
|
|
509
508
|
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
510
509
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -525,11 +524,11 @@ describe('ContactClient Tests', function () {
|
|
|
525
524
|
});
|
|
526
525
|
expect(contactClient['groups']).toEqual([]);
|
|
527
526
|
expect(_Logger.default.info).toBeCalledWith("Deleting contact group: ".concat(_contactFixtures.mockContactGroupListOne[0].groupId), {
|
|
528
|
-
file: _constants2.
|
|
527
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
529
528
|
method: 'deleteContactGroup'
|
|
530
529
|
});
|
|
531
530
|
expect(_Logger.default.log).toBeCalledWith("Contact group ".concat(_contactFixtures.mockContactGroupListOne[0].groupId, " successfully deleted"), {
|
|
532
|
-
file: _constants2.
|
|
531
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
533
532
|
method: 'deleteContactGroup'
|
|
534
533
|
});
|
|
535
534
|
case 11:
|
|
@@ -538,7 +537,7 @@ describe('ContactClient Tests', function () {
|
|
|
538
537
|
}
|
|
539
538
|
}, _callee7);
|
|
540
539
|
})));
|
|
541
|
-
it('create a contact with an existing group', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
540
|
+
it('create a contact with an existing group', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
542
541
|
var _res$data$contact, _result$data$contact;
|
|
543
542
|
var mockContactResponse, successResponsePayload, infoSpy, logSpy, contact, res, result;
|
|
544
543
|
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
@@ -564,23 +563,23 @@ describe('ContactClient Tests', function () {
|
|
|
564
563
|
expect(res.statusCode).toEqual(201);
|
|
565
564
|
expect((_res$data$contact = res.data.contact) === null || _res$data$contact === void 0 ? void 0 : _res$data$contact.contactId).toBe(mockContactResponse.contactId);
|
|
566
565
|
expect(infoSpy).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactType: ").concat(contact.contactType), {
|
|
567
|
-
file: _constants2.
|
|
566
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
568
567
|
method: _constants2.METHODS.CREATE_CONTACT
|
|
569
568
|
});
|
|
570
569
|
expect(logSpy).toBeCalledWith("Contact successfully created", {
|
|
571
|
-
file: _constants2.
|
|
570
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
572
571
|
method: _constants2.METHODS.CREATE_CONTACT
|
|
573
572
|
});
|
|
574
573
|
expect(logSpy).not.toBeCalledWith('Created a KRO and encryptionKeyUrl', {
|
|
575
|
-
file: _constants2.
|
|
574
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
576
575
|
method: 'createNewEncryptionKeyUrl'
|
|
577
576
|
});
|
|
578
577
|
expect(logSpy).not.toBeCalledWith('Created a KRO and encryptionKeyUrl', {
|
|
579
|
-
file: _constants2.
|
|
578
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
580
579
|
method: 'createNewEncryptionKeyUrl'
|
|
581
580
|
});
|
|
582
581
|
expect(infoSpy).not.toBeCalledWith("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
|
|
583
|
-
file: _constants2.
|
|
582
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
584
583
|
method: 'fetchEncryptionKeyUrl'
|
|
585
584
|
});
|
|
586
585
|
expect(webex.internal.encryption.encryptText).toBeCalledOnceWith(_contactFixtures.mockContactGroupListOne[0].encryptionKeyUrl, contact.displayName);
|
|
@@ -602,7 +601,7 @@ describe('ContactClient Tests', function () {
|
|
|
602
601
|
result = _context8.sent;
|
|
603
602
|
expect((_result$data$contact = result.data.contact) === null || _result$data$contact === void 0 ? void 0 : _result$data$contact.contactId).toBe(mockContactResponse.contactId);
|
|
604
603
|
expect(logSpy).not.toBeCalledWith("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
|
|
605
|
-
file: _constants2.
|
|
604
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
606
605
|
method: 'fetchEncryptionKeyUrl'
|
|
607
606
|
});
|
|
608
607
|
case 28:
|
|
@@ -611,7 +610,7 @@ describe('ContactClient Tests', function () {
|
|
|
611
610
|
}
|
|
612
611
|
}, _callee8);
|
|
613
612
|
})));
|
|
614
|
-
it('create a contact without a group and encryptionKey', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
613
|
+
it('create a contact without a group and encryptionKey', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
615
614
|
var _res$data$contact2;
|
|
616
615
|
var mockContactResponse, successContactGroupResponsePayload, successContactResponsePayload, contact, res;
|
|
617
616
|
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
@@ -670,23 +669,23 @@ describe('ContactClient Tests', function () {
|
|
|
670
669
|
});
|
|
671
670
|
expect((_res$data$contact2 = res.data.contact) === null || _res$data$contact2 === void 0 ? void 0 : _res$data$contact2.contactId).toBe(mockContactResponse.contactId);
|
|
672
671
|
expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactType: CUSTOM"), {
|
|
673
|
-
file: _constants2.
|
|
672
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
674
673
|
method: _constants2.METHODS.CREATE_CONTACT
|
|
675
674
|
});
|
|
676
675
|
expect(_Logger.default.info).toBeCalledWith(_constants.METHOD_START_MESSAGE, {
|
|
677
|
-
file: _constants2.
|
|
676
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
678
677
|
method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
|
|
679
678
|
});
|
|
680
679
|
expect(_Logger.default.info).toBeCalledWith('Requesting kms for a new KRO and key', {
|
|
681
|
-
file: _constants2.
|
|
680
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
682
681
|
method: _constants2.METHODS.CREATE_NEW_ENCRYPTION_KEY_URL
|
|
683
682
|
});
|
|
684
683
|
expect(_Logger.default.log).toBeCalledWith("Creating a default group: ".concat(_constants2.DEFAULT_GROUP_NAME), {
|
|
685
|
-
file: _constants2.
|
|
684
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
686
685
|
method: _constants2.METHODS.FETCH_ENCRYPTION_KEY_URL
|
|
687
686
|
});
|
|
688
687
|
expect(_Logger.default.log).toBeCalledWith("Contact successfully created", {
|
|
689
|
-
file: _constants2.
|
|
688
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
690
689
|
method: 'createContact'
|
|
691
690
|
});
|
|
692
691
|
case 26:
|
|
@@ -695,11 +694,11 @@ describe('ContactClient Tests', function () {
|
|
|
695
694
|
}
|
|
696
695
|
}, _callee9);
|
|
697
696
|
})));
|
|
698
|
-
it('create a cloud contact with no existing groups', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
697
|
+
it('create a cloud contact with no existing groups', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
699
698
|
var _res$data$contact3;
|
|
700
699
|
var mockContactResponse, successResponsePayload, successResponsePayloadGroup, contact, res;
|
|
701
|
-
return _regenerator.default.wrap(function
|
|
702
|
-
while (1) switch (
|
|
700
|
+
return _regenerator.default.wrap(function _callee0$(_context0) {
|
|
701
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
703
702
|
case 0:
|
|
704
703
|
mockContactResponse = _contactFixtures.mockContactResponseBodyOne.contacts[0];
|
|
705
704
|
successResponsePayload = {
|
|
@@ -718,21 +717,21 @@ describe('ContactClient Tests', function () {
|
|
|
718
717
|
contactType: 'CLOUD'
|
|
719
718
|
};
|
|
720
719
|
contact.groups = [];
|
|
721
|
-
|
|
720
|
+
_context0.next = 11;
|
|
722
721
|
return contactClient.createContact(contact);
|
|
723
722
|
case 11:
|
|
724
|
-
res =
|
|
723
|
+
res = _context0.sent;
|
|
725
724
|
expect(res.statusCode).toEqual(400);
|
|
726
725
|
expect(res.data.error).toEqual('contactId is required for contactType:CLOUD.');
|
|
727
726
|
expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactType: CLOUD"), {
|
|
728
|
-
file: _constants2.
|
|
727
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
729
728
|
method: _constants2.METHODS.CREATE_CONTACT
|
|
730
729
|
});
|
|
731
730
|
contact.contactId = mockContactResponse.contactId;
|
|
732
|
-
|
|
731
|
+
_context0.next = 18;
|
|
733
732
|
return contactClient.createContact(contact);
|
|
734
733
|
case 18:
|
|
735
|
-
res =
|
|
734
|
+
res = _context0.sent;
|
|
736
735
|
expect(res.statusCode).toEqual(201);
|
|
737
736
|
expect((_res$data$contact3 = res.data.contact) === null || _res$data$contact3 === void 0 ? void 0 : _res$data$contact3.contactId).toBe(mockContactResponse.contactId);
|
|
738
737
|
expect(webex.request).toBeCalledTimes(3);
|
|
@@ -766,19 +765,19 @@ describe('ContactClient Tests', function () {
|
|
|
766
765
|
}
|
|
767
766
|
});
|
|
768
767
|
expect(_Logger.default.log).toBeCalledWith("Contact successfully created", {
|
|
769
|
-
file: _constants2.
|
|
768
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
770
769
|
method: 'createContact'
|
|
771
770
|
});
|
|
772
771
|
case 26:
|
|
773
772
|
case "end":
|
|
774
|
-
return
|
|
773
|
+
return _context0.stop();
|
|
775
774
|
}
|
|
776
|
-
},
|
|
775
|
+
}, _callee0);
|
|
777
776
|
})));
|
|
778
|
-
it('create a contact - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
777
|
+
it('create a contact - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
|
|
779
778
|
var contact, res;
|
|
780
|
-
return _regenerator.default.wrap(function
|
|
781
|
-
while (1) switch (
|
|
779
|
+
return _regenerator.default.wrap(function _callee1$(_context1) {
|
|
780
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
782
781
|
case 0:
|
|
783
782
|
webex.request.mockRejectedValue(failureResponsePayload);
|
|
784
783
|
contactClient['groups'] = _contactFixtures.mockContactGroupListOne.slice();
|
|
@@ -787,10 +786,10 @@ describe('ContactClient Tests', function () {
|
|
|
787
786
|
contactType: 'CLOUD',
|
|
788
787
|
contactId: '801bb994-343b-4f6b-97ae-d13c91d4b877'
|
|
789
788
|
};
|
|
790
|
-
|
|
789
|
+
_context1.next = 6;
|
|
791
790
|
return contactClient.createContact(contact);
|
|
792
791
|
case 6:
|
|
793
|
-
res =
|
|
792
|
+
res = _context1.sent;
|
|
794
793
|
expect(webex.request).toBeCalledOnceWith({
|
|
795
794
|
uri: contactServiceUrl,
|
|
796
795
|
method: _types.HTTP_METHODS.POST,
|
|
@@ -801,38 +800,38 @@ describe('ContactClient Tests', function () {
|
|
|
801
800
|
})
|
|
802
801
|
});
|
|
803
802
|
expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(failureResponsePayload, {
|
|
804
|
-
file: _constants2.
|
|
803
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
805
804
|
method: _constants2.METHODS.CREATE_CONTACT
|
|
806
805
|
});
|
|
807
806
|
expect(res.statusCode).toEqual(503);
|
|
808
807
|
expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactType: CLOUD"), {
|
|
809
|
-
file: _constants2.
|
|
808
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
810
809
|
method: _constants2.METHODS.CREATE_CONTACT
|
|
811
810
|
});
|
|
812
811
|
expect(_Logger.default.error).toBeCalledWith(Error("Failed to create contact: ".concat(failureResponsePayload)), {
|
|
813
|
-
file: _constants2.
|
|
812
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
814
813
|
method: _constants2.METHODS.CREATE_CONTACT
|
|
815
814
|
});
|
|
816
815
|
case 12:
|
|
817
816
|
case "end":
|
|
818
|
-
return
|
|
817
|
+
return _context1.stop();
|
|
819
818
|
}
|
|
820
|
-
},
|
|
819
|
+
}, _callee1);
|
|
821
820
|
})));
|
|
822
|
-
it('successful deletion of contacts', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
821
|
+
it('successful deletion of contacts', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
823
822
|
var successResponsePayload, response;
|
|
824
|
-
return _regenerator.default.wrap(function
|
|
825
|
-
while (1) switch (
|
|
823
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
824
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
826
825
|
case 0:
|
|
827
826
|
successResponsePayload = {
|
|
828
827
|
statusCode: 204
|
|
829
828
|
};
|
|
830
829
|
contactClient['contacts'] = [_contactFixtures.mockContactListOne[0]];
|
|
831
830
|
webex.request.mockResolvedValue(successResponsePayload);
|
|
832
|
-
|
|
831
|
+
_context10.next = 5;
|
|
833
832
|
return contactClient.deleteContact(_contactFixtures.mockContactListOne[0].contactId);
|
|
834
833
|
case 5:
|
|
835
|
-
response =
|
|
834
|
+
response = _context10.sent;
|
|
836
835
|
expect(response.statusCode).toEqual(204);
|
|
837
836
|
expect(webex.request).toBeCalledOnceWith({
|
|
838
837
|
uri: "".concat(contactServiceUrl, "/").concat(_contactFixtures.mockContactListOne[0].contactId),
|
|
@@ -840,53 +839,53 @@ describe('ContactClient Tests', function () {
|
|
|
840
839
|
});
|
|
841
840
|
expect(contactClient['contacts']).toEqual([]);
|
|
842
841
|
expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactId: ").concat(_contactFixtures.mockContactListOne[0].contactId), {
|
|
843
|
-
file: _constants2.
|
|
842
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
844
843
|
method: _constants2.METHODS.DELETE_CONTACT
|
|
845
844
|
});
|
|
846
845
|
expect(_Logger.default.info).toBeCalledWith("Deleting contact : ".concat(_contactFixtures.mockContactListOne[0].contactId), {
|
|
847
|
-
file: _constants2.
|
|
846
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
848
847
|
method: _constants2.METHODS.DELETE_CONTACT
|
|
849
848
|
});
|
|
850
849
|
case 11:
|
|
851
850
|
case "end":
|
|
852
|
-
return
|
|
851
|
+
return _context10.stop();
|
|
853
852
|
}
|
|
854
|
-
},
|
|
853
|
+
}, _callee10);
|
|
855
854
|
})));
|
|
856
|
-
it('delete a contact - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
855
|
+
it('delete a contact - service unavailable', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
|
857
856
|
var response;
|
|
858
|
-
return _regenerator.default.wrap(function
|
|
859
|
-
while (1) switch (
|
|
857
|
+
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
858
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
860
859
|
case 0:
|
|
861
860
|
contactClient['contacts'] = _contactFixtures.mockContactListOne;
|
|
862
861
|
webex.request.mockRejectedValue(failureResponsePayload);
|
|
863
|
-
|
|
862
|
+
_context11.next = 4;
|
|
864
863
|
return contactClient.deleteContact(_contactFixtures.mockContactListOne[0].contactId);
|
|
865
864
|
case 4:
|
|
866
|
-
response =
|
|
865
|
+
response = _context11.sent;
|
|
867
866
|
expect(response.statusCode).toEqual(503);
|
|
868
867
|
expect(webex.request).toBeCalledOnceWith({
|
|
869
868
|
uri: "".concat(contactServiceUrl, "/").concat(_contactFixtures.mockContactListOne[0].contactId),
|
|
870
869
|
method: _types.HTTP_METHODS.DELETE
|
|
871
870
|
});
|
|
872
871
|
expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith(failureResponsePayload, {
|
|
873
|
-
file: _constants2.
|
|
872
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
874
873
|
method: _constants2.METHODS.DELETE_CONTACT
|
|
875
874
|
});
|
|
876
875
|
expect(contactClient['contacts']).toEqual(_contactFixtures.mockContactListOne);
|
|
877
876
|
expect(_Logger.default.info).toBeCalledWith("".concat(_constants.METHOD_START_MESSAGE, " with contactId: ").concat(_contactFixtures.mockContactListOne[0].contactId), {
|
|
878
|
-
file: _constants2.
|
|
877
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
879
878
|
method: _constants2.METHODS.DELETE_CONTACT
|
|
880
879
|
});
|
|
881
880
|
expect(_Logger.default.info).toBeCalledWith("Deleting contact : ".concat(_contactFixtures.mockContactListOne[0].contactId), {
|
|
882
|
-
file: _constants2.
|
|
881
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
883
882
|
method: _constants2.METHODS.DELETE_CONTACT
|
|
884
883
|
});
|
|
885
884
|
case 11:
|
|
886
885
|
case "end":
|
|
887
|
-
return
|
|
886
|
+
return _context11.stop();
|
|
888
887
|
}
|
|
889
|
-
},
|
|
888
|
+
}, _callee11);
|
|
890
889
|
})));
|
|
891
890
|
it('test resolveContacts function for a minimal contact with few details', function () {
|
|
892
891
|
var contact = contactClient['resolveCloudContacts']({
|
|
@@ -952,14 +951,14 @@ describe('ContactClient Tests', function () {
|
|
|
952
951
|
}, _contactFixtures.mockSCIMMinListResponse);
|
|
953
952
|
expect(contact).toEqual(null);
|
|
954
953
|
expect(warnSpy).toHaveBeenCalledWith('Error occurred while parsing resolved contacts', {
|
|
955
|
-
file: _constants2.
|
|
954
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
956
955
|
method: 'resolveCloudContacts'
|
|
957
956
|
});
|
|
958
957
|
});
|
|
959
|
-
it('logs error for chunk when scimQuery API call fails in the loop for getContacts', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
958
|
+
it('logs error for chunk when scimQuery API call fails in the loop for getContacts', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
960
959
|
var mockData, respPayload, warnSpy, infoSpy, logSpy;
|
|
961
|
-
return _regenerator.default.wrap(function
|
|
962
|
-
while (1) switch (
|
|
960
|
+
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
961
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
963
962
|
case 0:
|
|
964
963
|
mockData = errorCodes[0];
|
|
965
964
|
respPayload = {
|
|
@@ -977,28 +976,28 @@ describe('ContactClient Tests', function () {
|
|
|
977
976
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
978
977
|
infoSpy = jest.spyOn(_Logger.default, 'info');
|
|
979
978
|
logSpy = jest.spyOn(_Logger.default, 'log');
|
|
980
|
-
|
|
979
|
+
_context12.next = 9;
|
|
981
980
|
return contactClient.getContacts();
|
|
982
981
|
case 9:
|
|
983
982
|
expect(webex.request).toBeCalledTimes(2);
|
|
984
983
|
expect(warnSpy).toBeCalledTimes(1);
|
|
985
984
|
expect(warnSpy).toBeCalledWith('Error processing contact chunk 0-50', {
|
|
986
|
-
file:
|
|
985
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
987
986
|
method: _constants2.METHODS.GET_CONTACTS
|
|
988
987
|
});
|
|
989
988
|
expect(infoSpy).toBeCalledWith(_constants.METHOD_START_MESSAGE, {
|
|
990
|
-
file: _constants2.
|
|
989
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
991
990
|
method: _constants2.METHODS.GET_CONTACTS
|
|
992
991
|
});
|
|
993
992
|
expect(logSpy).toBeCalledWith('Successfully fetched contacts and groups', {
|
|
994
|
-
file: _constants2.
|
|
993
|
+
file: _constants2.CONTACTS_CLIENT,
|
|
995
994
|
method: _constants2.METHODS.GET_CONTACTS
|
|
996
995
|
});
|
|
997
996
|
case 14:
|
|
998
997
|
case "end":
|
|
999
|
-
return
|
|
998
|
+
return _context12.stop();
|
|
1000
999
|
}
|
|
1001
|
-
},
|
|
1000
|
+
}, _callee12);
|
|
1002
1001
|
})));
|
|
1003
1002
|
});
|
|
1004
1003
|
//# sourceMappingURL=ContactsClient.test.js.map
|