@webex/calling 3.9.0-next.8 → 3.9.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/CallHistory/CallHistory.js +51 -46
  2. package/dist/CallHistory/CallHistory.js.map +1 -1
  3. package/dist/CallHistory/CallHistory.test.js +146 -147
  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 +9 -10
  15. package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
  16. package/dist/CallSettings/WxCallBackendConnector.js +66 -59
  17. package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
  18. package/dist/CallSettings/WxCallBackendConnector.test.js +108 -109
  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 +142 -85
  24. package/dist/CallingClient/CallingClient.js.map +1 -1
  25. package/dist/CallingClient/CallingClient.test.js +184 -173
  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 +343 -320
  34. package/dist/CallingClient/calling/call.js.map +1 -1
  35. package/dist/CallingClient/calling/call.test.js +405 -406
  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 +67 -68
  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 +2 -1
  45. package/dist/CallingClient/constants.js.map +1 -1
  46. package/dist/CallingClient/line/index.js +7 -7
  47. package/dist/CallingClient/line/index.js.map +1 -1
  48. package/dist/CallingClient/line/line.test.js +6 -6
  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 +239 -230
  53. package/dist/CallingClient/registration/register.js.map +1 -1
  54. package/dist/CallingClient/registration/register.test.js +172 -173
  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 +5 -4
  59. package/dist/CallingClient/registration/webWorker.js.map +1 -1
  60. package/dist/CallingClient/registration/webWorker.test.js +14 -14
  61. package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
  62. package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
  63. package/dist/CallingClient/types.js.map +1 -1
  64. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js +2 -6
  65. package/dist/CallingClient/windowsChromiumIceWarmupUtils.js.map +1 -1
  66. package/dist/Contacts/ContactsClient.js +244 -238
  67. package/dist/Contacts/ContactsClient.js.map +1 -1
  68. package/dist/Contacts/ContactsClient.test.js +89 -90
  69. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  70. package/dist/Contacts/constants.js +2 -2
  71. package/dist/Contacts/constants.js.map +1 -1
  72. package/dist/Contacts/contactFixtures.js.map +1 -1
  73. package/dist/Contacts/types.js.map +1 -1
  74. package/dist/Errors/catalog/CallError.js +2 -2
  75. package/dist/Errors/catalog/CallError.js.map +1 -1
  76. package/dist/Errors/catalog/CallingDeviceError.js +2 -2
  77. package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
  78. package/dist/Errors/catalog/ExtendedError.js +3 -3
  79. package/dist/Errors/catalog/ExtendedError.js.map +1 -1
  80. package/dist/Errors/catalog/LineError.js +2 -2
  81. package/dist/Errors/catalog/LineError.js.map +1 -1
  82. package/dist/Errors/index.js.map +1 -1
  83. package/dist/Errors/types.js.map +1 -1
  84. package/dist/Events/impl/index.js +2 -2
  85. package/dist/Events/impl/index.js.map +1 -1
  86. package/dist/Events/types.js.map +1 -1
  87. package/dist/Logger/index.js.map +1 -1
  88. package/dist/Logger/index.test.js.map +1 -1
  89. package/dist/Logger/types.js.map +1 -1
  90. package/dist/Metrics/index.js +109 -46
  91. package/dist/Metrics/index.js.map +1 -1
  92. package/dist/Metrics/index.test.js.map +1 -1
  93. package/dist/Metrics/types.js +8 -1
  94. package/dist/Metrics/types.js.map +1 -1
  95. package/dist/SDKConnector/index.js +0 -1
  96. package/dist/SDKConnector/index.js.map +1 -1
  97. package/dist/SDKConnector/index.test.js.map +1 -1
  98. package/dist/SDKConnector/types.js.map +1 -1
  99. package/dist/SDKConnector/utils.js.map +1 -1
  100. package/dist/SDKConnector/utils.test.js.map +1 -1
  101. package/dist/Voicemail/BroadworksBackendConnector.js +42 -39
  102. package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
  103. package/dist/Voicemail/BroadworksBackendConnector.test.js +119 -120
  104. package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
  105. package/dist/Voicemail/UcmBackendConnector.js +54 -47
  106. package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
  107. package/dist/Voicemail/UcmBackendConnector.test.js +73 -74
  108. package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
  109. package/dist/Voicemail/Voicemail.js +12 -11
  110. package/dist/Voicemail/Voicemail.js.map +1 -1
  111. package/dist/Voicemail/Voicemail.test.js +2 -2
  112. package/dist/Voicemail/Voicemail.test.js.map +1 -1
  113. package/dist/Voicemail/WxCallBackendConnector.js +78 -70
  114. package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
  115. package/dist/Voicemail/WxCallBackendConnector.test.js +184 -185
  116. package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
  117. package/dist/Voicemail/constants.js.map +1 -1
  118. package/dist/Voicemail/types.js.map +1 -1
  119. package/dist/Voicemail/voicemailFixture.js.map +1 -1
  120. package/dist/api.js.map +1 -1
  121. package/dist/common/Utils.js +80 -63
  122. package/dist/common/Utils.js.map +1 -1
  123. package/dist/common/Utils.test.js +95 -104
  124. package/dist/common/Utils.test.js.map +1 -1
  125. package/dist/common/constants.js.map +1 -1
  126. package/dist/common/index.js.map +1 -1
  127. package/dist/common/testUtil.js +1 -1
  128. package/dist/common/testUtil.js.map +1 -1
  129. package/dist/common/types.js.map +1 -1
  130. package/dist/index.js +5 -5
  131. package/dist/index.js.map +1 -1
  132. package/dist/module/CallHistory/CallHistory.js +4 -0
  133. package/dist/module/CallSettings/UcmBackendConnector.js +1 -0
  134. package/dist/module/CallSettings/WxCallBackendConnector.js +7 -0
  135. package/dist/module/CallingClient/CallingClient.js +62 -20
  136. package/dist/module/CallingClient/calling/call.js +66 -43
  137. package/dist/module/CallingClient/constants.js +2 -1
  138. package/dist/module/CallingClient/registration/register.js +6 -3
  139. package/dist/module/CallingClient/registration/webWorker.js +2 -1
  140. package/dist/module/CallingClient/windowsChromiumIceWarmupUtils.js +1 -4
  141. package/dist/module/Contacts/ContactsClient.js +23 -17
  142. package/dist/module/Contacts/constants.js +1 -1
  143. package/dist/module/Metrics/index.js +42 -0
  144. package/dist/module/Metrics/types.js +7 -0
  145. package/dist/module/Voicemail/BroadworksBackendConnector.js +3 -0
  146. package/dist/module/Voicemail/UcmBackendConnector.js +6 -0
  147. package/dist/module/Voicemail/WxCallBackendConnector.js +8 -0
  148. package/dist/module/common/Utils.js +22 -8
  149. package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
  150. package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
  151. package/dist/types/CallSettings/WxCallBackendConnector.d.ts.map +1 -1
  152. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  153. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  154. package/dist/types/CallingClient/constants.d.ts +2 -1
  155. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  156. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  157. package/dist/types/CallingClient/registration/webWorker.d.ts +2 -1
  158. package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
  159. package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts +2 -4
  160. package/dist/types/CallingClient/windowsChromiumIceWarmupUtils.d.ts.map +1 -1
  161. package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
  162. package/dist/types/Contacts/constants.d.ts +1 -1
  163. package/dist/types/Contacts/constants.d.ts.map +1 -1
  164. package/dist/types/Metrics/index.d.ts.map +1 -1
  165. package/dist/types/Metrics/types.d.ts +10 -2
  166. package/dist/types/Metrics/types.d.ts.map +1 -1
  167. package/dist/types/Voicemail/BroadworksBackendConnector.d.ts.map +1 -1
  168. package/dist/types/Voicemail/UcmBackendConnector.d.ts.map +1 -1
  169. package/dist/types/Voicemail/WxCallBackendConnector.d.ts.map +1 -1
  170. package/dist/types/common/Utils.d.ts.map +1 -1
  171. package/package.json +7 -5
@@ -35,8 +35,7 @@ var _line = _interopRequireDefault(require("./line"));
35
35
  var _registerFixtures = require("./registration/registerFixtures");
36
36
  var _constants2 = require("../common/constants");
37
37
  var _windowsChromiumIceWarmupUtils = _interopRequireDefault(require("./windowsChromiumIceWarmupUtils"));
38
- 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); }
39
- 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; }
38
+ 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); }
40
39
  function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
41
40
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable dot-notation */
42
41
  global.crypto = {
@@ -68,7 +67,7 @@ describe('CallingClient Tests', function () {
68
67
  webex.internal.services['_serviceUrls']['mobius'] = 'https://mobius.aintgen-a-1.int.infra.webex.com/api/v1';
69
68
  webex.internal.services['_hostCatalog'] = _callingClientFixtures.mockCatalogUS;
70
69
  });
71
- it('should set mobiusServiceHost correctly when URL is valid', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
70
+ it('should set mobiusServiceHost correctly when URL is valid', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
72
71
  var urlSpy, callingClient;
73
72
  return _regenerator.default.wrap(function _callee$(_context) {
74
73
  while (1) switch (_context.prev = _context.next) {
@@ -95,7 +94,7 @@ describe('CallingClient Tests', function () {
95
94
  }
96
95
  }, _callee);
97
96
  })));
98
- it('should use default mobius service host when Service URL is invalid', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
97
+ it('should use default mobius service host when Service URL is invalid', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
99
98
  var callingClient;
100
99
  return _regenerator.default.wrap(function _callee2$(_context2) {
101
100
  while (1) switch (_context2.prev = _context2.next) {
@@ -130,11 +129,11 @@ describe('CallingClient Tests', function () {
130
129
  * No input sdk config to callingClient, it should default to service type
131
130
  * calling and empty domain value.
132
131
  */
133
- it('Verify valid calling serviceData with no input sdk config', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
132
+ it('Verify valid calling serviceData with no input sdk config', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4() {
134
133
  return _regenerator.default.wrap(function _callee4$(_context4) {
135
134
  while (1) switch (_context4.prev = _context4.next) {
136
135
  case 0:
137
- expect( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
136
+ expect(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
138
137
  return _regenerator.default.wrap(function _callee3$(_context3) {
139
138
  while (1) switch (_context3.prev = _context3.next) {
140
139
  case 0:
@@ -163,7 +162,7 @@ describe('CallingClient Tests', function () {
163
162
  * It should default to service type calling and empty domain value.
164
163
  *
165
164
  */
166
- it('Verify invalid empty service indicator, empty domain', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
165
+ it('Verify invalid empty service indicator, empty domain', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6() {
167
166
  var serviceDataObj;
168
167
  return _regenerator.default.wrap(function _callee6$(_context6) {
169
168
  while (1) switch (_context6.prev = _context6.next) {
@@ -173,7 +172,7 @@ describe('CallingClient Tests', function () {
173
172
  indicator: '',
174
173
  domain: ''
175
174
  };
176
- expect( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
175
+ expect(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
177
176
  return _regenerator.default.wrap(function _callee5$(_context5) {
178
177
  while (1) switch (_context5.prev = _context5.next) {
179
178
  case 0:
@@ -205,7 +204,7 @@ describe('CallingClient Tests', function () {
205
204
  *
206
205
  * INDICATOR value MUST MATCH with one of the values in ServiceIndicator enum.
207
206
  */
208
- it('Verify invalid service indicator, valid domain', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
207
+ it('Verify invalid service indicator, valid domain', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7() {
209
208
  var serviceDataObj;
210
209
  return _regenerator.default.wrap(function _callee7$(_context7) {
211
210
  while (1) switch (_context7.prev = _context7.next) {
@@ -246,7 +245,7 @@ describe('CallingClient Tests', function () {
246
245
  * DOMAIN field for service type calling is allowed to be empty but if it carries a non-empty
247
246
  * string then it must be of valid domain type.
248
247
  */
249
- it('CALLING: verify invalid service domain', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
248
+ it('CALLING: verify invalid service domain', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8() {
250
249
  var serviceDataObj;
251
250
  return _regenerator.default.wrap(function _callee8$(_context8) {
252
251
  while (1) switch (_context8.prev = _context8.next) {
@@ -285,16 +284,16 @@ describe('CallingClient Tests', function () {
285
284
  *
286
285
  * DOMAIN field for service type 'calling' is allowed to be empty.
287
286
  */
288
- it('CALLING: verify valid empty service domain', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
287
+ it('CALLING: verify valid empty service domain', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
289
288
  var serviceDataObj;
290
- return _regenerator.default.wrap(function _callee10$(_context10) {
291
- while (1) switch (_context10.prev = _context10.next) {
289
+ return _regenerator.default.wrap(function _callee0$(_context0) {
290
+ while (1) switch (_context0.prev = _context0.next) {
292
291
  case 0:
293
292
  serviceDataObj = {
294
293
  indicator: _types2.ServiceIndicator.CALLING,
295
294
  domain: ''
296
295
  };
297
- expect( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
296
+ expect(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
298
297
  return _regenerator.default.wrap(function _callee9$(_context9) {
299
298
  while (1) switch (_context9.prev = _context9.next) {
300
299
  case 0:
@@ -313,9 +312,9 @@ describe('CallingClient Tests', function () {
313
312
  }))).not.toThrow(Error);
314
313
  case 2:
315
314
  case "end":
316
- return _context10.stop();
315
+ return _context0.stop();
317
316
  }
318
- }, _callee10);
317
+ }, _callee0);
319
318
  })));
320
319
 
321
320
  /**
@@ -326,35 +325,35 @@ describe('CallingClient Tests', function () {
326
325
  *
327
326
  * DOMAIN field for service type 'contactcenter' must carry a non-empty valid domain type string.
328
327
  */
329
- it('ContactCenter: verify empty invalid service domain', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
328
+ it('ContactCenter: verify empty invalid service domain', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
330
329
  var serviceDataObj;
331
- return _regenerator.default.wrap(function _callee11$(_context11) {
332
- while (1) switch (_context11.prev = _context11.next) {
330
+ return _regenerator.default.wrap(function _callee1$(_context1) {
331
+ while (1) switch (_context1.prev = _context1.next) {
333
332
  case 0:
334
333
  serviceDataObj = {
335
334
  indicator: _types2.ServiceIndicator.CONTACT_CENTER,
336
335
  domain: ''
337
336
  };
338
- _context11.prev = 1;
339
- _context11.next = 4;
337
+ _context1.prev = 1;
338
+ _context1.next = 4;
340
339
  return (0, _CallingClient.createClient)(webex, {
341
340
  serviceData: serviceDataObj
342
341
  });
343
342
  case 4:
344
- callingClient = _context11.sent;
345
- _context11.next = 10;
343
+ callingClient = _context1.sent;
344
+ _context1.next = 10;
346
345
  break;
347
346
  case 7:
348
- _context11.prev = 7;
349
- _context11.t0 = _context11["catch"](1);
350
- expect(_context11.t0.message).toEqual('Invalid service domain.');
347
+ _context1.prev = 7;
348
+ _context1.t0 = _context1["catch"](1);
349
+ expect(_context1.t0.message).toEqual('Invalid service domain.');
351
350
  case 10:
352
351
  expect.assertions(1);
353
352
  case 11:
354
353
  case "end":
355
- return _context11.stop();
354
+ return _context1.stop();
356
355
  }
357
- }, _callee11, null, [[1, 7]]);
356
+ }, _callee1, null, [[1, 7]]);
358
357
  })));
359
358
 
360
359
  /**
@@ -365,58 +364,58 @@ describe('CallingClient Tests', function () {
365
364
  *
366
365
  * DOMAIN field for service type 'contactcenter' must carry a non-empty valid domain type string.
367
366
  */
368
- it('ContactCenter: verify valid service domain', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
367
+ it('ContactCenter: verify valid service domain', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
369
368
  var serviceDataObj;
370
- return _regenerator.default.wrap(function _callee13$(_context13) {
371
- while (1) switch (_context13.prev = _context13.next) {
369
+ return _regenerator.default.wrap(function _callee11$(_context11) {
370
+ while (1) switch (_context11.prev = _context11.next) {
372
371
  case 0:
373
372
  serviceDataObj = {
374
373
  indicator: _types2.ServiceIndicator.CONTACT_CENTER,
375
374
  domain: 'test.example.com'
376
375
  };
377
- expect( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
378
- return _regenerator.default.wrap(function _callee12$(_context12) {
379
- while (1) switch (_context12.prev = _context12.next) {
376
+ expect(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
377
+ return _regenerator.default.wrap(function _callee10$(_context10) {
378
+ while (1) switch (_context10.prev = _context10.next) {
380
379
  case 0:
381
- _context12.next = 2;
380
+ _context10.next = 2;
382
381
  return (0, _CallingClient.createClient)(webex, {
383
382
  serviceData: serviceDataObj
384
383
  });
385
384
  case 2:
386
- callingClient = _context12.sent;
385
+ callingClient = _context10.sent;
387
386
  expect(callingClient).toBeTruthy();
388
387
  case 4:
389
388
  case "end":
390
- return _context12.stop();
389
+ return _context10.stop();
391
390
  }
392
- }, _callee12);
391
+ }, _callee10);
393
392
  }))).not.toThrow(Error);
394
393
  case 2:
395
394
  case "end":
396
- return _context13.stop();
395
+ return _context11.stop();
397
396
  }
398
- }, _callee13);
397
+ }, _callee11);
399
398
  })));
400
- it('Get current log level', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
401
- return _regenerator.default.wrap(function _callee14$(_context14) {
402
- while (1) switch (_context14.prev = _context14.next) {
399
+ it('Get current log level', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
400
+ return _regenerator.default.wrap(function _callee12$(_context12) {
401
+ while (1) switch (_context12.prev = _context12.next) {
403
402
  case 0:
404
- _context14.next = 2;
403
+ _context12.next = 2;
405
404
  return (0, _CallingClient.createClient)(webex, {
406
405
  logger: {
407
406
  level: _types.LOGGER.INFO
408
407
  }
409
408
  });
410
409
  case 2:
411
- callingClient = _context14.sent;
410
+ callingClient = _context12.sent;
412
411
  expect(callingClient).toBeTruthy();
413
412
  expect(callingClient.getLoggingLevel).toBeTruthy();
414
413
  expect(callingClient.getLoggingLevel()).toEqual(_types.LOGGER.INFO);
415
414
  case 6:
416
415
  case "end":
417
- return _context14.stop();
416
+ return _context12.stop();
418
417
  }
419
- }, _callee14);
418
+ }, _callee12);
420
419
  })));
421
420
  });
422
421
  describe('Mobius Server discovery tests', function () {
@@ -429,19 +428,19 @@ describe('CallingClient Tests', function () {
429
428
  callingClient = undefined;
430
429
  jest.useRealTimers();
431
430
  });
432
- it('verify successful mobius server url discovery', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
433
- return _regenerator.default.wrap(function _callee15$(_context15) {
434
- while (1) switch (_context15.prev = _context15.next) {
431
+ it('verify successful mobius server url discovery', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13() {
432
+ return _regenerator.default.wrap(function _callee13$(_context13) {
433
+ while (1) switch (_context13.prev = _context13.next) {
435
434
  case 0:
436
435
  webex.request.mockResolvedValueOnce(_callingClientFixtures.ipPayload).mockResolvedValueOnce(_callingClientFixtures.regionPayload).mockResolvedValueOnce(_callingClientFixtures.discoveryPayload);
437
- _context15.next = 3;
436
+ _context13.next = 3;
438
437
  return (0, _CallingClient.createClient)(webex, {
439
438
  logger: {
440
439
  level: _types.LOGGER.INFO
441
440
  }
442
441
  });
443
442
  case 3:
444
- callingClient = _context15.sent;
443
+ callingClient = _context13.sent;
445
444
  expect(webex.request).toBeCalledTimes(3);
446
445
  expect(callingClient.primaryMobiusUris).toEqual([_callingClientFixtures.primaryUrl]);
447
446
  expect(handleErrorSpy).not.toBeCalled();
@@ -463,27 +462,27 @@ describe('CallingClient Tests', function () {
463
462
  }));
464
463
  case 10:
465
464
  case "end":
466
- return _context15.stop();
465
+ return _context13.stop();
467
466
  }
468
- }, _callee15);
467
+ }, _callee13);
469
468
  })));
470
- it('case when region discovery fails', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
469
+ it('case when region discovery fails', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
471
470
  var failurePayload;
472
- return _regenerator.default.wrap(function _callee16$(_context16) {
473
- while (1) switch (_context16.prev = _context16.next) {
471
+ return _regenerator.default.wrap(function _callee14$(_context14) {
472
+ while (1) switch (_context14.prev = _context14.next) {
474
473
  case 0:
475
474
  failurePayload = {
476
475
  statusCode: 500
477
476
  };
478
477
  webex.request.mockRejectedValue(failurePayload);
479
- _context16.next = 4;
478
+ _context14.next = 4;
480
479
  return (0, _CallingClient.createClient)(webex, {
481
480
  logger: {
482
481
  level: _types.LOGGER.INFO
483
482
  }
484
483
  });
485
484
  case 4:
486
- callingClient = _context16.sent;
485
+ callingClient = _context14.sent;
487
486
  expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
488
487
  uri: 'https://mobius-us-east-1.prod.infra.webex.com/api/v1/calling/web/myip',
489
488
  method: 'GET'
@@ -505,30 +504,33 @@ describe('CallingClient Tests', function () {
505
504
  method: 'getMobiusServers'
506
505
  });
507
506
  expect(callingClient.primaryMobiusUris).toEqual(["".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT)]);
508
- expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
507
+ expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", expect.objectContaining({
508
+ file: _constants.CALLING_CLIENT_FILE,
509
+ method: 'getMobiusServers'
510
+ }));
509
511
  case 12:
510
512
  case "end":
511
- return _context16.stop();
513
+ return _context14.stop();
512
514
  }
513
- }, _callee16);
515
+ }, _callee14);
514
516
  })));
515
- it('case when /myIP failed with 401', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
517
+ it('case when /myIP failed with 401', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
516
518
  var failurePayload;
517
- return _regenerator.default.wrap(function _callee17$(_context17) {
518
- while (1) switch (_context17.prev = _context17.next) {
519
+ return _regenerator.default.wrap(function _callee15$(_context15) {
520
+ while (1) switch (_context15.prev = _context15.next) {
519
521
  case 0:
520
522
  failurePayload = {
521
523
  statusCode: 401
522
524
  };
523
525
  webex.request.mockRejectedValueOnce(failurePayload);
524
- _context17.next = 4;
526
+ _context15.next = 4;
525
527
  return (0, _CallingClient.createClient)(webex, {
526
528
  logger: {
527
529
  level: _types.LOGGER.INFO
528
530
  }
529
531
  });
530
532
  case 4:
531
- callingClient = _context17.sent;
533
+ callingClient = _context15.sent;
532
534
  expect(webex.request).toBeCalledOnceWith(_objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
533
535
  uri: 'https://mobius-us-east-1.prod.infra.webex.com/api/v1/calling/web/myip',
534
536
  method: 'GET'
@@ -538,30 +540,33 @@ describe('CallingClient Tests', function () {
538
540
  method: 'getMobiusServers'
539
541
  });
540
542
  expect(callingClient.primaryMobiusUris).toEqual(["".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT)]);
541
- expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
543
+ expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", expect.objectContaining({
544
+ file: _constants.CALLING_CLIENT_FILE,
545
+ method: 'getMobiusServers'
546
+ }));
542
547
  case 9:
543
548
  case "end":
544
- return _context17.stop();
549
+ return _context15.stop();
545
550
  }
546
- }, _callee17);
551
+ }, _callee15);
547
552
  })));
548
- it('when region discovery succeeds but region based mobius url discovery fails', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
553
+ it('when region discovery succeeds but region based mobius url discovery fails', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
549
554
  var failurePayload;
550
- return _regenerator.default.wrap(function _callee18$(_context18) {
551
- while (1) switch (_context18.prev = _context18.next) {
555
+ return _regenerator.default.wrap(function _callee16$(_context16) {
556
+ while (1) switch (_context16.prev = _context16.next) {
552
557
  case 0:
553
558
  failurePayload = {
554
559
  statusCode: 500
555
560
  };
556
561
  webex.request.mockResolvedValueOnce(_callingClientFixtures.ipPayload).mockResolvedValueOnce(_callingClientFixtures.regionPayload).mockRejectedValueOnce(failurePayload);
557
- _context18.next = 4;
562
+ _context16.next = 4;
558
563
  return (0, _CallingClient.createClient)(webex, {
559
564
  logger: {
560
565
  level: _types.LOGGER.INFO
561
566
  }
562
567
  });
563
568
  case 4:
564
- callingClient = _context18.sent;
569
+ callingClient = _context16.sent;
565
570
  expect(handleErrorSpy).toBeCalledWith(failurePayload, expect.anything(), {
566
571
  file: _constants.CALLING_CLIENT_FILE,
567
572
  method: 'getMobiusServers'
@@ -579,30 +584,33 @@ describe('CallingClient Tests', function () {
579
584
  addAuthHeader: false,
580
585
  headers: (0, _defineProperty2.default)({}, _constants.SPARK_USER_AGENT, null)
581
586
  });
582
- expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
587
+ expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", expect.objectContaining({
588
+ file: _constants.CALLING_CLIENT_FILE,
589
+ method: 'getMobiusServers'
590
+ }));
583
591
  case 11:
584
592
  case "end":
585
- return _context18.stop();
593
+ return _context16.stop();
586
594
  }
587
- }, _callee18);
595
+ }, _callee16);
588
596
  })));
589
- it('case when discovery failed with 401', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
597
+ it('case when discovery failed with 401', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
590
598
  var failurePayload;
591
- return _regenerator.default.wrap(function _callee19$(_context19) {
592
- while (1) switch (_context19.prev = _context19.next) {
599
+ return _regenerator.default.wrap(function _callee17$(_context17) {
600
+ while (1) switch (_context17.prev = _context17.next) {
593
601
  case 0:
594
602
  failurePayload = {
595
603
  statusCode: 401
596
604
  };
597
605
  webex.request.mockResolvedValueOnce(_callingClientFixtures.ipPayload).mockRejectedValueOnce(failurePayload);
598
- _context19.next = 4;
606
+ _context17.next = 4;
599
607
  return (0, _CallingClient.createClient)(webex, {
600
608
  logger: {
601
609
  level: _types.LOGGER.INFO
602
610
  }
603
611
  });
604
612
  case 4:
605
- callingClient = _context19.sent;
613
+ callingClient = _context17.sent;
606
614
  expect(webex.request).toBeCalledTimes(2);
607
615
  expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
608
616
  uri: 'https://mobius-us-east-1.prod.infra.webex.com/api/v1/calling/web/myip',
@@ -619,22 +627,25 @@ describe('CallingClient Tests', function () {
619
627
  method: 'getMobiusServers'
620
628
  });
621
629
  expect(callingClient.primaryMobiusUris).toEqual(["".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT)]);
622
- expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
630
+ expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", expect.objectContaining({
631
+ file: _constants.CALLING_CLIENT_FILE,
632
+ method: 'getMobiusServers'
633
+ }));
623
634
  case 11:
624
635
  case "end":
625
- return _context19.stop();
636
+ return _context17.stop();
626
637
  }
627
- }, _callee19);
638
+ }, _callee17);
628
639
  })));
629
- it('Verify successful mobius server url discovery after initializing callingClient through a config', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
640
+ it('Verify successful mobius server url discovery after initializing callingClient through a config', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
630
641
  var infoSpy;
631
- return _regenerator.default.wrap(function _callee20$(_context20) {
632
- while (1) switch (_context20.prev = _context20.next) {
642
+ return _regenerator.default.wrap(function _callee18$(_context18) {
643
+ while (1) switch (_context18.prev = _context18.next) {
633
644
  case 0:
634
645
  infoSpy = jest.spyOn(_Logger.default, 'info');
635
646
  infoSpy.mockReset();
636
647
  webex.request.mockResolvedValueOnce(_callingClientFixtures.discoveryPayload);
637
- _context20.next = 5;
648
+ _context18.next = 5;
638
649
  return (0, _CallingClient.createClient)(webex, {
639
650
  discovery: {
640
651
  region: 'AP-SOUTHEAST',
@@ -645,7 +656,7 @@ describe('CallingClient Tests', function () {
645
656
  }
646
657
  });
647
658
  case 5:
648
- callingClient = _context20.sent;
659
+ callingClient = _context18.sent;
649
660
  expect(callingClient.primaryMobiusUris).toEqual([_callingClientFixtures.primaryUrl]);
650
661
  expect(infoSpy).toHaveBeenCalledWith(_constants2.METHOD_START_MESSAGE, {
651
662
  file: 'CallingClient',
@@ -658,66 +669,66 @@ describe('CallingClient Tests', function () {
658
669
  expect(handleErrorSpy).not.toHaveBeenCalled();
659
670
  case 10:
660
671
  case "end":
661
- return _context20.stop();
672
+ return _context18.stop();
662
673
  }
663
- }, _callee20);
674
+ }, _callee18);
664
675
  })));
665
676
  });
666
677
  describe('Testing each cluster present withing host catalog', function () {
667
678
  var mobiusCluster = ['mobius-eu-central-1.prod.infra.webex.com', 'mobius-us-east-1.int.infra.webex.com', 'mobius-eu-central-1.int.infra.webex.com'];
668
679
  var checkCluster = /*#__PURE__*/function () {
669
- var _ref21 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(mockServiceHosts, mockCatalog) {
680
+ var _ref19 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19(mockServiceHosts, mockCatalog) {
670
681
  var callingClient;
671
- return _regenerator.default.wrap(function _callee21$(_context21) {
672
- while (1) switch (_context21.prev = _context21.next) {
682
+ return _regenerator.default.wrap(function _callee19$(_context19) {
683
+ while (1) switch (_context19.prev = _context19.next) {
673
684
  case 0:
674
685
  webex.internal.services._hostCatalog = mockCatalog;
675
- _context21.next = 3;
686
+ _context19.next = 3;
676
687
  return (0, _CallingClient.createClient)(webex, {
677
688
  logger: {
678
689
  level: _types.LOGGER.INFO
679
690
  }
680
691
  });
681
692
  case 3:
682
- callingClient = _context21.sent;
693
+ callingClient = _context19.sent;
683
694
  expect(callingClient['mobiusClusters']).toStrictEqual(mockServiceHosts);
684
695
  case 5:
685
696
  case "end":
686
- return _context21.stop();
697
+ return _context19.stop();
687
698
  }
688
- }, _callee21);
699
+ }, _callee19);
689
700
  }));
690
701
  return function checkCluster(_x, _x2) {
691
- return _ref21.apply(this, arguments);
702
+ return _ref19.apply(this, arguments);
692
703
  };
693
704
  }();
694
705
  it.each(mobiusCluster)('%s', /*#__PURE__*/function () {
695
- var _ref22 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(clusterName) {
696
- return _regenerator.default.wrap(function _callee22$(_context22) {
697
- while (1) switch (_context22.prev = _context22.next) {
706
+ var _ref20 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20(clusterName) {
707
+ return _regenerator.default.wrap(function _callee20$(_context20) {
708
+ while (1) switch (_context20.prev = _context20.next) {
698
709
  case 0:
699
- _context22.t0 = clusterName;
700
- _context22.next = _context22.t0 === 'mobius-eu-central-1.prod.infra.webex.com' ? 3 : _context22.t0 === 'mobius-us-east-1.int.infra.webex.com' ? 5 : _context22.t0 === 'mobius-eu-central-1.int.infra.webex.com' ? 7 : 9;
710
+ _context20.t0 = clusterName;
711
+ _context20.next = _context20.t0 === 'mobius-eu-central-1.prod.infra.webex.com' ? 3 : _context20.t0 === 'mobius-us-east-1.int.infra.webex.com' ? 5 : _context20.t0 === 'mobius-eu-central-1.int.infra.webex.com' ? 7 : 9;
701
712
  break;
702
713
  case 3:
703
714
  checkCluster(_callingClientFixtures.mockEUServiceHosts, _callingClientFixtures.mockCatalogEU);
704
- return _context22.abrupt("break", 10);
715
+ return _context20.abrupt("break", 10);
705
716
  case 5:
706
717
  checkCluster(_callingClientFixtures.mockIntServiceHosts, _callingClientFixtures.mockCatalogUSInt);
707
- return _context22.abrupt("break", 10);
718
+ return _context20.abrupt("break", 10);
708
719
  case 7:
709
720
  checkCluster(_callingClientFixtures.mockEUIntServiceHosts, _callingClientFixtures.mockCatalogEUInt);
710
- return _context22.abrupt("break", 10);
721
+ return _context20.abrupt("break", 10);
711
722
  case 9:
712
- return _context22.abrupt("break", 10);
723
+ return _context20.abrupt("break", 10);
713
724
  case 10:
714
725
  case "end":
715
- return _context22.stop();
726
+ return _context20.stop();
716
727
  }
717
- }, _callee22);
728
+ }, _callee20);
718
729
  }));
719
730
  return function (_x3) {
720
- return _ref22.apply(this, arguments);
731
+ return _ref20.apply(this, arguments);
721
732
  };
722
733
  }());
723
734
  });
@@ -730,23 +741,23 @@ describe('CallingClient Tests', function () {
730
741
  var deRegSpy;
731
742
  var restartRegisterSpy;
732
743
  var registerSpy;
733
- beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
734
- return _regenerator.default.wrap(function _callee23$(_context23) {
735
- while (1) switch (_context23.prev = _context23.next) {
744
+ beforeEach(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
745
+ return _regenerator.default.wrap(function _callee21$(_context21) {
746
+ while (1) switch (_context21.prev = _context21.next) {
736
747
  case 0:
737
748
  jest.useFakeTimers();
738
749
  webex.request.mockResolvedValueOnce(_callingClientFixtures.ipPayload).mockResolvedValueOnce(_callingClientFixtures.regionPayload).mockResolvedValueOnce(_callingClientFixtures.discoveryPayload).mockResolvedValueOnce(_callingClientFixtures.registrationPayload);
739
- _context23.next = 4;
750
+ _context21.next = 4;
740
751
  return (0, _CallingClient.createClient)(webex, {
741
752
  logger: {
742
753
  level: _types.LOGGER.INFO
743
754
  }
744
755
  });
745
756
  case 4:
746
- callingClient = _context23.sent;
757
+ callingClient = _context21.sent;
747
758
  line = (0, _values.default)(callingClient.lineDict)[0];
748
759
  reg = line.registration;
749
- _context23.next = 9;
760
+ _context21.next = 9;
750
761
  return line.register();
751
762
  case 9:
752
763
  deRegSpy = jest.spyOn(line.registration, 'deregister');
@@ -755,9 +766,9 @@ describe('CallingClient Tests', function () {
755
766
  registerSpy = jest.spyOn(reg, 'attemptRegistrationWithServers');
756
767
  case 13:
757
768
  case "end":
758
- return _context23.stop();
769
+ return _context21.stop();
759
770
  }
760
- }, _callee23);
771
+ }, _callee21);
761
772
  })));
762
773
  afterEach(function () {
763
774
  jest.clearAllTimers();
@@ -767,9 +778,9 @@ describe('CallingClient Tests', function () {
767
778
  callingClient = undefined;
768
779
  jest.useRealTimers();
769
780
  });
770
- it('detect a network flap in mercury connection', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
771
- return _regenerator.default.wrap(function _callee24$(_context24) {
772
- while (1) switch (_context24.prev = _context24.next) {
781
+ it('detect a network flap in mercury connection', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
782
+ return _regenerator.default.wrap(function _callee22$(_context22) {
783
+ while (1) switch (_context22.prev = _context22.next) {
773
784
  case 0:
774
785
  warnSpy.mockClear();
775
786
  expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
@@ -788,7 +799,7 @@ describe('CallingClient Tests', function () {
788
799
  webex.internal.mercury.connected = true;
789
800
  logSpy.mockReset();
790
801
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
791
- _context24.next = 10;
802
+ _context22.next = 10;
792
803
  return flushPromises();
793
804
  case 10:
794
805
  _Logger.default.info('Mercury connection is up again, re-registering with Webex Calling if needed', {
@@ -808,14 +819,14 @@ describe('CallingClient Tests', function () {
808
819
  expect(registerSpy).toHaveBeenCalledWith('handleConnectionRestoration', [_callingClientFixtures.primaryUrl]);
809
820
  case 17:
810
821
  case "end":
811
- return _context24.stop();
822
+ return _context22.stop();
812
823
  }
813
- }, _callee24);
824
+ }, _callee22);
814
825
  })));
815
- it('Simulate a network flap with no active calls and re-verify registration: Restore Failure', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
826
+ it('Simulate a network flap with no active calls and re-verify registration: Restore Failure', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
816
827
  var failurePayload, mockRegistrationBody, successPayload;
817
- return _regenerator.default.wrap(function _callee25$(_context25) {
818
- while (1) switch (_context25.prev = _context25.next) {
828
+ return _regenerator.default.wrap(function _callee23$(_context23) {
829
+ while (1) switch (_context23.prev = _context23.next) {
819
830
  case 0:
820
831
  expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
821
832
  failurePayload = {
@@ -843,7 +854,7 @@ describe('CallingClient Tests', function () {
843
854
  webex.internal.mercury.connected = true;
844
855
  logSpy.mockReset();
845
856
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
846
- _context25.next = 13;
857
+ _context23.next = 13;
847
858
  return flushPromises();
848
859
  case 13:
849
860
  _Logger.default.info('Mercury connection is up again, re-registering with Webex Calling if needed', {
@@ -863,14 +874,14 @@ describe('CallingClient Tests', function () {
863
874
  expect(registerSpy).toHaveBeenCalledWith('handleConnectionRestoration', [_callingClientFixtures.primaryUrl]);
864
875
  case 20:
865
876
  case "end":
866
- return _context25.stop();
877
+ return _context23.stop();
867
878
  }
868
- }, _callee25);
879
+ }, _callee23);
869
880
  })));
870
- it('Simulate a network flap before initial registration is done', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
881
+ it('Simulate a network flap before initial registration is done', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
871
882
  var handleConnectionRestoreSpy;
872
- return _regenerator.default.wrap(function _callee26$(_context26) {
873
- while (1) switch (_context26.prev = _context26.next) {
883
+ return _regenerator.default.wrap(function _callee24$(_context24) {
884
+ while (1) switch (_context24.prev = _context24.next) {
874
885
  case 0:
875
886
  warnSpy.mockClear();
876
887
  handleConnectionRestoreSpy = jest.spyOn(reg, 'handleConnectionRestoration');
@@ -889,7 +900,7 @@ describe('CallingClient Tests', function () {
889
900
  /* Set mercury connection to be up and execute a delay of 2.5 seconds */
890
901
  webex.internal.mercury.connected = true;
891
902
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
892
- _context26.next = 10;
903
+ _context24.next = 10;
893
904
  return flushPromises();
894
905
  case 10:
895
906
  /* We should be detecting the network recovery */
@@ -905,13 +916,13 @@ describe('CallingClient Tests', function () {
905
916
  expect(handleConnectionRestoreSpy).not.toBeCalledOnceWith();
906
917
  case 12:
907
918
  case "end":
908
- return _context26.stop();
919
+ return _context24.stop();
909
920
  }
910
- }, _callee26);
921
+ }, _callee24);
911
922
  })));
912
- it('Simulate a network flap with 1 active call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
913
- return _regenerator.default.wrap(function _callee27$(_context27) {
914
- while (1) switch (_context27.prev = _context27.next) {
923
+ it('Simulate a network flap with 1 active call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
924
+ return _regenerator.default.wrap(function _callee25$(_context25) {
925
+ while (1) switch (_context25.prev = _context25.next) {
915
926
  case 0:
916
927
  expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
917
928
 
@@ -922,7 +933,7 @@ describe('CallingClient Tests', function () {
922
933
  /* Set mercury connection to be down and execute a delay of 2.5 seconds */
923
934
  webex.internal.mercury.connected = false;
924
935
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
925
- _context27.next = 7;
936
+ _context25.next = 7;
926
937
  return flushPromises();
927
938
  case 7:
928
939
  /* We should be detecting the network flap */
@@ -934,7 +945,7 @@ describe('CallingClient Tests', function () {
934
945
  /* Set mercury connection to be up and execute a delay of 2.5 seconds */
935
946
  webex.internal.mercury.connected = true;
936
947
  jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
937
- _context27.next = 12;
948
+ _context25.next = 12;
938
949
  return flushPromises();
939
950
  case 12:
940
951
  /* We should be detecting the network recovery */
@@ -945,28 +956,28 @@ describe('CallingClient Tests', function () {
945
956
  expect(registerSpy).not.toBeCalledWith(true);
946
957
  case 14:
947
958
  case "end":
948
- return _context27.stop();
959
+ return _context25.stop();
949
960
  }
950
- }, _callee27);
961
+ }, _callee25);
951
962
  })));
952
963
  });
953
964
  describe('Line creation tests', function () {
954
965
  var callingClient;
955
966
  var line;
956
- beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
957
- return _regenerator.default.wrap(function _callee28$(_context28) {
958
- while (1) switch (_context28.prev = _context28.next) {
967
+ beforeEach(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
968
+ return _regenerator.default.wrap(function _callee26$(_context26) {
969
+ while (1) switch (_context26.prev = _context26.next) {
959
970
  case 0:
960
- _context28.next = 2;
971
+ _context26.next = 2;
961
972
  return (0, _CallingClient.createClient)(webex);
962
973
  case 2:
963
- callingClient = _context28.sent;
974
+ callingClient = _context26.sent;
964
975
  line = (0, _values.default)(callingClient.lineDict)[0];
965
976
  case 4:
966
977
  case "end":
967
- return _context28.stop();
978
+ return _context26.stop();
968
979
  }
969
- }, _callee28);
980
+ }, _callee26);
970
981
  })));
971
982
  afterEach(function () {
972
983
  jest.clearAllTimers();
@@ -1001,15 +1012,15 @@ describe('CallingClient Tests', function () {
1001
1012
  });
1002
1013
  var callingClient;
1003
1014
  var line;
1004
- beforeAll( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
1015
+ beforeAll(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
1005
1016
  var calls;
1006
- return _regenerator.default.wrap(function _callee29$(_context29) {
1007
- while (1) switch (_context29.prev = _context29.next) {
1017
+ return _regenerator.default.wrap(function _callee27$(_context27) {
1018
+ while (1) switch (_context27.prev = _context27.next) {
1008
1019
  case 0:
1009
- _context29.next = 2;
1020
+ _context27.next = 2;
1010
1021
  return (0, _CallingClient.createClient)(webex);
1011
1022
  case 2:
1012
- callingClient = _context29.sent;
1023
+ callingClient = _context27.sent;
1013
1024
  line = new _line.default(userId, clientDeviceUri, mutex, primaryMobiusUris(), backupMobiusUris(), _types.LOGGER.INFO);
1014
1025
  calls = (0, _values.default)(callManager.getActiveCalls());
1015
1026
  calls.forEach(function (call) {
@@ -1017,9 +1028,9 @@ describe('CallingClient Tests', function () {
1017
1028
  });
1018
1029
  case 6:
1019
1030
  case "end":
1020
- return _context29.stop();
1031
+ return _context27.stop();
1021
1032
  }
1022
- }, _callee29);
1033
+ }, _callee27);
1023
1034
  })));
1024
1035
  afterAll(function () {
1025
1036
  callingClient.removeAllListeners();
@@ -1102,23 +1113,23 @@ describe('CallingClient Tests', function () {
1102
1113
  describe('Call Session Event test', function () {
1103
1114
  var mockOn = webex.internal.mercury.on;
1104
1115
  var callingClient;
1105
- beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
1106
- return _regenerator.default.wrap(function _callee30$(_context30) {
1107
- while (1) switch (_context30.prev = _context30.next) {
1116
+ beforeEach(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
1117
+ return _regenerator.default.wrap(function _callee28$(_context28) {
1118
+ while (1) switch (_context28.prev = _context28.next) {
1108
1119
  case 0:
1109
- _context30.next = 2;
1120
+ _context28.next = 2;
1110
1121
  return (0, _CallingClient.createClient)(webex, {
1111
1122
  logger: {
1112
1123
  level: _types.LOGGER.INFO
1113
1124
  }
1114
1125
  });
1115
1126
  case 2:
1116
- callingClient = _context30.sent;
1127
+ callingClient = _context28.sent;
1117
1128
  case 3:
1118
1129
  case "end":
1119
- return _context30.stop();
1130
+ return _context28.stop();
1120
1131
  }
1121
- }, _callee30);
1132
+ }, _callee28);
1122
1133
  })));
1123
1134
  afterEach(function () {
1124
1135
  callingClient.removeAllListeners();
@@ -1219,17 +1230,17 @@ describe('CallingClient Tests', function () {
1219
1230
  afterAll(function () {
1220
1231
  global.RTCPeerConnection = origRTCPeerConnection;
1221
1232
  });
1222
- it('should complete without throwing', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
1223
- return _regenerator.default.wrap(function _callee31$(_context31) {
1224
- while (1) switch (_context31.prev = _context31.next) {
1233
+ it('should complete without throwing', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
1234
+ return _regenerator.default.wrap(function _callee29$(_context29) {
1235
+ while (1) switch (_context29.prev = _context29.next) {
1225
1236
  case 0:
1226
- _context31.next = 2;
1237
+ _context29.next = 2;
1227
1238
  return expect((0, _windowsChromiumIceWarmupUtils.default)({})).resolves.not.toThrow();
1228
1239
  case 2:
1229
1240
  case "end":
1230
- return _context31.stop();
1241
+ return _context29.stop();
1231
1242
  }
1232
- }, _callee31);
1243
+ }, _callee29);
1233
1244
  })));
1234
1245
  });
1235
1246
  });