@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 _voicemailFixture = require("./voicemailFixture");
|
|
|
22
22
|
var _WxCallBackendConnector = require("./WxCallBackendConnector");
|
|
23
23
|
var utils = _interopRequireWildcard(require("../common/Utils"));
|
|
24
24
|
var _constants2 = require("../common/constants");
|
|
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; } /* eslint-disable dot-notation */
|
|
29
28
|
jest.spyOn(utils, 'uploadLogs').mockResolvedValue(undefined);
|
|
@@ -70,7 +69,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
70
69
|
expect(storeVoicemailListSpy).not.toBeCalled();
|
|
71
70
|
expect(fetchVoicemailListSpy).not.toBeCalled();
|
|
72
71
|
});
|
|
73
|
-
it('verify failure voicemail listing when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
72
|
+
it('verify failure voicemail listing when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
74
73
|
var failurePayload, response, responseDetails;
|
|
75
74
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
76
75
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -112,7 +111,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
112
111
|
}
|
|
113
112
|
}, _callee);
|
|
114
113
|
})));
|
|
115
|
-
it('verify failure voicemailMarkAsRead when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
114
|
+
it('verify failure voicemailMarkAsRead when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
116
115
|
var failurePayload, responseDetails, response;
|
|
117
116
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
118
117
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -156,7 +155,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
156
155
|
}
|
|
157
156
|
}, _callee2);
|
|
158
157
|
})));
|
|
159
|
-
it('verify failure voicemailMarkAsUnread when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
158
|
+
it('verify failure voicemailMarkAsUnread when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
160
159
|
var failurePayload, responseDetails, response;
|
|
161
160
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
162
161
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -200,7 +199,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
200
199
|
}
|
|
201
200
|
}, _callee3);
|
|
202
201
|
})));
|
|
203
|
-
it('verify failure delete Voicemail when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
202
|
+
it('verify failure delete Voicemail when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
204
203
|
var failurePayload, responseDetails, response;
|
|
205
204
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
206
205
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -244,7 +243,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
244
243
|
}
|
|
245
244
|
}, _callee4);
|
|
246
245
|
})));
|
|
247
|
-
it('verify failure for get transcript when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
246
|
+
it('verify failure for get transcript when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
248
247
|
var failurePayload, responseDetails, response;
|
|
249
248
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
250
249
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -278,7 +277,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
278
277
|
}
|
|
279
278
|
}, _callee5);
|
|
280
279
|
})));
|
|
281
|
-
it('verify failure voicemail listing when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
280
|
+
it('verify failure voicemail listing when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
282
281
|
var failurePayload, response, responseDetails;
|
|
283
282
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
284
283
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -312,7 +311,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
312
311
|
}
|
|
313
312
|
}, _callee6);
|
|
314
313
|
})));
|
|
315
|
-
it('verify failure voicemailMarkAsRead when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
314
|
+
it('verify failure voicemailMarkAsRead when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
316
315
|
var failurePayload, responseDetails, response;
|
|
317
316
|
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
318
317
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -346,7 +345,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
346
345
|
}
|
|
347
346
|
}, _callee7);
|
|
348
347
|
})));
|
|
349
|
-
it('verify failure voicemailMarkAsUnread when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
348
|
+
it('verify failure voicemailMarkAsUnread when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
350
349
|
var failurePayload, responseDetails, response;
|
|
351
350
|
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
352
351
|
while (1) switch (_context8.prev = _context8.next) {
|
|
@@ -380,7 +379,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
380
379
|
}
|
|
381
380
|
}, _callee8);
|
|
382
381
|
})));
|
|
383
|
-
it('verify failure delete Voicemail when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
382
|
+
it('verify failure delete Voicemail when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
384
383
|
var failurePayload, responseDetails, response;
|
|
385
384
|
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
386
385
|
while (1) switch (_context9.prev = _context9.next) {
|
|
@@ -414,10 +413,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
414
413
|
}
|
|
415
414
|
}, _callee9);
|
|
416
415
|
})));
|
|
417
|
-
it('verify failure for get transcript when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
416
|
+
it('verify failure for get transcript when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
418
417
|
var failurePayload, responseDetails, response;
|
|
419
|
-
return _regenerator.default.wrap(function
|
|
420
|
-
while (1) switch (
|
|
418
|
+
return _regenerator.default.wrap(function _callee0$(_context0) {
|
|
419
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
421
420
|
case 0:
|
|
422
421
|
failurePayload = {
|
|
423
422
|
statusCode: 401
|
|
@@ -430,10 +429,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
430
429
|
},
|
|
431
430
|
message: FAILURE
|
|
432
431
|
};
|
|
433
|
-
|
|
432
|
+
_context0.next = 5;
|
|
434
433
|
return wxCallBackendConnector.getVMTranscript(messageId.$);
|
|
435
434
|
case 5:
|
|
436
|
-
response =
|
|
435
|
+
response = _context0.sent;
|
|
437
436
|
expect(response).toStrictEqual(responseDetails);
|
|
438
437
|
expect(response === null || response === void 0 ? void 0 : response.message).toBe(FAILURE);
|
|
439
438
|
expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith({
|
|
@@ -444,23 +443,23 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
444
443
|
});
|
|
445
444
|
case 9:
|
|
446
445
|
case "end":
|
|
447
|
-
return
|
|
446
|
+
return _context0.stop();
|
|
448
447
|
}
|
|
449
|
-
},
|
|
448
|
+
}, _callee0);
|
|
450
449
|
})));
|
|
451
|
-
it('verify failure voicemail summary when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
450
|
+
it('verify failure voicemail summary when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
|
|
452
451
|
var failurePayload, response, responseDetails;
|
|
453
|
-
return _regenerator.default.wrap(function
|
|
454
|
-
while (1) switch (
|
|
452
|
+
return _regenerator.default.wrap(function _callee1$(_context1) {
|
|
453
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
455
454
|
case 0:
|
|
456
455
|
failurePayload = {
|
|
457
456
|
statusCode: 400
|
|
458
457
|
};
|
|
459
458
|
webex.request.mockRejectedValueOnce(failurePayload);
|
|
460
|
-
|
|
459
|
+
_context1.next = 4;
|
|
461
460
|
return wxCallBackendConnector.getVoicemailSummary();
|
|
462
461
|
case 4:
|
|
463
|
-
response =
|
|
462
|
+
response = _context1.sent;
|
|
464
463
|
responseDetails = {
|
|
465
464
|
statusCode: 400,
|
|
466
465
|
data: {
|
|
@@ -490,21 +489,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
490
489
|
}));
|
|
491
490
|
case 11:
|
|
492
491
|
case "end":
|
|
493
|
-
return
|
|
492
|
+
return _context1.stop();
|
|
494
493
|
}
|
|
495
|
-
},
|
|
494
|
+
}, _callee1);
|
|
496
495
|
})));
|
|
497
|
-
it('verify failure case for the voicemail content when api response is invalid', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
496
|
+
it('verify failure case for the voicemail content when api response is invalid', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
498
497
|
var xsiActionsEndpointUrl, response;
|
|
499
|
-
return _regenerator.default.wrap(function
|
|
500
|
-
while (1) switch (
|
|
498
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
499
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
501
500
|
case 0:
|
|
502
501
|
webex.request.mockResolvedValueOnce({});
|
|
503
502
|
xsiActionsEndpointUrl = _voicemailFixture.mockWXCData.body.items[0].xsiActionsEndpoint;
|
|
504
|
-
|
|
503
|
+
_context10.next = 4;
|
|
505
504
|
return wxCallBackendConnector.getVoicemailContent(messageId);
|
|
506
505
|
case 4:
|
|
507
|
-
response =
|
|
506
|
+
response = _context10.sent;
|
|
508
507
|
expect(response).toStrictEqual(_voicemailFixture.responseDetails422);
|
|
509
508
|
expect(webex.request).toBeCalledOnceWith({
|
|
510
509
|
method: _types2.HTTP_METHODS.GET,
|
|
@@ -517,9 +516,9 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
517
516
|
});
|
|
518
517
|
case 8:
|
|
519
518
|
case "end":
|
|
520
|
-
return
|
|
519
|
+
return _context10.stop();
|
|
521
520
|
}
|
|
522
|
-
},
|
|
521
|
+
}, _callee10);
|
|
523
522
|
})));
|
|
524
523
|
});
|
|
525
524
|
describe('Voicemail success tests for webex call', function () {
|
|
@@ -532,10 +531,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
532
531
|
afterEach(function () {
|
|
533
532
|
jest.clearAllMocks();
|
|
534
533
|
});
|
|
535
|
-
it('verify successfully fetching voicemail summary with newMessages and newUrgentMessage', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
534
|
+
it('verify successfully fetching voicemail summary with newMessages and newUrgentMessage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
|
536
535
|
var mockRawRequest, mockVoicemailSummary, voicemailSummary, response, voicemailSummaryResponseInfo, responseDetails;
|
|
537
|
-
return _regenerator.default.wrap(function
|
|
538
|
-
while (1) switch (
|
|
536
|
+
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
537
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
539
538
|
case 0:
|
|
540
539
|
mockRawRequest = {
|
|
541
540
|
response: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><VoiceMailMessageSummary xmlns=\"http://schema.broadsoft.com/xsi\"><summary><newMessages>2</newMessages><newUrgentMessages>1</newUrgentMessages></summary></VoiceMailMessageSummary>"
|
|
@@ -546,10 +545,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
546
545
|
};
|
|
547
546
|
voicemailSummary = mockVoicemailSummary;
|
|
548
547
|
webex.request.mockResolvedValueOnce(voicemailSummary);
|
|
549
|
-
|
|
548
|
+
_context11.next = 6;
|
|
550
549
|
return wxCallBackendConnector.getVoicemailSummary();
|
|
551
550
|
case 6:
|
|
552
|
-
response =
|
|
551
|
+
response = _context11.sent;
|
|
553
552
|
voicemailSummaryResponseInfo = {
|
|
554
553
|
voicemailSummary: {
|
|
555
554
|
newMessages: 2,
|
|
@@ -579,14 +578,14 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
579
578
|
});
|
|
580
579
|
case 13:
|
|
581
580
|
case "end":
|
|
582
|
-
return
|
|
581
|
+
return _context11.stop();
|
|
583
582
|
}
|
|
584
|
-
},
|
|
583
|
+
}, _callee11);
|
|
585
584
|
})));
|
|
586
|
-
it('verify successfully fetching voicemail summary with oldMessages and oldUrgentMessage', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
585
|
+
it('verify successfully fetching voicemail summary with oldMessages and oldUrgentMessage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
587
586
|
var mockRawRequest, mockVoicemailSummary, voicemailSummary, response, voicemailSummaryResponseInfo, responseDetails;
|
|
588
|
-
return _regenerator.default.wrap(function
|
|
589
|
-
while (1) switch (
|
|
587
|
+
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
588
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
590
589
|
case 0:
|
|
591
590
|
mockRawRequest = {
|
|
592
591
|
response: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><VoiceMailMessageSummary xmlns=\"http://schema.broadsoft.com/xsi\"><summary><oldMessages>2</oldMessages><oldUrgentMessages>1</oldUrgentMessages></summary></VoiceMailMessageSummary>"
|
|
@@ -597,10 +596,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
597
596
|
};
|
|
598
597
|
voicemailSummary = mockVoicemailSummary;
|
|
599
598
|
webex.request.mockResolvedValueOnce(voicemailSummary);
|
|
600
|
-
|
|
599
|
+
_context12.next = 6;
|
|
601
600
|
return wxCallBackendConnector.getVoicemailSummary();
|
|
602
601
|
case 6:
|
|
603
|
-
response =
|
|
602
|
+
response = _context12.sent;
|
|
604
603
|
voicemailSummaryResponseInfo = {
|
|
605
604
|
voicemailSummary: {
|
|
606
605
|
newMessages: 0,
|
|
@@ -622,14 +621,14 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
622
621
|
expect(response).toStrictEqual(responseDetails);
|
|
623
622
|
case 11:
|
|
624
623
|
case "end":
|
|
625
|
-
return
|
|
624
|
+
return _context12.stop();
|
|
626
625
|
}
|
|
627
|
-
},
|
|
626
|
+
}, _callee12);
|
|
628
627
|
})));
|
|
629
|
-
it('verify that PENDING transcription status is passed while transcribing is in progress in the backend', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
628
|
+
it('verify that PENDING transcription status is passed while transcribing is in progress in the backend', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13() {
|
|
630
629
|
var pending, mockPendingResponse, mockVoicemailTranscript, voicemailTranscript, response, responseDetails;
|
|
631
|
-
return _regenerator.default.wrap(function
|
|
632
|
-
while (1) switch (
|
|
630
|
+
return _regenerator.default.wrap(function _callee13$(_context13) {
|
|
631
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
633
632
|
case 0:
|
|
634
633
|
pending = 'PENDING';
|
|
635
634
|
mockPendingResponse = {
|
|
@@ -640,10 +639,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
640
639
|
});
|
|
641
640
|
voicemailTranscript = mockVoicemailTranscript;
|
|
642
641
|
webex.request.mockResolvedValueOnce(voicemailTranscript);
|
|
643
|
-
|
|
642
|
+
_context13.next = 7;
|
|
644
643
|
return wxCallBackendConnector.getVMTranscript('98099432-9d81-4224-bd04-00def73cd262');
|
|
645
644
|
case 7:
|
|
646
|
-
response =
|
|
645
|
+
response = _context13.sent;
|
|
647
646
|
responseDetails = {
|
|
648
647
|
data: {
|
|
649
648
|
voicemailTranscript: undefined
|
|
@@ -655,14 +654,14 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
655
654
|
expect(response).toStrictEqual(responseDetails);
|
|
656
655
|
case 11:
|
|
657
656
|
case "end":
|
|
658
|
-
return
|
|
657
|
+
return _context13.stop();
|
|
659
658
|
}
|
|
660
|
-
},
|
|
659
|
+
}, _callee13);
|
|
661
660
|
})));
|
|
662
|
-
it('verify successfully fetching voicemail transcript', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
661
|
+
it('verify successfully fetching voicemail transcript', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
|
|
663
662
|
var ready, mockRawRequest, mockVoicemailTranscript, voicemailTranscript, response, voicemailResponseInfo, responseDetails;
|
|
664
|
-
return _regenerator.default.wrap(function
|
|
665
|
-
while (1) switch (
|
|
663
|
+
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
664
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
666
665
|
case 0:
|
|
667
666
|
ready = 'READY';
|
|
668
667
|
mockRawRequest = {
|
|
@@ -673,10 +672,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
673
672
|
});
|
|
674
673
|
voicemailTranscript = mockVoicemailTranscript;
|
|
675
674
|
webex.request.mockResolvedValueOnce(voicemailTranscript);
|
|
676
|
-
|
|
675
|
+
_context14.next = 7;
|
|
677
676
|
return wxCallBackendConnector.getVMTranscript('98099432-9d81-4224-bd04-00def73cd262');
|
|
678
677
|
case 7:
|
|
679
|
-
response =
|
|
678
|
+
response = _context14.sent;
|
|
680
679
|
voicemailResponseInfo = {
|
|
681
680
|
voicemailTranscript: 'Hi, uh, testing, voice mail script, so dropping this message to be able to fetch it later.'
|
|
682
681
|
};
|
|
@@ -689,21 +688,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
689
688
|
expect(response).toStrictEqual(responseDetails);
|
|
690
689
|
case 12:
|
|
691
690
|
case "end":
|
|
692
|
-
return
|
|
691
|
+
return _context14.stop();
|
|
693
692
|
}
|
|
694
|
-
},
|
|
693
|
+
}, _callee14);
|
|
695
694
|
})));
|
|
696
|
-
it('verify successful voicemail listing in descending order with offset 0 and limit 20', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
695
|
+
it('verify successful voicemail listing in descending order with offset 0 and limit 20', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
697
696
|
var voiceMailPayload, response, voicemailResponseInfo, responseDetails;
|
|
698
|
-
return _regenerator.default.wrap(function
|
|
699
|
-
while (1) switch (
|
|
697
|
+
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
698
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
700
699
|
case 0:
|
|
701
700
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
702
701
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
703
|
-
|
|
702
|
+
_context15.next = 4;
|
|
704
703
|
return wxCallBackendConnector.getVoicemailList(0, 20, _types2.SORT.DESC, true);
|
|
705
704
|
case 4:
|
|
706
|
-
response =
|
|
705
|
+
response = _context15.sent;
|
|
707
706
|
voicemailResponseInfo = {
|
|
708
707
|
voicemailList: _voicemailFixture.getDescVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo
|
|
709
708
|
};
|
|
@@ -722,21 +721,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
722
721
|
});
|
|
723
722
|
case 12:
|
|
724
723
|
case "end":
|
|
725
|
-
return
|
|
724
|
+
return _context15.stop();
|
|
726
725
|
}
|
|
727
|
-
},
|
|
726
|
+
}, _callee15);
|
|
728
727
|
})));
|
|
729
|
-
it('verify successful voicemail listing in ascending order with offset 0 and limit 20', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
728
|
+
it('verify successful voicemail listing in ascending order with offset 0 and limit 20', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
730
729
|
var voiceMailPayload, response, voicemailResponseInfo, responseDetails;
|
|
731
|
-
return _regenerator.default.wrap(function
|
|
732
|
-
while (1) switch (
|
|
730
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
731
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
733
732
|
case 0:
|
|
734
733
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
735
734
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
736
|
-
|
|
735
|
+
_context16.next = 4;
|
|
737
736
|
return wxCallBackendConnector.getVoicemailList(0, 20, _types2.SORT.ASC, true);
|
|
738
737
|
case 4:
|
|
739
|
-
response =
|
|
738
|
+
response = _context16.sent;
|
|
740
739
|
voicemailResponseInfo = {
|
|
741
740
|
voicemailList: _voicemailFixture.getAscVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo
|
|
742
741
|
};
|
|
@@ -755,21 +754,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
755
754
|
});
|
|
756
755
|
case 12:
|
|
757
756
|
case "end":
|
|
758
|
-
return
|
|
757
|
+
return _context16.stop();
|
|
759
758
|
}
|
|
760
|
-
},
|
|
759
|
+
}, _callee16);
|
|
761
760
|
})));
|
|
762
|
-
it('verify successful voicemail listing in descending order with offset 0 and limit 2 with incorrect SORT param', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
761
|
+
it('verify successful voicemail listing in descending order with offset 0 and limit 2 with incorrect SORT param', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
|
|
763
762
|
var voiceMailPayload, response, voicemailResponseInfo, responseDetails;
|
|
764
|
-
return _regenerator.default.wrap(function
|
|
765
|
-
while (1) switch (
|
|
763
|
+
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
764
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
766
765
|
case 0:
|
|
767
766
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
768
767
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
769
|
-
|
|
768
|
+
_context17.next = 4;
|
|
770
769
|
return wxCallBackendConnector.getVoicemailList(0, 2, 'abcd', true);
|
|
771
770
|
case 4:
|
|
772
|
-
response =
|
|
771
|
+
response = _context17.sent;
|
|
773
772
|
voicemailResponseInfo = {
|
|
774
773
|
voicemailList: _voicemailFixture.getDescVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo.slice(0, 2)
|
|
775
774
|
};
|
|
@@ -788,21 +787,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
788
787
|
});
|
|
789
788
|
case 12:
|
|
790
789
|
case "end":
|
|
791
|
-
return
|
|
790
|
+
return _context17.stop();
|
|
792
791
|
}
|
|
793
|
-
},
|
|
792
|
+
}, _callee17);
|
|
794
793
|
})));
|
|
795
|
-
it('verify successful voicemail listing in ascending order with offset 0 and limit 4', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
794
|
+
it('verify successful voicemail listing in ascending order with offset 0 and limit 4', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
|
|
796
795
|
var voiceMailPayload, response, voicemailResponseInfo, responseDetails;
|
|
797
|
-
return _regenerator.default.wrap(function
|
|
798
|
-
while (1) switch (
|
|
796
|
+
return _regenerator.default.wrap(function _callee18$(_context18) {
|
|
797
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
799
798
|
case 0:
|
|
800
799
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
801
800
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
802
|
-
|
|
801
|
+
_context18.next = 4;
|
|
803
802
|
return wxCallBackendConnector.getVoicemailList(0, 4, _types2.SORT.ASC, true);
|
|
804
803
|
case 4:
|
|
805
|
-
response =
|
|
804
|
+
response = _context18.sent;
|
|
806
805
|
voicemailResponseInfo = {
|
|
807
806
|
voicemailList: _voicemailFixture.getAscVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo.slice(0, 4)
|
|
808
807
|
};
|
|
@@ -821,20 +820,20 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
821
820
|
});
|
|
822
821
|
case 12:
|
|
823
822
|
case "end":
|
|
824
|
-
return
|
|
823
|
+
return _context18.stop();
|
|
825
824
|
}
|
|
826
|
-
},
|
|
825
|
+
}, _callee18);
|
|
827
826
|
})));
|
|
828
|
-
it('verify empty voicemail list data', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
827
|
+
it('verify empty voicemail list data', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
|
|
829
828
|
var response, voicemailResponseInfo, responseDetails;
|
|
830
|
-
return _regenerator.default.wrap(function
|
|
831
|
-
while (1) switch (
|
|
829
|
+
return _regenerator.default.wrap(function _callee19$(_context19) {
|
|
830
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
832
831
|
case 0:
|
|
833
832
|
webex.request.mockResolvedValueOnce(_voicemailFixture.getEmptyVoicemailListJsonWxC);
|
|
834
|
-
|
|
833
|
+
_context19.next = 3;
|
|
835
834
|
return wxCallBackendConnector.getVoicemailList(0, 20, _types2.SORT.DESC, true);
|
|
836
835
|
case 3:
|
|
837
|
-
response =
|
|
836
|
+
response = _context19.sent;
|
|
838
837
|
voicemailResponseInfo = {
|
|
839
838
|
voicemailList: []
|
|
840
839
|
};
|
|
@@ -852,20 +851,20 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
852
851
|
});
|
|
853
852
|
case 10:
|
|
854
853
|
case "end":
|
|
855
|
-
return
|
|
854
|
+
return _context19.stop();
|
|
856
855
|
}
|
|
857
|
-
},
|
|
856
|
+
}, _callee19);
|
|
858
857
|
})));
|
|
859
|
-
it('verify empty voicemail list data when response data is in invalid format', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
858
|
+
it('verify empty voicemail list data when response data is in invalid format', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
|
|
860
859
|
var response, voicemailResponseInfo, responseDetails;
|
|
861
|
-
return _regenerator.default.wrap(function
|
|
862
|
-
while (1) switch (
|
|
860
|
+
return _regenerator.default.wrap(function _callee20$(_context20) {
|
|
861
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
863
862
|
case 0:
|
|
864
863
|
webex.request.mockResolvedValueOnce(_voicemailFixture.getInvalidVoicemailListJsonWxC);
|
|
865
|
-
|
|
864
|
+
_context20.next = 3;
|
|
866
865
|
return wxCallBackendConnector.getVoicemailList(0, 20, _types2.SORT.DESC, true);
|
|
867
866
|
case 3:
|
|
868
|
-
response =
|
|
867
|
+
response = _context20.sent;
|
|
869
868
|
voicemailResponseInfo = {
|
|
870
869
|
voicemailList: [{}]
|
|
871
870
|
};
|
|
@@ -883,23 +882,23 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
883
882
|
});
|
|
884
883
|
case 10:
|
|
885
884
|
case "end":
|
|
886
|
-
return
|
|
885
|
+
return _context20.stop();
|
|
887
886
|
}
|
|
888
|
-
},
|
|
887
|
+
}, _callee20);
|
|
889
888
|
})));
|
|
890
|
-
it('verify successful fetching of voicemail list without refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
889
|
+
it('verify successful fetching of voicemail list without refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
891
890
|
var voiceMailPayload, vmEncodedList, response, voicemailResponseInfo, responseDetails;
|
|
892
|
-
return _regenerator.default.wrap(function
|
|
893
|
-
while (1) switch (
|
|
891
|
+
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
892
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
894
893
|
case 0:
|
|
895
894
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
896
895
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
897
896
|
vmEncodedList = Buffer.from((0, _stringify.default)(_voicemailFixture.getAscVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo), 'utf8').toString('base64');
|
|
898
897
|
sessionStorage.setItem(CONTEXT, vmEncodedList.toString());
|
|
899
|
-
|
|
898
|
+
_context21.next = 6;
|
|
900
899
|
return wxCallBackendConnector.getVoicemailList(0, 4, _types2.SORT.ASC, false);
|
|
901
900
|
case 6:
|
|
902
|
-
response =
|
|
901
|
+
response = _context21.sent;
|
|
903
902
|
voicemailResponseInfo = {
|
|
904
903
|
voicemailList: _voicemailFixture.getAscVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo.slice(0, 4)
|
|
905
904
|
};
|
|
@@ -919,98 +918,98 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
919
918
|
sessionStorage.removeItem(CONTEXT);
|
|
920
919
|
case 15:
|
|
921
920
|
case "end":
|
|
922
|
-
return
|
|
921
|
+
return _context21.stop();
|
|
923
922
|
}
|
|
924
|
-
},
|
|
923
|
+
}, _callee21);
|
|
925
924
|
})));
|
|
926
|
-
it('verify successful voicemailMarkAsRead', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
925
|
+
it('verify successful voicemailMarkAsRead', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
|
|
927
926
|
var voiceMailPayload, response;
|
|
928
|
-
return _regenerator.default.wrap(function
|
|
929
|
-
while (1) switch (
|
|
927
|
+
return _regenerator.default.wrap(function _callee22$(_context22) {
|
|
928
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
930
929
|
case 0:
|
|
931
930
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
932
931
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
933
|
-
|
|
932
|
+
_context22.next = 4;
|
|
934
933
|
return wxCallBackendConnector.voicemailMarkAsRead(messageId.$);
|
|
935
934
|
case 4:
|
|
936
|
-
response =
|
|
935
|
+
response = _context22.sent;
|
|
937
936
|
expect(response).toStrictEqual(EMPTY_SUCCESS_RESPONSE);
|
|
938
937
|
case 6:
|
|
939
938
|
case "end":
|
|
940
|
-
return
|
|
939
|
+
return _context22.stop();
|
|
941
940
|
}
|
|
942
|
-
},
|
|
941
|
+
}, _callee22);
|
|
943
942
|
})));
|
|
944
|
-
it('verify successful voicemailMarkAsUnread', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
943
|
+
it('verify successful voicemailMarkAsUnread', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
|
|
945
944
|
var voiceMailPayload, response;
|
|
946
|
-
return _regenerator.default.wrap(function
|
|
947
|
-
while (1) switch (
|
|
945
|
+
return _regenerator.default.wrap(function _callee23$(_context23) {
|
|
946
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
948
947
|
case 0:
|
|
949
948
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
950
949
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
951
|
-
|
|
950
|
+
_context23.next = 4;
|
|
952
951
|
return wxCallBackendConnector.voicemailMarkAsUnread(messageId.$);
|
|
953
952
|
case 4:
|
|
954
|
-
response =
|
|
953
|
+
response = _context23.sent;
|
|
955
954
|
expect(response).toStrictEqual(EMPTY_SUCCESS_RESPONSE);
|
|
956
955
|
case 6:
|
|
957
956
|
case "end":
|
|
958
|
-
return
|
|
957
|
+
return _context23.stop();
|
|
959
958
|
}
|
|
960
|
-
},
|
|
959
|
+
}, _callee23);
|
|
961
960
|
})));
|
|
962
|
-
it('verify successful deleteVoicemail', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
961
|
+
it('verify successful deleteVoicemail', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
|
|
963
962
|
var voiceMailPayload, response;
|
|
964
|
-
return _regenerator.default.wrap(function
|
|
965
|
-
while (1) switch (
|
|
963
|
+
return _regenerator.default.wrap(function _callee24$(_context24) {
|
|
964
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
966
965
|
case 0:
|
|
967
966
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
968
967
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
969
|
-
|
|
968
|
+
_context24.next = 4;
|
|
970
969
|
return wxCallBackendConnector.deleteVoicemail(messageId.$);
|
|
971
970
|
case 4:
|
|
972
|
-
response =
|
|
971
|
+
response = _context24.sent;
|
|
973
972
|
expect(response).toStrictEqual(EMPTY_SUCCESS_RESPONSE);
|
|
974
973
|
case 6:
|
|
975
974
|
case "end":
|
|
976
|
-
return
|
|
975
|
+
return _context24.stop();
|
|
977
976
|
}
|
|
978
|
-
},
|
|
977
|
+
}, _callee24);
|
|
979
978
|
})));
|
|
980
|
-
it('verify resolveContact', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
979
|
+
it('verify resolveContact', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
|
|
981
980
|
var voiceMailPayload, samplePeopleListResponse, displayInfo;
|
|
982
|
-
return _regenerator.default.wrap(function
|
|
983
|
-
while (1) switch (
|
|
981
|
+
return _regenerator.default.wrap(function _callee25$(_context25) {
|
|
982
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
984
983
|
case 0:
|
|
985
984
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
986
985
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
987
986
|
samplePeopleListResponse = (0, _testUtil.getSamplePeopleListResponse)();
|
|
988
987
|
webex.people.list.mockResolvedValue(samplePeopleListResponse);
|
|
989
|
-
|
|
988
|
+
_context25.next = 6;
|
|
990
989
|
return wxCallBackendConnector.resolveContact({
|
|
991
990
|
name: {
|
|
992
991
|
$: 'Name'
|
|
993
992
|
}
|
|
994
993
|
});
|
|
995
994
|
case 6:
|
|
996
|
-
displayInfo =
|
|
995
|
+
displayInfo = _context25.sent;
|
|
997
996
|
expect(displayInfo === null || displayInfo === void 0 ? void 0 : displayInfo.id).toStrictEqual(Buffer.from(samplePeopleListResponse.items[0].id, 'base64').toString('binary').split('/').pop());
|
|
998
997
|
expect(displayInfo === null || displayInfo === void 0 ? void 0 : displayInfo.name).toStrictEqual(samplePeopleListResponse.items[0].displayName);
|
|
999
998
|
expect(displayInfo === null || displayInfo === void 0 ? void 0 : displayInfo.num).toStrictEqual(samplePeopleListResponse.items[0].phoneNumbers[0].value);
|
|
1000
999
|
expect(displayInfo === null || displayInfo === void 0 ? void 0 : displayInfo.avatarSrc).toStrictEqual(samplePeopleListResponse.items[0].avatar);
|
|
1001
1000
|
case 11:
|
|
1002
1001
|
case "end":
|
|
1003
|
-
return
|
|
1002
|
+
return _context25.stop();
|
|
1004
1003
|
}
|
|
1005
|
-
},
|
|
1004
|
+
}, _callee25);
|
|
1006
1005
|
})));
|
|
1007
1006
|
});
|
|
1008
1007
|
describe('Voicemail Fedramp webex call Backend Connector Test case', function () {
|
|
1009
1008
|
webex.config.fedramp = true;
|
|
1010
1009
|
var MOCK_FEDRAMP_URL = 'https://mock-fedramp-url/com.broadsoft.xsi-actions';
|
|
1011
|
-
beforeAll(
|
|
1012
|
-
return _regenerator.default.wrap(function
|
|
1013
|
-
while (1) switch (
|
|
1010
|
+
beforeAll(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
|
|
1011
|
+
return _regenerator.default.wrap(function _callee26$(_context26) {
|
|
1012
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
1014
1013
|
case 0:
|
|
1015
1014
|
webex.credentials.getUserToken.mockResolvedValue('mockAuthToken');
|
|
1016
1015
|
jest.spyOn(utils, 'getXsiActionEndpoint').mockResolvedValue(MOCK_FEDRAMP_URL);
|
|
@@ -1018,30 +1017,30 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1018
1017
|
level: _types.LOGGER.INFO
|
|
1019
1018
|
});
|
|
1020
1019
|
jest.spyOn(webex, 'request');
|
|
1021
|
-
|
|
1020
|
+
_context26.next = 6;
|
|
1022
1021
|
return wxCallBackendConnector.init();
|
|
1023
1022
|
case 6:
|
|
1024
1023
|
wxCallBackendConnector['context'] = CONTEXT;
|
|
1025
1024
|
wxCallBackendConnector.getSDKConnector();
|
|
1026
1025
|
case 8:
|
|
1027
1026
|
case "end":
|
|
1028
|
-
return
|
|
1027
|
+
return _context26.stop();
|
|
1029
1028
|
}
|
|
1030
|
-
},
|
|
1029
|
+
}, _callee26);
|
|
1031
1030
|
})));
|
|
1032
1031
|
beforeEach(function () {
|
|
1033
1032
|
getSortedVoicemailListSpy = jest.spyOn(utils, 'getSortedVoicemailList');
|
|
1034
1033
|
storeVoicemailListSpy = jest.spyOn(utils, 'storeVoicemailList');
|
|
1035
1034
|
fetchVoicemailListSpy = jest.spyOn(utils, 'fetchVoicemailList');
|
|
1036
1035
|
});
|
|
1037
|
-
it('getVoicemailList: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1036
|
+
it('getVoicemailList: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
|
|
1038
1037
|
var voiceMailPayload;
|
|
1039
|
-
return _regenerator.default.wrap(function
|
|
1040
|
-
while (1) switch (
|
|
1038
|
+
return _regenerator.default.wrap(function _callee27$(_context27) {
|
|
1039
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
1041
1040
|
case 0:
|
|
1042
1041
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1043
1042
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1044
|
-
|
|
1043
|
+
_context27.next = 4;
|
|
1045
1044
|
return wxCallBackendConnector.getVoicemailList(0, 4, _types2.SORT.ASC, true);
|
|
1046
1045
|
case 4:
|
|
1047
1046
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1053,18 +1052,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1053
1052
|
});
|
|
1054
1053
|
case 5:
|
|
1055
1054
|
case "end":
|
|
1056
|
-
return
|
|
1055
|
+
return _context27.stop();
|
|
1057
1056
|
}
|
|
1058
|
-
},
|
|
1057
|
+
}, _callee27);
|
|
1059
1058
|
})));
|
|
1060
|
-
it('getVoicemailContent: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1059
|
+
it('getVoicemailContent: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
|
|
1061
1060
|
var voiceMailPayload;
|
|
1062
|
-
return _regenerator.default.wrap(function
|
|
1063
|
-
while (1) switch (
|
|
1061
|
+
return _regenerator.default.wrap(function _callee28$(_context28) {
|
|
1062
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
1064
1063
|
case 0:
|
|
1065
1064
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1066
1065
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1067
|
-
|
|
1066
|
+
_context28.next = 4;
|
|
1068
1067
|
return wxCallBackendConnector.getVoicemailContent(messageId.$);
|
|
1069
1068
|
case 4:
|
|
1070
1069
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1076,18 +1075,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1076
1075
|
});
|
|
1077
1076
|
case 5:
|
|
1078
1077
|
case "end":
|
|
1079
|
-
return
|
|
1078
|
+
return _context28.stop();
|
|
1080
1079
|
}
|
|
1081
|
-
},
|
|
1080
|
+
}, _callee28);
|
|
1082
1081
|
})));
|
|
1083
|
-
it('getVoicemailSummary: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1082
|
+
it('getVoicemailSummary: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
|
|
1084
1083
|
var voiceMailPayload;
|
|
1085
|
-
return _regenerator.default.wrap(function
|
|
1086
|
-
while (1) switch (
|
|
1084
|
+
return _regenerator.default.wrap(function _callee29$(_context29) {
|
|
1085
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
1087
1086
|
case 0:
|
|
1088
1087
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1089
1088
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1090
|
-
|
|
1089
|
+
_context29.next = 4;
|
|
1091
1090
|
return wxCallBackendConnector.getVoicemailSummary();
|
|
1092
1091
|
case 4:
|
|
1093
1092
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1099,18 +1098,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1099
1098
|
});
|
|
1100
1099
|
case 5:
|
|
1101
1100
|
case "end":
|
|
1102
|
-
return
|
|
1101
|
+
return _context29.stop();
|
|
1103
1102
|
}
|
|
1104
|
-
},
|
|
1103
|
+
}, _callee29);
|
|
1105
1104
|
})));
|
|
1106
|
-
it('voicemailMarkAsRead: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1105
|
+
it('voicemailMarkAsRead: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30() {
|
|
1107
1106
|
var voiceMailPayload;
|
|
1108
|
-
return _regenerator.default.wrap(function
|
|
1109
|
-
while (1) switch (
|
|
1107
|
+
return _regenerator.default.wrap(function _callee30$(_context30) {
|
|
1108
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
1110
1109
|
case 0:
|
|
1111
1110
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1112
1111
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1113
|
-
|
|
1112
|
+
_context30.next = 4;
|
|
1114
1113
|
return wxCallBackendConnector.voicemailMarkAsRead(messageId.$);
|
|
1115
1114
|
case 4:
|
|
1116
1115
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1122,18 +1121,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1122
1121
|
});
|
|
1123
1122
|
case 5:
|
|
1124
1123
|
case "end":
|
|
1125
|
-
return
|
|
1124
|
+
return _context30.stop();
|
|
1126
1125
|
}
|
|
1127
|
-
},
|
|
1126
|
+
}, _callee30);
|
|
1128
1127
|
})));
|
|
1129
|
-
it('voicemailMarkAsUnread: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1128
|
+
it('voicemailMarkAsUnread: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
|
|
1130
1129
|
var voiceMailPayload;
|
|
1131
|
-
return _regenerator.default.wrap(function
|
|
1132
|
-
while (1) switch (
|
|
1130
|
+
return _regenerator.default.wrap(function _callee31$(_context31) {
|
|
1131
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
1133
1132
|
case 0:
|
|
1134
1133
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1135
1134
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1136
|
-
|
|
1135
|
+
_context31.next = 4;
|
|
1137
1136
|
return wxCallBackendConnector.voicemailMarkAsUnread(messageId.$);
|
|
1138
1137
|
case 4:
|
|
1139
1138
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1145,18 +1144,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1145
1144
|
});
|
|
1146
1145
|
case 5:
|
|
1147
1146
|
case "end":
|
|
1148
|
-
return
|
|
1147
|
+
return _context31.stop();
|
|
1149
1148
|
}
|
|
1150
|
-
},
|
|
1149
|
+
}, _callee31);
|
|
1151
1150
|
})));
|
|
1152
|
-
it('deleteVoicemail: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1151
|
+
it('deleteVoicemail: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
|
|
1153
1152
|
var voiceMailPayload;
|
|
1154
|
-
return _regenerator.default.wrap(function
|
|
1155
|
-
while (1) switch (
|
|
1153
|
+
return _regenerator.default.wrap(function _callee32$(_context32) {
|
|
1154
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
1156
1155
|
case 0:
|
|
1157
1156
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1158
1157
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1159
|
-
|
|
1158
|
+
_context32.next = 4;
|
|
1160
1159
|
return wxCallBackendConnector.deleteVoicemail(messageId.$);
|
|
1161
1160
|
case 4:
|
|
1162
1161
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1168,18 +1167,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1168
1167
|
});
|
|
1169
1168
|
case 5:
|
|
1170
1169
|
case "end":
|
|
1171
|
-
return
|
|
1170
|
+
return _context32.stop();
|
|
1172
1171
|
}
|
|
1173
|
-
},
|
|
1172
|
+
}, _callee32);
|
|
1174
1173
|
})));
|
|
1175
|
-
it('getVMTranscript: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1174
|
+
it('getVMTranscript: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
|
|
1176
1175
|
var voiceMailPayload;
|
|
1177
|
-
return _regenerator.default.wrap(function
|
|
1178
|
-
while (1) switch (
|
|
1176
|
+
return _regenerator.default.wrap(function _callee33$(_context33) {
|
|
1177
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
1179
1178
|
case 0:
|
|
1180
1179
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1181
1180
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1182
|
-
|
|
1181
|
+
_context33.next = 4;
|
|
1183
1182
|
return wxCallBackendConnector.getVMTranscript(messageId.$);
|
|
1184
1183
|
case 4:
|
|
1185
1184
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1191,9 +1190,9 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1191
1190
|
});
|
|
1192
1191
|
case 5:
|
|
1193
1192
|
case "end":
|
|
1194
|
-
return
|
|
1193
|
+
return _context33.stop();
|
|
1195
1194
|
}
|
|
1196
|
-
},
|
|
1195
|
+
}, _callee33);
|
|
1197
1196
|
})));
|
|
1198
1197
|
});
|
|
1199
1198
|
});
|