@webex/calling 3.3.1 → 3.4.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
- package/dist/CallingClient/calling/call.js +5 -3
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +17 -15
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/constants.js +5 -8
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/Contacts/ContactsClient.js +261 -292
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +74 -12
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Contacts/constants.js +3 -1
- package/dist/Contacts/constants.js.map +1 -1
- package/dist/Contacts/contactFixtures.js +164 -48
- package/dist/Contacts/contactFixtures.js.map +1 -1
- package/dist/Contacts/types.js.map +1 -1
- package/dist/Metrics/index.js +9 -9
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +37 -10
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/common/Utils.js +8 -8
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +25 -1
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/constants.js +6 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/testUtil.js +24 -6
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js +1 -0
- package/dist/common/types.js.map +1 -1
- package/dist/module/CallingClient/calling/call.js +6 -4
- package/dist/module/CallingClient/constants.js +4 -6
- package/dist/module/Contacts/ContactsClient.js +65 -58
- package/dist/module/Contacts/constants.js +2 -0
- package/dist/module/Contacts/contactFixtures.js +198 -31
- package/dist/module/Metrics/index.js +9 -9
- package/dist/module/common/Utils.js +7 -8
- package/dist/module/common/constants.js +5 -0
- package/dist/module/common/testUtil.js +24 -4
- package/dist/module/common/types.js +1 -0
- package/dist/types/CallingClient/calling/CallerId/types.d.ts +1 -23
- package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +3 -5
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/Contacts/ContactsClient.d.ts +1 -1
- package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
- package/dist/types/Contacts/constants.d.ts +2 -0
- package/dist/types/Contacts/constants.d.ts.map +1 -1
- package/dist/types/Contacts/contactFixtures.d.ts +99 -39
- package/dist/types/Contacts/contactFixtures.d.ts.map +1 -1
- package/dist/types/Contacts/types.d.ts +6 -13
- package/dist/types/Contacts/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +1 -5
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts +1 -0
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/constants.d.ts +5 -0
- package/dist/types/common/constants.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +20 -4
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +56 -25
- package/dist/types/common/types.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -10,7 +10,7 @@ var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/objec
|
|
|
10
10
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
11
11
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
12
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
13
|
-
var
|
|
13
|
+
var InternalMediaCoreModule = _interopRequireWildcard(require("@webex/internal-media-core"));
|
|
14
14
|
var _webMediaEffects = require("@webex/web-media-effects");
|
|
15
15
|
var _types = require("../../Errors/types");
|
|
16
16
|
var _Utils = _interopRequireWildcard(require("../../common/Utils"));
|
|
@@ -33,7 +33,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
33
33
|
|
|
34
34
|
jest.mock('@webex/internal-media-core');
|
|
35
35
|
var webex = (0, _testUtil.getTestUtilsWebex)();
|
|
36
|
-
var
|
|
36
|
+
var mockInternalMediaCoreModule = InternalMediaCoreModule;
|
|
37
37
|
var defaultServiceIndicator = _types3.ServiceIndicator.CALLING;
|
|
38
38
|
var activeUrl = 'FakeActiveUrl';
|
|
39
39
|
var mockLineId = 'e4e8ee2a-a154-4e52-8f11-ef4cde2dce72';
|
|
@@ -93,9 +93,11 @@ describe('Call Tests', function () {
|
|
|
93
93
|
var roapMediaConnectionConfig = {
|
|
94
94
|
skipInactiveTransceivers: true,
|
|
95
95
|
iceServers: [],
|
|
96
|
+
iceCandidatesTimeout: _constants.ICE_CANDIDATES_TIMEOUT,
|
|
96
97
|
sdpMunging: {
|
|
97
98
|
convertPort9to0: true,
|
|
98
|
-
addContentSlides: false
|
|
99
|
+
addContentSlides: false,
|
|
100
|
+
copyClineToSessionLevel: true
|
|
99
101
|
}
|
|
100
102
|
};
|
|
101
103
|
var roapMediaConnectionOptions = {
|
|
@@ -347,7 +349,7 @@ describe('Call Tests', function () {
|
|
|
347
349
|
bnrMetricSpy = jest.spyOn(call['metricManager'], 'submitBNRMetric');
|
|
348
350
|
call.dial(localAudioStream);
|
|
349
351
|
expect(mockTrack.enabled).toEqual(true);
|
|
350
|
-
expect(
|
|
352
|
+
expect(mockInternalMediaCoreModule.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
|
|
351
353
|
expect(call['mediaStateMachine'].state.value).toBe('S_SEND_ROAP_OFFER');
|
|
352
354
|
expect(bnrMetricSpy).toBeCalledOnceWith(_types4.METRIC_EVENT.BNR_ENABLED, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId());
|
|
353
355
|
|
|
@@ -386,7 +388,7 @@ describe('Call Tests', function () {
|
|
|
386
388
|
bnrMetricSpy = jest.spyOn(call['metricManager'], 'submitBNRMetric');
|
|
387
389
|
call.answer(localAudioStream);
|
|
388
390
|
expect(mockTrack.enabled).toEqual(true);
|
|
389
|
-
expect(
|
|
391
|
+
expect(mockInternalMediaCoreModule.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
|
|
390
392
|
expect(call['callStateMachine'].state.value).toBe('S_IDLE');
|
|
391
393
|
expect(warnSpy).toBeCalledOnceWith("Call cannot be answered because the state is : S_IDLE", {
|
|
392
394
|
file: 'call',
|
|
@@ -425,7 +427,7 @@ describe('Call Tests', function () {
|
|
|
425
427
|
call = (0, _call.createCall)(activeUrl, webex, dest, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator);
|
|
426
428
|
call.dial(localAudioStream);
|
|
427
429
|
expect(mockTrack.enabled).toEqual(true);
|
|
428
|
-
expect(
|
|
430
|
+
expect(mockInternalMediaCoreModule.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
|
|
429
431
|
expect(call['mediaStateMachine'].state.value).toBe('S_SEND_ROAP_OFFER');
|
|
430
432
|
updateLocalTracksSpy = jest.spyOn(call['mediaConnection'], 'updateLocalTracks');
|
|
431
433
|
bnrMetricSpy = jest.spyOn(call['metricManager'], 'submitBNRMetric');
|
|
@@ -434,8 +436,8 @@ describe('Call Tests', function () {
|
|
|
434
436
|
|
|
435
437
|
/* Checking if listeners on the localAudioStream have been registered */
|
|
436
438
|
expect(onStreamSpy).toBeCalledTimes(2);
|
|
437
|
-
expect(onStreamSpy).toBeCalledWith(
|
|
438
|
-
expect(onStreamSpy).toBeCalledWith(
|
|
439
|
+
expect(onStreamSpy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
|
|
440
|
+
expect(onStreamSpy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
|
|
439
441
|
bnrMetricSpy.mockClear();
|
|
440
442
|
/* Invoking the callback function to trigger EffectAdded event to simulate adding effect to the stream */
|
|
441
443
|
onStreamSpy.mock.calls[1][1](mockEffect);
|
|
@@ -468,8 +470,8 @@ describe('Call Tests', function () {
|
|
|
468
470
|
case 35:
|
|
469
471
|
/* Checks for switching off the listeners on call disconnect */
|
|
470
472
|
expect(offStreamSpy).toBeCalledTimes(2);
|
|
471
|
-
expect(offStreamSpy).toBeCalledWith(
|
|
472
|
-
expect(offStreamSpy).toBeCalledWith(
|
|
473
|
+
expect(offStreamSpy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
|
|
474
|
+
expect(offStreamSpy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
|
|
473
475
|
expect(offEffectSpy).toBeCalledWith(_webMediaEffects.EffectEvent.Enabled, expect.any(Function));
|
|
474
476
|
expect(offEffectSpy).toBeCalledWith(_webMediaEffects.EffectEvent.Disabled, expect.any(Function));
|
|
475
477
|
case 40:
|
|
@@ -573,8 +575,8 @@ describe('Call Tests', function () {
|
|
|
573
575
|
call.dial(localAudioStream);
|
|
574
576
|
expect(mockTrack.enabled).toEqual(true);
|
|
575
577
|
expect(onStream1Spy).toBeCalledTimes(2);
|
|
576
|
-
expect(onStream1Spy).toBeCalledWith(
|
|
577
|
-
expect(onStream1Spy).toBeCalledWith(
|
|
578
|
+
expect(onStream1Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
|
|
579
|
+
expect(onStream1Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
|
|
578
580
|
var mockTrack2 = {
|
|
579
581
|
enabled: true
|
|
580
582
|
};
|
|
@@ -592,9 +594,9 @@ describe('Call Tests', function () {
|
|
|
592
594
|
audio: mockTrack2
|
|
593
595
|
});
|
|
594
596
|
expect(call['localAudioStream']).toEqual(localAudioStream2);
|
|
595
|
-
expect(offStream1Spy).toBeCalledWith(
|
|
596
|
-
expect(onStream2Spy).toBeCalledWith(
|
|
597
|
-
expect(onStream2Spy).toBeCalledWith(
|
|
597
|
+
expect(offStream1Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
|
|
598
|
+
expect(onStream2Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
|
|
599
|
+
expect(onStream2Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
|
|
598
600
|
});
|
|
599
601
|
it('update media with invalid stream', function () {
|
|
600
602
|
var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
|