@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.
Files changed (192) hide show
  1. package/dist/CallHistory/CallHistory.js +43 -43
  2. package/dist/CallHistory/CallHistory.js.map +1 -1
  3. package/dist/CallHistory/CallHistory.test.js +157 -152
  4. package/dist/CallHistory/CallHistory.test.js.map +1 -1
  5. package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
  6. package/dist/CallHistory/constants.js.map +1 -1
  7. package/dist/CallHistory/types.js.map +1 -1
  8. package/dist/CallSettings/CallSettings.js +8 -8
  9. package/dist/CallSettings/CallSettings.js.map +1 -1
  10. package/dist/CallSettings/CallSettings.test.js +1 -1
  11. package/dist/CallSettings/CallSettings.test.js.map +1 -1
  12. package/dist/CallSettings/UcmBackendConnector.js +12 -11
  13. package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
  14. package/dist/CallSettings/UcmBackendConnector.test.js +11 -11
  15. package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
  16. package/dist/CallSettings/WxCallBackendConnector.js +53 -52
  17. package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
  18. package/dist/CallSettings/WxCallBackendConnector.test.js +112 -110
  19. package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
  20. package/dist/CallSettings/constants.js.map +1 -1
  21. package/dist/CallSettings/testFixtures.js.map +1 -1
  22. package/dist/CallSettings/types.js.map +1 -1
  23. package/dist/CallingClient/CallingClient.js +458 -203
  24. package/dist/CallingClient/CallingClient.js.map +1 -1
  25. package/dist/CallingClient/CallingClient.test.js +458 -315
  26. package/dist/CallingClient/CallingClient.test.js.map +1 -1
  27. package/dist/CallingClient/callRecordFixtures.js.map +1 -1
  28. package/dist/CallingClient/calling/CallerId/index.js +2 -2
  29. package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
  30. package/dist/CallingClient/calling/CallerId/index.test.js +8 -7
  31. package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
  32. package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
  33. package/dist/CallingClient/calling/call.js +405 -372
  34. package/dist/CallingClient/calling/call.js.map +1 -1
  35. package/dist/CallingClient/calling/call.test.js +411 -410
  36. package/dist/CallingClient/calling/call.test.js.map +1 -1
  37. package/dist/CallingClient/calling/callManager.js +3 -4
  38. package/dist/CallingClient/calling/callManager.js.map +1 -1
  39. package/dist/CallingClient/calling/callManager.test.js +68 -69
  40. package/dist/CallingClient/calling/callManager.test.js.map +1 -1
  41. package/dist/CallingClient/calling/index.js.map +1 -1
  42. package/dist/CallingClient/calling/types.js.map +1 -1
  43. package/dist/CallingClient/callingClientFixtures.js.map +1 -1
  44. package/dist/CallingClient/constants.js +9 -6
  45. package/dist/CallingClient/constants.js.map +1 -1
  46. package/dist/CallingClient/line/index.js +10 -11
  47. package/dist/CallingClient/line/index.js.map +1 -1
  48. package/dist/CallingClient/line/line.test.js +10 -9
  49. package/dist/CallingClient/line/line.test.js.map +1 -1
  50. package/dist/CallingClient/line/types.js.map +1 -1
  51. package/dist/CallingClient/registration/index.js.map +1 -1
  52. package/dist/CallingClient/registration/register.js +285 -205
  53. package/dist/CallingClient/registration/register.js.map +1 -1
  54. package/dist/CallingClient/registration/register.test.js +251 -180
  55. package/dist/CallingClient/registration/register.test.js.map +1 -1
  56. package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
  57. package/dist/CallingClient/registration/types.js.map +1 -1
  58. package/dist/CallingClient/registration/webWorker.js +25 -10
  59. package/dist/CallingClient/registration/webWorker.js.map +1 -1
  60. package/dist/CallingClient/registration/webWorker.test.js +85 -38
  61. package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
  62. package/dist/CallingClient/registration/webWorkerStr.js +1 -1
  63. package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
  64. package/dist/CallingClient/types.js.map +1 -1
  65. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +142 -0
  66. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -0
  67. package/dist/Contacts/ContactsClient.js +244 -247
  68. package/dist/Contacts/ContactsClient.js.map +1 -1
  69. package/dist/Contacts/ContactsClient.test.js +93 -93
  70. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  71. package/dist/Contacts/constants.js +2 -2
  72. package/dist/Contacts/constants.js.map +1 -1
  73. package/dist/Contacts/contactFixtures.js.map +1 -1
  74. package/dist/Contacts/types.js.map +1 -1
  75. package/dist/Errors/catalog/CallError.js +2 -2
  76. package/dist/Errors/catalog/CallError.js.map +1 -1
  77. package/dist/Errors/catalog/CallingDeviceError.js +2 -2
  78. package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
  79. package/dist/Errors/catalog/ExtendedError.js +3 -3
  80. package/dist/Errors/catalog/ExtendedError.js.map +1 -1
  81. package/dist/Errors/catalog/LineError.js +2 -2
  82. package/dist/Errors/catalog/LineError.js.map +1 -1
  83. package/dist/Errors/index.js.map +1 -1
  84. package/dist/Errors/types.js.map +1 -1
  85. package/dist/Events/impl/index.js +3 -3
  86. package/dist/Events/impl/index.js.map +1 -1
  87. package/dist/Events/types.js.map +1 -1
  88. package/dist/Logger/index.js +3 -3
  89. package/dist/Logger/index.js.map +1 -1
  90. package/dist/Logger/index.test.js +1 -1
  91. package/dist/Logger/index.test.js.map +1 -1
  92. package/dist/Logger/types.js.map +1 -1
  93. package/dist/Metrics/index.js +221 -104
  94. package/dist/Metrics/index.js.map +1 -1
  95. package/dist/Metrics/index.test.js +112 -23
  96. package/dist/Metrics/index.test.js.map +1 -1
  97. package/dist/Metrics/types.js +15 -1
  98. package/dist/Metrics/types.js.map +1 -1
  99. package/dist/SDKConnector/index.js +0 -1
  100. package/dist/SDKConnector/index.js.map +1 -1
  101. package/dist/SDKConnector/index.test.js.map +1 -1
  102. package/dist/SDKConnector/types.js.map +1 -1
  103. package/dist/SDKConnector/utils.js.map +1 -1
  104. package/dist/SDKConnector/utils.test.js.map +1 -1
  105. package/dist/Voicemail/BroadworksBackendConnector.js +55 -61
  106. package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
  107. package/dist/Voicemail/BroadworksBackendConnector.test.js +129 -122
  108. package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
  109. package/dist/Voicemail/UcmBackendConnector.js +53 -50
  110. package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
  111. package/dist/Voicemail/UcmBackendConnector.test.js +73 -74
  112. package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
  113. package/dist/Voicemail/Voicemail.js +89 -113
  114. package/dist/Voicemail/Voicemail.js.map +1 -1
  115. package/dist/Voicemail/Voicemail.test.js +2 -2
  116. package/dist/Voicemail/Voicemail.test.js.map +1 -1
  117. package/dist/Voicemail/WxCallBackendConnector.js +87 -92
  118. package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
  119. package/dist/Voicemail/WxCallBackendConnector.test.js +228 -203
  120. package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
  121. package/dist/Voicemail/constants.js.map +1 -1
  122. package/dist/Voicemail/types.js.map +1 -1
  123. package/dist/Voicemail/voicemailFixture.js.map +1 -1
  124. package/dist/api.js.map +1 -1
  125. package/dist/common/Utils.js +85 -66
  126. package/dist/common/Utils.js.map +1 -1
  127. package/dist/common/Utils.test.js +113 -123
  128. package/dist/common/Utils.test.js.map +1 -1
  129. package/dist/common/constants.js.map +1 -1
  130. package/dist/common/index.js.map +1 -1
  131. package/dist/common/testUtil.js +1 -1
  132. package/dist/common/testUtil.js.map +1 -1
  133. package/dist/common/types.js.map +1 -1
  134. package/dist/index.js +5 -5
  135. package/dist/index.js.map +1 -1
  136. package/dist/module/CallHistory/CallHistory.js +17 -8
  137. package/dist/module/CallSettings/UcmBackendConnector.js +2 -2
  138. package/dist/module/CallSettings/WxCallBackendConnector.js +14 -14
  139. package/dist/module/CallingClient/CallingClient.js +176 -36
  140. package/dist/module/CallingClient/calling/call.js +91 -61
  141. package/dist/module/CallingClient/constants.js +8 -4
  142. package/dist/module/CallingClient/line/index.js +3 -3
  143. package/dist/module/CallingClient/registration/register.js +37 -13
  144. package/dist/module/CallingClient/registration/webWorker.js +17 -3
  145. package/dist/module/CallingClient/registration/webWorkerStr.js +19 -3
  146. package/dist/module/CallingClient/windowsChromiumIceWarmupUtils.js +59 -0
  147. package/dist/module/Contacts/ContactsClient.js +33 -37
  148. package/dist/module/Contacts/constants.js +1 -1
  149. package/dist/module/Events/impl/index.js +1 -1
  150. package/dist/module/Logger/index.js +2 -2
  151. package/dist/module/Metrics/index.js +142 -55
  152. package/dist/module/Metrics/types.js +14 -0
  153. package/dist/module/Voicemail/BroadworksBackendConnector.js +10 -17
  154. package/dist/module/Voicemail/UcmBackendConnector.js +11 -10
  155. package/dist/module/Voicemail/Voicemail.js +42 -68
  156. package/dist/module/Voicemail/WxCallBackendConnector.js +22 -28
  157. package/dist/module/common/Utils.js +29 -12
  158. package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
  159. package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
  160. package/dist/types/CallSettings/WxCallBackendConnector.d.ts.map +1 -1
  161. package/dist/types/CallingClient/CallingClient.d.ts +12 -1
  162. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  163. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  164. package/dist/types/CallingClient/calling/types.d.ts +2 -1
  165. package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
  166. package/dist/types/CallingClient/constants.d.ts +8 -4
  167. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  168. package/dist/types/CallingClient/line/index.d.ts.map +1 -1
  169. package/dist/types/CallingClient/registration/register.d.ts +1 -0
  170. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  171. package/dist/types/CallingClient/registration/webWorker.d.ts +2 -1
  172. package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
  173. package/dist/types/CallingClient/registration/webWorkerStr.d.ts +1 -1
  174. package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -1
  175. package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts +5 -0
  176. package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts.map +1 -0
  177. package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
  178. package/dist/types/Contacts/constants.d.ts +1 -1
  179. package/dist/types/Contacts/constants.d.ts.map +1 -1
  180. package/dist/types/Logger/index.d.ts +1 -2
  181. package/dist/types/Logger/index.d.ts.map +1 -1
  182. package/dist/types/Metrics/index.d.ts.map +1 -1
  183. package/dist/types/Metrics/types.d.ts +18 -3
  184. package/dist/types/Metrics/types.d.ts.map +1 -1
  185. package/dist/types/Voicemail/BroadworksBackendConnector.d.ts.map +1 -1
  186. package/dist/types/Voicemail/UcmBackendConnector.d.ts.map +1 -1
  187. package/dist/types/Voicemail/Voicemail.d.ts.map +1 -1
  188. package/dist/types/Voicemail/WxCallBackendConnector.d.ts.map +1 -1
  189. package/dist/types/common/Utils.d.ts.map +1 -1
  190. package/dist/types/common/types.d.ts +1 -0
  191. package/dist/types/common/types.d.ts.map +1 -1
  192. package/package.json +10 -8
@@ -26,8 +26,7 @@ var _callManager = require("./callManager");
26
26
  var _Logger = _interopRequireDefault(require("../../Logger"));
27
27
  var _Errors = require("../../Errors");
28
28
  var _constants2 = require("../../common/constants");
29
- function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
30
- 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; }
29
+ 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); }
31
30
  /* eslint-disable @typescript-eslint/no-explicit-any */
32
31
  /* eslint-disable dot-notation */
33
32
  /* eslint-disable @typescript-eslint/no-shadow */
@@ -135,7 +134,7 @@ describe('Call Tests', function () {
135
134
  var call = (0, _call.createCall)(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator, dest);
136
135
  expect(call).toBeTruthy();
137
136
  });
138
- it('should log a warning when sending a digit fails', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
137
+ it('should log a warning when sending a digit fails', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
139
138
  var tone, errorMessage, mockMediaConnection, callManager, call, realMediaConnection, warnSpy, infoSpy;
140
139
  return _regenerator.default.wrap(function _callee$(_context) {
141
140
  while (1) switch (_context.prev = _context.next) {
@@ -185,7 +184,7 @@ describe('Call Tests', function () {
185
184
  }
186
185
  }, _callee);
187
186
  })));
188
- it('delete call object when ending the call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
187
+ it('delete call object when ending the call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
189
188
  var callManager, mockStream, localAudioStream, call, infoSpy;
190
189
  return _regenerator.default.wrap(function _callee2$(_context2) {
191
190
  while (1) switch (_context2.prev = _context2.next) {
@@ -243,7 +242,7 @@ describe('Call Tests', function () {
243
242
  }
244
243
  }, _callee2);
245
244
  })));
246
- it('Check whether media requests succeed or not', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
245
+ it('Check whether media requests succeed or not', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
247
246
  var mediaResponse, call, response;
248
247
  return _regenerator.default.wrap(function _callee3$(_context3) {
249
248
  while (1) switch (_context3.prev = _context3.next) {
@@ -280,7 +279,7 @@ describe('Call Tests', function () {
280
279
  }
281
280
  }, _callee3);
282
281
  })));
283
- it('check whether callerId midcall event is serviced or not', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
282
+ it('check whether callerId midcall event is serviced or not', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
284
283
  var call;
285
284
  return _regenerator.default.wrap(function _callee4$(_context4) {
286
285
  while (1) switch (_context4.prev = _context4.next) {
@@ -299,7 +298,7 @@ describe('Call Tests', function () {
299
298
  }
300
299
  }, _callee4);
301
300
  })));
302
- it('check whether call midcall event is serviced or not', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
301
+ it('check whether call midcall event is serviced or not', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
303
302
  var call, logSpy, corelationId;
304
303
  return _regenerator.default.wrap(function _callee5$(_context5) {
305
304
  while (1) switch (_context5.prev = _context5.next) {
@@ -322,7 +321,7 @@ describe('Call Tests', function () {
322
321
  }
323
322
  }, _callee5);
324
323
  })));
325
- it('check call stats for active call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
324
+ it('check call stats for active call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
326
325
  var call, callRtpStats;
327
326
  return _regenerator.default.wrap(function _callee6$(_context6) {
328
327
  while (1) switch (_context6.prev = _context6.next) {
@@ -347,7 +346,7 @@ describe('Call Tests', function () {
347
346
  }
348
347
  }, _callee6, null, [[1, 7]]);
349
348
  })));
350
- it('dial functionality tests for coverage', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
349
+ it('dial functionality tests for coverage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
351
350
  var mockStream, localAudioStream, warnSpy, call, bnrMetricSpy, logSpy;
352
351
  return _regenerator.default.wrap(function _callee7$(_context7) {
353
352
  while (1) switch (_context7.prev = _context7.next) {
@@ -387,7 +386,7 @@ describe('Call Tests', function () {
387
386
  }
388
387
  }, _callee7);
389
388
  })));
390
- it('answer functionality tests for coverage', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
389
+ it('answer functionality tests for coverage', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
391
390
  var mockStream, localAudioStream, warnSpy, call, bnrMetricSpy, infoSpy;
392
391
  return _regenerator.default.wrap(function _callee8$(_context8) {
393
392
  while (1) switch (_context8.prev = _context8.next) {
@@ -428,7 +427,7 @@ describe('Call Tests', function () {
428
427
  }
429
428
  }, _callee8);
430
429
  })));
431
- it('testing enabling/disabling the BNR on an active call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
430
+ it('testing enabling/disabling the BNR on an active call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
432
431
  var mockStream, localAudioStream, onStreamSpy, onEffectSpy, offStreamSpy, offEffectSpy, call, updateLocalTracksSpy, bnrMetricSpy;
433
432
  return _regenerator.default.wrap(function _callee9$(_context9) {
434
433
  while (1) switch (_context9.prev = _context9.next) {
@@ -502,10 +501,10 @@ describe('Call Tests', function () {
502
501
  }
503
502
  }, _callee9);
504
503
  })));
505
- it('answer fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
504
+ it('answer fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
506
505
  var mockStream, localAudioStream, warnSpy, call;
507
- return _regenerator.default.wrap(function _callee10$(_context10) {
508
- while (1) switch (_context10.prev = _context10.next) {
506
+ return _regenerator.default.wrap(function _callee0$(_context0) {
507
+ while (1) switch (_context0.prev = _context0.next) {
509
508
  case 0:
510
509
  mockStream = {
511
510
  outputStream: {
@@ -529,7 +528,7 @@ describe('Call Tests', function () {
529
528
  warnSpy = jest.spyOn(_Logger.default, 'warn');
530
529
  call = (0, _call.createCall)(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator, dest);
531
530
  call.answer(localAudioStream);
532
- _context10.next = 8;
531
+ _context0.next = 8;
533
532
  return (0, _Utils.waitForMsecs)(50);
534
533
  case 8:
535
534
  expect(warnSpy).toBeCalledTimes(2);
@@ -544,14 +543,14 @@ describe('Call Tests', function () {
544
543
  expect(webex.request.mock.calls[0][0].body.metrics).toStrictEqual(disconnectStats);
545
544
  case 15:
546
545
  case "end":
547
- return _context10.stop();
546
+ return _context0.stop();
548
547
  }
549
- }, _callee10);
548
+ }, _callee0);
550
549
  })));
551
- it('dial fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
550
+ it('dial fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
552
551
  var mockStream, localAudioStream, warnSpy, call;
553
- return _regenerator.default.wrap(function _callee11$(_context11) {
554
- while (1) switch (_context11.prev = _context11.next) {
552
+ return _regenerator.default.wrap(function _callee1$(_context1) {
553
+ while (1) switch (_context1.prev = _context1.next) {
555
554
  case 0:
556
555
  mockStream = {
557
556
  outputStream: {
@@ -563,7 +562,7 @@ describe('Call Tests', function () {
563
562
  warnSpy = jest.spyOn(_Logger.default, 'warn');
564
563
  call = (0, _call.createCall)(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator, dest);
565
564
  call.dial(localAudioStream);
566
- _context11.next = 7;
565
+ _context1.next = 7;
567
566
  return (0, _Utils.waitForMsecs)(50);
568
567
  case 7:
569
568
  expect(warnSpy).toBeCalledTimes(1);
@@ -576,9 +575,9 @@ describe('Call Tests', function () {
576
575
  expect(webex.request).not.toBeCalledOnceWith();
577
576
  case 12:
578
577
  case "end":
579
- return _context11.stop();
578
+ return _context1.stop();
580
579
  }
581
- }, _callee11);
580
+ }, _callee1);
582
581
  })));
583
582
  it('update media after call creation with valid stream', function () {
584
583
  var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
@@ -652,10 +651,10 @@ describe('Call Tests', function () {
652
651
  method: 'dial'
653
652
  });
654
653
  });
655
- it('test system mute and user mute different scnearios', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
654
+ it('test system mute and user mute different scnearios', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
656
655
  var logSpy, callManager, mockStream, localAudioStream, call;
657
- return _regenerator.default.wrap(function _callee12$(_context12) {
658
- while (1) switch (_context12.prev = _context12.next) {
656
+ return _regenerator.default.wrap(function _callee10$(_context10) {
657
+ while (1) switch (_context10.prev = _context10.next) {
659
658
  case 0:
660
659
  logSpy = jest.spyOn(_Logger.default, 'info');
661
660
  webex.request.mockReturnValue({
@@ -731,9 +730,9 @@ describe('Call Tests', function () {
731
730
  expect(mockStream.setUserMuted).toBeCalledOnceWith(false);
732
731
  case 37:
733
732
  case "end":
734
- return _context12.stop();
733
+ return _context10.stop();
735
734
  }
736
- }, _callee12);
735
+ }, _callee10);
737
736
  })));
738
737
  describe('Guest Calling Flow Tests', function () {
739
738
  var dummyEvent = {
@@ -741,10 +740,10 @@ describe('Call Tests', function () {
741
740
  data: undefined
742
741
  };
743
742
  var call;
744
- it('outgoing call without guest calling must have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
743
+ it('outgoing call without guest calling must have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
745
744
  var requestSpy, requestArgs;
746
- return _regenerator.default.wrap(function _callee13$(_context13) {
747
- while (1) switch (_context13.prev = _context13.next) {
745
+ return _regenerator.default.wrap(function _callee11$(_context11) {
746
+ while (1) switch (_context11.prev = _context11.next) {
748
747
  case 0:
749
748
  call = new _call.Call(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, function () {
750
749
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -757,14 +756,14 @@ describe('Call Tests', function () {
757
756
  expect('callee' in requestArgs.body).toBe(true);
758
757
  case 6:
759
758
  case "end":
760
- return _context13.stop();
759
+ return _context11.stop();
761
760
  }
762
- }, _callee13);
761
+ }, _callee11);
763
762
  })));
764
- it('outgoing call for guest calling must not have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
763
+ it('outgoing call for guest calling must not have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
765
764
  var requestSpy, requestArgs;
766
- return _regenerator.default.wrap(function _callee14$(_context14) {
767
- while (1) switch (_context14.prev = _context14.next) {
765
+ return _regenerator.default.wrap(function _callee12$(_context12) {
766
+ while (1) switch (_context12.prev = _context12.next) {
768
767
  case 0:
769
768
  call = new _call.Call(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, function () {
770
769
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -777,9 +776,9 @@ describe('Call Tests', function () {
777
776
  expect('callee' in requestArgs.body).toBe(false);
778
777
  case 6:
779
778
  case "end":
780
- return _context14.stop();
779
+ return _context12.stop();
781
780
  }
782
- }, _callee14);
781
+ }, _callee12);
783
782
  })));
784
783
  });
785
784
  });
@@ -812,10 +811,10 @@ describe('State Machine handler tests', function () {
812
811
 
813
812
  // afterEach(() => call.removeAllListeners());
814
813
 
815
- it('successful session refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
814
+ it('successful session refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13() {
816
815
  var statusPayload, dummyEvent, funcSpy, logSpy;
817
- return _regenerator.default.wrap(function _callee15$(_context15) {
818
- while (1) switch (_context15.prev = _context15.next) {
816
+ return _regenerator.default.wrap(function _callee13$(_context13) {
817
+ while (1) switch (_context13.prev = _context13.next) {
819
818
  case 0:
820
819
  statusPayload = {
821
820
  statusCode: 200,
@@ -835,7 +834,7 @@ describe('State Machine handler tests', function () {
835
834
  /* This is to flush all the promises from the Promise queue so that
836
835
  * Jest.fakeTimers can advance time and also clear the promise Queue
837
836
  */
838
- _context15.next = 11;
837
+ _context13.next = 11;
839
838
  return (0, _testUtil.flushPromises)(3);
840
839
  case 11:
841
840
  expect(setInterval).toHaveBeenCalledTimes(1);
@@ -850,14 +849,14 @@ describe('State Machine handler tests', function () {
850
849
  });
851
850
  case 15:
852
851
  case "end":
853
- return _context15.stop();
852
+ return _context13.stop();
854
853
  }
855
- }, _callee15);
854
+ }, _callee13);
856
855
  })));
857
- it('session refresh failure', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
856
+ it('session refresh failure', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
858
857
  var statusPayload, funcSpy;
859
- return _regenerator.default.wrap(function _callee16$(_context16) {
860
- while (1) switch (_context16.prev = _context16.next) {
858
+ return _regenerator.default.wrap(function _callee14$(_context14) {
859
+ while (1) switch (_context14.prev = _context14.next) {
861
860
  case 0:
862
861
  expect.assertions(4);
863
862
  statusPayload = {
@@ -881,24 +880,24 @@ describe('State Machine handler tests', function () {
881
880
  /* This is to flush all the promises from the Promise queue so that
882
881
  * Jest.fakeTimers can advance time and also clear the promise Queue
883
882
  */
884
- _context16.next = 11;
883
+ _context14.next = 11;
885
884
  return _promise.default.resolve();
886
885
  case 11:
887
- _context16.next = 13;
886
+ _context14.next = 13;
888
887
  return _promise.default.resolve();
889
888
  case 13:
890
- expect(clearInterval).toHaveBeenCalledTimes(1);
889
+ expect(clearInterval).toHaveBeenCalledTimes(2); // check this
891
890
  expect(funcSpy).toBeCalledTimes(1);
892
891
  case 15:
893
892
  case "end":
894
- return _context16.stop();
893
+ return _context14.stop();
895
894
  }
896
- }, _callee16);
895
+ }, _callee14);
897
896
  })));
898
- it('state changes during successful incoming call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
897
+ it('state changes during successful incoming call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
899
898
  var statusPayload, dummyEvent, postMediaSpy, deleteSpy, dummyOkEvent;
900
- return _regenerator.default.wrap(function _callee17$(_context17) {
901
- while (1) switch (_context17.prev = _context17.next) {
899
+ return _regenerator.default.wrap(function _callee15$(_context15) {
900
+ while (1) switch (_context15.prev = _context15.next) {
902
901
  case 0:
903
902
  statusPayload = {
904
903
  statusCode: 200,
@@ -954,14 +953,14 @@ describe('State Machine handler tests', function () {
954
953
  expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
955
954
  case 27:
956
955
  case "end":
957
- return _context17.stop();
956
+ return _context15.stop();
958
957
  }
959
- }, _callee17);
958
+ }, _callee15);
960
959
  })));
961
- it('state changes during unsuccessful incoming call due to no offer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
960
+ it('state changes during unsuccessful incoming call due to no offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
962
961
  var statusPayload, dummyEvent;
963
- return _regenerator.default.wrap(function _callee18$(_context18) {
964
- while (1) switch (_context18.prev = _context18.next) {
962
+ return _regenerator.default.wrap(function _callee16$(_context16) {
963
+ while (1) switch (_context16.prev = _context16.next) {
965
964
  case 0:
966
965
  call['direction'] = _types3.CallDirection.INBOUND;
967
966
  statusPayload = {
@@ -979,7 +978,7 @@ describe('State Machine handler tests', function () {
979
978
  webex.request.mockReturnValue(statusPayload);
980
979
  call.sendCallStateMachineEvt(dummyEvent);
981
980
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_PROGRESS');
982
- _context18.next = 8;
981
+ _context16.next = 8;
983
982
  return call['handleOutgoingCallConnect']({
984
983
  type: 'E_SEND_CALL_CONNECT'
985
984
  });
@@ -993,14 +992,14 @@ describe('State Machine handler tests', function () {
993
992
  expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
994
993
  case 12:
995
994
  case "end":
996
- return _context18.stop();
995
+ return _context16.stop();
997
996
  }
998
- }, _callee18);
997
+ }, _callee16);
999
998
  })));
1000
- it('state changes during unsuccessful incoming call due error in call connect', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
999
+ it('state changes during unsuccessful incoming call due error in call connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
1001
1000
  var warnSpy, errorSpy, stateMachineSpy, statusPayload, roapMessage;
1002
- return _regenerator.default.wrap(function _callee19$(_context19) {
1003
- while (1) switch (_context19.prev = _context19.next) {
1001
+ return _regenerator.default.wrap(function _callee17$(_context17) {
1002
+ while (1) switch (_context17.prev = _context17.next) {
1004
1003
  case 0:
1005
1004
  warnSpy = jest.spyOn(_Logger.default, 'warn');
1006
1005
  errorSpy = jest.spyOn(_Logger.default, 'error');
@@ -1027,7 +1026,7 @@ describe('State Machine handler tests', function () {
1027
1026
  webex.request.mockRejectedValueOnce({
1028
1027
  statusCode: 403
1029
1028
  }).mockResolvedValue(statusPayload);
1030
- _context19.next = 13;
1029
+ _context17.next = 13;
1031
1030
  return call['handleOutgoingCallConnect']({
1032
1031
  type: 'E_SEND_CALL_CONNECT'
1033
1032
  });
@@ -1038,14 +1037,14 @@ describe('State Machine handler tests', function () {
1038
1037
  expect(errorSpy).toBeCalledTimes(1);
1039
1038
  case 17:
1040
1039
  case "end":
1041
- return _context19.stop();
1040
+ return _context17.stop();
1042
1041
  }
1043
- }, _callee19);
1042
+ }, _callee17);
1044
1043
  })));
1045
- it('state changes during successful outgoing call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
1044
+ it('state changes during successful outgoing call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
1046
1045
  var statusPayload, dummyEvent, postMediaSpy, logSpy, dummyOkEvent;
1047
- return _regenerator.default.wrap(function _callee20$(_context20) {
1048
- while (1) switch (_context20.prev = _context20.next) {
1046
+ return _regenerator.default.wrap(function _callee18$(_context18) {
1047
+ while (1) switch (_context18.prev = _context18.next) {
1049
1048
  case 0:
1050
1049
  statusPayload = {
1051
1050
  statusCode: 200,
@@ -1121,14 +1120,14 @@ describe('State Machine handler tests', function () {
1121
1120
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_DISCONNECT');
1122
1121
  case 42:
1123
1122
  case "end":
1124
- return _context20.stop();
1123
+ return _context18.stop();
1125
1124
  }
1126
- }, _callee20);
1125
+ }, _callee18);
1127
1126
  })));
1128
- it('outgoing call where we receive connect directly after setup. Media established before connect. test call and media state changes', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
1127
+ it('outgoing call where we receive connect directly after setup. Media established before connect. test call and media state changes', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
1129
1128
  var statusPayload, dummySetupEvent, dummyConnectEvent, dummyOfferEvent, dummyAnswerEvent, dummyOkEvent, postMediaSpy;
1130
- return _regenerator.default.wrap(function _callee21$(_context21) {
1131
- while (1) switch (_context21.prev = _context21.next) {
1129
+ return _regenerator.default.wrap(function _callee19$(_context19) {
1130
+ while (1) switch (_context19.prev = _context19.next) {
1132
1131
  case 0:
1133
1132
  statusPayload = {
1134
1133
  statusCode: 200,
@@ -1196,14 +1195,14 @@ describe('State Machine handler tests', function () {
1196
1195
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_DISCONNECT');
1197
1196
  case 25:
1198
1197
  case "end":
1199
- return _context21.stop();
1198
+ return _context19.stop();
1200
1199
  }
1201
- }, _callee21);
1200
+ }, _callee19);
1202
1201
  })));
1203
- it('state changes during successful outgoing call with early media', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
1202
+ it('state changes during successful outgoing call with early media', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
1204
1203
  var statusPayload, dummyEvent;
1205
- return _regenerator.default.wrap(function _callee22$(_context22) {
1206
- while (1) switch (_context22.prev = _context22.next) {
1204
+ return _regenerator.default.wrap(function _callee20$(_context20) {
1205
+ while (1) switch (_context20.prev = _context20.next) {
1207
1206
  case 0:
1208
1207
  statusPayload = {
1209
1208
  statusCode: 200,
@@ -1242,14 +1241,14 @@ describe('State Machine handler tests', function () {
1242
1241
  expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
1243
1242
  case 17:
1244
1243
  case "end":
1245
- return _context22.stop();
1244
+ return _context20.stop();
1246
1245
  }
1247
- }, _callee22);
1246
+ }, _callee20);
1248
1247
  })));
1249
- it('state changes during unsuccessful outgoing call due to error in call setup', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
1248
+ it('state changes during unsuccessful outgoing call due to error in call setup', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
1250
1249
  var statusPayload, dummyEvent, errorSpy;
1251
- return _regenerator.default.wrap(function _callee23$(_context23) {
1252
- while (1) switch (_context23.prev = _context23.next) {
1250
+ return _regenerator.default.wrap(function _callee21$(_context21) {
1251
+ while (1) switch (_context21.prev = _context21.next) {
1253
1252
  case 0:
1254
1253
  statusPayload = {
1255
1254
  statusCode: 403,
@@ -1266,7 +1265,7 @@ describe('State Machine handler tests', function () {
1266
1265
  webex.request.mockRejectedValueOnce(statusPayload);
1267
1266
  errorSpy = jest.spyOn(_Logger.default, 'error');
1268
1267
  call.sendCallStateMachineEvt(dummyEvent);
1269
- _context23.next = 7;
1268
+ _context21.next = 7;
1270
1269
  return (0, _testUtil.flushPromises)(3);
1271
1270
  case 7:
1272
1271
  expect(call['callStateMachine'].state.value).toBe('S_UNKNOWN');
@@ -1277,14 +1276,14 @@ describe('State Machine handler tests', function () {
1277
1276
  });
1278
1277
  case 10:
1279
1278
  case "end":
1280
- return _context23.stop();
1279
+ return _context21.stop();
1281
1280
  }
1282
- }, _callee23);
1281
+ }, _callee21);
1283
1282
  })));
1284
- it('state changes during unsuccessful outgoing call due to error in media ok', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
1283
+ it('state changes during unsuccessful outgoing call due to error in media ok', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
1285
1284
  var statusPayload, dummyEvent, warnSpy;
1286
- return _regenerator.default.wrap(function _callee24$(_context24) {
1287
- while (1) switch (_context24.prev = _context24.next) {
1285
+ return _regenerator.default.wrap(function _callee22$(_context22) {
1286
+ while (1) switch (_context22.prev = _context22.next) {
1288
1287
  case 0:
1289
1288
  statusPayload = {
1290
1289
  statusCode: 403,
@@ -1303,10 +1302,10 @@ describe('State Machine handler tests', function () {
1303
1302
  webex.request.mockRejectedValue(statusPayload);
1304
1303
  warnSpy = jest.spyOn(_Logger.default, 'warn');
1305
1304
  jest.spyOn(Utils, 'uploadLogs').mockResolvedValue(undefined);
1306
- _context24.next = 10;
1305
+ _context22.next = 10;
1307
1306
  return call['handleRoapEstablished']({}, dummyEvent);
1308
1307
  case 10:
1309
- _context24.next = 12;
1308
+ _context22.next = 12;
1310
1309
  return (0, _testUtil.flushPromises)(2);
1311
1310
  case 12:
1312
1311
  expect(call.isConnected()).toBe(false);
@@ -1322,14 +1321,14 @@ describe('State Machine handler tests', function () {
1322
1321
  });
1323
1322
  case 17:
1324
1323
  case "end":
1325
- return _context24.stop();
1324
+ return _context22.stop();
1326
1325
  }
1327
- }, _callee24);
1326
+ }, _callee22);
1328
1327
  })));
1329
- it('state changes during unsuccessful outgoing call since no sdp in offer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
1328
+ it('state changes during unsuccessful outgoing call since no sdp in offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
1330
1329
  var statusPayload, dummyEvent;
1331
- return _regenerator.default.wrap(function _callee25$(_context25) {
1332
- while (1) switch (_context25.prev = _context25.next) {
1330
+ return _regenerator.default.wrap(function _callee23$(_context23) {
1331
+ while (1) switch (_context23.prev = _context23.next) {
1333
1332
  case 0:
1334
1333
  statusPayload = {
1335
1334
  statusCode: 403,
@@ -1352,14 +1351,14 @@ describe('State Machine handler tests', function () {
1352
1351
  expect(_testUtil.mediaConnection.initiateOffer).toBeCalledOnceWith();
1353
1352
  case 8:
1354
1353
  case "end":
1355
- return _context25.stop();
1354
+ return _context23.stop();
1356
1355
  }
1357
- }, _callee25);
1356
+ }, _callee23);
1358
1357
  })));
1359
- it('Outgoing Roap offer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
1358
+ it('Outgoing Roap offer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
1360
1359
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
1361
- return _regenerator.default.wrap(function _callee26$(_context26) {
1362
- while (1) switch (_context26.prev = _context26.next) {
1360
+ return _regenerator.default.wrap(function _callee24$(_context24) {
1361
+ while (1) switch (_context24.prev = _context24.next) {
1363
1362
  case 0:
1364
1363
  statusPayload = {
1365
1364
  statusCode: 503,
@@ -1381,7 +1380,7 @@ describe('State Machine handler tests', function () {
1381
1380
  }
1382
1381
  };
1383
1382
  call['connected'] = true;
1384
- _context26.next = 8;
1383
+ _context24.next = 8;
1385
1384
  return call['handleOutgoingRoapOffer']({}, dummyEvent);
1386
1385
  case 8:
1387
1386
  jest.advanceTimersByTime(1005);
@@ -1393,14 +1392,14 @@ describe('State Machine handler tests', function () {
1393
1392
  expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
1394
1393
  case 13:
1395
1394
  case "end":
1396
- return _context26.stop();
1395
+ return _context24.stop();
1397
1396
  }
1398
- }, _callee26);
1397
+ }, _callee24);
1399
1398
  })));
1400
- it('Outgoing Roap offer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
1399
+ it('Outgoing Roap offer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
1401
1400
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
1402
- return _regenerator.default.wrap(function _callee27$(_context27) {
1403
- while (1) switch (_context27.prev = _context27.next) {
1401
+ return _regenerator.default.wrap(function _callee25$(_context25) {
1402
+ while (1) switch (_context25.prev = _context25.next) {
1404
1403
  case 0:
1405
1404
  statusPayload = {
1406
1405
  statusCode: 503,
@@ -1422,7 +1421,7 @@ describe('State Machine handler tests', function () {
1422
1421
  }
1423
1422
  };
1424
1423
  call['connected'] = false;
1425
- _context27.next = 8;
1424
+ _context25.next = 8;
1426
1425
  return call['handleOutgoingRoapOffer']({}, dummyEvent);
1427
1426
  case 8:
1428
1427
  jest.advanceTimersByTime(1005);
@@ -1433,14 +1432,14 @@ describe('State Machine handler tests', function () {
1433
1432
  expect(stateMachineSpy).not.toBeCalled();
1434
1433
  case 12:
1435
1434
  case "end":
1436
- return _context27.stop();
1435
+ return _context25.stop();
1437
1436
  }
1438
- }, _callee27);
1437
+ }, _callee25);
1439
1438
  })));
1440
- it('Outgoing Roap Answer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
1439
+ it('Outgoing Roap Answer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
1441
1440
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
1442
- return _regenerator.default.wrap(function _callee28$(_context28) {
1443
- while (1) switch (_context28.prev = _context28.next) {
1441
+ return _regenerator.default.wrap(function _callee26$(_context26) {
1442
+ while (1) switch (_context26.prev = _context26.next) {
1444
1443
  case 0:
1445
1444
  statusPayload = {
1446
1445
  statusCode: 503,
@@ -1462,7 +1461,7 @@ describe('State Machine handler tests', function () {
1462
1461
  };
1463
1462
  call['connected'] = true;
1464
1463
  call['mediaStateMachine'].state.value = 'S_RECV_ROAP_OFFER';
1465
- _context28.next = 9;
1464
+ _context26.next = 9;
1466
1465
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
1467
1466
  case 9:
1468
1467
  jest.advanceTimersByTime(1005);
@@ -1474,14 +1473,14 @@ describe('State Machine handler tests', function () {
1474
1473
  expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
1475
1474
  case 14:
1476
1475
  case "end":
1477
- return _context28.stop();
1476
+ return _context26.stop();
1478
1477
  }
1479
- }, _callee28);
1478
+ }, _callee26);
1480
1479
  })));
1481
- it('Outgoing Roap answer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
1480
+ it('Outgoing Roap answer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
1482
1481
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
1483
- return _regenerator.default.wrap(function _callee29$(_context29) {
1484
- while (1) switch (_context29.prev = _context29.next) {
1482
+ return _regenerator.default.wrap(function _callee27$(_context27) {
1483
+ while (1) switch (_context27.prev = _context27.next) {
1485
1484
  case 0:
1486
1485
  statusPayload = {
1487
1486
  statusCode: 503,
@@ -1502,7 +1501,7 @@ describe('State Machine handler tests', function () {
1502
1501
  }
1503
1502
  };
1504
1503
  call['connected'] = false;
1505
- _context29.next = 8;
1504
+ _context27.next = 8;
1506
1505
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
1507
1506
  case 8:
1508
1507
  jest.advanceTimersByTime(1005);
@@ -1514,14 +1513,14 @@ describe('State Machine handler tests', function () {
1514
1513
  expect(stateMachineSpy).not.toBeCalled();
1515
1514
  case 13:
1516
1515
  case "end":
1517
- return _context29.stop();
1516
+ return _context27.stop();
1518
1517
  }
1519
- }, _callee29);
1518
+ }, _callee27);
1520
1519
  })));
1521
- it('ROAP error during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
1520
+ it('ROAP error during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
1522
1521
  var statusPayload, warnSpy, stateMachineSpy, funcSpy, errorEvent;
1523
- return _regenerator.default.wrap(function _callee30$(_context30) {
1524
- while (1) switch (_context30.prev = _context30.next) {
1522
+ return _regenerator.default.wrap(function _callee28$(_context28) {
1523
+ while (1) switch (_context28.prev = _context28.next) {
1525
1524
  case 0:
1526
1525
  statusPayload = {
1527
1526
  statusCode: 200,
@@ -1546,14 +1545,14 @@ describe('State Machine handler tests', function () {
1546
1545
  expect(stateMachineSpy).not.toHaveBeenCalled();
1547
1546
  case 11:
1548
1547
  case "end":
1549
- return _context30.stop();
1548
+ return _context28.stop();
1550
1549
  }
1551
- }, _callee30);
1550
+ }, _callee28);
1552
1551
  })));
1553
- it('ROAP ok retry-after during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
1552
+ it('ROAP ok retry-after during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
1554
1553
  var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
1555
- return _regenerator.default.wrap(function _callee31$(_context31) {
1556
- while (1) switch (_context31.prev = _context31.next) {
1554
+ return _regenerator.default.wrap(function _callee29$(_context29) {
1555
+ while (1) switch (_context29.prev = _context29.next) {
1557
1556
  case 0:
1558
1557
  statusPayload = {
1559
1558
  statusCode: 503,
@@ -1575,7 +1574,7 @@ describe('State Machine handler tests', function () {
1575
1574
  };
1576
1575
  call['connected'] = true;
1577
1576
  call['mediaStateMachine'].state.value = 'S_RECV_ROAP_ANSWER';
1578
- _context31.next = 9;
1577
+ _context29.next = 9;
1579
1578
  return call['handleRoapEstablished']({}, dummyEvent);
1580
1579
  case 9:
1581
1580
  jest.advanceTimersByTime(1005);
@@ -1587,14 +1586,14 @@ describe('State Machine handler tests', function () {
1587
1586
  expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
1588
1587
  case 14:
1589
1588
  case "end":
1590
- return _context31.stop();
1589
+ return _context29.stop();
1591
1590
  }
1592
- }, _callee31);
1591
+ }, _callee29);
1593
1592
  })));
1594
- it('Unable to communicate roap error with mobius', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
1593
+ it('Unable to communicate roap error with mobius', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30() {
1595
1594
  var statusPayload, stateMachineSpy, funcSpy, errorEvent;
1596
- return _regenerator.default.wrap(function _callee32$(_context32) {
1597
- while (1) switch (_context32.prev = _context32.next) {
1595
+ return _regenerator.default.wrap(function _callee30$(_context30) {
1596
+ while (1) switch (_context30.prev = _context30.next) {
1598
1597
  case 0:
1599
1598
  statusPayload = {
1600
1599
  statusCode: 403,
@@ -1617,14 +1616,14 @@ describe('State Machine handler tests', function () {
1617
1616
  expect(stateMachineSpy).not.toHaveBeenCalled();
1618
1617
  case 9:
1619
1618
  case "end":
1620
- return _context32.stop();
1619
+ return _context30.stop();
1621
1620
  }
1622
- }, _callee32);
1621
+ }, _callee30);
1623
1622
  })));
1624
- it('ROAP error during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
1623
+ it('ROAP error during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
1625
1624
  var statusPayload, warnSpy, stateMachineSpy, funcSpy, errorEvent;
1626
- return _regenerator.default.wrap(function _callee33$(_context33) {
1627
- while (1) switch (_context33.prev = _context33.next) {
1625
+ return _regenerator.default.wrap(function _callee31$(_context31) {
1626
+ while (1) switch (_context31.prev = _context31.next) {
1628
1627
  case 0:
1629
1628
  statusPayload = {
1630
1629
  statusCode: 200,
@@ -1642,7 +1641,7 @@ describe('State Machine handler tests', function () {
1642
1641
  }
1643
1642
  };
1644
1643
  call['connected'] = false;
1645
- _context33.next = 8;
1644
+ _context31.next = 8;
1646
1645
  return call['handleRoapError']({}, errorEvent);
1647
1646
  case 8:
1648
1647
  expect(funcSpy).toBeCalledOnceWith(errorEvent.data);
@@ -1658,14 +1657,14 @@ describe('State Machine handler tests', function () {
1658
1657
  });
1659
1658
  case 11:
1660
1659
  case "end":
1661
- return _context33.stop();
1660
+ return _context31.stop();
1662
1661
  }
1663
- }, _callee33);
1662
+ }, _callee31);
1664
1663
  })));
1665
- it('state changes during successful incoming call with out of order events', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34() {
1664
+ it('state changes during successful incoming call with out of order events', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
1666
1665
  var statusPayload, dummyEvent, postMediaSpy, dummyOkEvent, dummyOfferEvent;
1667
- return _regenerator.default.wrap(function _callee34$(_context34) {
1668
- while (1) switch (_context34.prev = _context34.next) {
1666
+ return _regenerator.default.wrap(function _callee32$(_context32) {
1667
+ while (1) switch (_context32.prev = _context32.next) {
1669
1668
  case 0:
1670
1669
  statusPayload = {
1671
1670
  statusCode: 200,
@@ -1698,7 +1697,7 @@ describe('State Machine handler tests', function () {
1698
1697
  seq: 1,
1699
1698
  messageType: 'ANSWER'
1700
1699
  };
1701
- _context34.next = 17;
1700
+ _context32.next = 17;
1702
1701
  return call.sendMediaStateMachineEvt(dummyEvent);
1703
1702
  case 17:
1704
1703
  expect(postMediaSpy).toBeCalledOnceWith(dummyEvent.data);
@@ -1720,7 +1719,7 @@ describe('State Machine handler tests', function () {
1720
1719
  seq: 2,
1721
1720
  messageType: 'OFFER_REQUEST'
1722
1721
  };
1723
- _context34.next = 23;
1722
+ _context32.next = 23;
1724
1723
  return call.sendMediaStateMachineEvt(dummyEvent);
1725
1724
  case 23:
1726
1725
  expect(call['receivedRoapOKSeq']).toBe(0);
@@ -1770,7 +1769,7 @@ describe('State Machine handler tests', function () {
1770
1769
  };
1771
1770
  call.sendCallStateMachineEvt(dummyEvent);
1772
1771
  dummyEvent.type = 'E_RECV_ROAP_OFFER';
1773
- _context34.next = 49;
1772
+ _context32.next = 49;
1774
1773
  return call.sendMediaStateMachineEvt(dummyEvent);
1775
1774
  case 49:
1776
1775
  expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenLastCalledWith(dummyEvent.data);
@@ -1779,7 +1778,7 @@ describe('State Machine handler tests', function () {
1779
1778
  seq: 3,
1780
1779
  messageType: 'ANSWER'
1781
1780
  };
1782
- _context34.next = 54;
1781
+ _context32.next = 54;
1783
1782
  return call.sendMediaStateMachineEvt(dummyEvent);
1784
1783
  case 54:
1785
1784
  expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
@@ -1798,7 +1797,7 @@ describe('State Machine handler tests', function () {
1798
1797
  messageType: 'OK'
1799
1798
  }
1800
1799
  };
1801
- _context34.next = 63;
1800
+ _context32.next = 63;
1802
1801
  return call.sendMediaStateMachineEvt(dummyOkEvent);
1803
1802
  case 63:
1804
1803
  expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenNthCalledWith(6, dummyOkEvent.data.message);
@@ -1813,14 +1812,14 @@ describe('State Machine handler tests', function () {
1813
1812
  expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
1814
1813
  case 70:
1815
1814
  case "end":
1816
- return _context34.stop();
1815
+ return _context32.stop();
1817
1816
  }
1818
- }, _callee34);
1817
+ }, _callee32);
1819
1818
  })));
1820
- it('successfully handles out of order events when ROAP OK is received while executing outgoingRoapAnswer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35() {
1819
+ it('successfully handles out of order events when ROAP OK is received while executing outgoingRoapAnswer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
1821
1820
  var mockStatusBody, statusPayload, dummyEvent, postMediaSpy, dummyOkEvent, dummyOfferEvent;
1822
- return _regenerator.default.wrap(function _callee35$(_context35) {
1823
- while (1) switch (_context35.prev = _context35.next) {
1821
+ return _regenerator.default.wrap(function _callee33$(_context33) {
1822
+ while (1) switch (_context33.prev = _context33.next) {
1824
1823
  case 0:
1825
1824
  mockStatusBody = {
1826
1825
  device: {
@@ -1860,7 +1859,7 @@ describe('State Machine handler tests', function () {
1860
1859
  seq: 1,
1861
1860
  messageType: 'ANSWER'
1862
1861
  };
1863
- _context35.next = 18;
1862
+ _context33.next = 18;
1864
1863
  return call.sendMediaStateMachineEvt(dummyEvent);
1865
1864
  case 18:
1866
1865
  expect(postMediaSpy).toBeCalledOnceWith(dummyEvent.data);
@@ -1882,7 +1881,7 @@ describe('State Machine handler tests', function () {
1882
1881
  seq: 2,
1883
1882
  messageType: 'OFFER_REQUEST'
1884
1883
  };
1885
- _context35.next = 24;
1884
+ _context33.next = 24;
1886
1885
  return call.sendMediaStateMachineEvt(dummyEvent);
1887
1886
  case 24:
1888
1887
  expect(call['receivedRoapOKSeq']).toBe(0);
@@ -1932,7 +1931,7 @@ describe('State Machine handler tests', function () {
1932
1931
  };
1933
1932
  call.sendCallStateMachineEvt(dummyEvent);
1934
1933
  dummyEvent.type = 'E_RECV_ROAP_OFFER';
1935
- _context35.next = 50;
1934
+ _context33.next = 50;
1936
1935
  return call.sendMediaStateMachineEvt(dummyEvent);
1937
1936
  case 50:
1938
1937
  expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenLastCalledWith(dummyEvent.data);
@@ -1941,7 +1940,7 @@ describe('State Machine handler tests', function () {
1941
1940
  seq: 3,
1942
1941
  messageType: 'ANSWER'
1943
1942
  };
1944
- _context35.next = 55;
1943
+ _context33.next = 55;
1945
1944
  return call.sendMediaStateMachineEvt(dummyEvent);
1946
1945
  case 55:
1947
1946
  expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
@@ -1958,7 +1957,7 @@ describe('State Machine handler tests', function () {
1958
1957
  }
1959
1958
  };
1960
1959
  call.sendMediaStateMachineEvt(dummyEvent);
1961
- _context35.next = 62;
1960
+ _context33.next = 62;
1962
1961
  return call.sendMediaStateMachineEvt(dummyOkEvent);
1963
1962
  case 62:
1964
1963
  expect(call['receivedRoapOKSeq']).toBe(3);
@@ -1974,14 +1973,14 @@ describe('State Machine handler tests', function () {
1974
1973
  expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
1975
1974
  case 70:
1976
1975
  case "end":
1977
- return _context35.stop();
1976
+ return _context33.stop();
1978
1977
  }
1979
- }, _callee35);
1978
+ }, _callee33);
1980
1979
  })));
1981
- it('handle hold event successfully when media received after progress but before connect', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
1980
+ it('handle hold event successfully when media received after progress but before connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
1982
1981
  var statusPayload, dummyEvent, postMediaSpy, infoSpy, dummyOkEvent;
1983
- return _regenerator.default.wrap(function _callee36$(_context36) {
1984
- while (1) switch (_context36.prev = _context36.next) {
1982
+ return _regenerator.default.wrap(function _callee34$(_context34) {
1983
+ while (1) switch (_context34.prev = _context34.next) {
1985
1984
  case 0:
1986
1985
  statusPayload = {
1987
1986
  statusCode: 200,
@@ -2048,9 +2047,9 @@ describe('State Machine handler tests', function () {
2048
2047
  });
2049
2048
  case 33:
2050
2049
  case "end":
2051
- return _context36.stop();
2050
+ return _context34.stop();
2052
2051
  }
2053
- }, _callee36);
2052
+ }, _callee34);
2054
2053
  })));
2055
2054
  describe('Call event timers tests', function () {
2056
2055
  var callManager;
@@ -2061,10 +2060,10 @@ describe('State Machine handler tests', function () {
2061
2060
  afterEach(function () {
2062
2061
  jest.clearAllTimers();
2063
2062
  });
2064
- it('times out if the next event is not received - 60 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
2063
+ it('times out if the next event is not received - 60 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
2065
2064
  var statusPayload, dummyEvent, logSpy, emitSpy, deleteSpy, dummyOkEvent;
2066
- return _regenerator.default.wrap(function _callee37$(_context37) {
2067
- while (1) switch (_context37.prev = _context37.next) {
2065
+ return _regenerator.default.wrap(function _callee35$(_context35) {
2066
+ while (1) switch (_context35.prev = _context35.next) {
2068
2067
  case 0:
2069
2068
  statusPayload = {
2070
2069
  statusCode: 200,
@@ -2081,7 +2080,7 @@ describe('State Machine handler tests', function () {
2081
2080
  webex.request.mockReturnValue(statusPayload);
2082
2081
 
2083
2082
  // handleOutgoingCallSetup is asynchronous
2084
- _context37.next = 9;
2083
+ _context35.next = 9;
2085
2084
  return call.sendCallStateMachineEvt(dummyEvent);
2086
2085
  case 9:
2087
2086
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_SETUP');
@@ -2124,14 +2123,14 @@ describe('State Machine handler tests', function () {
2124
2123
  expect(callManager.callCollection).toStrictEqual({});
2125
2124
  case 32:
2126
2125
  case "end":
2127
- return _context37.stop();
2126
+ return _context35.stop();
2128
2127
  }
2129
- }, _callee37);
2128
+ }, _callee35);
2130
2129
  })));
2131
- it('times out if the next event is not received - 10 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
2130
+ it('times out if the next event is not received - 10 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
2132
2131
  var statusPayload, dummyEvent, call, emitSpy, deleteSpy, logSpy;
2133
- return _regenerator.default.wrap(function _callee38$(_context38) {
2134
- while (1) switch (_context38.prev = _context38.next) {
2132
+ return _regenerator.default.wrap(function _callee36$(_context36) {
2133
+ while (1) switch (_context36.prev = _context36.next) {
2135
2134
  case 0:
2136
2135
  statusPayload = {
2137
2136
  statusCode: 200,
@@ -2150,7 +2149,7 @@ describe('State Machine handler tests', function () {
2150
2149
  expect((0, _keys.default)(callManager.callCollection)[0]).toBe(call.getCorrelationId());
2151
2150
 
2152
2151
  // handleOutgoingCallSetup is asynchronous
2153
- _context38.next = 11;
2152
+ _context36.next = 11;
2154
2153
  return call.sendCallStateMachineEvt(dummyEvent);
2155
2154
  case 11:
2156
2155
  expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_SETUP');
@@ -2162,9 +2161,9 @@ describe('State Machine handler tests', function () {
2162
2161
  expect(callManager.callCollection).toStrictEqual({});
2163
2162
  case 18:
2164
2163
  case "end":
2165
- return _context38.stop();
2164
+ return _context36.stop();
2166
2165
  }
2167
- }, _callee38);
2166
+ }, _callee36);
2168
2167
  })));
2169
2168
  });
2170
2169
  });
@@ -2224,10 +2223,10 @@ describe('Supplementary Services tests', function () {
2224
2223
  beforeEach(function () {
2225
2224
  call.removeAllListeners();
2226
2225
  });
2227
- it('Handle successful Call hold case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
2226
+ it('Handle successful Call hold case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38() {
2228
2227
  var responsePayload, warnSpy, roapEvent;
2229
- return _regenerator.default.wrap(function _callee40$(_context40) {
2230
- while (1) switch (_context40.prev = _context40.next) {
2228
+ return _regenerator.default.wrap(function _callee38$(_context38) {
2229
+ while (1) switch (_context38.prev = _context38.next) {
2231
2230
  case 0:
2232
2231
  expect.assertions(7);
2233
2232
  responsePayload = {
@@ -2240,25 +2239,25 @@ describe('Supplementary Services tests', function () {
2240
2239
  warnSpy = jest.spyOn(_Logger.default, 'warn');
2241
2240
  call['held'] = false;
2242
2241
  call.on(_types2.CALL_EVENT_KEYS.HELD, /*#__PURE__*/function () {
2243
- var _ref40 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(correlationId) {
2244
- return _regenerator.default.wrap(function _callee39$(_context39) {
2245
- while (1) switch (_context39.prev = _context39.next) {
2242
+ var _ref38 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37(correlationId) {
2243
+ return _regenerator.default.wrap(function _callee37$(_context37) {
2244
+ while (1) switch (_context37.prev = _context37.next) {
2246
2245
  case 0:
2247
2246
  expect(correlationId).toStrictEqual(call.getCorrelationId());
2248
2247
  case 1:
2249
2248
  case "end":
2250
- return _context39.stop();
2249
+ return _context37.stop();
2251
2250
  }
2252
- }, _callee39);
2251
+ }, _callee37);
2253
2252
  }));
2254
2253
  return function (_x) {
2255
- return _ref40.apply(this, arguments);
2254
+ return _ref38.apply(this, arguments);
2256
2255
  };
2257
2256
  }());
2258
- _context40.next = 10;
2257
+ _context38.next = 10;
2259
2258
  return call.doHoldResume();
2260
2259
  case 10:
2261
- _context40.next = 12;
2260
+ _context38.next = 12;
2262
2261
  return (0, _testUtil.flushPromises)(2);
2263
2262
  case 12:
2264
2263
  expect(setTimeout).toHaveBeenCalledTimes(1);
@@ -2274,11 +2273,11 @@ describe('Supplementary Services tests', function () {
2274
2273
  call['handleIncomingRoapOffer']({}, dummyEvent);
2275
2274
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2276
2275
  roapEvent.data.type = 'ANSWER';
2277
- _context40.next = 20;
2276
+ _context38.next = 20;
2278
2277
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2279
2278
  case 20:
2280
2279
  roapEvent.data.type = 'OK';
2281
- _context40.next = 23;
2280
+ _context38.next = 23;
2282
2281
  return call['handleRoapEstablished']({}, dummyEvent);
2283
2282
  case 23:
2284
2283
  expect(clearTimeout).toHaveBeenCalledTimes(1);
@@ -2293,14 +2292,14 @@ describe('Supplementary Services tests', function () {
2293
2292
  });
2294
2293
  case 28:
2295
2294
  case "end":
2296
- return _context40.stop();
2295
+ return _context38.stop();
2297
2296
  }
2298
- }, _callee40);
2297
+ }, _callee38);
2299
2298
  })));
2300
- it('Handle successful Call hold case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
2299
+ it('Handle successful Call hold case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40() {
2301
2300
  var responsePayload, warnSpy, roapEvent;
2302
- return _regenerator.default.wrap(function _callee42$(_context42) {
2303
- while (1) switch (_context42.prev = _context42.next) {
2301
+ return _regenerator.default.wrap(function _callee40$(_context40) {
2302
+ while (1) switch (_context40.prev = _context40.next) {
2304
2303
  case 0:
2305
2304
  expect.assertions(8);
2306
2305
  responsePayload = {
@@ -2313,26 +2312,26 @@ describe('Supplementary Services tests', function () {
2313
2312
  warnSpy = jest.spyOn(_Logger.default, 'warn');
2314
2313
  call['held'] = false;
2315
2314
  call.on(_types2.CALL_EVENT_KEYS.HELD, /*#__PURE__*/function () {
2316
- var _ref42 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(correlationId) {
2317
- return _regenerator.default.wrap(function _callee41$(_context41) {
2318
- while (1) switch (_context41.prev = _context41.next) {
2315
+ var _ref40 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39(correlationId) {
2316
+ return _regenerator.default.wrap(function _callee39$(_context39) {
2317
+ while (1) switch (_context39.prev = _context39.next) {
2319
2318
  case 0:
2320
2319
  expect(correlationId).toStrictEqual(call.getCorrelationId());
2321
2320
  case 1:
2322
2321
  case "end":
2323
- return _context41.stop();
2322
+ return _context39.stop();
2324
2323
  }
2325
- }, _callee41);
2324
+ }, _callee39);
2326
2325
  }));
2327
2326
  return function (_x2) {
2328
- return _ref42.apply(this, arguments);
2327
+ return _ref40.apply(this, arguments);
2329
2328
  };
2330
2329
  }());
2331
2330
  call.doHoldResume();
2332
- _context42.next = 11;
2331
+ _context40.next = 11;
2333
2332
  return _promise.default.resolve();
2334
2333
  case 11:
2335
- _context42.next = 13;
2334
+ _context40.next = 13;
2336
2335
  return _promise.default.resolve();
2337
2336
  case 13:
2338
2337
  expect(setTimeout).not.toHaveBeenCalled();
@@ -2348,11 +2347,11 @@ describe('Supplementary Services tests', function () {
2348
2347
  call['handleIncomingRoapOffer']({}, dummyEvent);
2349
2348
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2350
2349
  roapEvent.data.type = 'ANSWER';
2351
- _context42.next = 22;
2350
+ _context40.next = 22;
2352
2351
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2353
2352
  case 22:
2354
2353
  roapEvent.data.type = 'OK';
2355
- _context42.next = 25;
2354
+ _context40.next = 25;
2356
2355
  return call['handleRoapEstablished']({}, dummyEvent);
2357
2356
  case 25:
2358
2357
  expect(clearTimeout).not.toHaveBeenCalled();
@@ -2367,14 +2366,14 @@ describe('Supplementary Services tests', function () {
2367
2366
  });
2368
2367
  case 30:
2369
2368
  case "end":
2370
- return _context42.stop();
2369
+ return _context40.stop();
2371
2370
  }
2372
- }, _callee42);
2371
+ }, _callee40);
2373
2372
  })));
2374
- it('Handle failure Call Hold case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
2373
+ it('Handle failure Call Hold case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42() {
2375
2374
  var responsePayload;
2376
- return _regenerator.default.wrap(function _callee44$(_context44) {
2377
- while (1) switch (_context44.prev = _context44.next) {
2375
+ return _regenerator.default.wrap(function _callee42$(_context42) {
2376
+ while (1) switch (_context42.prev = _context42.next) {
2378
2377
  case 0:
2379
2378
  expect.assertions(4);
2380
2379
  responsePayload = {
@@ -2384,26 +2383,26 @@ describe('Supplementary Services tests', function () {
2384
2383
  jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
2385
2384
  call['held'] = false;
2386
2385
  call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
2387
- var _ref44 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43(errObj) {
2388
- return _regenerator.default.wrap(function _callee43$(_context43) {
2389
- while (1) switch (_context43.prev = _context43.next) {
2386
+ var _ref42 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41(errObj) {
2387
+ return _regenerator.default.wrap(function _callee41$(_context41) {
2388
+ while (1) switch (_context41.prev = _context41.next) {
2390
2389
  case 0:
2391
2390
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
2392
2391
  expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
2393
2392
  case 2:
2394
2393
  case "end":
2395
- return _context43.stop();
2394
+ return _context41.stop();
2396
2395
  }
2397
- }, _callee43);
2396
+ }, _callee41);
2398
2397
  }));
2399
2398
  return function (_x3) {
2400
- return _ref44.apply(this, arguments);
2399
+ return _ref42.apply(this, arguments);
2401
2400
  };
2402
2401
  }());
2403
- _context44.next = 7;
2402
+ _context42.next = 7;
2404
2403
  return call.doHoldResume();
2405
2404
  case 7:
2406
- _context44.next = 9;
2405
+ _context42.next = 9;
2407
2406
  return (0, _testUtil.flushPromises)(2);
2408
2407
  case 9:
2409
2408
  expect(call.isHeld()).toStrictEqual(false);
@@ -2413,14 +2412,14 @@ describe('Supplementary Services tests', function () {
2413
2412
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
2414
2413
  case 11:
2415
2414
  case "end":
2416
- return _context44.stop();
2415
+ return _context42.stop();
2417
2416
  }
2418
- }, _callee44);
2417
+ }, _callee42);
2419
2418
  })));
2420
- it('Handle failure Call Hold case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
2419
+ it('Handle failure Call Hold case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44() {
2421
2420
  var responsePayload, rejectPayload, roapEvent;
2422
- return _regenerator.default.wrap(function _callee46$(_context46) {
2423
- while (1) switch (_context46.prev = _context46.next) {
2421
+ return _regenerator.default.wrap(function _callee44$(_context44) {
2422
+ while (1) switch (_context44.prev = _context44.next) {
2424
2423
  case 0:
2425
2424
  expect.assertions(5);
2426
2425
  responsePayload = {
@@ -2434,24 +2433,24 @@ describe('Supplementary Services tests', function () {
2434
2433
  jest.spyOn(webex, 'request').mockResolvedValueOnce(responsePayload).mockRejectedValueOnce(rejectPayload);
2435
2434
  call['held'] = false;
2436
2435
  call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
2437
- var _ref46 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45(errObj) {
2438
- return _regenerator.default.wrap(function _callee45$(_context45) {
2439
- while (1) switch (_context45.prev = _context45.next) {
2436
+ var _ref44 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43(errObj) {
2437
+ return _regenerator.default.wrap(function _callee43$(_context43) {
2438
+ while (1) switch (_context43.prev = _context43.next) {
2440
2439
  case 0:
2441
2440
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
2442
2441
  expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
2443
2442
  case 2:
2444
2443
  case "end":
2445
- return _context45.stop();
2444
+ return _context43.stop();
2446
2445
  }
2447
- }, _callee45);
2446
+ }, _callee43);
2448
2447
  }));
2449
2448
  return function (_x4) {
2450
- return _ref46.apply(this, arguments);
2449
+ return _ref44.apply(this, arguments);
2451
2450
  };
2452
2451
  }());
2453
2452
  call.doHoldResume();
2454
- _context46.next = 9;
2453
+ _context44.next = 9;
2455
2454
  return (0, _testUtil.flushPromises)(2);
2456
2455
  case 9:
2457
2456
  /* the Call State should transition to S_CALL_ESTABLISHED
@@ -2461,7 +2460,7 @@ describe('Supplementary Services tests', function () {
2461
2460
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2462
2461
  /* We are intentionally failing the ROAP ANSWER */
2463
2462
  roapEvent.data.type = 'ANSWER';
2464
- _context46.next = 15;
2463
+ _context44.next = 15;
2465
2464
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2466
2465
  case 15:
2467
2466
  expect(call.isHeld()).toStrictEqual(false);
@@ -2469,14 +2468,14 @@ describe('Supplementary Services tests', function () {
2469
2468
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
2470
2469
  case 17:
2471
2470
  case "end":
2472
- return _context46.stop();
2471
+ return _context44.stop();
2473
2472
  }
2474
- }, _callee46);
2473
+ }, _callee44);
2475
2474
  })));
2476
- it('Handle failure Call Hold case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
2475
+ it('Handle failure Call Hold case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45() {
2477
2476
  var responsePayload, warnSpy, roapEvent;
2478
- return _regenerator.default.wrap(function _callee47$(_context47) {
2479
- while (1) switch (_context47.prev = _context47.next) {
2477
+ return _regenerator.default.wrap(function _callee45$(_context45) {
2478
+ while (1) switch (_context45.prev = _context45.next) {
2480
2479
  case 0:
2481
2480
  responsePayload = {
2482
2481
  statusCode: 200,
@@ -2487,10 +2486,10 @@ describe('Supplementary Services tests', function () {
2487
2486
  jest.spyOn(global, 'clearTimeout');
2488
2487
  warnSpy = jest.spyOn(_Logger.default, 'warn');
2489
2488
  call['held'] = false;
2490
- _context47.next = 8;
2489
+ _context45.next = 8;
2491
2490
  return call.doHoldResume();
2492
2491
  case 8:
2493
- _context47.next = 10;
2492
+ _context45.next = 10;
2494
2493
  return (0, _testUtil.flushPromises)(2);
2495
2494
  case 10:
2496
2495
  expect(setTimeout).toHaveBeenCalledTimes(1);
@@ -2505,19 +2504,19 @@ describe('Supplementary Services tests', function () {
2505
2504
  call['handleIncomingRoapOffer']({}, dummyEvent);
2506
2505
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2507
2506
  roapEvent.data.type = 'ANSWER';
2508
- _context47.next = 17;
2507
+ _context45.next = 17;
2509
2508
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2510
2509
  case 17:
2511
2510
  jest.spyOn(webex, 'request').mockRejectedValue({
2512
2511
  statusCode: 403
2513
2512
  });
2514
2513
  roapEvent.data.type = 'OK';
2515
- _context47.next = 21;
2514
+ _context45.next = 21;
2516
2515
  return call['handleRoapEstablished']({}, dummyEvent);
2517
2516
  case 21:
2518
2517
  /* this is for coverage */
2519
2518
  call['callStateMachine'].state.value = 'S_CALL_HOLD';
2520
- _context47.next = 24;
2519
+ _context45.next = 24;
2521
2520
  return call['handleRoapEstablished']({}, dummyEvent);
2522
2521
  case 24:
2523
2522
  expect(call.isHeld()).toStrictEqual(false);
@@ -2529,14 +2528,14 @@ describe('Supplementary Services tests', function () {
2529
2528
  });
2530
2529
  case 27:
2531
2530
  case "end":
2532
- return _context47.stop();
2531
+ return _context45.stop();
2533
2532
  }
2534
- }, _callee47);
2533
+ }, _callee45);
2535
2534
  })));
2536
- it('Handle failure Call resume case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48() {
2535
+ it('Handle failure Call resume case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
2537
2536
  var responsePayload, warnSpy, roapEvent;
2538
- return _regenerator.default.wrap(function _callee48$(_context48) {
2539
- while (1) switch (_context48.prev = _context48.next) {
2537
+ return _regenerator.default.wrap(function _callee46$(_context46) {
2538
+ while (1) switch (_context46.prev = _context46.next) {
2540
2539
  case 0:
2541
2540
  responsePayload = {
2542
2541
  statusCode: 200,
@@ -2547,10 +2546,10 @@ describe('Supplementary Services tests', function () {
2547
2546
  jest.spyOn(global, 'clearTimeout');
2548
2547
  warnSpy = jest.spyOn(_Logger.default, 'warn');
2549
2548
  call['held'] = true;
2550
- _context48.next = 8;
2549
+ _context46.next = 8;
2551
2550
  return call.doHoldResume();
2552
2551
  case 8:
2553
- _context48.next = 10;
2552
+ _context46.next = 10;
2554
2553
  return (0, _testUtil.flushPromises)(2);
2555
2554
  case 10:
2556
2555
  expect(setTimeout).toHaveBeenCalledTimes(1);
@@ -2565,14 +2564,14 @@ describe('Supplementary Services tests', function () {
2565
2564
  call['handleIncomingRoapOffer']({}, dummyEvent);
2566
2565
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2567
2566
  roapEvent.data.type = 'ANSWER';
2568
- _context48.next = 17;
2567
+ _context46.next = 17;
2569
2568
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2570
2569
  case 17:
2571
2570
  jest.spyOn(webex, 'request').mockRejectedValue({
2572
2571
  statusCode: 403
2573
2572
  });
2574
2573
  roapEvent.data.type = 'OK';
2575
- _context48.next = 21;
2574
+ _context46.next = 21;
2576
2575
  return call['handleRoapEstablished']({}, dummyEvent);
2577
2576
  case 21:
2578
2577
  expect(call.isHeld()).toStrictEqual(true);
@@ -2584,14 +2583,14 @@ describe('Supplementary Services tests', function () {
2584
2583
  });
2585
2584
  case 24:
2586
2585
  case "end":
2587
- return _context48.stop();
2586
+ return _context46.stop();
2588
2587
  }
2589
- }, _callee48);
2588
+ }, _callee46);
2590
2589
  })));
2591
- it('Handle Call hold case where successful Held response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
2590
+ it('Handle Call hold case where successful Held response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee48() {
2592
2591
  var responsePayload, roapEvent;
2593
- return _regenerator.default.wrap(function _callee50$(_context50) {
2594
- while (1) switch (_context50.prev = _context50.next) {
2592
+ return _regenerator.default.wrap(function _callee48$(_context48) {
2593
+ while (1) switch (_context48.prev = _context48.next) {
2595
2594
  case 0:
2596
2595
  expect.assertions(5);
2597
2596
  responsePayload = {
@@ -2601,25 +2600,25 @@ describe('Supplementary Services tests', function () {
2601
2600
  jest.spyOn(webex, 'request').mockResolvedValue(responsePayload);
2602
2601
  call['held'] = false;
2603
2602
  call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
2604
- var _ref50 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(errObj) {
2605
- return _regenerator.default.wrap(function _callee49$(_context49) {
2606
- while (1) switch (_context49.prev = _context49.next) {
2603
+ var _ref48 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47(errObj) {
2604
+ return _regenerator.default.wrap(function _callee47$(_context47) {
2605
+ while (1) switch (_context47.prev = _context47.next) {
2607
2606
  case 0:
2608
2607
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.TIMEOUT);
2609
2608
  expect(errObj.message).toStrictEqual('An error occurred while placing the call on hold. Wait a moment and try again.');
2610
2609
  case 2:
2611
2610
  case "end":
2612
- return _context49.stop();
2611
+ return _context47.stop();
2613
2612
  }
2614
- }, _callee49);
2613
+ }, _callee47);
2615
2614
  }));
2616
2615
  return function (_x5) {
2617
- return _ref50.apply(this, arguments);
2616
+ return _ref48.apply(this, arguments);
2618
2617
  };
2619
2618
  }());
2620
2619
  jest.runAllTimers();
2621
2620
  call.doHoldResume();
2622
- _context50.next = 9;
2621
+ _context48.next = 9;
2623
2622
  return (0, _testUtil.flushPromises)(2);
2624
2623
  case 9:
2625
2624
  /* At this point, the Call State should be S_CALL_HOLD
@@ -2632,11 +2631,11 @@ describe('Supplementary Services tests', function () {
2632
2631
  call['handleIncomingRoapOffer']({}, dummyEvent);
2633
2632
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2634
2633
  roapEvent.data.type = 'ANSWER';
2635
- _context50.next = 15;
2634
+ _context48.next = 15;
2636
2635
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2637
2636
  case 15:
2638
2637
  roapEvent.data.type = 'OK';
2639
- _context50.next = 18;
2638
+ _context48.next = 18;
2640
2639
  return call['handleRoapEstablished']({}, dummyEvent);
2641
2640
  case 18:
2642
2641
  /* Advancing timer by 12 seconds so that it gets timed out */
@@ -2648,14 +2647,14 @@ describe('Supplementary Services tests', function () {
2648
2647
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
2649
2648
  case 21:
2650
2649
  case "end":
2651
- return _context50.stop();
2650
+ return _context48.stop();
2652
2651
  }
2653
- }, _callee50);
2652
+ }, _callee48);
2654
2653
  })));
2655
- it('Handle successful Call Resume case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
2654
+ it('Handle successful Call Resume case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee50() {
2656
2655
  var responsePayload, warnSpy, roapEvent;
2657
- return _regenerator.default.wrap(function _callee52$(_context52) {
2658
- while (1) switch (_context52.prev = _context52.next) {
2656
+ return _regenerator.default.wrap(function _callee50$(_context50) {
2657
+ while (1) switch (_context50.prev = _context50.next) {
2659
2658
  case 0:
2660
2659
  expect.assertions(7);
2661
2660
  responsePayload = {
@@ -2668,25 +2667,25 @@ describe('Supplementary Services tests', function () {
2668
2667
  warnSpy = jest.spyOn(_Logger.default, 'warn');
2669
2668
  call['held'] = true;
2670
2669
  call.on(_types2.CALL_EVENT_KEYS.RESUMED, /*#__PURE__*/function () {
2671
- var _ref52 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51(correlationId) {
2672
- return _regenerator.default.wrap(function _callee51$(_context51) {
2673
- while (1) switch (_context51.prev = _context51.next) {
2670
+ var _ref50 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee49(correlationId) {
2671
+ return _regenerator.default.wrap(function _callee49$(_context49) {
2672
+ while (1) switch (_context49.prev = _context49.next) {
2674
2673
  case 0:
2675
2674
  expect(correlationId).toStrictEqual(call.getCorrelationId());
2676
2675
  case 1:
2677
2676
  case "end":
2678
- return _context51.stop();
2677
+ return _context49.stop();
2679
2678
  }
2680
- }, _callee51);
2679
+ }, _callee49);
2681
2680
  }));
2682
2681
  return function (_x6) {
2683
- return _ref52.apply(this, arguments);
2682
+ return _ref50.apply(this, arguments);
2684
2683
  };
2685
2684
  }());
2686
- _context52.next = 10;
2685
+ _context50.next = 10;
2687
2686
  return call.doHoldResume();
2688
2687
  case 10:
2689
- _context52.next = 12;
2688
+ _context50.next = 12;
2690
2689
  return (0, _testUtil.flushPromises)(2);
2691
2690
  case 12:
2692
2691
  expect(setTimeout).toHaveBeenCalledTimes(1);
@@ -2702,11 +2701,11 @@ describe('Supplementary Services tests', function () {
2702
2701
  call['handleIncomingRoapOffer']({}, dummyEvent);
2703
2702
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2704
2703
  roapEvent.data.type = 'ANSWER';
2705
- _context52.next = 20;
2704
+ _context50.next = 20;
2706
2705
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2707
2706
  case 20:
2708
2707
  roapEvent.data.type = 'OK';
2709
- _context52.next = 23;
2708
+ _context50.next = 23;
2710
2709
  return call['handleRoapEstablished']({}, dummyEvent);
2711
2710
  case 23:
2712
2711
  expect(clearTimeout).toHaveBeenCalledTimes(1);
@@ -2721,14 +2720,14 @@ describe('Supplementary Services tests', function () {
2721
2720
  });
2722
2721
  case 28:
2723
2722
  case "end":
2724
- return _context52.stop();
2723
+ return _context50.stop();
2725
2724
  }
2726
- }, _callee52);
2725
+ }, _callee50);
2727
2726
  })));
2728
- it('Handle successful Call Resume case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
2727
+ it('Handle successful Call Resume case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee52() {
2729
2728
  var responsePayload, warnSpy, roapEvent;
2730
- return _regenerator.default.wrap(function _callee54$(_context54) {
2731
- while (1) switch (_context54.prev = _context54.next) {
2729
+ return _regenerator.default.wrap(function _callee52$(_context52) {
2730
+ while (1) switch (_context52.prev = _context52.next) {
2732
2731
  case 0:
2733
2732
  expect.assertions(7);
2734
2733
  responsePayload = {
@@ -2741,26 +2740,26 @@ describe('Supplementary Services tests', function () {
2741
2740
  warnSpy = jest.spyOn(_Logger.default, 'warn');
2742
2741
  call['held'] = true;
2743
2742
  call.on(_types2.CALL_EVENT_KEYS.RESUMED, /*#__PURE__*/function () {
2744
- var _ref54 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53(correlationId) {
2745
- return _regenerator.default.wrap(function _callee53$(_context53) {
2746
- while (1) switch (_context53.prev = _context53.next) {
2743
+ var _ref52 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee51(correlationId) {
2744
+ return _regenerator.default.wrap(function _callee51$(_context51) {
2745
+ while (1) switch (_context51.prev = _context51.next) {
2747
2746
  case 0:
2748
2747
  expect(correlationId).toStrictEqual(call.getCorrelationId());
2749
2748
  case 1:
2750
2749
  case "end":
2751
- return _context53.stop();
2750
+ return _context51.stop();
2752
2751
  }
2753
- }, _callee53);
2752
+ }, _callee51);
2754
2753
  }));
2755
2754
  return function (_x7) {
2756
- return _ref54.apply(this, arguments);
2755
+ return _ref52.apply(this, arguments);
2757
2756
  };
2758
2757
  }());
2759
2758
  call.doHoldResume();
2760
- _context54.next = 11;
2759
+ _context52.next = 11;
2761
2760
  return _promise.default.resolve();
2762
2761
  case 11:
2763
- _context54.next = 13;
2762
+ _context52.next = 13;
2764
2763
  return _promise.default.resolve();
2765
2764
  case 13:
2766
2765
  expect(setTimeout).not.toHaveBeenCalled();
@@ -2776,11 +2775,11 @@ describe('Supplementary Services tests', function () {
2776
2775
  call['handleIncomingRoapOffer']({}, dummyEvent);
2777
2776
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2778
2777
  roapEvent.data.type = 'ANSWER';
2779
- _context54.next = 21;
2778
+ _context52.next = 21;
2780
2779
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2781
2780
  case 21:
2782
2781
  roapEvent.data.type = 'OK';
2783
- _context54.next = 24;
2782
+ _context52.next = 24;
2784
2783
  return call['handleRoapEstablished']({}, dummyEvent);
2785
2784
  case 24:
2786
2785
  expect(clearTimeout).not.toHaveBeenCalled();
@@ -2795,14 +2794,14 @@ describe('Supplementary Services tests', function () {
2795
2794
  });
2796
2795
  case 29:
2797
2796
  case "end":
2798
- return _context54.stop();
2797
+ return _context52.stop();
2799
2798
  }
2800
- }, _callee54);
2799
+ }, _callee52);
2801
2800
  })));
2802
- it('Handle failure Call Resume case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56() {
2801
+ it('Handle failure Call Resume case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee54() {
2803
2802
  var responsePayload;
2804
- return _regenerator.default.wrap(function _callee56$(_context56) {
2805
- while (1) switch (_context56.prev = _context56.next) {
2803
+ return _regenerator.default.wrap(function _callee54$(_context54) {
2804
+ while (1) switch (_context54.prev = _context54.next) {
2806
2805
  case 0:
2807
2806
  expect.assertions(4);
2808
2807
  responsePayload = {
@@ -2812,26 +2811,26 @@ describe('Supplementary Services tests', function () {
2812
2811
  jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
2813
2812
  call['held'] = true;
2814
2813
  call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
2815
- var _ref56 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55(errObj) {
2816
- return _regenerator.default.wrap(function _callee55$(_context55) {
2817
- while (1) switch (_context55.prev = _context55.next) {
2814
+ var _ref54 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee53(errObj) {
2815
+ return _regenerator.default.wrap(function _callee53$(_context53) {
2816
+ while (1) switch (_context53.prev = _context53.next) {
2818
2817
  case 0:
2819
2818
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
2820
2819
  expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
2821
2820
  case 2:
2822
2821
  case "end":
2823
- return _context55.stop();
2822
+ return _context53.stop();
2824
2823
  }
2825
- }, _callee55);
2824
+ }, _callee53);
2826
2825
  }));
2827
2826
  return function (_x8) {
2828
- return _ref56.apply(this, arguments);
2827
+ return _ref54.apply(this, arguments);
2829
2828
  };
2830
2829
  }());
2831
- _context56.next = 7;
2830
+ _context54.next = 7;
2832
2831
  return call.doHoldResume();
2833
2832
  case 7:
2834
- _context56.next = 9;
2833
+ _context54.next = 9;
2835
2834
  return (0, _testUtil.flushPromises)(2);
2836
2835
  case 9:
2837
2836
  expect(call.isHeld()).toStrictEqual(true);
@@ -2842,14 +2841,14 @@ describe('Supplementary Services tests', function () {
2842
2841
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
2843
2842
  case 11:
2844
2843
  case "end":
2845
- return _context56.stop();
2844
+ return _context54.stop();
2846
2845
  }
2847
- }, _callee56);
2846
+ }, _callee54);
2848
2847
  })));
2849
- it('Handle failure Call Resume case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58() {
2848
+ it('Handle failure Call Resume case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee56() {
2850
2849
  var responsePayload, rejectPayload, roapEvent;
2851
- return _regenerator.default.wrap(function _callee58$(_context58) {
2852
- while (1) switch (_context58.prev = _context58.next) {
2850
+ return _regenerator.default.wrap(function _callee56$(_context56) {
2851
+ while (1) switch (_context56.prev = _context56.next) {
2853
2852
  case 0:
2854
2853
  expect.assertions(5);
2855
2854
  responsePayload = {
@@ -2863,24 +2862,24 @@ describe('Supplementary Services tests', function () {
2863
2862
  jest.spyOn(webex, 'request').mockResolvedValueOnce(responsePayload).mockRejectedValueOnce(rejectPayload);
2864
2863
  call['held'] = true;
2865
2864
  call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
2866
- var _ref58 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(errObj) {
2867
- return _regenerator.default.wrap(function _callee57$(_context57) {
2868
- while (1) switch (_context57.prev = _context57.next) {
2865
+ var _ref56 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee55(errObj) {
2866
+ return _regenerator.default.wrap(function _callee55$(_context55) {
2867
+ while (1) switch (_context55.prev = _context55.next) {
2869
2868
  case 0:
2870
2869
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
2871
2870
  expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
2872
2871
  case 2:
2873
2872
  case "end":
2874
- return _context57.stop();
2873
+ return _context55.stop();
2875
2874
  }
2876
- }, _callee57);
2875
+ }, _callee55);
2877
2876
  }));
2878
2877
  return function (_x9) {
2879
- return _ref58.apply(this, arguments);
2878
+ return _ref56.apply(this, arguments);
2880
2879
  };
2881
2880
  }());
2882
2881
  call.doHoldResume();
2883
- _context58.next = 9;
2882
+ _context56.next = 9;
2884
2883
  return (0, _testUtil.flushPromises)(2);
2885
2884
  case 9:
2886
2885
  /* At this point , the Call State should transition to S_CALL_ESTABLISHED
@@ -2891,7 +2890,7 @@ describe('Supplementary Services tests', function () {
2891
2890
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2892
2891
  /* We are intentionally failing the ROAP ANSWER */
2893
2892
  roapEvent.data.type = 'ANSWER';
2894
- _context58.next = 15;
2893
+ _context56.next = 15;
2895
2894
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2896
2895
  case 15:
2897
2896
  expect(call.isHeld()).toStrictEqual(true);
@@ -2899,14 +2898,14 @@ describe('Supplementary Services tests', function () {
2899
2898
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
2900
2899
  case 17:
2901
2900
  case "end":
2902
- return _context58.stop();
2901
+ return _context56.stop();
2903
2902
  }
2904
- }, _callee58);
2903
+ }, _callee56);
2905
2904
  })));
2906
- it('Handle Call resume case where successful response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee60() {
2905
+ it('Handle Call resume case where successful response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee58() {
2907
2906
  var responsePayload, roapEvent;
2908
- return _regenerator.default.wrap(function _callee60$(_context60) {
2909
- while (1) switch (_context60.prev = _context60.next) {
2907
+ return _regenerator.default.wrap(function _callee58$(_context58) {
2908
+ while (1) switch (_context58.prev = _context58.next) {
2910
2909
  case 0:
2911
2910
  expect.assertions(5);
2912
2911
  responsePayload = {
@@ -2916,24 +2915,24 @@ describe('Supplementary Services tests', function () {
2916
2915
  jest.spyOn(webex, 'request').mockResolvedValue(responsePayload);
2917
2916
  call['held'] = true;
2918
2917
  call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
2919
- var _ref60 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(errObj) {
2920
- return _regenerator.default.wrap(function _callee59$(_context59) {
2921
- while (1) switch (_context59.prev = _context59.next) {
2918
+ var _ref58 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee57(errObj) {
2919
+ return _regenerator.default.wrap(function _callee57$(_context57) {
2920
+ while (1) switch (_context57.prev = _context57.next) {
2922
2921
  case 0:
2923
2922
  expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.TIMEOUT);
2924
2923
  expect(errObj.message).toStrictEqual('An error occurred while resuming the call. Wait a moment and try again.');
2925
2924
  case 2:
2926
2925
  case "end":
2927
- return _context59.stop();
2926
+ return _context57.stop();
2928
2927
  }
2929
- }, _callee59);
2928
+ }, _callee57);
2930
2929
  }));
2931
- return function (_x10) {
2932
- return _ref60.apply(this, arguments);
2930
+ return function (_x0) {
2931
+ return _ref58.apply(this, arguments);
2933
2932
  };
2934
2933
  }());
2935
2934
  call.doHoldResume();
2936
- _context60.next = 8;
2935
+ _context58.next = 8;
2937
2936
  return (0, _testUtil.flushPromises)(2);
2938
2937
  case 8:
2939
2938
  /* At this point ,the Call State should be S_CALL_RESUME
@@ -2946,11 +2945,11 @@ describe('Supplementary Services tests', function () {
2946
2945
  call['handleIncomingRoapOffer']({}, dummyEvent);
2947
2946
  roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
2948
2947
  roapEvent.data.type = 'ANSWER';
2949
- _context60.next = 14;
2948
+ _context58.next = 14;
2950
2949
  return call['handleOutgoingRoapAnswer']({}, dummyEvent);
2951
2950
  case 14:
2952
2951
  roapEvent.data.type = 'OK';
2953
- _context60.next = 17;
2952
+ _context58.next = 17;
2954
2953
  return call['handleRoapEstablished']({}, dummyEvent);
2955
2954
  case 17:
2956
2955
  /* Advancing timer by 12 seconds so that it gets timed out */
@@ -2960,9 +2959,9 @@ describe('Supplementary Services tests', function () {
2960
2959
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
2961
2960
  case 20:
2962
2961
  case "end":
2963
- return _context60.stop();
2962
+ return _context58.stop();
2964
2963
  }
2965
- }, _callee60);
2964
+ }, _callee58);
2966
2965
  })));
2967
2966
  });
2968
2967
  describe('Call transfer tests', function () {
@@ -2995,10 +2994,10 @@ describe('Supplementary Services tests', function () {
2995
2994
  secondCall.removeAllListeners(_types2.CALL_EVENT_KEYS.CALL_ERROR);
2996
2995
  secondCall['held'] = false;
2997
2996
  });
2998
- it('Handle successful consult transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee63() {
2997
+ it('Handle successful consult transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee61() {
2999
2998
  var responsePayload, requestSpy, warnSpy, infoSpy, metricSpy;
3000
- return _regenerator.default.wrap(function _callee63$(_context63) {
3001
- while (1) switch (_context63.prev = _context63.next) {
2999
+ return _regenerator.default.wrap(function _callee61$(_context61) {
3000
+ while (1) switch (_context61.prev = _context61.next) {
3002
3001
  case 0:
3003
3002
  expect.assertions(12); // Updated to match actual assertion count
3004
3003
  responsePayload = {
@@ -3010,41 +3009,41 @@ describe('Supplementary Services tests', function () {
3010
3009
  infoSpy = jest.spyOn(_Logger.default, 'info');
3011
3010
  metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
3012
3011
  call.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
3013
- var _ref62 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee61(correlationId) {
3014
- return _regenerator.default.wrap(function _callee61$(_context61) {
3015
- while (1) switch (_context61.prev = _context61.next) {
3012
+ var _ref60 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee59(correlationId) {
3013
+ return _regenerator.default.wrap(function _callee59$(_context59) {
3014
+ while (1) switch (_context59.prev = _context59.next) {
3016
3015
  case 0:
3017
3016
  expect(correlationId).toStrictEqual(call.getCorrelationId());
3018
3017
  case 1:
3019
3018
  case "end":
3020
- return _context61.stop();
3019
+ return _context59.stop();
3021
3020
  }
3022
- }, _callee61);
3021
+ }, _callee59);
3023
3022
  }));
3024
- return function (_x11) {
3025
- return _ref62.apply(this, arguments);
3023
+ return function (_x1) {
3024
+ return _ref60.apply(this, arguments);
3026
3025
  };
3027
3026
  }());
3028
3027
  secondCall.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
3029
- var _ref63 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee62(correlationId) {
3030
- return _regenerator.default.wrap(function _callee62$(_context62) {
3031
- while (1) switch (_context62.prev = _context62.next) {
3028
+ var _ref61 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee60(correlationId) {
3029
+ return _regenerator.default.wrap(function _callee60$(_context60) {
3030
+ while (1) switch (_context60.prev = _context60.next) {
3032
3031
  case 0:
3033
3032
  expect(correlationId).toStrictEqual(secondCall.getCorrelationId());
3034
3033
  case 1:
3035
3034
  case "end":
3036
- return _context62.stop();
3035
+ return _context60.stop();
3037
3036
  }
3038
- }, _callee62);
3037
+ }, _callee60);
3039
3038
  }));
3040
- return function (_x12) {
3041
- return _ref63.apply(this, arguments);
3039
+ return function (_x10) {
3040
+ return _ref61.apply(this, arguments);
3042
3041
  };
3043
3042
  }());
3044
- _context63.next = 10;
3043
+ _context61.next = 10;
3045
3044
  return call.completeTransfer(_types5.TransferType.CONSULT, secondCall.getCallId(), undefined);
3046
3045
  case 10:
3047
- _context63.next = 12;
3046
+ _context61.next = 12;
3048
3047
  return (0, _testUtil.flushPromises)(2);
3049
3048
  case 12:
3050
3049
  expect(requestSpy).toBeCalled();
@@ -3067,14 +3066,14 @@ describe('Supplementary Services tests', function () {
3067
3066
  expect(warnSpy).not.toHaveBeenCalledWith("Consult Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
3068
3067
  case 24:
3069
3068
  case "end":
3070
- return _context63.stop();
3069
+ return _context61.stop();
3071
3070
  }
3072
- }, _callee63);
3071
+ }, _callee61);
3073
3072
  })));
3074
- it('Handle successful blind transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee65() {
3073
+ it('Handle successful blind transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee63() {
3075
3074
  var responsePayload, requestSpy, warnSpy, infoSpy, metricSpy;
3076
- return _regenerator.default.wrap(function _callee65$(_context65) {
3077
- while (1) switch (_context65.prev = _context65.next) {
3075
+ return _regenerator.default.wrap(function _callee63$(_context63) {
3076
+ while (1) switch (_context63.prev = _context63.next) {
3078
3077
  case 0:
3079
3078
  expect.assertions(10); // Updated to match actual assertion count
3080
3079
  responsePayload = {
@@ -3086,25 +3085,25 @@ describe('Supplementary Services tests', function () {
3086
3085
  infoSpy = jest.spyOn(_Logger.default, 'info');
3087
3086
  metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
3088
3087
  call.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
3089
- var _ref65 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee64(correlationId) {
3090
- return _regenerator.default.wrap(function _callee64$(_context64) {
3091
- while (1) switch (_context64.prev = _context64.next) {
3088
+ var _ref63 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee62(correlationId) {
3089
+ return _regenerator.default.wrap(function _callee62$(_context62) {
3090
+ while (1) switch (_context62.prev = _context62.next) {
3092
3091
  case 0:
3093
3092
  expect(correlationId).toStrictEqual(call.getCorrelationId());
3094
3093
  case 1:
3095
3094
  case "end":
3096
- return _context64.stop();
3095
+ return _context62.stop();
3097
3096
  }
3098
- }, _callee64);
3097
+ }, _callee62);
3099
3098
  }));
3100
- return function (_x13) {
3101
- return _ref65.apply(this, arguments);
3099
+ return function (_x11) {
3100
+ return _ref63.apply(this, arguments);
3102
3101
  };
3103
3102
  }());
3104
- _context65.next = 9;
3103
+ _context63.next = 9;
3105
3104
  return call.completeTransfer(_types5.TransferType.BLIND, undefined, transfereeNumber);
3106
3105
  case 9:
3107
- _context65.next = 11;
3106
+ _context63.next = 11;
3108
3107
  return (0, _testUtil.flushPromises)(2);
3109
3108
  case 11:
3110
3109
  expect(requestSpy).toBeCalled();
@@ -3123,14 +3122,14 @@ describe('Supplementary Services tests', function () {
3123
3122
  expect(warnSpy).not.toHaveBeenCalledWith("Blind Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
3124
3123
  case 21:
3125
3124
  case "end":
3126
- return _context65.stop();
3125
+ return _context63.stop();
3127
3126
  }
3128
- }, _callee65);
3127
+ }, _callee63);
3129
3128
  })));
3130
- it('Handle unsuccessful blind transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee66() {
3129
+ it('Handle unsuccessful blind transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee64() {
3131
3130
  var responsePayload, emitSpy, requestSpy, warnSpy, metricSpy;
3132
- return _regenerator.default.wrap(function _callee66$(_context66) {
3133
- while (1) switch (_context66.prev = _context66.next) {
3131
+ return _regenerator.default.wrap(function _callee64$(_context64) {
3132
+ while (1) switch (_context64.prev = _context64.next) {
3134
3133
  case 0:
3135
3134
  responsePayload = {
3136
3135
  statusCode: 403,
@@ -3140,12 +3139,13 @@ describe('Supplementary Services tests', function () {
3140
3139
  requestSpy = jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
3141
3140
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3142
3141
  metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
3143
- _context66.next = 7;
3142
+ call['broadworksCorrelationInfo'] = 'dummy-broadworks-correlation-info';
3143
+ _context64.next = 8;
3144
3144
  return call.completeTransfer(_types5.TransferType.BLIND, undefined, transfereeNumber);
3145
- case 7:
3146
- _context66.next = 9;
3145
+ case 8:
3146
+ _context64.next = 10;
3147
3147
  return (0, _testUtil.flushPromises)(1);
3148
- case 9:
3148
+ case 10:
3149
3149
  expect(requestSpy).toBeCalled();
3150
3150
  /* We should be in CALL_ESTABLISHED state */
3151
3151
  expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
@@ -3155,22 +3155,23 @@ describe('Supplementary Services tests', function () {
3155
3155
  expect.anything(), call.getCorrelationId(), responsePayload, 'completeTransfer', 'call');
3156
3156
  expect(uploadLogsSpy).toHaveBeenCalledWith({
3157
3157
  correlationId: call.getCorrelationId(),
3158
- callId: call.getCallId()
3158
+ callId: call.getCallId(),
3159
+ broadworksCorrelationInfo: 'dummy-broadworks-correlation-info'
3159
3160
  });
3160
3161
  /* check whether error event is being emitted by sdk */
3161
3162
  expect(emitSpy).toBeCalledOnceWith(_types2.CALL_EVENT_KEYS.TRANSFER_ERROR, expect.any(_Errors.CallError));
3162
3163
  expect(warnSpy).toHaveBeenCalledWith("Blind Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
3163
3164
  expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.CALL_ERROR, _types4.TRANSFER_ACTION.BLIND, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), expect.any(_Errors.CallError));
3164
- case 17:
3165
+ case 18:
3165
3166
  case "end":
3166
- return _context66.stop();
3167
+ return _context64.stop();
3167
3168
  }
3168
- }, _callee66);
3169
+ }, _callee64);
3169
3170
  })));
3170
- it('Handle unsuccessful consult transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee67() {
3171
+ it('Handle unsuccessful consult transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee65() {
3171
3172
  var responsePayload, emitSpy, requestSpy, warnSpy, metricSpy;
3172
- return _regenerator.default.wrap(function _callee67$(_context67) {
3173
- while (1) switch (_context67.prev = _context67.next) {
3173
+ return _regenerator.default.wrap(function _callee65$(_context65) {
3174
+ while (1) switch (_context65.prev = _context65.next) {
3174
3175
  case 0:
3175
3176
  responsePayload = {
3176
3177
  statusCode: 403,
@@ -3180,10 +3181,10 @@ describe('Supplementary Services tests', function () {
3180
3181
  requestSpy = jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
3181
3182
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3182
3183
  metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
3183
- _context67.next = 7;
3184
+ _context65.next = 7;
3184
3185
  return call.completeTransfer(_types5.TransferType.CONSULT, secondCall.getCallId(), undefined);
3185
3186
  case 7:
3186
- _context67.next = 9;
3187
+ _context65.next = 9;
3187
3188
  return (0, _testUtil.flushPromises)(2);
3188
3189
  case 9:
3189
3190
  expect(requestSpy).toBeCalled();
@@ -3204,18 +3205,18 @@ describe('Supplementary Services tests', function () {
3204
3205
  expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.CALL_ERROR, _types4.TRANSFER_ACTION.CONSULT, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), expect.any(_Errors.CallError));
3205
3206
  case 18:
3206
3207
  case "end":
3207
- return _context67.stop();
3208
+ return _context65.stop();
3208
3209
  }
3209
- }, _callee67);
3210
+ }, _callee65);
3210
3211
  })));
3211
- it('Handle blind transfer with undefined transferTarget', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee68() {
3212
+ it('Handle blind transfer with undefined transferTarget', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee66() {
3212
3213
  var requestSpy, warnSpy;
3213
- return _regenerator.default.wrap(function _callee68$(_context68) {
3214
- while (1) switch (_context68.prev = _context68.next) {
3214
+ return _regenerator.default.wrap(function _callee66$(_context66) {
3215
+ while (1) switch (_context66.prev = _context66.next) {
3215
3216
  case 0:
3216
3217
  requestSpy = jest.spyOn(webex, 'request');
3217
3218
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3218
- _context68.next = 4;
3219
+ _context66.next = 4;
3219
3220
  return call.completeTransfer(_types5.TransferType.BLIND, undefined, undefined);
3220
3221
  case 4:
3221
3222
  /* We should be in CALL_ESTABLISHED state */
@@ -3227,18 +3228,18 @@ describe('Supplementary Services tests', function () {
3227
3228
  expect(warnSpy).toBeCalledOnceWith("Invalid information received, transfer failed for correlationId: ".concat(call.getCorrelationId()), transferLoggingContext);
3228
3229
  case 10:
3229
3230
  case "end":
3230
- return _context68.stop();
3231
+ return _context66.stop();
3231
3232
  }
3232
- }, _callee68);
3233
+ }, _callee66);
3233
3234
  })));
3234
- it('Handle consult transfer with undefined transferCallId', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee69() {
3235
+ it('Handle consult transfer with undefined transferCallId', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee67() {
3235
3236
  var requestSpy, warnSpy;
3236
- return _regenerator.default.wrap(function _callee69$(_context69) {
3237
- while (1) switch (_context69.prev = _context69.next) {
3237
+ return _regenerator.default.wrap(function _callee67$(_context67) {
3238
+ while (1) switch (_context67.prev = _context67.next) {
3238
3239
  case 0:
3239
3240
  requestSpy = jest.spyOn(webex, 'request');
3240
3241
  warnSpy = jest.spyOn(_Logger.default, 'warn');
3241
- _context69.next = 4;
3242
+ _context67.next = 4;
3242
3243
  return call.completeTransfer(_types5.TransferType.CONSULT, undefined, undefined);
3243
3244
  case 4:
3244
3245
  /* We should be in CALL_ESTABLISHED state */
@@ -3250,9 +3251,9 @@ describe('Supplementary Services tests', function () {
3250
3251
  expect(warnSpy).toBeCalledOnceWith("Invalid information received, transfer failed for correlationId: ".concat(call.getCorrelationId()), transferLoggingContext);
3251
3252
  case 10:
3252
3253
  case "end":
3253
- return _context69.stop();
3254
+ return _context67.stop();
3254
3255
  }
3255
- }, _callee69);
3256
+ }, _callee67);
3256
3257
  })));
3257
3258
  });
3258
3259
  });