@webex/calling 3.0.0-next.8 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CallHistory/CallHistory.js +49 -49
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/CallHistory.test.js +9 -0
- package/dist/CallHistory/CallHistory.test.js.map +1 -1
- package/dist/CallHistory/callHistoryFixtures.js +63 -7
- package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
- package/dist/CallHistory/constants.js +9 -18
- package/dist/CallHistory/constants.js.map +1 -1
- package/dist/CallHistory/types.js.map +1 -1
- package/dist/CallSettings/CallSettings.js +18 -13
- package/dist/CallSettings/CallSettings.js.map +1 -1
- package/dist/CallSettings/CallSettings.test.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.js +7 -8
- package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.test.js +69 -37
- package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.js +19 -13
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +2 -2
- package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/constants.js +11 -22
- package/dist/CallSettings/constants.js.map +1 -1
- package/dist/CallSettings/testFixtures.js +4 -8
- package/dist/CallSettings/testFixtures.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +134 -75
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +170 -109
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/callRecordFixtures.js +2 -4
- package/dist/CallingClient/callRecordFixtures.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.js +9 -29
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
- package/dist/CallingClient/calling/call.js +140 -80
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +651 -409
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +3 -14
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +1 -1
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js +31 -33
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/callingClientFixtures.js +107 -17
- package/dist/CallingClient/callingClientFixtures.js.map +1 -1
- package/dist/CallingClient/constants.js +101 -193
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +20 -18
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +13 -13
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/line/types.js +7 -11
- package/dist/CallingClient/line/types.js.map +1 -1
- package/dist/CallingClient/registration/register.js +102 -111
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +33 -32
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/registerFixtures.js +5 -10
- package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/Contacts/ContactsClient.js +30 -19
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +4 -4
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Contacts/constants.js +10 -18
- package/dist/Contacts/constants.js.map +1 -1
- package/dist/Contacts/contactFixtures.js +26 -52
- package/dist/Contacts/contactFixtures.js.map +1 -1
- package/dist/Contacts/types.js +29 -9
- package/dist/Contacts/types.js.map +1 -1
- package/dist/Errors/catalog/CallError.js +3 -5
- package/dist/Errors/catalog/CallError.js.map +1 -1
- package/dist/Errors/catalog/CallingDeviceError.js +4 -6
- package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
- package/dist/Errors/catalog/ExtendedError.js +2 -3
- package/dist/Errors/catalog/ExtendedError.js.map +1 -1
- package/dist/Errors/catalog/LineError.js +5 -7
- package/dist/Errors/catalog/LineError.js.map +1 -1
- package/dist/Errors/index.js +7 -0
- package/dist/Errors/index.js.map +1 -1
- package/dist/Errors/types.js +15 -20
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/impl/index.js +2 -3
- package/dist/Events/impl/index.js.map +1 -1
- package/dist/Events/types.js +44 -52
- package/dist/Events/types.js.map +1 -1
- package/dist/Logger/index.js +1 -2
- package/dist/Logger/index.js.map +1 -1
- package/dist/Logger/index.test.js.map +1 -1
- package/dist/Logger/types.js +9 -12
- package/dist/Logger/types.js.map +1 -1
- package/dist/Metrics/index.js +2 -4
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +3 -3
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +15 -20
- package/dist/Metrics/types.js.map +1 -1
- package/dist/SDKConnector/index.js +1 -2
- package/dist/SDKConnector/index.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/SDKConnector/utils.js +1 -2
- package/dist/SDKConnector/utils.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.js +21 -12
- package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.test.js +2 -2
- package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.js +19 -11
- package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.test.js +5 -4
- package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/Voicemail.js +35 -33
- package/dist/Voicemail/Voicemail.js.map +1 -1
- package/dist/Voicemail/Voicemail.test.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js +18 -11
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.test.js +4 -4
- package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/constants.js +29 -58
- package/dist/Voicemail/constants.js.map +1 -1
- package/dist/Voicemail/types.js.map +1 -1
- package/dist/Voicemail/voicemailFixture.js +35 -70
- package/dist/Voicemail/voicemailFixture.js.map +1 -1
- package/dist/api.js +13 -20
- package/dist/api.js.map +1 -1
- package/dist/common/Utils.js +18 -25
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +3 -3
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/constants.js +41 -82
- package/dist/common/constants.js.map +1 -1
- package/dist/common/testUtil.js +12 -21
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js +34 -43
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +246 -0
- package/dist/index.js.map +1 -1
- package/dist/module/CallHistory/CallHistory.js +7 -5
- package/dist/module/CallHistory/callHistoryFixtures.js +59 -0
- package/dist/module/CallSettings/UcmBackendConnector.js +4 -4
- package/dist/module/CallingClient/CallingClient.js +59 -42
- package/dist/module/CallingClient/calling/CallerId/index.js +3 -23
- package/dist/module/CallingClient/calling/call.js +69 -26
- package/dist/module/CallingClient/calling/callManager.js +0 -6
- package/dist/module/CallingClient/callingClientFixtures.js +119 -1
- package/dist/module/CallingClient/constants.js +8 -4
- package/dist/module/CallingClient/line/index.js +9 -12
- package/dist/module/CallingClient/line/types.js +0 -5
- package/dist/module/CallingClient/registration/register.js +28 -20
- package/dist/module/Errors/catalog/CallingDeviceError.js +2 -2
- package/dist/module/Errors/catalog/LineError.js +2 -2
- package/dist/module/Errors/index.js +1 -0
- package/dist/module/Events/types.js +2 -0
- package/dist/module/common/Utils.js +14 -19
- package/dist/module/common/testUtil.js +2 -1
- package/dist/module/common/types.js +6 -5
- package/dist/module/index.js +9 -0
- package/dist/types/CallHistory/CallHistory.d.ts +2 -1
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
- package/dist/types/CallHistory/callHistoryFixtures.d.ts +1 -0
- package/dist/types/CallHistory/callHistoryFixtures.d.ts.map +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/CallSettings/types.d.ts +1 -0
- package/dist/types/CallSettings/types.d.ts.map +1 -1
- package/dist/types/CallingClient/CallingClient.d.ts +2 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/index.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts +2 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/callManager.d.ts +0 -1
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +30 -30
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/callingClientFixtures.d.ts +69 -1
- package/dist/types/CallingClient/callingClientFixtures.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +7 -3
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts +6 -6
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/line/types.d.ts +11 -23
- package/dist/types/CallingClient/line/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +3 -3
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +14 -14
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/types.d.ts +6 -4
- package/dist/types/CallingClient/types.d.ts.map +1 -1
- package/dist/types/Contacts/ContactsClient.d.ts +1 -1
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts +4 -4
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts.map +1 -1
- package/dist/types/Errors/catalog/LineError.d.ts +4 -4
- package/dist/types/Errors/catalog/LineError.d.ts.map +1 -1
- package/dist/types/Errors/index.d.ts +1 -0
- package/dist/types/Errors/index.d.ts.map +1 -1
- package/dist/types/Errors/types.d.ts +2 -3
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Events/types.d.ts +28 -5
- package/dist/types/Events/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +2 -1
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/Voicemail/UcmBackendConnector.d.ts +1 -1
- package/dist/types/Voicemail/Voicemail.d.ts.map +1 -1
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts +1 -1
- package/dist/types/Voicemail/types.d.ts +10 -10
- package/dist/types/Voicemail/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +4 -5
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +1 -0
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +3 -2
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -22,23 +22,24 @@ var _types2 = require("../common/types");
|
|
|
22
22
|
var _types3 = require("../Events/types");
|
|
23
23
|
var _Logger = _interopRequireDefault(require("../Logger"));
|
|
24
24
|
var _CallingClient = require("./CallingClient");
|
|
25
|
-
var
|
|
25
|
+
var _Utils = _interopRequireWildcard(require("../common/Utils"));
|
|
26
|
+
var utils = _Utils;
|
|
26
27
|
var _callManager = require("./calling/callManager");
|
|
27
28
|
var _constants = require("./constants");
|
|
28
29
|
var _callRecordFixtures = require("./callRecordFixtures");
|
|
29
|
-
var _types4 = require("./line/types");
|
|
30
30
|
var _callingClientFixtures = require("./callingClientFixtures");
|
|
31
31
|
var _line = _interopRequireDefault(require("./line"));
|
|
32
32
|
var _registerFixtures = require("./registration/registerFixtures");
|
|
33
|
-
function _getRequireWildcardCache(
|
|
34
|
-
function _interopRequireWildcard(
|
|
35
|
-
function ownKeys(
|
|
36
|
-
function _objectSpread(
|
|
33
|
+
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); }
|
|
34
|
+
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; }
|
|
35
|
+
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; }
|
|
36
|
+
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 */
|
|
37
37
|
describe('CallingClient Tests', function () {
|
|
38
38
|
// Common initializers
|
|
39
39
|
|
|
40
40
|
var handleErrorSpy = jest.spyOn(utils, 'handleCallingClientErrors');
|
|
41
41
|
var webex = (0, _testUtil.getTestUtilsWebex)();
|
|
42
|
+
webex.internal.services['_hostCatalog'] = _callingClientFixtures.mockCatalogUS;
|
|
42
43
|
var defaultServiceIndicator = _types2.ServiceIndicator.CALLING;
|
|
43
44
|
var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
|
|
44
45
|
var logSpy = jest.spyOn(_Logger.default, 'info');
|
|
@@ -378,7 +379,7 @@ describe('CallingClient Tests', function () {
|
|
|
378
379
|
expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({
|
|
379
380
|
method: 'GET'
|
|
380
381
|
}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
381
|
-
uri: "".concat(
|
|
382
|
+
uri: "".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT).concat(_constants.IP_ENDPOINT)
|
|
382
383
|
}));
|
|
383
384
|
expect(webex.request).nthCalledWith(2, {
|
|
384
385
|
method: 'GET',
|
|
@@ -389,7 +390,7 @@ describe('CallingClient Tests', function () {
|
|
|
389
390
|
expect(webex.request).nthCalledWith(3, _objectSpread(_objectSpread({
|
|
390
391
|
method: 'GET'
|
|
391
392
|
}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
392
|
-
uri: "".concat(
|
|
393
|
+
uri: "".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT, "?regionCode=").concat(_callingClientFixtures.regionBody.clientRegion, "&countryCode=").concat(_callingClientFixtures.regionBody.countryCode)
|
|
393
394
|
}));
|
|
394
395
|
case 10:
|
|
395
396
|
case "end":
|
|
@@ -414,22 +415,29 @@ describe('CallingClient Tests', function () {
|
|
|
414
415
|
});
|
|
415
416
|
case 4:
|
|
416
417
|
callingClient = _context14.sent;
|
|
417
|
-
expect(
|
|
418
|
-
|
|
419
|
-
method: 'getMobiusServers'
|
|
420
|
-
});
|
|
421
|
-
expect(webex.request).toBeCalledOnceWith(_objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
422
|
-
uri: "".concat(_callingClientFixtures.uri, "myip"),
|
|
418
|
+
expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
419
|
+
uri: 'https://mobius-us-east-1.prod.infra.webex.com/api/v1/calling/web/myip',
|
|
423
420
|
method: 'GET'
|
|
424
421
|
}));
|
|
425
|
-
expect(
|
|
426
|
-
|
|
422
|
+
expect(webex.request).nthCalledWith(2, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
423
|
+
uri: 'https://mobius-ca-central-1.prod.infra.webex.com/api/v1/calling/web/myip',
|
|
427
424
|
method: 'GET'
|
|
428
|
-
}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
429
|
-
uri: "".concat(_callingClientFixtures.uri, "myip")
|
|
430
425
|
}));
|
|
431
|
-
expect(
|
|
432
|
-
|
|
426
|
+
expect(webex.request).nthCalledWith(3, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
427
|
+
uri: 'https://mobius-eu-central-1.prod.infra.webex.com/api/v1/calling/web/myip',
|
|
428
|
+
method: 'GET'
|
|
429
|
+
}));
|
|
430
|
+
expect(webex.request).nthCalledWith(4, _objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
431
|
+
uri: 'https://mobius-ap-southeast-2.prod.infra.webex.com/api/v1/calling/web/myip',
|
|
432
|
+
method: 'GET'
|
|
433
|
+
}));
|
|
434
|
+
expect(handleErrorSpy).toBeCalledWith(failurePayload, expect.anything(), {
|
|
435
|
+
file: _constants.CALLING_CLIENT_FILE,
|
|
436
|
+
method: 'getMobiusServers'
|
|
437
|
+
});
|
|
438
|
+
expect(callingClient.primaryMobiusUris).toEqual(["".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT)]);
|
|
439
|
+
expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
|
|
440
|
+
case 12:
|
|
433
441
|
case "end":
|
|
434
442
|
return _context14.stop();
|
|
435
443
|
}
|
|
@@ -457,11 +465,11 @@ describe('CallingClient Tests', function () {
|
|
|
457
465
|
method: 'getMobiusServers'
|
|
458
466
|
});
|
|
459
467
|
expect(webex.request).toBeCalledTimes(3);
|
|
460
|
-
expect(callingClient.primaryMobiusUris).toEqual([
|
|
468
|
+
expect(callingClient.primaryMobiusUris).toEqual(["".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT)]);
|
|
461
469
|
expect(webex.request).nthCalledWith(1, _objectSpread(_objectSpread({
|
|
462
470
|
method: 'GET'
|
|
463
471
|
}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
464
|
-
uri: "".concat(
|
|
472
|
+
uri: "".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT).concat(_constants.IP_ENDPOINT)
|
|
465
473
|
}));
|
|
466
474
|
expect(webex.request).nthCalledWith(2, {
|
|
467
475
|
method: 'GET',
|
|
@@ -469,7 +477,7 @@ describe('CallingClient Tests', function () {
|
|
|
469
477
|
addAuthHeader: false,
|
|
470
478
|
headers: (0, _defineProperty2.default)({}, _constants.SPARK_USER_AGENT, null)
|
|
471
479
|
});
|
|
472
|
-
expect(warnSpy).toBeCalledWith('
|
|
480
|
+
expect(warnSpy).toBeCalledWith("Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers", '');
|
|
473
481
|
case 11:
|
|
474
482
|
case "end":
|
|
475
483
|
return _context15.stop();
|
|
@@ -501,7 +509,7 @@ describe('CallingClient Tests', function () {
|
|
|
501
509
|
method: 'getMobiusServers'
|
|
502
510
|
});
|
|
503
511
|
expect(webex.request).toBeCalledOnceWith(_objectSpread(_objectSpread({}, (0, _testUtil.getMockRequestTemplate)()), {}, {
|
|
504
|
-
uri: "".concat(
|
|
512
|
+
uri: "".concat(callingClient['mobiusHost']).concat(_constants.URL_ENDPOINT, "?regionCode=").concat(_callingClientFixtures.regionBody.clientRegion, "&countryCode=").concat(_callingClientFixtures.regionBody.countryCode),
|
|
505
513
|
method: 'GET'
|
|
506
514
|
}));
|
|
507
515
|
expect(handleErrorSpy).not.toBeCalled();
|
|
@@ -512,43 +520,101 @@ describe('CallingClient Tests', function () {
|
|
|
512
520
|
}, _callee16);
|
|
513
521
|
})));
|
|
514
522
|
});
|
|
523
|
+
describe('Testing each cluster present withing host catalog', function () {
|
|
524
|
+
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'];
|
|
525
|
+
var checkCluster = /*#__PURE__*/function () {
|
|
526
|
+
var _ref17 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(mockServiceHosts, mockCatalog) {
|
|
527
|
+
var callingClient;
|
|
528
|
+
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
529
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
530
|
+
case 0:
|
|
531
|
+
webex.internal.services._hostCatalog = mockCatalog;
|
|
532
|
+
_context17.next = 3;
|
|
533
|
+
return (0, _CallingClient.createClient)(webex, {
|
|
534
|
+
logger: {
|
|
535
|
+
level: _types.LOGGER.INFO
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
case 3:
|
|
539
|
+
callingClient = _context17.sent;
|
|
540
|
+
expect(callingClient['mobiusClusters']).toStrictEqual(mockServiceHosts);
|
|
541
|
+
case 5:
|
|
542
|
+
case "end":
|
|
543
|
+
return _context17.stop();
|
|
544
|
+
}
|
|
545
|
+
}, _callee17);
|
|
546
|
+
}));
|
|
547
|
+
return function checkCluster(_x, _x2) {
|
|
548
|
+
return _ref17.apply(this, arguments);
|
|
549
|
+
};
|
|
550
|
+
}();
|
|
551
|
+
it.each(mobiusCluster)('%s', /*#__PURE__*/function () {
|
|
552
|
+
var _ref18 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(clusterName) {
|
|
553
|
+
return _regenerator.default.wrap(function _callee18$(_context18) {
|
|
554
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
555
|
+
case 0:
|
|
556
|
+
_context18.t0 = clusterName;
|
|
557
|
+
_context18.next = _context18.t0 === 'mobius-eu-central-1.prod.infra.webex.com' ? 3 : _context18.t0 === 'mobius-us-east-1.int.infra.webex.com' ? 5 : _context18.t0 === 'mobius-eu-central-1.int.infra.webex.com' ? 7 : 9;
|
|
558
|
+
break;
|
|
559
|
+
case 3:
|
|
560
|
+
checkCluster(_callingClientFixtures.mockEUServiceHosts, _callingClientFixtures.mockCatalogEU);
|
|
561
|
+
return _context18.abrupt("break", 10);
|
|
562
|
+
case 5:
|
|
563
|
+
checkCluster(_callingClientFixtures.mockIntServiceHosts, _callingClientFixtures.mockCatalogUSInt);
|
|
564
|
+
return _context18.abrupt("break", 10);
|
|
565
|
+
case 7:
|
|
566
|
+
checkCluster(_callingClientFixtures.mockEUIntServiceHosts, _callingClientFixtures.mockCatalogEUInt);
|
|
567
|
+
return _context18.abrupt("break", 10);
|
|
568
|
+
case 9:
|
|
569
|
+
return _context18.abrupt("break", 10);
|
|
570
|
+
case 10:
|
|
571
|
+
case "end":
|
|
572
|
+
return _context18.stop();
|
|
573
|
+
}
|
|
574
|
+
}, _callee18);
|
|
575
|
+
}));
|
|
576
|
+
return function (_x3) {
|
|
577
|
+
return _ref18.apply(this, arguments);
|
|
578
|
+
};
|
|
579
|
+
}());
|
|
580
|
+
});
|
|
515
581
|
describe('Network activity detection tests', function () {
|
|
516
582
|
var callingClient;
|
|
517
583
|
var line;
|
|
518
584
|
var reg;
|
|
519
|
-
var deRegSpy;
|
|
520
585
|
var restoreSpy;
|
|
586
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
587
|
+
var deRegSpy;
|
|
521
588
|
var restartRegisterSpy;
|
|
522
589
|
var registerSpy;
|
|
523
|
-
beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
524
|
-
return _regenerator.default.wrap(function
|
|
525
|
-
while (1) switch (
|
|
590
|
+
beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
|
|
591
|
+
return _regenerator.default.wrap(function _callee19$(_context19) {
|
|
592
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
526
593
|
case 0:
|
|
527
594
|
jest.useFakeTimers();
|
|
528
595
|
webex.request.mockResolvedValueOnce(_callingClientFixtures.ipPayload).mockResolvedValueOnce(_callingClientFixtures.regionPayload).mockResolvedValueOnce(_callingClientFixtures.discoveryPayload).mockResolvedValueOnce(_callingClientFixtures.registrationPayload);
|
|
529
|
-
|
|
596
|
+
_context19.next = 4;
|
|
530
597
|
return (0, _CallingClient.createClient)(webex, {
|
|
531
598
|
logger: {
|
|
532
599
|
level: _types.LOGGER.INFO
|
|
533
600
|
}
|
|
534
601
|
});
|
|
535
602
|
case 4:
|
|
536
|
-
callingClient =
|
|
603
|
+
callingClient = _context19.sent;
|
|
537
604
|
line = (0, _values.default)(callingClient.lineDict)[0];
|
|
538
605
|
reg = line.registration;
|
|
539
|
-
|
|
540
|
-
_context17.next = 10;
|
|
606
|
+
_context19.next = 9;
|
|
541
607
|
return line.register();
|
|
542
|
-
case
|
|
608
|
+
case 9:
|
|
543
609
|
deRegSpy = jest.spyOn(line.registration, 'deregister');
|
|
544
610
|
restoreSpy = jest.spyOn(reg, 'restorePreviousRegistration');
|
|
545
611
|
restartRegisterSpy = jest.spyOn(reg, 'restartRegistration');
|
|
546
612
|
registerSpy = jest.spyOn(reg, 'attemptRegistrationWithServers');
|
|
547
|
-
case
|
|
613
|
+
case 13:
|
|
548
614
|
case "end":
|
|
549
|
-
return
|
|
615
|
+
return _context19.stop();
|
|
550
616
|
}
|
|
551
|
-
},
|
|
617
|
+
}, _callee19);
|
|
552
618
|
})));
|
|
553
619
|
afterEach(function () {
|
|
554
620
|
jest.clearAllTimers();
|
|
@@ -558,18 +624,18 @@ describe('CallingClient Tests', function () {
|
|
|
558
624
|
callingClient = undefined;
|
|
559
625
|
jest.useRealTimers();
|
|
560
626
|
});
|
|
561
|
-
it('detect a network flap in mercury connection', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
562
|
-
return _regenerator.default.wrap(function
|
|
563
|
-
while (1) switch (
|
|
627
|
+
it('detect a network flap in mercury connection', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
|
|
628
|
+
return _regenerator.default.wrap(function _callee20$(_context20) {
|
|
629
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
564
630
|
case 0:
|
|
565
|
-
expect(line.
|
|
631
|
+
expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
|
|
566
632
|
|
|
567
633
|
/* Set mercury connection to be down and execute a delay of 2.5 seconds */
|
|
568
634
|
webex.internal.mercury.connected = false;
|
|
569
635
|
jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
|
|
570
636
|
|
|
571
637
|
/* We should be detecting the network flap */
|
|
572
|
-
expect(warnSpy).
|
|
638
|
+
expect(warnSpy).toBeCalledOnceWith('Network has flapped, waiting for mercury connection to be up', {
|
|
573
639
|
file: _constants.CALLING_CLIENT_FILE,
|
|
574
640
|
method: _constants.NETWORK_CHANGE_DETECTION_UTIL
|
|
575
641
|
});
|
|
@@ -577,32 +643,31 @@ describe('CallingClient Tests', function () {
|
|
|
577
643
|
/* Set mercury connection to be up and execute a delay of 2.5 seconds */
|
|
578
644
|
webex.internal.mercury.connected = true;
|
|
579
645
|
jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
|
|
580
|
-
|
|
646
|
+
_context20.next = 8;
|
|
581
647
|
return flushPromises();
|
|
582
648
|
case 8:
|
|
583
649
|
/* We should be detecting the network recovery */
|
|
584
|
-
expect(logSpy).
|
|
650
|
+
expect(logSpy).toBeCalledWith('Mercury connection is up again, re-registering with Webex Calling if needed', {
|
|
585
651
|
file: _constants.REGISTRATION_FILE,
|
|
586
652
|
method: 'handleConnectionRestoration'
|
|
587
653
|
});
|
|
588
|
-
expect(deRegSpy).toBeCalledWith();
|
|
589
654
|
expect(restoreSpy).toBeCalledWith('handleConnectionRestoration');
|
|
590
655
|
expect(restartRegisterSpy).toBeCalledWith('handleConnectionRestoration');
|
|
591
656
|
expect(webex.request).toBeCalledTimes(6);
|
|
592
657
|
expect(registerSpy).toBeCalledWith('handleConnectionRestoration', [reg.getActiveMobiusUrl()]);
|
|
593
658
|
expect(registerSpy).lastCalledWith('handleConnectionRestoration', [_callingClientFixtures.primaryUrl]);
|
|
594
|
-
case
|
|
659
|
+
case 14:
|
|
595
660
|
case "end":
|
|
596
|
-
return
|
|
661
|
+
return _context20.stop();
|
|
597
662
|
}
|
|
598
|
-
},
|
|
663
|
+
}, _callee20);
|
|
599
664
|
})));
|
|
600
|
-
it('Simulate a network flap with no active calls and re-verify registration: Restore Failure', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
665
|
+
it('Simulate a network flap with no active calls and re-verify registration: Restore Failure', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
601
666
|
var failurePayload, mockRegistrationBody, successPayload;
|
|
602
|
-
return _regenerator.default.wrap(function
|
|
603
|
-
while (1) switch (
|
|
667
|
+
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
668
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
604
669
|
case 0:
|
|
605
|
-
expect(line.
|
|
670
|
+
expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
|
|
606
671
|
failurePayload = {
|
|
607
672
|
statusCode: 500,
|
|
608
673
|
body: ''
|
|
@@ -627,41 +692,39 @@ describe('CallingClient Tests', function () {
|
|
|
627
692
|
/* Set mercury connection to be up and execute a delay of 2.5 seconds */
|
|
628
693
|
webex.internal.mercury.connected = true;
|
|
629
694
|
jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
|
|
630
|
-
|
|
695
|
+
_context21.next = 12;
|
|
631
696
|
return flushPromises();
|
|
632
697
|
case 12:
|
|
633
698
|
/* We should be detecting the network recovery */
|
|
634
|
-
expect(logSpy).toBeCalledWith('Mercury connection is up again,
|
|
699
|
+
expect(logSpy).toBeCalledWith('Mercury connection is up again, re-registering with Webex Calling if needed', {
|
|
635
700
|
file: _constants.REGISTRATION_FILE,
|
|
636
701
|
method: 'handleConnectionRestoration'
|
|
637
702
|
});
|
|
638
|
-
expect(
|
|
639
|
-
expect(
|
|
640
|
-
expect(restartRegisterSpy).toBeCalledWith('handleConnectionRestoration');
|
|
703
|
+
expect(restoreSpy).toBeCalledOnceWith('handleConnectionRestoration');
|
|
704
|
+
expect(restartRegisterSpy).toBeCalledOnceWith('handleConnectionRestoration');
|
|
641
705
|
expect(webex.request).toBeCalledTimes(6);
|
|
642
706
|
expect(registerSpy).toBeCalledWith('handleConnectionRestoration', [reg.getActiveMobiusUrl()]);
|
|
643
707
|
expect(registerSpy).lastCalledWith('handleConnectionRestoration', [_callingClientFixtures.primaryUrl]);
|
|
644
|
-
case
|
|
708
|
+
case 18:
|
|
645
709
|
case "end":
|
|
646
|
-
return
|
|
710
|
+
return _context21.stop();
|
|
647
711
|
}
|
|
648
|
-
},
|
|
712
|
+
}, _callee21);
|
|
649
713
|
})));
|
|
650
|
-
it('Simulate a network flap before initial registration is done', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
651
|
-
|
|
652
|
-
|
|
714
|
+
it('Simulate a network flap before initial registration is done', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
|
|
715
|
+
var handleConnectionRestoreSpy;
|
|
716
|
+
return _regenerator.default.wrap(function _callee22$(_context22) {
|
|
717
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
653
718
|
case 0:
|
|
654
|
-
|
|
655
|
-
reg.
|
|
656
|
-
reg.setActiveMobiusUrl(undefined);
|
|
657
|
-
jest.clearAllMocks();
|
|
719
|
+
handleConnectionRestoreSpy = jest.spyOn(reg, 'handleConnectionRestoration');
|
|
720
|
+
reg.setStatus(_types2.RegistrationStatus.IDLE);
|
|
658
721
|
|
|
659
722
|
/* Set mercury connection to be down and execute a delay of 2.5 seconds */
|
|
660
723
|
webex.internal.mercury.connected = false;
|
|
661
724
|
jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
|
|
662
725
|
|
|
663
726
|
/* We should be detecting the network flap */
|
|
664
|
-
expect(warnSpy).
|
|
727
|
+
expect(warnSpy).toBeCalledOnceWith('Network has flapped, waiting for mercury connection to be up', {
|
|
665
728
|
file: _constants.CALLING_CLIENT_FILE,
|
|
666
729
|
method: _constants.NETWORK_CHANGE_DETECTION_UTIL
|
|
667
730
|
});
|
|
@@ -669,11 +732,11 @@ describe('CallingClient Tests', function () {
|
|
|
669
732
|
/* Set mercury connection to be up and execute a delay of 2.5 seconds */
|
|
670
733
|
webex.internal.mercury.connected = true;
|
|
671
734
|
jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
|
|
672
|
-
|
|
735
|
+
_context22.next = 9;
|
|
673
736
|
return flushPromises();
|
|
674
|
-
case
|
|
737
|
+
case 9:
|
|
675
738
|
/* We should be detecting the network recovery */
|
|
676
|
-
expect(logSpy).toBeCalledWith('Mercury connection is up again,
|
|
739
|
+
expect(logSpy).not.toBeCalledWith('Mercury connection is up again, re-registering with Webex Calling if needed', {
|
|
677
740
|
file: _constants.REGISTRATION_FILE,
|
|
678
741
|
method: 'handleConnectionRestoration'
|
|
679
742
|
});
|
|
@@ -682,20 +745,18 @@ describe('CallingClient Tests', function () {
|
|
|
682
745
|
* When initial registration is not done, network flap
|
|
683
746
|
* will not trigger de-registration/registration
|
|
684
747
|
*/
|
|
685
|
-
expect(
|
|
686
|
-
|
|
687
|
-
expect(registerSpy).not.toBeCalled();
|
|
688
|
-
case 15:
|
|
748
|
+
expect(handleConnectionRestoreSpy).not.toBeCalledOnceWith();
|
|
749
|
+
case 11:
|
|
689
750
|
case "end":
|
|
690
|
-
return
|
|
751
|
+
return _context22.stop();
|
|
691
752
|
}
|
|
692
|
-
},
|
|
753
|
+
}, _callee22);
|
|
693
754
|
})));
|
|
694
|
-
it('Simulate a network flap with 1 active call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
695
|
-
return _regenerator.default.wrap(function
|
|
696
|
-
while (1) switch (
|
|
755
|
+
it('Simulate a network flap with 1 active call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
|
|
756
|
+
return _regenerator.default.wrap(function _callee23$(_context23) {
|
|
757
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
697
758
|
case 0:
|
|
698
|
-
expect(line.
|
|
759
|
+
expect(line.getStatus()).toEqual(_types2.RegistrationStatus.ACTIVE);
|
|
699
760
|
|
|
700
761
|
/** create a new call */
|
|
701
762
|
reg.callManager.createCall();
|
|
@@ -704,11 +765,11 @@ describe('CallingClient Tests', function () {
|
|
|
704
765
|
/* Set mercury connection to be down and execute a delay of 2.5 seconds */
|
|
705
766
|
webex.internal.mercury.connected = false;
|
|
706
767
|
jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
|
|
707
|
-
|
|
768
|
+
_context23.next = 7;
|
|
708
769
|
return flushPromises();
|
|
709
770
|
case 7:
|
|
710
771
|
/* We should be detecting the network flap */
|
|
711
|
-
expect(warnSpy).not.
|
|
772
|
+
expect(warnSpy).not.toBeCalledOnceWith('Network has flapped, waiting for mercury connection to be up', {
|
|
712
773
|
file: _constants.CALLING_CLIENT_FILE,
|
|
713
774
|
method: 'handleConnectionRestoration'
|
|
714
775
|
});
|
|
@@ -716,39 +777,39 @@ describe('CallingClient Tests', function () {
|
|
|
716
777
|
/* Set mercury connection to be up and execute a delay of 2.5 seconds */
|
|
717
778
|
webex.internal.mercury.connected = true;
|
|
718
779
|
jest.advanceTimersByTime(_constants.NETWORK_FLAP_TIMEOUT + 500);
|
|
719
|
-
|
|
780
|
+
_context23.next = 12;
|
|
720
781
|
return flushPromises();
|
|
721
782
|
case 12:
|
|
722
783
|
/* We should be detecting the network recovery */
|
|
723
|
-
expect(logSpy).not.
|
|
784
|
+
expect(logSpy).not.toBeCalledOnceWith('Mercury connection is up again, re-registering with Webex Calling if needed', {
|
|
724
785
|
file: _constants.REGISTRATION_FILE,
|
|
725
786
|
method: 'handleConnectionRestoration'
|
|
726
787
|
});
|
|
727
788
|
expect(registerSpy).not.toBeCalledWith(true);
|
|
728
789
|
case 14:
|
|
729
790
|
case "end":
|
|
730
|
-
return
|
|
791
|
+
return _context23.stop();
|
|
731
792
|
}
|
|
732
|
-
},
|
|
793
|
+
}, _callee23);
|
|
733
794
|
})));
|
|
734
795
|
});
|
|
735
796
|
describe('Line creation tests', function () {
|
|
736
797
|
var callingClient;
|
|
737
798
|
var line;
|
|
738
|
-
beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
739
|
-
return _regenerator.default.wrap(function
|
|
740
|
-
while (1) switch (
|
|
799
|
+
beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
|
|
800
|
+
return _regenerator.default.wrap(function _callee24$(_context24) {
|
|
801
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
741
802
|
case 0:
|
|
742
|
-
|
|
803
|
+
_context24.next = 2;
|
|
743
804
|
return (0, _CallingClient.createClient)(webex);
|
|
744
805
|
case 2:
|
|
745
|
-
callingClient =
|
|
806
|
+
callingClient = _context24.sent;
|
|
746
807
|
line = (0, _values.default)(callingClient.lineDict)[0];
|
|
747
808
|
case 4:
|
|
748
809
|
case "end":
|
|
749
|
-
return
|
|
810
|
+
return _context24.stop();
|
|
750
811
|
}
|
|
751
|
-
},
|
|
812
|
+
}, _callee24);
|
|
752
813
|
})));
|
|
753
814
|
afterEach(function () {
|
|
754
815
|
jest.clearAllTimers();
|
|
@@ -774,7 +835,7 @@ describe('CallingClient Tests', function () {
|
|
|
774
835
|
var mutex = new _asyncMutex.Mutex();
|
|
775
836
|
var userId = webex.internal.device.userId;
|
|
776
837
|
var clientDeviceUri = webex.internal.device.url;
|
|
777
|
-
var mobiusUris = (0,
|
|
838
|
+
var mobiusUris = (0, _Utils.filterMobiusUris)((0, _testUtil.getMobiusDiscoveryResponse)(), _registerFixtures.URL);
|
|
778
839
|
var primaryMobiusUris = jest.fn(function () {
|
|
779
840
|
return mobiusUris.primary;
|
|
780
841
|
});
|
|
@@ -783,25 +844,25 @@ describe('CallingClient Tests', function () {
|
|
|
783
844
|
});
|
|
784
845
|
var callingClient;
|
|
785
846
|
var line;
|
|
786
|
-
beforeAll( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
847
|
+
beforeAll( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
|
|
787
848
|
var calls;
|
|
788
|
-
return _regenerator.default.wrap(function
|
|
789
|
-
while (1) switch (
|
|
849
|
+
return _regenerator.default.wrap(function _callee25$(_context25) {
|
|
850
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
790
851
|
case 0:
|
|
791
|
-
|
|
852
|
+
_context25.next = 2;
|
|
792
853
|
return (0, _CallingClient.createClient)(webex);
|
|
793
854
|
case 2:
|
|
794
|
-
callingClient =
|
|
795
|
-
line = new _line.default(userId, clientDeviceUri,
|
|
855
|
+
callingClient = _context25.sent;
|
|
856
|
+
line = new _line.default(userId, clientDeviceUri, mutex, primaryMobiusUris(), backupMobiusUris(), _types.LOGGER.INFO);
|
|
796
857
|
calls = (0, _values.default)(callManager.getActiveCalls());
|
|
797
858
|
calls.forEach(function (call) {
|
|
798
859
|
call.end();
|
|
799
860
|
});
|
|
800
861
|
case 6:
|
|
801
862
|
case "end":
|
|
802
|
-
return
|
|
863
|
+
return _context25.stop();
|
|
803
864
|
}
|
|
804
|
-
},
|
|
865
|
+
}, _callee25);
|
|
805
866
|
})));
|
|
806
867
|
afterAll(function () {
|
|
807
868
|
callingClient.removeAllListeners();
|
|
@@ -884,23 +945,23 @@ describe('CallingClient Tests', function () {
|
|
|
884
945
|
describe('Call Session Event test', function () {
|
|
885
946
|
var mockOn = webex.internal.mercury.on;
|
|
886
947
|
var callingClient;
|
|
887
|
-
beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
888
|
-
return _regenerator.default.wrap(function
|
|
889
|
-
while (1) switch (
|
|
948
|
+
beforeEach( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
|
|
949
|
+
return _regenerator.default.wrap(function _callee26$(_context26) {
|
|
950
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
890
951
|
case 0:
|
|
891
|
-
|
|
952
|
+
_context26.next = 2;
|
|
892
953
|
return (0, _CallingClient.createClient)(webex, {
|
|
893
954
|
logger: {
|
|
894
955
|
level: _types.LOGGER.INFO
|
|
895
956
|
}
|
|
896
957
|
});
|
|
897
958
|
case 2:
|
|
898
|
-
callingClient =
|
|
959
|
+
callingClient = _context26.sent;
|
|
899
960
|
case 3:
|
|
900
961
|
case "end":
|
|
901
|
-
return
|
|
962
|
+
return _context26.stop();
|
|
902
963
|
}
|
|
903
|
-
},
|
|
964
|
+
}, _callee26);
|
|
904
965
|
})));
|
|
905
966
|
afterEach(function () {
|
|
906
967
|
callingClient.removeAllListeners();
|