@webex/calling 3.9.0 → 3.10.0-next.2
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 +43 -43
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/CallHistory.test.js +157 -152
- 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 +11 -11
- package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.js +53 -52
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +112 -110
- 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 +458 -203
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +458 -315
- 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 +405 -372
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +411 -410
- 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 +68 -69
- 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 +9 -6
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +10 -11
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +10 -9
- 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 +285 -205
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +251 -180
- 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 +25 -10
- package/dist/CallingClient/registration/webWorker.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.test.js +85 -38
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +142 -0
- package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -0
- package/dist/Contacts/ContactsClient.js +244 -247
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +93 -93
- 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 +3 -3
- package/dist/Events/impl/index.js.map +1 -1
- package/dist/Events/types.js.map +1 -1
- package/dist/Logger/index.js +3 -3
- package/dist/Logger/index.js.map +1 -1
- package/dist/Logger/index.test.js +1 -1
- package/dist/Logger/index.test.js.map +1 -1
- package/dist/Logger/types.js.map +1 -1
- package/dist/Metrics/index.js +221 -104
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +112 -23
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +15 -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 +55 -61
- package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.test.js +129 -122
- package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.js +53 -50
- 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 +89 -113
- 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 +87 -92
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.test.js +228 -203
- 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 +85 -66
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +113 -123
- 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 +17 -8
- package/dist/module/CallSettings/UcmBackendConnector.js +2 -2
- package/dist/module/CallSettings/WxCallBackendConnector.js +14 -14
- package/dist/module/CallingClient/CallingClient.js +176 -36
- package/dist/module/CallingClient/calling/call.js +91 -61
- package/dist/module/CallingClient/constants.js +8 -4
- package/dist/module/CallingClient/line/index.js +3 -3
- package/dist/module/CallingClient/registration/register.js +37 -13
- package/dist/module/CallingClient/registration/webWorker.js +17 -3
- package/dist/module/CallingClient/registration/webWorkerStr.js +19 -3
- package/dist/module/CallingClient/windowsChromiumIceWarmupUtils.js +59 -0
- package/dist/module/Contacts/ContactsClient.js +33 -37
- package/dist/module/Contacts/constants.js +1 -1
- package/dist/module/Events/impl/index.js +1 -1
- package/dist/module/Logger/index.js +2 -2
- package/dist/module/Metrics/index.js +142 -55
- package/dist/module/Metrics/types.js +14 -0
- package/dist/module/Voicemail/BroadworksBackendConnector.js +10 -17
- package/dist/module/Voicemail/UcmBackendConnector.js +11 -10
- package/dist/module/Voicemail/Voicemail.js +42 -68
- package/dist/module/Voicemail/WxCallBackendConnector.js +22 -28
- package/dist/module/common/Utils.js +29 -12
- 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 +12 -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/calling/types.d.ts +2 -1
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +8 -4
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +1 -0
- 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/registration/webWorkerStr.d.ts +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -1
- package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts +5 -0
- package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts.map +1 -0
- 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/Logger/index.d.ts +1 -2
- package/dist/types/Logger/index.d.ts.map +1 -1
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +18 -3
- 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/Voicemail.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/dist/types/common/types.d.ts +1 -0
- package/dist/types/common/types.d.ts.map +1 -1
- package/package.json +10 -8
|
@@ -9,8 +9,8 @@ var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/de
|
|
|
9
9
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
10
10
|
var _WeakMap = require("@babel/runtime-corejs2/core-js/weak-map");
|
|
11
11
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
12
|
-
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
13
12
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
13
|
+
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
15
15
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
16
16
|
var _types = require("../Logger/types");
|
|
@@ -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) {
|
|
@@ -102,17 +101,17 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
102
101
|
file: 'WxCallBackendConnector',
|
|
103
102
|
method: 'getVoicemailList'
|
|
104
103
|
}));
|
|
105
|
-
expect(errorSpy).toHaveBeenCalledWith(
|
|
104
|
+
expect(errorSpy).toHaveBeenCalledWith("Failed to get voicemail list: ".concat((0, _stringify.default)(failurePayload)), {
|
|
106
105
|
file: 'WxCallBackendConnector',
|
|
107
106
|
method: 'getVoicemailList'
|
|
108
|
-
})
|
|
107
|
+
});
|
|
109
108
|
case 11:
|
|
110
109
|
case "end":
|
|
111
110
|
return _context.stop();
|
|
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) {
|
|
@@ -144,9 +143,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
144
143
|
file: 'WxCallBackendConnector',
|
|
145
144
|
method: 'voicemailMarkAsRead'
|
|
146
145
|
});
|
|
147
|
-
expect(errorSpy).toHaveBeenNthCalledWith(1,
|
|
148
|
-
message: expect.stringContaining('Failed to mark voicemail as read')
|
|
149
|
-
}), {
|
|
146
|
+
expect(errorSpy).toHaveBeenNthCalledWith(1, "Failed to mark voicemail as read: ".concat((0, _stringify.default)(failurePayload)), {
|
|
150
147
|
file: 'WxCallBackendConnector',
|
|
151
148
|
method: 'voicemailMarkAsRead'
|
|
152
149
|
});
|
|
@@ -156,7 +153,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
156
153
|
}
|
|
157
154
|
}, _callee2);
|
|
158
155
|
})));
|
|
159
|
-
it('verify failure voicemailMarkAsUnread when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
156
|
+
it('verify failure voicemailMarkAsUnread when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
160
157
|
var failurePayload, responseDetails, response;
|
|
161
158
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
162
159
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -188,9 +185,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
188
185
|
file: 'WxCallBackendConnector',
|
|
189
186
|
method: 'voicemailMarkAsUnread'
|
|
190
187
|
});
|
|
191
|
-
expect(errorSpy).toHaveBeenNthCalledWith(1,
|
|
192
|
-
message: expect.stringContaining('Failed to mark voicemail as unread')
|
|
193
|
-
}), {
|
|
188
|
+
expect(errorSpy).toHaveBeenNthCalledWith(1, "Failed to mark voicemail as unread: ".concat((0, _stringify.default)(failurePayload)), {
|
|
194
189
|
file: 'WxCallBackendConnector',
|
|
195
190
|
method: 'voicemailMarkAsUnread'
|
|
196
191
|
});
|
|
@@ -200,7 +195,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
200
195
|
}
|
|
201
196
|
}, _callee3);
|
|
202
197
|
})));
|
|
203
|
-
it('verify failure delete Voicemail when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
198
|
+
it('verify failure delete Voicemail when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
204
199
|
var failurePayload, responseDetails, response;
|
|
205
200
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
206
201
|
while (1) switch (_context4.prev = _context4.next) {
|
|
@@ -232,9 +227,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
232
227
|
file: 'WxCallBackendConnector',
|
|
233
228
|
method: 'deleteVoicemail'
|
|
234
229
|
});
|
|
235
|
-
expect(errorSpy).toHaveBeenCalledWith(
|
|
236
|
-
message: expect.stringContaining('Failed to delete voicemail')
|
|
237
|
-
}), {
|
|
230
|
+
expect(errorSpy).toHaveBeenCalledWith("Failed to delete voicemail: ".concat((0, _stringify.default)(failurePayload)), {
|
|
238
231
|
file: 'WxCallBackendConnector',
|
|
239
232
|
method: 'deleteVoicemail'
|
|
240
233
|
});
|
|
@@ -244,7 +237,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
244
237
|
}
|
|
245
238
|
}, _callee4);
|
|
246
239
|
})));
|
|
247
|
-
it('verify failure for get transcript when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
240
|
+
it('verify failure for get transcript when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
248
241
|
var failurePayload, responseDetails, response;
|
|
249
242
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
250
243
|
while (1) switch (_context5.prev = _context5.next) {
|
|
@@ -278,7 +271,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
278
271
|
}
|
|
279
272
|
}, _callee5);
|
|
280
273
|
})));
|
|
281
|
-
it('verify failure voicemail listing when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
274
|
+
it('verify failure voicemail listing when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
282
275
|
var failurePayload, response, responseDetails;
|
|
283
276
|
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
284
277
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -312,7 +305,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
312
305
|
}
|
|
313
306
|
}, _callee6);
|
|
314
307
|
})));
|
|
315
|
-
it('verify failure voicemailMarkAsRead when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
308
|
+
it('verify failure voicemailMarkAsRead when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
316
309
|
var failurePayload, responseDetails, response;
|
|
317
310
|
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
318
311
|
while (1) switch (_context7.prev = _context7.next) {
|
|
@@ -346,7 +339,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
346
339
|
}
|
|
347
340
|
}, _callee7);
|
|
348
341
|
})));
|
|
349
|
-
it('verify failure voicemailMarkAsUnread when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
342
|
+
it('verify failure voicemailMarkAsUnread when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
|
|
350
343
|
var failurePayload, responseDetails, response;
|
|
351
344
|
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
352
345
|
while (1) switch (_context8.prev = _context8.next) {
|
|
@@ -380,7 +373,7 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
380
373
|
}
|
|
381
374
|
}, _callee8);
|
|
382
375
|
})));
|
|
383
|
-
it('verify failure delete Voicemail when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
376
|
+
it('verify failure delete Voicemail when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
384
377
|
var failurePayload, responseDetails, response;
|
|
385
378
|
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
386
379
|
while (1) switch (_context9.prev = _context9.next) {
|
|
@@ -414,10 +407,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
414
407
|
}
|
|
415
408
|
}, _callee9);
|
|
416
409
|
})));
|
|
417
|
-
it('verify failure for get transcript when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
410
|
+
it('verify failure for get transcript when user is unauthorised, possible token expiry', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
418
411
|
var failurePayload, responseDetails, response;
|
|
419
|
-
return _regenerator.default.wrap(function
|
|
420
|
-
while (1) switch (
|
|
412
|
+
return _regenerator.default.wrap(function _callee0$(_context0) {
|
|
413
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
421
414
|
case 0:
|
|
422
415
|
failurePayload = {
|
|
423
416
|
statusCode: 401
|
|
@@ -430,10 +423,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
430
423
|
},
|
|
431
424
|
message: FAILURE
|
|
432
425
|
};
|
|
433
|
-
|
|
426
|
+
_context0.next = 5;
|
|
434
427
|
return wxCallBackendConnector.getVMTranscript(messageId.$);
|
|
435
428
|
case 5:
|
|
436
|
-
response =
|
|
429
|
+
response = _context0.sent;
|
|
437
430
|
expect(response).toStrictEqual(responseDetails);
|
|
438
431
|
expect(response === null || response === void 0 ? void 0 : response.message).toBe(FAILURE);
|
|
439
432
|
expect(serviceErrorCodeHandlerSpy).toBeCalledOnceWith({
|
|
@@ -444,23 +437,23 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
444
437
|
});
|
|
445
438
|
case 9:
|
|
446
439
|
case "end":
|
|
447
|
-
return
|
|
440
|
+
return _context0.stop();
|
|
448
441
|
}
|
|
449
|
-
},
|
|
442
|
+
}, _callee0);
|
|
450
443
|
})));
|
|
451
|
-
it('verify failure voicemail summary when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
444
|
+
it('verify failure voicemail summary when bad request occur', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
|
|
452
445
|
var failurePayload, response, responseDetails;
|
|
453
|
-
return _regenerator.default.wrap(function
|
|
454
|
-
while (1) switch (
|
|
446
|
+
return _regenerator.default.wrap(function _callee1$(_context1) {
|
|
447
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
455
448
|
case 0:
|
|
456
449
|
failurePayload = {
|
|
457
450
|
statusCode: 400
|
|
458
451
|
};
|
|
459
452
|
webex.request.mockRejectedValueOnce(failurePayload);
|
|
460
|
-
|
|
453
|
+
_context1.next = 4;
|
|
461
454
|
return wxCallBackendConnector.getVoicemailSummary();
|
|
462
455
|
case 4:
|
|
463
|
-
response =
|
|
456
|
+
response = _context1.sent;
|
|
464
457
|
responseDetails = {
|
|
465
458
|
statusCode: 400,
|
|
466
459
|
data: {
|
|
@@ -484,27 +477,27 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
484
477
|
file: 'WxCallBackendConnector',
|
|
485
478
|
method: 'getVoicemailSummary'
|
|
486
479
|
});
|
|
487
|
-
expect(errorSpy).toHaveBeenCalledWith(
|
|
480
|
+
expect(errorSpy).toHaveBeenCalledWith("Failed to get voicemail summary: ".concat((0, _stringify.default)(failurePayload)), {
|
|
488
481
|
file: 'WxCallBackendConnector',
|
|
489
482
|
method: 'getVoicemailSummary'
|
|
490
|
-
})
|
|
483
|
+
});
|
|
491
484
|
case 11:
|
|
492
485
|
case "end":
|
|
493
|
-
return
|
|
486
|
+
return _context1.stop();
|
|
494
487
|
}
|
|
495
|
-
},
|
|
488
|
+
}, _callee1);
|
|
496
489
|
})));
|
|
497
|
-
it('verify failure case for the voicemail content when api response is invalid', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
490
|
+
it('verify failure case for the voicemail content when api response is invalid', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
498
491
|
var xsiActionsEndpointUrl, response;
|
|
499
|
-
return _regenerator.default.wrap(function
|
|
500
|
-
while (1) switch (
|
|
492
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
493
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
501
494
|
case 0:
|
|
502
495
|
webex.request.mockResolvedValueOnce({});
|
|
503
496
|
xsiActionsEndpointUrl = _voicemailFixture.mockWXCData.body.items[0].xsiActionsEndpoint;
|
|
504
|
-
|
|
497
|
+
_context10.next = 4;
|
|
505
498
|
return wxCallBackendConnector.getVoicemailContent(messageId);
|
|
506
499
|
case 4:
|
|
507
|
-
response =
|
|
500
|
+
response = _context10.sent;
|
|
508
501
|
expect(response).toStrictEqual(_voicemailFixture.responseDetails422);
|
|
509
502
|
expect(webex.request).toBeCalledOnceWith({
|
|
510
503
|
method: _types2.HTTP_METHODS.GET,
|
|
@@ -517,9 +510,9 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
517
510
|
});
|
|
518
511
|
case 8:
|
|
519
512
|
case "end":
|
|
520
|
-
return
|
|
513
|
+
return _context10.stop();
|
|
521
514
|
}
|
|
522
|
-
},
|
|
515
|
+
}, _callee10);
|
|
523
516
|
})));
|
|
524
517
|
});
|
|
525
518
|
describe('Voicemail success tests for webex call', function () {
|
|
@@ -532,10 +525,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
532
525
|
afterEach(function () {
|
|
533
526
|
jest.clearAllMocks();
|
|
534
527
|
});
|
|
535
|
-
it('verify successfully fetching voicemail summary with newMessages and newUrgentMessage', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
528
|
+
it('verify successfully fetching voicemail summary with newMessages and newUrgentMessage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
|
536
529
|
var mockRawRequest, mockVoicemailSummary, voicemailSummary, response, voicemailSummaryResponseInfo, responseDetails;
|
|
537
|
-
return _regenerator.default.wrap(function
|
|
538
|
-
while (1) switch (
|
|
530
|
+
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
531
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
539
532
|
case 0:
|
|
540
533
|
mockRawRequest = {
|
|
541
534
|
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 +539,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
546
539
|
};
|
|
547
540
|
voicemailSummary = mockVoicemailSummary;
|
|
548
541
|
webex.request.mockResolvedValueOnce(voicemailSummary);
|
|
549
|
-
|
|
542
|
+
_context11.next = 6;
|
|
550
543
|
return wxCallBackendConnector.getVoicemailSummary();
|
|
551
544
|
case 6:
|
|
552
|
-
response =
|
|
545
|
+
response = _context11.sent;
|
|
553
546
|
voicemailSummaryResponseInfo = {
|
|
554
547
|
voicemailSummary: {
|
|
555
548
|
newMessages: 2,
|
|
@@ -579,14 +572,14 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
579
572
|
});
|
|
580
573
|
case 13:
|
|
581
574
|
case "end":
|
|
582
|
-
return
|
|
575
|
+
return _context11.stop();
|
|
583
576
|
}
|
|
584
|
-
},
|
|
577
|
+
}, _callee11);
|
|
585
578
|
})));
|
|
586
|
-
it('verify successfully fetching voicemail summary with oldMessages and oldUrgentMessage', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
579
|
+
it('verify successfully fetching voicemail summary with oldMessages and oldUrgentMessage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
587
580
|
var mockRawRequest, mockVoicemailSummary, voicemailSummary, response, voicemailSummaryResponseInfo, responseDetails;
|
|
588
|
-
return _regenerator.default.wrap(function
|
|
589
|
-
while (1) switch (
|
|
581
|
+
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
582
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
590
583
|
case 0:
|
|
591
584
|
mockRawRequest = {
|
|
592
585
|
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 +590,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
597
590
|
};
|
|
598
591
|
voicemailSummary = mockVoicemailSummary;
|
|
599
592
|
webex.request.mockResolvedValueOnce(voicemailSummary);
|
|
600
|
-
|
|
593
|
+
_context12.next = 6;
|
|
601
594
|
return wxCallBackendConnector.getVoicemailSummary();
|
|
602
595
|
case 6:
|
|
603
|
-
response =
|
|
596
|
+
response = _context12.sent;
|
|
604
597
|
voicemailSummaryResponseInfo = {
|
|
605
598
|
voicemailSummary: {
|
|
606
599
|
newMessages: 0,
|
|
@@ -620,16 +613,24 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
620
613
|
headers: {}
|
|
621
614
|
});
|
|
622
615
|
expect(response).toStrictEqual(responseDetails);
|
|
623
|
-
|
|
616
|
+
expect(infoSpy).toHaveBeenCalledWith(_constants2.METHOD_START_MESSAGE, {
|
|
617
|
+
file: 'WxCallBackendConnector',
|
|
618
|
+
method: 'getVoicemailSummary'
|
|
619
|
+
});
|
|
620
|
+
expect(logSpy).toHaveBeenCalledWith('Successfully fetched voicemail summary', {
|
|
621
|
+
file: 'WxCallBackendConnector',
|
|
622
|
+
method: 'getVoicemailSummary'
|
|
623
|
+
});
|
|
624
|
+
case 13:
|
|
624
625
|
case "end":
|
|
625
|
-
return
|
|
626
|
+
return _context12.stop();
|
|
626
627
|
}
|
|
627
|
-
},
|
|
628
|
+
}, _callee12);
|
|
628
629
|
})));
|
|
629
|
-
it('verify that PENDING transcription status is passed while transcribing is in progress in the backend', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
630
|
+
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
631
|
var pending, mockPendingResponse, mockVoicemailTranscript, voicemailTranscript, response, responseDetails;
|
|
631
|
-
return _regenerator.default.wrap(function
|
|
632
|
-
while (1) switch (
|
|
632
|
+
return _regenerator.default.wrap(function _callee13$(_context13) {
|
|
633
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
633
634
|
case 0:
|
|
634
635
|
pending = 'PENDING';
|
|
635
636
|
mockPendingResponse = {
|
|
@@ -640,10 +641,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
640
641
|
});
|
|
641
642
|
voicemailTranscript = mockVoicemailTranscript;
|
|
642
643
|
webex.request.mockResolvedValueOnce(voicemailTranscript);
|
|
643
|
-
|
|
644
|
+
_context13.next = 7;
|
|
644
645
|
return wxCallBackendConnector.getVMTranscript('98099432-9d81-4224-bd04-00def73cd262');
|
|
645
646
|
case 7:
|
|
646
|
-
response =
|
|
647
|
+
response = _context13.sent;
|
|
647
648
|
responseDetails = {
|
|
648
649
|
data: {
|
|
649
650
|
voicemailTranscript: undefined
|
|
@@ -655,14 +656,14 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
655
656
|
expect(response).toStrictEqual(responseDetails);
|
|
656
657
|
case 11:
|
|
657
658
|
case "end":
|
|
658
|
-
return
|
|
659
|
+
return _context13.stop();
|
|
659
660
|
}
|
|
660
|
-
},
|
|
661
|
+
}, _callee13);
|
|
661
662
|
})));
|
|
662
|
-
it('verify successfully fetching voicemail transcript', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
663
|
+
it('verify successfully fetching voicemail transcript', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
|
|
663
664
|
var ready, mockRawRequest, mockVoicemailTranscript, voicemailTranscript, response, voicemailResponseInfo, responseDetails;
|
|
664
|
-
return _regenerator.default.wrap(function
|
|
665
|
-
while (1) switch (
|
|
665
|
+
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
666
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
666
667
|
case 0:
|
|
667
668
|
ready = 'READY';
|
|
668
669
|
mockRawRequest = {
|
|
@@ -673,10 +674,10 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
673
674
|
});
|
|
674
675
|
voicemailTranscript = mockVoicemailTranscript;
|
|
675
676
|
webex.request.mockResolvedValueOnce(voicemailTranscript);
|
|
676
|
-
|
|
677
|
+
_context14.next = 7;
|
|
677
678
|
return wxCallBackendConnector.getVMTranscript('98099432-9d81-4224-bd04-00def73cd262');
|
|
678
679
|
case 7:
|
|
679
|
-
response =
|
|
680
|
+
response = _context14.sent;
|
|
680
681
|
voicemailResponseInfo = {
|
|
681
682
|
voicemailTranscript: 'Hi, uh, testing, voice mail script, so dropping this message to be able to fetch it later.'
|
|
682
683
|
};
|
|
@@ -689,21 +690,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
689
690
|
expect(response).toStrictEqual(responseDetails);
|
|
690
691
|
case 12:
|
|
691
692
|
case "end":
|
|
692
|
-
return
|
|
693
|
+
return _context14.stop();
|
|
693
694
|
}
|
|
694
|
-
},
|
|
695
|
+
}, _callee14);
|
|
695
696
|
})));
|
|
696
|
-
it('verify successful voicemail listing in descending order with offset 0 and limit 20', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
697
|
+
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
698
|
var voiceMailPayload, response, voicemailResponseInfo, responseDetails;
|
|
698
|
-
return _regenerator.default.wrap(function
|
|
699
|
-
while (1) switch (
|
|
699
|
+
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
700
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
700
701
|
case 0:
|
|
701
702
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
702
703
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
703
|
-
|
|
704
|
+
_context15.next = 4;
|
|
704
705
|
return wxCallBackendConnector.getVoicemailList(0, 20, _types2.SORT.DESC, true);
|
|
705
706
|
case 4:
|
|
706
|
-
response =
|
|
707
|
+
response = _context15.sent;
|
|
707
708
|
voicemailResponseInfo = {
|
|
708
709
|
voicemailList: _voicemailFixture.getDescVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo
|
|
709
710
|
};
|
|
@@ -722,21 +723,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
722
723
|
});
|
|
723
724
|
case 12:
|
|
724
725
|
case "end":
|
|
725
|
-
return
|
|
726
|
+
return _context15.stop();
|
|
726
727
|
}
|
|
727
|
-
},
|
|
728
|
+
}, _callee15);
|
|
728
729
|
})));
|
|
729
|
-
it('verify successful voicemail listing in ascending order with offset 0 and limit 20', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
730
|
+
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
731
|
var voiceMailPayload, response, voicemailResponseInfo, responseDetails;
|
|
731
|
-
return _regenerator.default.wrap(function
|
|
732
|
-
while (1) switch (
|
|
732
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
733
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
733
734
|
case 0:
|
|
734
735
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
735
736
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
736
|
-
|
|
737
|
+
_context16.next = 4;
|
|
737
738
|
return wxCallBackendConnector.getVoicemailList(0, 20, _types2.SORT.ASC, true);
|
|
738
739
|
case 4:
|
|
739
|
-
response =
|
|
740
|
+
response = _context16.sent;
|
|
740
741
|
voicemailResponseInfo = {
|
|
741
742
|
voicemailList: _voicemailFixture.getAscVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo
|
|
742
743
|
};
|
|
@@ -755,21 +756,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
755
756
|
});
|
|
756
757
|
case 12:
|
|
757
758
|
case "end":
|
|
758
|
-
return
|
|
759
|
+
return _context16.stop();
|
|
759
760
|
}
|
|
760
|
-
},
|
|
761
|
+
}, _callee16);
|
|
761
762
|
})));
|
|
762
|
-
it('verify successful voicemail listing in descending order with offset 0 and limit 2 with incorrect SORT param', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
763
|
+
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
764
|
var voiceMailPayload, response, voicemailResponseInfo, responseDetails;
|
|
764
|
-
return _regenerator.default.wrap(function
|
|
765
|
-
while (1) switch (
|
|
765
|
+
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
766
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
766
767
|
case 0:
|
|
767
768
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
768
769
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
769
|
-
|
|
770
|
+
_context17.next = 4;
|
|
770
771
|
return wxCallBackendConnector.getVoicemailList(0, 2, 'abcd', true);
|
|
771
772
|
case 4:
|
|
772
|
-
response =
|
|
773
|
+
response = _context17.sent;
|
|
773
774
|
voicemailResponseInfo = {
|
|
774
775
|
voicemailList: _voicemailFixture.getDescVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo.slice(0, 2)
|
|
775
776
|
};
|
|
@@ -788,21 +789,21 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
788
789
|
});
|
|
789
790
|
case 12:
|
|
790
791
|
case "end":
|
|
791
|
-
return
|
|
792
|
+
return _context17.stop();
|
|
792
793
|
}
|
|
793
|
-
},
|
|
794
|
+
}, _callee17);
|
|
794
795
|
})));
|
|
795
|
-
it('verify successful voicemail listing in ascending order with offset 0 and limit 4', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
796
|
+
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
797
|
var voiceMailPayload, response, voicemailResponseInfo, responseDetails;
|
|
797
|
-
return _regenerator.default.wrap(function
|
|
798
|
-
while (1) switch (
|
|
798
|
+
return _regenerator.default.wrap(function _callee18$(_context18) {
|
|
799
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
799
800
|
case 0:
|
|
800
801
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
801
802
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
802
|
-
|
|
803
|
+
_context18.next = 4;
|
|
803
804
|
return wxCallBackendConnector.getVoicemailList(0, 4, _types2.SORT.ASC, true);
|
|
804
805
|
case 4:
|
|
805
|
-
response =
|
|
806
|
+
response = _context18.sent;
|
|
806
807
|
voicemailResponseInfo = {
|
|
807
808
|
voicemailList: _voicemailFixture.getAscVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo.slice(0, 4)
|
|
808
809
|
};
|
|
@@ -821,20 +822,20 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
821
822
|
});
|
|
822
823
|
case 12:
|
|
823
824
|
case "end":
|
|
824
|
-
return
|
|
825
|
+
return _context18.stop();
|
|
825
826
|
}
|
|
826
|
-
},
|
|
827
|
+
}, _callee18);
|
|
827
828
|
})));
|
|
828
|
-
it('verify empty voicemail list data', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
829
|
+
it('verify empty voicemail list data', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
|
|
829
830
|
var response, voicemailResponseInfo, responseDetails;
|
|
830
|
-
return _regenerator.default.wrap(function
|
|
831
|
-
while (1) switch (
|
|
831
|
+
return _regenerator.default.wrap(function _callee19$(_context19) {
|
|
832
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
832
833
|
case 0:
|
|
833
834
|
webex.request.mockResolvedValueOnce(_voicemailFixture.getEmptyVoicemailListJsonWxC);
|
|
834
|
-
|
|
835
|
+
_context19.next = 3;
|
|
835
836
|
return wxCallBackendConnector.getVoicemailList(0, 20, _types2.SORT.DESC, true);
|
|
836
837
|
case 3:
|
|
837
|
-
response =
|
|
838
|
+
response = _context19.sent;
|
|
838
839
|
voicemailResponseInfo = {
|
|
839
840
|
voicemailList: []
|
|
840
841
|
};
|
|
@@ -852,20 +853,20 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
852
853
|
});
|
|
853
854
|
case 10:
|
|
854
855
|
case "end":
|
|
855
|
-
return
|
|
856
|
+
return _context19.stop();
|
|
856
857
|
}
|
|
857
|
-
},
|
|
858
|
+
}, _callee19);
|
|
858
859
|
})));
|
|
859
|
-
it('verify empty voicemail list data when response data is in invalid format', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
860
|
+
it('verify empty voicemail list data when response data is in invalid format', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
|
|
860
861
|
var response, voicemailResponseInfo, responseDetails;
|
|
861
|
-
return _regenerator.default.wrap(function
|
|
862
|
-
while (1) switch (
|
|
862
|
+
return _regenerator.default.wrap(function _callee20$(_context20) {
|
|
863
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
863
864
|
case 0:
|
|
864
865
|
webex.request.mockResolvedValueOnce(_voicemailFixture.getInvalidVoicemailListJsonWxC);
|
|
865
|
-
|
|
866
|
+
_context20.next = 3;
|
|
866
867
|
return wxCallBackendConnector.getVoicemailList(0, 20, _types2.SORT.DESC, true);
|
|
867
868
|
case 3:
|
|
868
|
-
response =
|
|
869
|
+
response = _context20.sent;
|
|
869
870
|
voicemailResponseInfo = {
|
|
870
871
|
voicemailList: [{}]
|
|
871
872
|
};
|
|
@@ -883,23 +884,23 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
883
884
|
});
|
|
884
885
|
case 10:
|
|
885
886
|
case "end":
|
|
886
|
-
return
|
|
887
|
+
return _context20.stop();
|
|
887
888
|
}
|
|
888
|
-
},
|
|
889
|
+
}, _callee20);
|
|
889
890
|
})));
|
|
890
|
-
it('verify successful fetching of voicemail list without refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
891
|
+
it('verify successful fetching of voicemail list without refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
891
892
|
var voiceMailPayload, vmEncodedList, response, voicemailResponseInfo, responseDetails;
|
|
892
|
-
return _regenerator.default.wrap(function
|
|
893
|
-
while (1) switch (
|
|
893
|
+
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
894
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
894
895
|
case 0:
|
|
895
896
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
896
897
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
897
898
|
vmEncodedList = Buffer.from((0, _stringify.default)(_voicemailFixture.getAscVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo), 'utf8').toString('base64');
|
|
898
899
|
sessionStorage.setItem(CONTEXT, vmEncodedList.toString());
|
|
899
|
-
|
|
900
|
+
_context21.next = 6;
|
|
900
901
|
return wxCallBackendConnector.getVoicemailList(0, 4, _types2.SORT.ASC, false);
|
|
901
902
|
case 6:
|
|
902
|
-
response =
|
|
903
|
+
response = _context21.sent;
|
|
903
904
|
voicemailResponseInfo = {
|
|
904
905
|
voicemailList: _voicemailFixture.getAscVoicemailListJsonWXC.body.VoiceMessagingMessages.messageInfoList.messageInfo.slice(0, 4)
|
|
905
906
|
};
|
|
@@ -919,98 +920,122 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
919
920
|
sessionStorage.removeItem(CONTEXT);
|
|
920
921
|
case 15:
|
|
921
922
|
case "end":
|
|
922
|
-
return
|
|
923
|
+
return _context21.stop();
|
|
923
924
|
}
|
|
924
|
-
},
|
|
925
|
+
}, _callee21);
|
|
925
926
|
})));
|
|
926
|
-
it('verify successful voicemailMarkAsRead', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
927
|
+
it('verify successful voicemailMarkAsRead', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
|
|
927
928
|
var voiceMailPayload, response;
|
|
928
|
-
return _regenerator.default.wrap(function
|
|
929
|
-
while (1) switch (
|
|
929
|
+
return _regenerator.default.wrap(function _callee22$(_context22) {
|
|
930
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
930
931
|
case 0:
|
|
931
932
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
932
933
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
933
|
-
|
|
934
|
+
_context22.next = 4;
|
|
934
935
|
return wxCallBackendConnector.voicemailMarkAsRead(messageId.$);
|
|
935
936
|
case 4:
|
|
936
|
-
response =
|
|
937
|
+
response = _context22.sent;
|
|
937
938
|
expect(response).toStrictEqual(EMPTY_SUCCESS_RESPONSE);
|
|
938
|
-
|
|
939
|
+
expect(infoSpy).toHaveBeenCalledWith("".concat(_constants2.METHOD_START_MESSAGE, " with messageId: ").concat(messageId.$), {
|
|
940
|
+
file: 'WxCallBackendConnector',
|
|
941
|
+
method: 'voicemailMarkAsRead'
|
|
942
|
+
});
|
|
943
|
+
expect(logSpy).toHaveBeenCalledWith('Successfully marked voicemail as read', {
|
|
944
|
+
file: 'WxCallBackendConnector',
|
|
945
|
+
method: 'voicemailMarkAsRead'
|
|
946
|
+
});
|
|
947
|
+
case 8:
|
|
939
948
|
case "end":
|
|
940
|
-
return
|
|
949
|
+
return _context22.stop();
|
|
941
950
|
}
|
|
942
|
-
},
|
|
951
|
+
}, _callee22);
|
|
943
952
|
})));
|
|
944
|
-
it('verify successful voicemailMarkAsUnread', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
953
|
+
it('verify successful voicemailMarkAsUnread', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
|
|
945
954
|
var voiceMailPayload, response;
|
|
946
|
-
return _regenerator.default.wrap(function
|
|
947
|
-
while (1) switch (
|
|
955
|
+
return _regenerator.default.wrap(function _callee23$(_context23) {
|
|
956
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
948
957
|
case 0:
|
|
949
958
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
950
959
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
951
|
-
|
|
960
|
+
_context23.next = 4;
|
|
952
961
|
return wxCallBackendConnector.voicemailMarkAsUnread(messageId.$);
|
|
953
962
|
case 4:
|
|
954
|
-
response =
|
|
963
|
+
response = _context23.sent;
|
|
955
964
|
expect(response).toStrictEqual(EMPTY_SUCCESS_RESPONSE);
|
|
956
|
-
|
|
965
|
+
expect(infoSpy).toHaveBeenCalledWith("".concat(_constants2.METHOD_START_MESSAGE, " with messageId: ").concat(messageId.$), {
|
|
966
|
+
file: 'WxCallBackendConnector',
|
|
967
|
+
method: 'voicemailMarkAsUnread'
|
|
968
|
+
});
|
|
969
|
+
expect(logSpy).toHaveBeenCalledWith('Successfully marked voicemail as unread', {
|
|
970
|
+
file: 'WxCallBackendConnector',
|
|
971
|
+
method: 'voicemailMarkAsUnread'
|
|
972
|
+
});
|
|
973
|
+
case 8:
|
|
957
974
|
case "end":
|
|
958
|
-
return
|
|
975
|
+
return _context23.stop();
|
|
959
976
|
}
|
|
960
|
-
},
|
|
977
|
+
}, _callee23);
|
|
961
978
|
})));
|
|
962
|
-
it('verify successful deleteVoicemail', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
979
|
+
it('verify successful deleteVoicemail', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
|
|
963
980
|
var voiceMailPayload, response;
|
|
964
|
-
return _regenerator.default.wrap(function
|
|
965
|
-
while (1) switch (
|
|
981
|
+
return _regenerator.default.wrap(function _callee24$(_context24) {
|
|
982
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
966
983
|
case 0:
|
|
967
984
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
968
985
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
969
|
-
|
|
986
|
+
_context24.next = 4;
|
|
970
987
|
return wxCallBackendConnector.deleteVoicemail(messageId.$);
|
|
971
988
|
case 4:
|
|
972
|
-
response =
|
|
989
|
+
response = _context24.sent;
|
|
973
990
|
expect(response).toStrictEqual(EMPTY_SUCCESS_RESPONSE);
|
|
974
|
-
|
|
991
|
+
expect(infoSpy).toHaveBeenCalledWith("".concat(_constants2.METHOD_START_MESSAGE, " with messageId: ").concat(messageId.$), {
|
|
992
|
+
file: 'WxCallBackendConnector',
|
|
993
|
+
method: 'deleteVoicemail'
|
|
994
|
+
});
|
|
995
|
+
expect(logSpy).toHaveBeenCalledWith('Successfully deleted voicemail', {
|
|
996
|
+
file: 'WxCallBackendConnector',
|
|
997
|
+
method: 'deleteVoicemail'
|
|
998
|
+
});
|
|
999
|
+
case 8:
|
|
975
1000
|
case "end":
|
|
976
|
-
return
|
|
1001
|
+
return _context24.stop();
|
|
977
1002
|
}
|
|
978
|
-
},
|
|
1003
|
+
}, _callee24);
|
|
979
1004
|
})));
|
|
980
|
-
it('verify resolveContact', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1005
|
+
it('verify resolveContact', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
|
|
981
1006
|
var voiceMailPayload, samplePeopleListResponse, displayInfo;
|
|
982
|
-
return _regenerator.default.wrap(function
|
|
983
|
-
while (1) switch (
|
|
1007
|
+
return _regenerator.default.wrap(function _callee25$(_context25) {
|
|
1008
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
984
1009
|
case 0:
|
|
985
1010
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
986
1011
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
987
1012
|
samplePeopleListResponse = (0, _testUtil.getSamplePeopleListResponse)();
|
|
988
1013
|
webex.people.list.mockResolvedValue(samplePeopleListResponse);
|
|
989
|
-
|
|
1014
|
+
_context25.next = 6;
|
|
990
1015
|
return wxCallBackendConnector.resolveContact({
|
|
991
1016
|
name: {
|
|
992
1017
|
$: 'Name'
|
|
993
1018
|
}
|
|
994
1019
|
});
|
|
995
1020
|
case 6:
|
|
996
|
-
displayInfo =
|
|
1021
|
+
displayInfo = _context25.sent;
|
|
997
1022
|
expect(displayInfo === null || displayInfo === void 0 ? void 0 : displayInfo.id).toStrictEqual(Buffer.from(samplePeopleListResponse.items[0].id, 'base64').toString('binary').split('/').pop());
|
|
998
1023
|
expect(displayInfo === null || displayInfo === void 0 ? void 0 : displayInfo.name).toStrictEqual(samplePeopleListResponse.items[0].displayName);
|
|
999
1024
|
expect(displayInfo === null || displayInfo === void 0 ? void 0 : displayInfo.num).toStrictEqual(samplePeopleListResponse.items[0].phoneNumbers[0].value);
|
|
1000
1025
|
expect(displayInfo === null || displayInfo === void 0 ? void 0 : displayInfo.avatarSrc).toStrictEqual(samplePeopleListResponse.items[0].avatar);
|
|
1001
1026
|
case 11:
|
|
1002
1027
|
case "end":
|
|
1003
|
-
return
|
|
1028
|
+
return _context25.stop();
|
|
1004
1029
|
}
|
|
1005
|
-
},
|
|
1030
|
+
}, _callee25);
|
|
1006
1031
|
})));
|
|
1007
1032
|
});
|
|
1008
1033
|
describe('Voicemail Fedramp webex call Backend Connector Test case', function () {
|
|
1009
1034
|
webex.config.fedramp = true;
|
|
1010
1035
|
var MOCK_FEDRAMP_URL = 'https://mock-fedramp-url/com.broadsoft.xsi-actions';
|
|
1011
|
-
beforeAll(
|
|
1012
|
-
return _regenerator.default.wrap(function
|
|
1013
|
-
while (1) switch (
|
|
1036
|
+
beforeAll(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
|
|
1037
|
+
return _regenerator.default.wrap(function _callee26$(_context26) {
|
|
1038
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
1014
1039
|
case 0:
|
|
1015
1040
|
webex.credentials.getUserToken.mockResolvedValue('mockAuthToken');
|
|
1016
1041
|
jest.spyOn(utils, 'getXsiActionEndpoint').mockResolvedValue(MOCK_FEDRAMP_URL);
|
|
@@ -1018,30 +1043,30 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1018
1043
|
level: _types.LOGGER.INFO
|
|
1019
1044
|
});
|
|
1020
1045
|
jest.spyOn(webex, 'request');
|
|
1021
|
-
|
|
1046
|
+
_context26.next = 6;
|
|
1022
1047
|
return wxCallBackendConnector.init();
|
|
1023
1048
|
case 6:
|
|
1024
1049
|
wxCallBackendConnector['context'] = CONTEXT;
|
|
1025
1050
|
wxCallBackendConnector.getSDKConnector();
|
|
1026
1051
|
case 8:
|
|
1027
1052
|
case "end":
|
|
1028
|
-
return
|
|
1053
|
+
return _context26.stop();
|
|
1029
1054
|
}
|
|
1030
|
-
},
|
|
1055
|
+
}, _callee26);
|
|
1031
1056
|
})));
|
|
1032
1057
|
beforeEach(function () {
|
|
1033
1058
|
getSortedVoicemailListSpy = jest.spyOn(utils, 'getSortedVoicemailList');
|
|
1034
1059
|
storeVoicemailListSpy = jest.spyOn(utils, 'storeVoicemailList');
|
|
1035
1060
|
fetchVoicemailListSpy = jest.spyOn(utils, 'fetchVoicemailList');
|
|
1036
1061
|
});
|
|
1037
|
-
it('getVoicemailList: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1062
|
+
it('getVoicemailList: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
|
|
1038
1063
|
var voiceMailPayload;
|
|
1039
|
-
return _regenerator.default.wrap(function
|
|
1040
|
-
while (1) switch (
|
|
1064
|
+
return _regenerator.default.wrap(function _callee27$(_context27) {
|
|
1065
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
1041
1066
|
case 0:
|
|
1042
1067
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1043
1068
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1044
|
-
|
|
1069
|
+
_context27.next = 4;
|
|
1045
1070
|
return wxCallBackendConnector.getVoicemailList(0, 4, _types2.SORT.ASC, true);
|
|
1046
1071
|
case 4:
|
|
1047
1072
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1053,18 +1078,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1053
1078
|
});
|
|
1054
1079
|
case 5:
|
|
1055
1080
|
case "end":
|
|
1056
|
-
return
|
|
1081
|
+
return _context27.stop();
|
|
1057
1082
|
}
|
|
1058
|
-
},
|
|
1083
|
+
}, _callee27);
|
|
1059
1084
|
})));
|
|
1060
|
-
it('getVoicemailContent: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1085
|
+
it('getVoicemailContent: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
|
|
1061
1086
|
var voiceMailPayload;
|
|
1062
|
-
return _regenerator.default.wrap(function
|
|
1063
|
-
while (1) switch (
|
|
1087
|
+
return _regenerator.default.wrap(function _callee28$(_context28) {
|
|
1088
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
1064
1089
|
case 0:
|
|
1065
1090
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1066
1091
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1067
|
-
|
|
1092
|
+
_context28.next = 4;
|
|
1068
1093
|
return wxCallBackendConnector.getVoicemailContent(messageId.$);
|
|
1069
1094
|
case 4:
|
|
1070
1095
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1076,18 +1101,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1076
1101
|
});
|
|
1077
1102
|
case 5:
|
|
1078
1103
|
case "end":
|
|
1079
|
-
return
|
|
1104
|
+
return _context28.stop();
|
|
1080
1105
|
}
|
|
1081
|
-
},
|
|
1106
|
+
}, _callee28);
|
|
1082
1107
|
})));
|
|
1083
|
-
it('getVoicemailSummary: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1108
|
+
it('getVoicemailSummary: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
|
|
1084
1109
|
var voiceMailPayload;
|
|
1085
|
-
return _regenerator.default.wrap(function
|
|
1086
|
-
while (1) switch (
|
|
1110
|
+
return _regenerator.default.wrap(function _callee29$(_context29) {
|
|
1111
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
1087
1112
|
case 0:
|
|
1088
1113
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1089
1114
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1090
|
-
|
|
1115
|
+
_context29.next = 4;
|
|
1091
1116
|
return wxCallBackendConnector.getVoicemailSummary();
|
|
1092
1117
|
case 4:
|
|
1093
1118
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1099,18 +1124,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1099
1124
|
});
|
|
1100
1125
|
case 5:
|
|
1101
1126
|
case "end":
|
|
1102
|
-
return
|
|
1127
|
+
return _context29.stop();
|
|
1103
1128
|
}
|
|
1104
|
-
},
|
|
1129
|
+
}, _callee29);
|
|
1105
1130
|
})));
|
|
1106
|
-
it('voicemailMarkAsRead: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1131
|
+
it('voicemailMarkAsRead: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30() {
|
|
1107
1132
|
var voiceMailPayload;
|
|
1108
|
-
return _regenerator.default.wrap(function
|
|
1109
|
-
while (1) switch (
|
|
1133
|
+
return _regenerator.default.wrap(function _callee30$(_context30) {
|
|
1134
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
1110
1135
|
case 0:
|
|
1111
1136
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1112
1137
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1113
|
-
|
|
1138
|
+
_context30.next = 4;
|
|
1114
1139
|
return wxCallBackendConnector.voicemailMarkAsRead(messageId.$);
|
|
1115
1140
|
case 4:
|
|
1116
1141
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1122,18 +1147,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1122
1147
|
});
|
|
1123
1148
|
case 5:
|
|
1124
1149
|
case "end":
|
|
1125
|
-
return
|
|
1150
|
+
return _context30.stop();
|
|
1126
1151
|
}
|
|
1127
|
-
},
|
|
1152
|
+
}, _callee30);
|
|
1128
1153
|
})));
|
|
1129
|
-
it('voicemailMarkAsUnread: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1154
|
+
it('voicemailMarkAsUnread: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
|
|
1130
1155
|
var voiceMailPayload;
|
|
1131
|
-
return _regenerator.default.wrap(function
|
|
1132
|
-
while (1) switch (
|
|
1156
|
+
return _regenerator.default.wrap(function _callee31$(_context31) {
|
|
1157
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
1133
1158
|
case 0:
|
|
1134
1159
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1135
1160
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1136
|
-
|
|
1161
|
+
_context31.next = 4;
|
|
1137
1162
|
return wxCallBackendConnector.voicemailMarkAsUnread(messageId.$);
|
|
1138
1163
|
case 4:
|
|
1139
1164
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1145,18 +1170,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1145
1170
|
});
|
|
1146
1171
|
case 5:
|
|
1147
1172
|
case "end":
|
|
1148
|
-
return
|
|
1173
|
+
return _context31.stop();
|
|
1149
1174
|
}
|
|
1150
|
-
},
|
|
1175
|
+
}, _callee31);
|
|
1151
1176
|
})));
|
|
1152
|
-
it('deleteVoicemail: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1177
|
+
it('deleteVoicemail: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
|
|
1153
1178
|
var voiceMailPayload;
|
|
1154
|
-
return _regenerator.default.wrap(function
|
|
1155
|
-
while (1) switch (
|
|
1179
|
+
return _regenerator.default.wrap(function _callee32$(_context32) {
|
|
1180
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
1156
1181
|
case 0:
|
|
1157
1182
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1158
1183
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1159
|
-
|
|
1184
|
+
_context32.next = 4;
|
|
1160
1185
|
return wxCallBackendConnector.deleteVoicemail(messageId.$);
|
|
1161
1186
|
case 4:
|
|
1162
1187
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1168,18 +1193,18 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1168
1193
|
});
|
|
1169
1194
|
case 5:
|
|
1170
1195
|
case "end":
|
|
1171
|
-
return
|
|
1196
|
+
return _context32.stop();
|
|
1172
1197
|
}
|
|
1173
|
-
},
|
|
1198
|
+
}, _callee32);
|
|
1174
1199
|
})));
|
|
1175
|
-
it('getVMTranscript: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(
|
|
1200
|
+
it('getVMTranscript: adds the authorization header when in fedramp', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
|
|
1176
1201
|
var voiceMailPayload;
|
|
1177
|
-
return _regenerator.default.wrap(function
|
|
1178
|
-
while (1) switch (
|
|
1202
|
+
return _regenerator.default.wrap(function _callee33$(_context33) {
|
|
1203
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
1179
1204
|
case 0:
|
|
1180
1205
|
voiceMailPayload = _voicemailFixture.getVoicemailListJsonWXC;
|
|
1181
1206
|
webex.request.mockResolvedValueOnce(voiceMailPayload);
|
|
1182
|
-
|
|
1207
|
+
_context33.next = 4;
|
|
1183
1208
|
return wxCallBackendConnector.getVMTranscript(messageId.$);
|
|
1184
1209
|
case 4:
|
|
1185
1210
|
expect(webex.request).toBeCalledOnceWith({
|
|
@@ -1191,9 +1216,9 @@ describe('Voicemail webex call Backend Connector Test case', function () {
|
|
|
1191
1216
|
});
|
|
1192
1217
|
case 5:
|
|
1193
1218
|
case "end":
|
|
1194
|
-
return
|
|
1219
|
+
return _context33.stop();
|
|
1195
1220
|
}
|
|
1196
|
-
},
|
|
1221
|
+
}, _callee33);
|
|
1197
1222
|
})));
|
|
1198
1223
|
});
|
|
1199
1224
|
});
|