@webex/calling 3.12.0-next.28 → 3.12.0-next.29
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/CallingClient/CallingClient.js +408 -194
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +119 -25
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/calling/call.js +11 -8
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +45 -4
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +53 -30
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +35 -0
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js +2 -0
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/constants.js +20 -2
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +16 -1
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/registration/register.js +694 -406
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +202 -21
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.js +41 -104
- package/dist/CallingClient/registration/webWorker.js.map +1 -1
- package/dist/CallingClient/registration/webWorker.test.js +39 -153
- package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js +1 -1
- package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
- package/dist/CallingClient/utils/constants.js +46 -0
- package/dist/CallingClient/utils/constants.js.map +1 -0
- package/dist/CallingClient/utils/index.js +63 -0
- package/dist/CallingClient/utils/index.js.map +1 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.js +122 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.js.map +1 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.test.js +211 -0
- package/dist/CallingClient/utils/mobiusSocketMapper.test.js.map +1 -0
- package/dist/CallingClient/utils/request.js +349 -0
- package/dist/CallingClient/utils/request.js.map +1 -0
- package/dist/CallingClient/utils/request.test.js +881 -0
- package/dist/CallingClient/utils/request.test.js.map +1 -0
- package/dist/CallingClient/utils/types.js +7 -0
- package/dist/CallingClient/utils/types.js.map +1 -0
- package/dist/CallingClient/utils/wsFeatureFlag.js +28 -0
- package/dist/CallingClient/utils/wsFeatureFlag.js.map +1 -0
- package/dist/CallingClient/utils/wsFeatureFlag.test.js +139 -0
- package/dist/CallingClient/utils/wsFeatureFlag.test.js.map +1 -0
- package/dist/Contacts/ContactsClient.test.js +3 -8
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Metrics/index.js +60 -0
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +356 -0
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +11 -1
- package/dist/Metrics/types.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/common/Utils.js +136 -40
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/testUtil.js +8 -4
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js +2 -0
- package/dist/common/types.js.map +1 -1
- package/dist/mobius-socket/config.js +24 -0
- package/dist/mobius-socket/config.js.map +1 -0
- package/dist/mobius-socket/errors.js +150 -0
- package/dist/mobius-socket/errors.js.map +1 -0
- package/dist/mobius-socket/index.js +57 -0
- package/dist/mobius-socket/index.js.map +1 -0
- package/dist/mobius-socket/mobius-socket-events.test.js +485 -0
- package/dist/mobius-socket/mobius-socket-events.test.js.map +1 -0
- package/dist/mobius-socket/mobius-socket.js +804 -0
- package/dist/mobius-socket/mobius-socket.js.map +1 -0
- package/dist/mobius-socket/mobius-socket.test.js +1833 -0
- package/dist/mobius-socket/mobius-socket.test.js.map +1 -0
- package/dist/mobius-socket/socket/constants.js +34 -0
- package/dist/mobius-socket/socket/constants.js.map +1 -0
- package/dist/mobius-socket/socket/index.js +15 -0
- package/dist/mobius-socket/socket/index.js.map +1 -0
- package/dist/mobius-socket/socket/socket-base.js +604 -0
- package/dist/mobius-socket/socket/socket-base.js.map +1 -0
- package/dist/mobius-socket/socket/socket.js +19 -0
- package/dist/mobius-socket/socket/socket.js.map +1 -0
- package/dist/mobius-socket/socket/socket.shim.js +26 -0
- package/dist/mobius-socket/socket/socket.shim.js.map +1 -0
- package/dist/mobius-socket/socket/types.js +7 -0
- package/dist/mobius-socket/socket/types.js.map +1 -0
- package/dist/mobius-socket/socket.test.js +727 -0
- package/dist/mobius-socket/socket.test.js.map +1 -0
- package/dist/mobius-socket/test/mocha-helpers.js +23 -0
- package/dist/mobius-socket/test/mocha-helpers.js.map +1 -0
- package/dist/mobius-socket/test/promise-tick.js +28 -0
- package/dist/mobius-socket/test/promise-tick.js.map +1 -0
- package/dist/mobius-socket/types.js +7 -0
- package/dist/mobius-socket/types.js.map +1 -0
- package/dist/module/CallingClient/CallingClient.js +102 -5
- package/dist/module/CallingClient/calling/call.js +9 -6
- package/dist/module/CallingClient/calling/callManager.js +27 -7
- package/dist/module/CallingClient/calling/types.js +2 -0
- package/dist/module/CallingClient/constants.js +18 -0
- package/dist/module/CallingClient/registration/register.js +226 -62
- package/dist/module/CallingClient/registration/webWorker.js +42 -61
- package/dist/module/CallingClient/registration/webWorkerStr.js +47 -82
- package/dist/module/CallingClient/utils/constants.js +30 -0
- package/dist/module/CallingClient/utils/index.js +5 -0
- package/dist/module/CallingClient/utils/mobiusSocketMapper.js +72 -0
- package/dist/module/CallingClient/utils/request.js +162 -0
- package/dist/module/CallingClient/utils/types.js +1 -0
- package/dist/module/CallingClient/utils/wsFeatureFlag.js +12 -0
- package/dist/module/Metrics/index.js +46 -0
- package/dist/module/Metrics/types.js +10 -0
- package/dist/module/common/Utils.js +51 -8
- package/dist/module/common/testUtil.js +5 -1
- package/dist/module/common/types.js +2 -0
- package/dist/module/mobius-socket/config.js +15 -0
- package/dist/module/mobius-socket/errors.js +64 -0
- package/dist/module/mobius-socket/index.js +24 -0
- package/dist/module/mobius-socket/mobius-socket.js +571 -0
- package/dist/module/mobius-socket/socket/constants.js +10 -0
- package/dist/module/mobius-socket/socket/index.js +4 -0
- package/dist/module/mobius-socket/socket/socket-base.js +368 -0
- package/dist/module/mobius-socket/socket/socket.js +9 -0
- package/dist/module/mobius-socket/socket/socket.shim.js +12 -0
- package/dist/module/mobius-socket/socket/types.js +1 -0
- package/dist/module/mobius-socket/types.js +1 -0
- package/dist/types/CallingClient/CallingClient.d.ts +5 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts +1 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/callManager.d.ts +3 -2
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +21 -9
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +18 -0
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +6 -0
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +3 -1
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts +1 -1
- package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -1
- package/dist/types/CallingClient/utils/constants.d.ts +30 -0
- package/dist/types/CallingClient/utils/constants.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/index.d.ts +6 -0
- package/dist/types/CallingClient/utils/index.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/mobiusSocketMapper.d.ts +5 -0
- package/dist/types/CallingClient/utils/mobiusSocketMapper.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/request.d.ts +23 -0
- package/dist/types/CallingClient/utils/request.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/types.d.ts +29 -0
- package/dist/types/CallingClient/utils/types.d.ts.map +1 -0
- package/dist/types/CallingClient/utils/wsFeatureFlag.d.ts +4 -0
- package/dist/types/CallingClient/utils/wsFeatureFlag.d.ts.map +1 -0
- package/dist/types/Metrics/index.d.ts.map +1 -1
- package/dist/types/Metrics/types.d.ts +11 -1
- package/dist/types/Metrics/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +24 -0
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts +8 -2
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +4 -1
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +3 -0
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/mobius-socket/config.d.ts +17 -0
- package/dist/types/mobius-socket/config.d.ts.map +1 -0
- package/dist/types/mobius-socket/errors.d.ts +32 -0
- package/dist/types/mobius-socket/errors.d.ts.map +1 -0
- package/dist/types/mobius-socket/index.d.ts +14 -0
- package/dist/types/mobius-socket/index.d.ts.map +1 -0
- package/dist/types/mobius-socket/mobius-socket.d.ts +48 -0
- package/dist/types/mobius-socket/mobius-socket.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/constants.d.ts +11 -0
- package/dist/types/mobius-socket/socket/constants.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/index.d.ts +5 -0
- package/dist/types/mobius-socket/socket/index.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket-base.d.ts +43 -0
- package/dist/types/mobius-socket/socket/socket-base.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket.d.ts +6 -0
- package/dist/types/mobius-socket/socket/socket.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket.shim.d.ts +6 -0
- package/dist/types/mobius-socket/socket/socket.shim.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/types.d.ts +61 -0
- package/dist/types/mobius-socket/socket/types.d.ts.map +1 -0
- package/dist/types/mobius-socket/types.d.ts +21 -0
- package/dist/types/mobius-socket/types.d.ts.map +1 -0
- package/package.json +16 -2
- package/src/mobius-socket/socket/socket.shim.ts +22 -0
- package/src/mobius-socket/socket/socket.ts +14 -0
|
@@ -36,9 +36,20 @@ var _registerFixtures = require("./registration/registerFixtures");
|
|
|
36
36
|
var _constants2 = require("../common/constants");
|
|
37
37
|
var _types4 = require("../Metrics/types");
|
|
38
38
|
var _windowsChromiumIceWarmupUtils = _interopRequireDefault(require("./windowsChromiumIceWarmupUtils"));
|
|
39
|
+
var _request = require("./utils/request");
|
|
39
40
|
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 _t4 in e) "default" !== _t4 && {}.hasOwnProperty.call(e, _t4) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t4)) && (i.get || i.set) ? o(f, _t4, i) : f[_t4] = e[_t4]); return f; })(e, t); }
|
|
40
41
|
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
42
|
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 */
|
|
43
|
+
jest.mock('../mobius-socket', function () {
|
|
44
|
+
return {
|
|
45
|
+
getMobiusSocketInstance: jest.fn().mockReturnValue({
|
|
46
|
+
sendWssRequest: jest.fn(),
|
|
47
|
+
connect: jest.fn(),
|
|
48
|
+
on: jest.fn(),
|
|
49
|
+
off: jest.fn()
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
});
|
|
42
53
|
global.crypto = {
|
|
43
54
|
randomUUID: function randomUUID() {
|
|
44
55
|
return '12345678-1234-5678-1234-567812345678';
|
|
@@ -64,6 +75,12 @@ describe('CallingClient Tests', function () {
|
|
|
64
75
|
originalProcessNextTick(resolve);
|
|
65
76
|
});
|
|
66
77
|
}
|
|
78
|
+
beforeEach(function () {
|
|
79
|
+
_request.APIRequest.resetInstance();
|
|
80
|
+
_request.APIRequest.getInstance({
|
|
81
|
+
webex: webex
|
|
82
|
+
});
|
|
83
|
+
});
|
|
67
84
|
describe('CallingClient pick Mobius cluster using Service Host Tests', function () {
|
|
68
85
|
afterAll(function () {
|
|
69
86
|
callManager.removeAllListeners();
|
|
@@ -1060,14 +1077,25 @@ describe('CallingClient Tests', function () {
|
|
|
1060
1077
|
callSessionCallback(_callRecordFixtures.MOCK_MULTIPLE_SESSIONS_EVENT);
|
|
1061
1078
|
});
|
|
1062
1079
|
});
|
|
1063
|
-
describe('
|
|
1080
|
+
describe('Mobius async_event routing', function () {
|
|
1064
1081
|
var callingClient;
|
|
1065
|
-
var
|
|
1066
|
-
var
|
|
1082
|
+
var asyncEventCallback;
|
|
1083
|
+
var mobiusSocketMock;
|
|
1067
1084
|
beforeEach(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30() {
|
|
1085
|
+
var asyncEventOnCall;
|
|
1068
1086
|
return _regenerator.default.wrap(function (_context30) {
|
|
1069
1087
|
while (1) switch (_context30.prev = _context30.next) {
|
|
1070
1088
|
case 0:
|
|
1089
|
+
webex.internal.device.features.developer.get = jest.fn().mockReturnValue({
|
|
1090
|
+
value: true
|
|
1091
|
+
});
|
|
1092
|
+
_request.APIRequest.resetInstance();
|
|
1093
|
+
_request.APIRequest.getInstance({
|
|
1094
|
+
webex: webex
|
|
1095
|
+
});
|
|
1096
|
+
mobiusSocketMock = jest.requireMock('../mobius-socket').getMobiusSocketInstance(webex);
|
|
1097
|
+
mobiusSocketMock.on.mockClear();
|
|
1098
|
+
mobiusSocketMock.off.mockClear();
|
|
1071
1099
|
_context30.next = 1;
|
|
1072
1100
|
return (0, _CallingClient.createClient)(webex, {
|
|
1073
1101
|
logger: {
|
|
@@ -1076,9 +1104,10 @@ describe('CallingClient Tests', function () {
|
|
|
1076
1104
|
});
|
|
1077
1105
|
case 1:
|
|
1078
1106
|
callingClient = _context30.sent;
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1107
|
+
asyncEventOnCall = mobiusSocketMock.on.mock.calls.find(function (call) {
|
|
1108
|
+
return call[0] === 'event:async_event';
|
|
1109
|
+
});
|
|
1110
|
+
asyncEventCallback = asyncEventOnCall[1];
|
|
1082
1111
|
case 2:
|
|
1083
1112
|
case "end":
|
|
1084
1113
|
return _context30.stop();
|
|
@@ -1087,11 +1116,76 @@ describe('CallingClient Tests', function () {
|
|
|
1087
1116
|
})));
|
|
1088
1117
|
afterEach(function () {
|
|
1089
1118
|
callingClient.removeAllListeners();
|
|
1119
|
+
callManager.removeAllListeners();
|
|
1120
|
+
webex.internal.device.features.developer.get = jest.fn().mockReturnValue({
|
|
1121
|
+
value: false
|
|
1122
|
+
});
|
|
1090
1123
|
});
|
|
1091
|
-
it('
|
|
1092
|
-
var
|
|
1124
|
+
it('routes mobius.* async events to callManager', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
|
|
1125
|
+
var callEventSpy;
|
|
1093
1126
|
return _regenerator.default.wrap(function (_context31) {
|
|
1094
1127
|
while (1) switch (_context31.prev = _context31.next) {
|
|
1128
|
+
case 0:
|
|
1129
|
+
callEventSpy = jest.spyOn(callingClient['callManager'], 'dequeueWsEvents').mockImplementation(function () {
|
|
1130
|
+
return undefined;
|
|
1131
|
+
});
|
|
1132
|
+
_context31.next = 1;
|
|
1133
|
+
return asyncEventCallback({
|
|
1134
|
+
type: 'async_event',
|
|
1135
|
+
data: {
|
|
1136
|
+
eventType: 'mobius.call',
|
|
1137
|
+
callId: 'fcf86aa5-5539-4c9f-8b72-667786ae9b6c',
|
|
1138
|
+
callUrl: 'https://mobius-a.wbx2.com/api/v1/calling/web/devices/d1/calls/c1',
|
|
1139
|
+
deviceId: 'd1',
|
|
1140
|
+
correlationId: 'corr-1'
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
case 1:
|
|
1144
|
+
expect(callEventSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
1145
|
+
type: 'async_event',
|
|
1146
|
+
data: expect.objectContaining({
|
|
1147
|
+
eventType: 'mobius.call'
|
|
1148
|
+
})
|
|
1149
|
+
}));
|
|
1150
|
+
case 2:
|
|
1151
|
+
case "end":
|
|
1152
|
+
return _context31.stop();
|
|
1153
|
+
}
|
|
1154
|
+
}, _callee31);
|
|
1155
|
+
})));
|
|
1156
|
+
});
|
|
1157
|
+
describe('getDevices', function () {
|
|
1158
|
+
var callingClient;
|
|
1159
|
+
var primaryMobius = 'https://mobius.primary/api/v1/calling/web/';
|
|
1160
|
+
var backupMobius = 'https://mobius.backup/api/v1/calling/web/';
|
|
1161
|
+
beforeEach(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
|
|
1162
|
+
return _regenerator.default.wrap(function (_context32) {
|
|
1163
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
1164
|
+
case 0:
|
|
1165
|
+
_context32.next = 1;
|
|
1166
|
+
return (0, _CallingClient.createClient)(webex, {
|
|
1167
|
+
logger: {
|
|
1168
|
+
level: _types.LOGGER.INFO
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1171
|
+
case 1:
|
|
1172
|
+
callingClient = _context32.sent;
|
|
1173
|
+
callingClient.primaryMobiusUris = [primaryMobius];
|
|
1174
|
+
callingClient.backupMobiusUris = [backupMobius];
|
|
1175
|
+
webex.request.mockClear();
|
|
1176
|
+
case 2:
|
|
1177
|
+
case "end":
|
|
1178
|
+
return _context32.stop();
|
|
1179
|
+
}
|
|
1180
|
+
}, _callee32);
|
|
1181
|
+
})));
|
|
1182
|
+
afterEach(function () {
|
|
1183
|
+
callingClient.removeAllListeners();
|
|
1184
|
+
});
|
|
1185
|
+
it('fetches devices for the provided userId', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
|
|
1186
|
+
var devices, responsePayload, response;
|
|
1187
|
+
return _regenerator.default.wrap(function (_context33) {
|
|
1188
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
1095
1189
|
case 0:
|
|
1096
1190
|
devices = [{
|
|
1097
1191
|
deviceId: 'device-1',
|
|
@@ -1109,10 +1203,10 @@ describe('CallingClient Tests', function () {
|
|
|
1109
1203
|
}
|
|
1110
1204
|
};
|
|
1111
1205
|
webex.request.mockResolvedValue(responsePayload);
|
|
1112
|
-
|
|
1206
|
+
_context33.next = 1;
|
|
1113
1207
|
return callingClient.getDevices('user-123');
|
|
1114
1208
|
case 1:
|
|
1115
|
-
response =
|
|
1209
|
+
response = _context33.sent;
|
|
1116
1210
|
expect(webex.request).toHaveBeenCalledWith({
|
|
1117
1211
|
uri: 'https://mobius.primary/api/v1/calling/web/devices?userid=user-123',
|
|
1118
1212
|
method: _types2.HTTP_METHODS.GET,
|
|
@@ -1122,14 +1216,14 @@ describe('CallingClient Tests', function () {
|
|
|
1122
1216
|
expect(response).toEqual(devices);
|
|
1123
1217
|
case 2:
|
|
1124
1218
|
case "end":
|
|
1125
|
-
return
|
|
1219
|
+
return _context33.stop();
|
|
1126
1220
|
}
|
|
1127
|
-
},
|
|
1221
|
+
}, _callee33);
|
|
1128
1222
|
})));
|
|
1129
|
-
it('falls back to backup Mobius when primary fails', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1223
|
+
it('falls back to backup Mobius when primary fails', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
|
|
1130
1224
|
var devices, failurePayload, responsePayload, response, requestCalls;
|
|
1131
|
-
return _regenerator.default.wrap(function (
|
|
1132
|
-
while (1) switch (
|
|
1225
|
+
return _regenerator.default.wrap(function (_context34) {
|
|
1226
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
1133
1227
|
case 0:
|
|
1134
1228
|
devices = [{
|
|
1135
1229
|
deviceId: 'device-2',
|
|
@@ -1150,10 +1244,10 @@ describe('CallingClient Tests', function () {
|
|
|
1150
1244
|
}
|
|
1151
1245
|
};
|
|
1152
1246
|
webex.request.mockRejectedValueOnce(failurePayload).mockResolvedValueOnce(responsePayload);
|
|
1153
|
-
|
|
1247
|
+
_context34.next = 1;
|
|
1154
1248
|
return callingClient.getDevices('user-123');
|
|
1155
1249
|
case 1:
|
|
1156
|
-
response =
|
|
1250
|
+
response = _context34.sent;
|
|
1157
1251
|
requestCalls = webex.request.mock.calls;
|
|
1158
1252
|
expect(requestCalls[0][0]).toEqual({
|
|
1159
1253
|
uri: 'https://mobius.primary/api/v1/calling/web/devices?userid=user-123',
|
|
@@ -1170,9 +1264,9 @@ describe('CallingClient Tests', function () {
|
|
|
1170
1264
|
expect(response).toEqual(devices);
|
|
1171
1265
|
case 2:
|
|
1172
1266
|
case "end":
|
|
1173
|
-
return
|
|
1267
|
+
return _context34.stop();
|
|
1174
1268
|
}
|
|
1175
|
-
},
|
|
1269
|
+
}, _callee34);
|
|
1176
1270
|
})));
|
|
1177
1271
|
});
|
|
1178
1272
|
describe('windowsChromiumIceWarmup', function () {
|
|
@@ -1248,17 +1342,17 @@ describe('CallingClient Tests', function () {
|
|
|
1248
1342
|
afterAll(function () {
|
|
1249
1343
|
global.RTCPeerConnection = origRTCPeerConnection;
|
|
1250
1344
|
});
|
|
1251
|
-
it('should complete without throwing', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1252
|
-
return _regenerator.default.wrap(function (
|
|
1253
|
-
while (1) switch (
|
|
1345
|
+
it('should complete without throwing', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
|
|
1346
|
+
return _regenerator.default.wrap(function (_context35) {
|
|
1347
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
1254
1348
|
case 0:
|
|
1255
|
-
|
|
1349
|
+
_context35.next = 1;
|
|
1256
1350
|
return expect((0, _windowsChromiumIceWarmupUtils.default)({})).resolves.not.toThrow();
|
|
1257
1351
|
case 1:
|
|
1258
1352
|
case "end":
|
|
1259
|
-
return
|
|
1353
|
+
return _context35.stop();
|
|
1260
1354
|
}
|
|
1261
|
-
},
|
|
1355
|
+
}, _callee35);
|
|
1262
1356
|
})));
|
|
1263
1357
|
});
|
|
1264
1358
|
});
|