@webex/calling 3.12.0-next.26 → 3.12.0-next.27
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/call.js +21 -0
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +536 -441
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/module/CallingClient/calling/call.js +15 -0
- package/dist/types/CallingClient/calling/call.d.ts +1 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,6 +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 _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
|
|
12
12
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
13
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
13
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
14
15
|
var InternalMediaCoreModule = _interopRequireWildcard(require("@webex/internal-media-core"));
|
|
15
16
|
var _mediaHelpers = require("@webex/media-helpers");
|
|
@@ -428,10 +429,104 @@ describe('Call Tests', function () {
|
|
|
428
429
|
}
|
|
429
430
|
}, _callee8);
|
|
430
431
|
})));
|
|
431
|
-
it('
|
|
432
|
-
var
|
|
432
|
+
it('sends connect before ROAP answer when inbound offer is delayed', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee9() {
|
|
433
|
+
var _mock$calls$find;
|
|
434
|
+
var mockStream, localAudioStream, call, handleOutgoingCallConnectSpy, delayedOffer, sendCallStateMachineEvtSpy, sendMediaStateMachineEvtSpy, roapListener;
|
|
433
435
|
return _regenerator.default.wrap(function (_context9) {
|
|
434
436
|
while (1) switch (_context9.prev = _context9.next) {
|
|
437
|
+
case 0:
|
|
438
|
+
mockStream = {
|
|
439
|
+
outputStream: {
|
|
440
|
+
getAudioTracks: jest.fn().mockReturnValue([mockTrack])
|
|
441
|
+
},
|
|
442
|
+
on: jest.fn(),
|
|
443
|
+
getEffectByKind: jest.fn().mockImplementation(function () {
|
|
444
|
+
return mockEffect;
|
|
445
|
+
})
|
|
446
|
+
};
|
|
447
|
+
localAudioStream = mockStream;
|
|
448
|
+
call = (0, _call.createCall)(activeUrl, webex, _types3.CallDirection.INBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator, dest);
|
|
449
|
+
webex.request.mockReturnValue({
|
|
450
|
+
statusCode: 200,
|
|
451
|
+
body: {
|
|
452
|
+
callId: 'mock-call-id'
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
call.sendCallStateMachineEvt({
|
|
456
|
+
type: 'E_RECV_CALL_SETUP',
|
|
457
|
+
data: {
|
|
458
|
+
seq: 1,
|
|
459
|
+
messageType: 'OFFER'
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_PROGRESS');
|
|
463
|
+
_context9.next = 1;
|
|
464
|
+
return call.answer(localAudioStream);
|
|
465
|
+
case 1:
|
|
466
|
+
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_CONNECT');
|
|
467
|
+
|
|
468
|
+
// Connect is attempted by answer(), but is deferred because offer is not buffered yet.
|
|
469
|
+
handleOutgoingCallConnectSpy = jest.spyOn(call, 'handleOutgoingCallConnect');
|
|
470
|
+
expect(call['connectPending']).toBe(true);
|
|
471
|
+
expect(call['mediaConnection'].roapMessageReceived).not.toHaveBeenCalled();
|
|
472
|
+
delayedOffer = {
|
|
473
|
+
seq: 1,
|
|
474
|
+
messageType: 'OFFER',
|
|
475
|
+
sdp: 'v=0',
|
|
476
|
+
version: 1
|
|
477
|
+
};
|
|
478
|
+
call.sendMediaStateMachineEvt({
|
|
479
|
+
type: 'E_RECV_ROAP_OFFER',
|
|
480
|
+
data: delayedOffer
|
|
481
|
+
});
|
|
482
|
+
_context9.next = 2;
|
|
483
|
+
return (0, _testUtil.flushPromises)(2);
|
|
484
|
+
case 2:
|
|
485
|
+
expect(call['mediaConnection'].roapMessageReceived).toHaveBeenCalledWith(delayedOffer);
|
|
486
|
+
sendCallStateMachineEvtSpy = jest.spyOn(call, 'sendCallStateMachineEvt');
|
|
487
|
+
sendMediaStateMachineEvtSpy = jest.spyOn(call, 'sendMediaStateMachineEvt');
|
|
488
|
+
roapListener = (_mock$calls$find = call['mediaConnection'].on.mock.calls.find(function (_ref0) {
|
|
489
|
+
var _ref1 = (0, _slicedToArray2.default)(_ref0, 1),
|
|
490
|
+
eventName = _ref1[0];
|
|
491
|
+
return eventName === InternalMediaCoreModule.MediaConnectionEventNames.ROAP_MESSAGE_TO_SEND;
|
|
492
|
+
})) === null || _mock$calls$find === void 0 ? void 0 : _mock$calls$find[1];
|
|
493
|
+
expect(roapListener).toBeDefined();
|
|
494
|
+
_context9.next = 3;
|
|
495
|
+
return roapListener({
|
|
496
|
+
roapMessage: {
|
|
497
|
+
messageType: 'ANSWER',
|
|
498
|
+
sdp: 'v=0',
|
|
499
|
+
seq: 1,
|
|
500
|
+
version: 2
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
case 3:
|
|
504
|
+
_context9.next = 4;
|
|
505
|
+
return (0, _testUtil.flushPromises)(2);
|
|
506
|
+
case 4:
|
|
507
|
+
// On ANSWER from media layer, connect is retried first, then ROAP answer is posted.
|
|
508
|
+
expect(sendCallStateMachineEvtSpy).toHaveBeenNthCalledWith(1, {
|
|
509
|
+
type: 'E_SEND_CALL_CONNECT'
|
|
510
|
+
});
|
|
511
|
+
expect(sendMediaStateMachineEvtSpy).toHaveBeenNthCalledWith(1, {
|
|
512
|
+
type: 'E_SEND_ROAP_ANSWER',
|
|
513
|
+
data: expect.objectContaining({
|
|
514
|
+
messageType: 'ANSWER'
|
|
515
|
+
})
|
|
516
|
+
});
|
|
517
|
+
expect(handleOutgoingCallConnectSpy).toHaveBeenCalled();
|
|
518
|
+
expect(call['mediaConnection'].roapMessageReceived).toHaveBeenLastCalledWith(delayedOffer);
|
|
519
|
+
expect(call['connectPending']).toBe(false);
|
|
520
|
+
case 5:
|
|
521
|
+
case "end":
|
|
522
|
+
return _context9.stop();
|
|
523
|
+
}
|
|
524
|
+
}, _callee9);
|
|
525
|
+
})));
|
|
526
|
+
it('testing enabling/disabling the BNR on an active call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
|
|
527
|
+
var mockStream, localAudioStream, onStreamSpy, onEffectSpy, offStreamSpy, offEffectSpy, call, updateLocalTracksSpy, bnrMetricSpy;
|
|
528
|
+
return _regenerator.default.wrap(function (_context0) {
|
|
529
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
435
530
|
case 0:
|
|
436
531
|
mockStream = {
|
|
437
532
|
outputStream: {
|
|
@@ -487,7 +582,7 @@ describe('Call Tests', function () {
|
|
|
487
582
|
});
|
|
488
583
|
expect(bnrMetricSpy).toBeCalledOnceWith(_types4.METRIC_EVENT.BNR_DISABLED, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId());
|
|
489
584
|
call.end();
|
|
490
|
-
|
|
585
|
+
_context0.next = 1;
|
|
491
586
|
return (0, _Utils.waitForMsecs)(50);
|
|
492
587
|
case 1:
|
|
493
588
|
/* Checks for switching off the listeners on call disconnect */
|
|
@@ -498,14 +593,14 @@ describe('Call Tests', function () {
|
|
|
498
593
|
expect(offEffectSpy).toBeCalledWith(_mediaHelpers.EffectEvent.Disabled, expect.any(Function));
|
|
499
594
|
case 2:
|
|
500
595
|
case "end":
|
|
501
|
-
return
|
|
596
|
+
return _context0.stop();
|
|
502
597
|
}
|
|
503
|
-
},
|
|
598
|
+
}, _callee0);
|
|
504
599
|
})));
|
|
505
|
-
it('answer fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
600
|
+
it('answer fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
|
|
506
601
|
var mockStream, localAudioStream, warnSpy, call;
|
|
507
|
-
return _regenerator.default.wrap(function (
|
|
508
|
-
while (1) switch (
|
|
602
|
+
return _regenerator.default.wrap(function (_context1) {
|
|
603
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
509
604
|
case 0:
|
|
510
605
|
mockStream = {
|
|
511
606
|
outputStream: {
|
|
@@ -529,7 +624,7 @@ describe('Call Tests', function () {
|
|
|
529
624
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
530
625
|
call = (0, _call.createCall)(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator, dest);
|
|
531
626
|
call.answer(localAudioStream);
|
|
532
|
-
|
|
627
|
+
_context1.next = 1;
|
|
533
628
|
return (0, _Utils.waitForMsecs)(50);
|
|
534
629
|
case 1:
|
|
535
630
|
expect(warnSpy).toBeCalledTimes(2);
|
|
@@ -544,14 +639,14 @@ describe('Call Tests', function () {
|
|
|
544
639
|
expect(webex.request.mock.calls[0][0].body.metrics).toStrictEqual(disconnectStats);
|
|
545
640
|
case 2:
|
|
546
641
|
case "end":
|
|
547
|
-
return
|
|
642
|
+
return _context1.stop();
|
|
548
643
|
}
|
|
549
|
-
},
|
|
644
|
+
}, _callee1);
|
|
550
645
|
})));
|
|
551
|
-
it('dial fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
646
|
+
it('dial fails if localAudioTrack is empty', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10() {
|
|
552
647
|
var mockStream, localAudioStream, warnSpy, call;
|
|
553
|
-
return _regenerator.default.wrap(function (
|
|
554
|
-
while (1) switch (
|
|
648
|
+
return _regenerator.default.wrap(function (_context10) {
|
|
649
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
555
650
|
case 0:
|
|
556
651
|
mockStream = {
|
|
557
652
|
outputStream: {
|
|
@@ -563,7 +658,7 @@ describe('Call Tests', function () {
|
|
|
563
658
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
564
659
|
call = (0, _call.createCall)(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator, dest);
|
|
565
660
|
call.dial(localAudioStream);
|
|
566
|
-
|
|
661
|
+
_context10.next = 1;
|
|
567
662
|
return (0, _Utils.waitForMsecs)(50);
|
|
568
663
|
case 1:
|
|
569
664
|
expect(warnSpy).toBeCalledTimes(1);
|
|
@@ -576,9 +671,9 @@ describe('Call Tests', function () {
|
|
|
576
671
|
expect(webex.request).not.toBeCalledOnceWith();
|
|
577
672
|
case 2:
|
|
578
673
|
case "end":
|
|
579
|
-
return
|
|
674
|
+
return _context10.stop();
|
|
580
675
|
}
|
|
581
|
-
},
|
|
676
|
+
}, _callee10);
|
|
582
677
|
})));
|
|
583
678
|
it('update media after call creation with valid stream', function () {
|
|
584
679
|
var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
|
|
@@ -652,10 +747,10 @@ describe('Call Tests', function () {
|
|
|
652
747
|
method: 'dial'
|
|
653
748
|
});
|
|
654
749
|
});
|
|
655
|
-
it('test system mute and user mute different scnearios', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
750
|
+
it('test system mute and user mute different scnearios', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11() {
|
|
656
751
|
var logSpy, callManager, mockStream, localAudioStream, call;
|
|
657
|
-
return _regenerator.default.wrap(function (
|
|
658
|
-
while (1) switch (
|
|
752
|
+
return _regenerator.default.wrap(function (_context11) {
|
|
753
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
659
754
|
case 0:
|
|
660
755
|
logSpy = jest.spyOn(_Logger.default, 'info');
|
|
661
756
|
webex.request.mockReturnValue({
|
|
@@ -731,9 +826,9 @@ describe('Call Tests', function () {
|
|
|
731
826
|
expect(mockStream.setUserMuted).toBeCalledOnceWith(false);
|
|
732
827
|
case 1:
|
|
733
828
|
case "end":
|
|
734
|
-
return
|
|
829
|
+
return _context11.stop();
|
|
735
830
|
}
|
|
736
|
-
},
|
|
831
|
+
}, _callee11);
|
|
737
832
|
})));
|
|
738
833
|
describe('Guest Calling Flow Tests', function () {
|
|
739
834
|
var dummyEvent = {
|
|
@@ -741,10 +836,10 @@ describe('Call Tests', function () {
|
|
|
741
836
|
data: undefined
|
|
742
837
|
};
|
|
743
838
|
var call;
|
|
744
|
-
it('outgoing call without guest calling must have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
839
|
+
it('outgoing call without guest calling must have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
745
840
|
var requestSpy, requestArgs;
|
|
746
|
-
return _regenerator.default.wrap(function (
|
|
747
|
-
while (1) switch (
|
|
841
|
+
return _regenerator.default.wrap(function (_context12) {
|
|
842
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
748
843
|
case 0:
|
|
749
844
|
call = new _call.Call(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, function () {
|
|
750
845
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -757,14 +852,14 @@ describe('Call Tests', function () {
|
|
|
757
852
|
expect('callee' in requestArgs.body).toBe(true);
|
|
758
853
|
case 1:
|
|
759
854
|
case "end":
|
|
760
|
-
return
|
|
855
|
+
return _context12.stop();
|
|
761
856
|
}
|
|
762
|
-
},
|
|
857
|
+
}, _callee12);
|
|
763
858
|
})));
|
|
764
|
-
it('outgoing call for guest calling must not have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
859
|
+
it('outgoing call for guest calling must not have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13() {
|
|
765
860
|
var requestSpy, requestArgs;
|
|
766
|
-
return _regenerator.default.wrap(function (
|
|
767
|
-
while (1) switch (
|
|
861
|
+
return _regenerator.default.wrap(function (_context13) {
|
|
862
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
768
863
|
case 0:
|
|
769
864
|
call = new _call.Call(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, function () {
|
|
770
865
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -777,9 +872,9 @@ describe('Call Tests', function () {
|
|
|
777
872
|
expect('callee' in requestArgs.body).toBe(false);
|
|
778
873
|
case 1:
|
|
779
874
|
case "end":
|
|
780
|
-
return
|
|
875
|
+
return _context13.stop();
|
|
781
876
|
}
|
|
782
|
-
},
|
|
877
|
+
}, _callee13);
|
|
783
878
|
})));
|
|
784
879
|
});
|
|
785
880
|
});
|
|
@@ -812,10 +907,10 @@ describe('State Machine handler tests', function () {
|
|
|
812
907
|
|
|
813
908
|
// afterEach(() => call.removeAllListeners());
|
|
814
909
|
|
|
815
|
-
it('successful session refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
910
|
+
it('successful session refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14() {
|
|
816
911
|
var statusPayload, dummyEvent, funcSpy, logSpy;
|
|
817
|
-
return _regenerator.default.wrap(function (
|
|
818
|
-
while (1) switch (
|
|
912
|
+
return _regenerator.default.wrap(function (_context14) {
|
|
913
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
819
914
|
case 0:
|
|
820
915
|
statusPayload = {
|
|
821
916
|
statusCode: 200,
|
|
@@ -835,7 +930,7 @@ describe('State Machine handler tests', function () {
|
|
|
835
930
|
/* This is to flush all the promises from the Promise queue so that
|
|
836
931
|
* Jest.fakeTimers can advance time and also clear the promise Queue
|
|
837
932
|
*/
|
|
838
|
-
|
|
933
|
+
_context14.next = 1;
|
|
839
934
|
return (0, _testUtil.flushPromises)(3);
|
|
840
935
|
case 1:
|
|
841
936
|
expect(setInterval).toHaveBeenCalledTimes(1);
|
|
@@ -851,14 +946,14 @@ describe('State Machine handler tests', function () {
|
|
|
851
946
|
});
|
|
852
947
|
case 2:
|
|
853
948
|
case "end":
|
|
854
|
-
return
|
|
949
|
+
return _context14.stop();
|
|
855
950
|
}
|
|
856
|
-
},
|
|
951
|
+
}, _callee14);
|
|
857
952
|
})));
|
|
858
|
-
it('session refresh 401 emits token error and ends the call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
953
|
+
it('session refresh 401 emits token error and ends the call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
859
954
|
var statusPayload, emitSpy, funcSpy;
|
|
860
|
-
return _regenerator.default.wrap(function (
|
|
861
|
-
while (1) switch (
|
|
955
|
+
return _regenerator.default.wrap(function (_context15) {
|
|
956
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
862
957
|
case 0:
|
|
863
958
|
expect.assertions(4);
|
|
864
959
|
statusPayload = {
|
|
@@ -873,10 +968,10 @@ describe('State Machine handler tests', function () {
|
|
|
873
968
|
funcSpy = jest.spyOn(call, 'postStatus').mockRejectedValue(statusPayload);
|
|
874
969
|
call['handleCallEstablished']({});
|
|
875
970
|
jest.advanceTimersByTime(_constants.DEFAULT_SESSION_TIMER);
|
|
876
|
-
|
|
971
|
+
_context15.next = 1;
|
|
877
972
|
return _promise.default.resolve();
|
|
878
973
|
case 1:
|
|
879
|
-
|
|
974
|
+
_context15.next = 2;
|
|
880
975
|
return _promise.default.resolve();
|
|
881
976
|
case 2:
|
|
882
977
|
// clearInterval is called twice: once in scheduleCallKeepaliveInterval (at start)
|
|
@@ -886,14 +981,14 @@ describe('State Machine handler tests', function () {
|
|
|
886
981
|
expect(emitSpy).toHaveBeenCalledWith(_types2.CALL_EVENT_KEYS.DISCONNECT, call.getCorrelationId());
|
|
887
982
|
case 3:
|
|
888
983
|
case "end":
|
|
889
|
-
return
|
|
984
|
+
return _context15.stop();
|
|
890
985
|
}
|
|
891
|
-
},
|
|
986
|
+
}, _callee15);
|
|
892
987
|
})));
|
|
893
|
-
it('session refresh failure', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
988
|
+
it('session refresh failure', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
894
989
|
var statusPayload, funcSpy;
|
|
895
|
-
return _regenerator.default.wrap(function (
|
|
896
|
-
while (1) switch (
|
|
990
|
+
return _regenerator.default.wrap(function (_context16) {
|
|
991
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
897
992
|
case 0:
|
|
898
993
|
expect.assertions(4);
|
|
899
994
|
statusPayload = {
|
|
@@ -912,7 +1007,7 @@ describe('State Machine handler tests', function () {
|
|
|
912
1007
|
/* This is to flush all the promises from the Promise queue so that
|
|
913
1008
|
* Jest.fakeTimers can advance time and also clear the promise Queue
|
|
914
1009
|
*/
|
|
915
|
-
|
|
1010
|
+
_context16.next = 1;
|
|
916
1011
|
return (0, _testUtil.flushPromises)(2);
|
|
917
1012
|
case 1:
|
|
918
1013
|
// clearInterval is called twice: once in scheduleCallKeepaliveInterval (at start)
|
|
@@ -921,14 +1016,14 @@ describe('State Machine handler tests', function () {
|
|
|
921
1016
|
expect(funcSpy).toBeCalledTimes(1);
|
|
922
1017
|
case 2:
|
|
923
1018
|
case "end":
|
|
924
|
-
return
|
|
1019
|
+
return _context16.stop();
|
|
925
1020
|
}
|
|
926
|
-
},
|
|
1021
|
+
}, _callee16);
|
|
927
1022
|
})));
|
|
928
|
-
it('session refresh 500 schedules retry via retry-after or default interval', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1023
|
+
it('session refresh 500 schedules retry via retry-after or default interval', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee17() {
|
|
929
1024
|
var errorPayload, okPayload, scheduleKeepaliveSpy, postStatusSpy;
|
|
930
|
-
return _regenerator.default.wrap(function (
|
|
931
|
-
while (1) switch (
|
|
1025
|
+
return _regenerator.default.wrap(function (_context17) {
|
|
1026
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
932
1027
|
case 0:
|
|
933
1028
|
errorPayload = {
|
|
934
1029
|
statusCode: 500,
|
|
@@ -946,28 +1041,28 @@ describe('State Machine handler tests', function () {
|
|
|
946
1041
|
call['handleCallEstablished']({});
|
|
947
1042
|
}
|
|
948
1043
|
jest.advanceTimersByTime(_constants.DEFAULT_SESSION_TIMER);
|
|
949
|
-
|
|
1044
|
+
_context17.next = 1;
|
|
950
1045
|
return (0, _testUtil.flushPromises)(2);
|
|
951
1046
|
case 1:
|
|
952
1047
|
expect(postStatusSpy).toHaveBeenCalledTimes(1);
|
|
953
1048
|
|
|
954
1049
|
// Now advance by 1 second for the retry-after interval
|
|
955
1050
|
jest.advanceTimersByTime(1000);
|
|
956
|
-
|
|
1051
|
+
_context17.next = 2;
|
|
957
1052
|
return (0, _testUtil.flushPromises)(2);
|
|
958
1053
|
case 2:
|
|
959
1054
|
expect(postStatusSpy).toHaveBeenCalledTimes(2);
|
|
960
1055
|
expect(scheduleKeepaliveSpy).toHaveBeenCalledTimes(2);
|
|
961
1056
|
case 3:
|
|
962
1057
|
case "end":
|
|
963
|
-
return
|
|
1058
|
+
return _context17.stop();
|
|
964
1059
|
}
|
|
965
|
-
},
|
|
1060
|
+
}, _callee17);
|
|
966
1061
|
})));
|
|
967
|
-
it('scheduleCallKeepaliveInterval clears existing interval before creating new one', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1062
|
+
it('scheduleCallKeepaliveInterval clears existing interval before creating new one', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee18() {
|
|
968
1063
|
var firstTimer, secondTimer;
|
|
969
|
-
return _regenerator.default.wrap(function (
|
|
970
|
-
while (1) switch (
|
|
1064
|
+
return _regenerator.default.wrap(function (_context18) {
|
|
1065
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
971
1066
|
case 0:
|
|
972
1067
|
jest.spyOn(global, 'setInterval');
|
|
973
1068
|
jest.spyOn(global, 'clearInterval');
|
|
@@ -995,14 +1090,14 @@ describe('State Machine handler tests', function () {
|
|
|
995
1090
|
expect(secondTimer).toBeDefined();
|
|
996
1091
|
case 1:
|
|
997
1092
|
case "end":
|
|
998
|
-
return
|
|
1093
|
+
return _context18.stop();
|
|
999
1094
|
}
|
|
1000
|
-
},
|
|
1095
|
+
}, _callee18);
|
|
1001
1096
|
})));
|
|
1002
|
-
it('keepalive ends after reaching max retry count', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1097
|
+
it('keepalive ends after reaching max retry count', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee19() {
|
|
1003
1098
|
var errorPayload, warnSpy, postStatusSpy;
|
|
1004
|
-
return _regenerator.default.wrap(function (
|
|
1005
|
-
while (1) switch (
|
|
1099
|
+
return _regenerator.default.wrap(function (_context19) {
|
|
1100
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
1006
1101
|
case 0:
|
|
1007
1102
|
errorPayload = {
|
|
1008
1103
|
statusCode: 500,
|
|
@@ -1021,25 +1116,25 @@ describe('State Machine handler tests', function () {
|
|
|
1021
1116
|
|
|
1022
1117
|
// Advance timer to trigger the first failure (uses DEFAULT_SESSION_TIMER)
|
|
1023
1118
|
jest.advanceTimersByTime(_constants.DEFAULT_SESSION_TIMER);
|
|
1024
|
-
|
|
1119
|
+
_context19.next = 1;
|
|
1025
1120
|
return (0, _testUtil.flushPromises)(2);
|
|
1026
1121
|
case 1:
|
|
1027
1122
|
// Now advance by 1 second for each of the 4 retry attempts (retry-after: 1 second each)
|
|
1028
1123
|
// Need to do this separately to allow state machine to process and create new intervals
|
|
1029
1124
|
jest.advanceTimersByTime(1000);
|
|
1030
|
-
|
|
1125
|
+
_context19.next = 2;
|
|
1031
1126
|
return (0, _testUtil.flushPromises)(2);
|
|
1032
1127
|
case 2:
|
|
1033
1128
|
jest.advanceTimersByTime(1000);
|
|
1034
|
-
|
|
1129
|
+
_context19.next = 3;
|
|
1035
1130
|
return (0, _testUtil.flushPromises)(2);
|
|
1036
1131
|
case 3:
|
|
1037
1132
|
jest.advanceTimersByTime(1000);
|
|
1038
|
-
|
|
1133
|
+
_context19.next = 4;
|
|
1039
1134
|
return (0, _testUtil.flushPromises)(2);
|
|
1040
1135
|
case 4:
|
|
1041
1136
|
jest.advanceTimersByTime(1000);
|
|
1042
|
-
|
|
1137
|
+
_context19.next = 5;
|
|
1043
1138
|
return (0, _testUtil.flushPromises)(2);
|
|
1044
1139
|
case 5:
|
|
1045
1140
|
// The error handler should detect we're at max retry count and stop
|
|
@@ -1051,14 +1146,14 @@ describe('State Machine handler tests', function () {
|
|
|
1051
1146
|
expect(call['callKeepaliveRetryCount']).toBe(4);
|
|
1052
1147
|
case 6:
|
|
1053
1148
|
case "end":
|
|
1054
|
-
return
|
|
1149
|
+
return _context19.stop();
|
|
1055
1150
|
}
|
|
1056
|
-
},
|
|
1151
|
+
}, _callee19);
|
|
1057
1152
|
})));
|
|
1058
|
-
it('state changes during successful incoming call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1153
|
+
it('state changes during successful incoming call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee20() {
|
|
1059
1154
|
var statusPayload, dummyEvent, postMediaSpy, deleteSpy, dummyOkEvent;
|
|
1060
|
-
return _regenerator.default.wrap(function (
|
|
1061
|
-
while (1) switch (
|
|
1155
|
+
return _regenerator.default.wrap(function (_context20) {
|
|
1156
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
1062
1157
|
case 0:
|
|
1063
1158
|
statusPayload = {
|
|
1064
1159
|
statusCode: 200,
|
|
@@ -1114,14 +1209,14 @@ describe('State Machine handler tests', function () {
|
|
|
1114
1209
|
expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
|
|
1115
1210
|
case 1:
|
|
1116
1211
|
case "end":
|
|
1117
|
-
return
|
|
1212
|
+
return _context20.stop();
|
|
1118
1213
|
}
|
|
1119
|
-
},
|
|
1214
|
+
}, _callee20);
|
|
1120
1215
|
})));
|
|
1121
|
-
it('state changes during unsuccessful incoming call due to no offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1216
|
+
it('state changes during unsuccessful incoming call due to no offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee21() {
|
|
1122
1217
|
var statusPayload, dummyEvent;
|
|
1123
|
-
return _regenerator.default.wrap(function (
|
|
1124
|
-
while (1) switch (
|
|
1218
|
+
return _regenerator.default.wrap(function (_context21) {
|
|
1219
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
1125
1220
|
case 0:
|
|
1126
1221
|
call['direction'] = _types3.CallDirection.INBOUND;
|
|
1127
1222
|
statusPayload = {
|
|
@@ -1139,7 +1234,7 @@ describe('State Machine handler tests', function () {
|
|
|
1139
1234
|
webex.request.mockReturnValue(statusPayload);
|
|
1140
1235
|
call.sendCallStateMachineEvt(dummyEvent);
|
|
1141
1236
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_PROGRESS');
|
|
1142
|
-
|
|
1237
|
+
_context21.next = 1;
|
|
1143
1238
|
return call['handleOutgoingCallConnect']({
|
|
1144
1239
|
type: 'E_SEND_CALL_CONNECT'
|
|
1145
1240
|
});
|
|
@@ -1153,14 +1248,14 @@ describe('State Machine handler tests', function () {
|
|
|
1153
1248
|
expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
|
|
1154
1249
|
case 2:
|
|
1155
1250
|
case "end":
|
|
1156
|
-
return
|
|
1251
|
+
return _context21.stop();
|
|
1157
1252
|
}
|
|
1158
|
-
},
|
|
1253
|
+
}, _callee21);
|
|
1159
1254
|
})));
|
|
1160
|
-
it('processes callerId on received progress event in established state without emitting PROGRESS', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1255
|
+
it('processes callerId on received progress event in established state without emitting PROGRESS', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee22() {
|
|
1161
1256
|
var callManager, statusPayload, call, dummyEvent, dummyOkEvent, emitSpy, startCallerIdSpy, mobiusProgressEvent;
|
|
1162
|
-
return _regenerator.default.wrap(function (
|
|
1163
|
-
while (1) switch (
|
|
1257
|
+
return _regenerator.default.wrap(function (_context22) {
|
|
1258
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
1164
1259
|
case 0:
|
|
1165
1260
|
callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
|
|
1166
1261
|
statusPayload = {
|
|
@@ -1254,14 +1349,14 @@ describe('State Machine handler tests', function () {
|
|
|
1254
1349
|
expect(call.earlyMedia).not.toBe(true);
|
|
1255
1350
|
case 1:
|
|
1256
1351
|
case "end":
|
|
1257
|
-
return
|
|
1352
|
+
return _context22.stop();
|
|
1258
1353
|
}
|
|
1259
|
-
},
|
|
1354
|
+
}, _callee22);
|
|
1260
1355
|
})));
|
|
1261
|
-
it('state changes during unsuccessful incoming call due error in call connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1356
|
+
it('state changes during unsuccessful incoming call due error in call connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee23() {
|
|
1262
1357
|
var warnSpy, errorSpy, stateMachineSpy, statusPayload, roapMessage;
|
|
1263
|
-
return _regenerator.default.wrap(function (
|
|
1264
|
-
while (1) switch (
|
|
1358
|
+
return _regenerator.default.wrap(function (_context23) {
|
|
1359
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1265
1360
|
case 0:
|
|
1266
1361
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
1267
1362
|
errorSpy = jest.spyOn(_Logger.default, 'error');
|
|
@@ -1288,7 +1383,7 @@ describe('State Machine handler tests', function () {
|
|
|
1288
1383
|
webex.request.mockRejectedValueOnce({
|
|
1289
1384
|
statusCode: 403
|
|
1290
1385
|
}).mockResolvedValue(statusPayload);
|
|
1291
|
-
|
|
1386
|
+
_context23.next = 1;
|
|
1292
1387
|
return call['handleOutgoingCallConnect']({
|
|
1293
1388
|
type: 'E_SEND_CALL_CONNECT'
|
|
1294
1389
|
});
|
|
@@ -1299,14 +1394,14 @@ describe('State Machine handler tests', function () {
|
|
|
1299
1394
|
expect(errorSpy).toBeCalledTimes(1);
|
|
1300
1395
|
case 2:
|
|
1301
1396
|
case "end":
|
|
1302
|
-
return
|
|
1397
|
+
return _context23.stop();
|
|
1303
1398
|
}
|
|
1304
|
-
},
|
|
1399
|
+
}, _callee23);
|
|
1305
1400
|
})));
|
|
1306
|
-
it('state changes during successful outgoing call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1401
|
+
it('state changes during successful outgoing call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee24() {
|
|
1307
1402
|
var statusPayload, dummyEvent, postMediaSpy, logSpy, dummyOkEvent;
|
|
1308
|
-
return _regenerator.default.wrap(function (
|
|
1309
|
-
while (1) switch (
|
|
1403
|
+
return _regenerator.default.wrap(function (_context24) {
|
|
1404
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
1310
1405
|
case 0:
|
|
1311
1406
|
statusPayload = {
|
|
1312
1407
|
statusCode: 200,
|
|
@@ -1382,14 +1477,14 @@ describe('State Machine handler tests', function () {
|
|
|
1382
1477
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_DISCONNECT');
|
|
1383
1478
|
case 1:
|
|
1384
1479
|
case "end":
|
|
1385
|
-
return
|
|
1480
|
+
return _context24.stop();
|
|
1386
1481
|
}
|
|
1387
|
-
},
|
|
1482
|
+
}, _callee24);
|
|
1388
1483
|
})));
|
|
1389
|
-
it('outgoing call where we receive connect directly after setup. Media established before connect. test call and media state changes', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1484
|
+
it('outgoing call where we receive connect directly after setup. Media established before connect. test call and media state changes', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee25() {
|
|
1390
1485
|
var statusPayload, dummySetupEvent, dummyConnectEvent, dummyOfferEvent, dummyAnswerEvent, dummyOkEvent, postMediaSpy;
|
|
1391
|
-
return _regenerator.default.wrap(function (
|
|
1392
|
-
while (1) switch (
|
|
1486
|
+
return _regenerator.default.wrap(function (_context25) {
|
|
1487
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
1393
1488
|
case 0:
|
|
1394
1489
|
statusPayload = {
|
|
1395
1490
|
statusCode: 200,
|
|
@@ -1457,14 +1552,14 @@ describe('State Machine handler tests', function () {
|
|
|
1457
1552
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_DISCONNECT');
|
|
1458
1553
|
case 1:
|
|
1459
1554
|
case "end":
|
|
1460
|
-
return
|
|
1555
|
+
return _context25.stop();
|
|
1461
1556
|
}
|
|
1462
|
-
},
|
|
1557
|
+
}, _callee25);
|
|
1463
1558
|
})));
|
|
1464
|
-
it('state changes during successful outgoing call with early media', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1559
|
+
it('state changes during successful outgoing call with early media', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee26() {
|
|
1465
1560
|
var statusPayload, dummyEvent;
|
|
1466
|
-
return _regenerator.default.wrap(function (
|
|
1467
|
-
while (1) switch (
|
|
1561
|
+
return _regenerator.default.wrap(function (_context26) {
|
|
1562
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
1468
1563
|
case 0:
|
|
1469
1564
|
statusPayload = {
|
|
1470
1565
|
statusCode: 200,
|
|
@@ -1503,14 +1598,14 @@ describe('State Machine handler tests', function () {
|
|
|
1503
1598
|
expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
|
|
1504
1599
|
case 1:
|
|
1505
1600
|
case "end":
|
|
1506
|
-
return
|
|
1601
|
+
return _context26.stop();
|
|
1507
1602
|
}
|
|
1508
|
-
},
|
|
1603
|
+
}, _callee26);
|
|
1509
1604
|
})));
|
|
1510
|
-
it('state changes during unsuccessful outgoing call due to error in call setup', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1605
|
+
it('state changes during unsuccessful outgoing call due to error in call setup', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee27() {
|
|
1511
1606
|
var statusPayload, dummyEvent, errorSpy;
|
|
1512
|
-
return _regenerator.default.wrap(function (
|
|
1513
|
-
while (1) switch (
|
|
1607
|
+
return _regenerator.default.wrap(function (_context27) {
|
|
1608
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
1514
1609
|
case 0:
|
|
1515
1610
|
statusPayload = {
|
|
1516
1611
|
statusCode: 403,
|
|
@@ -1527,7 +1622,7 @@ describe('State Machine handler tests', function () {
|
|
|
1527
1622
|
webex.request.mockRejectedValueOnce(statusPayload);
|
|
1528
1623
|
errorSpy = jest.spyOn(_Logger.default, 'error');
|
|
1529
1624
|
call.sendCallStateMachineEvt(dummyEvent);
|
|
1530
|
-
|
|
1625
|
+
_context27.next = 1;
|
|
1531
1626
|
return (0, _testUtil.flushPromises)(3);
|
|
1532
1627
|
case 1:
|
|
1533
1628
|
expect(call['callStateMachine'].state.value).toBe('S_UNKNOWN');
|
|
@@ -1538,14 +1633,14 @@ describe('State Machine handler tests', function () {
|
|
|
1538
1633
|
});
|
|
1539
1634
|
case 2:
|
|
1540
1635
|
case "end":
|
|
1541
|
-
return
|
|
1636
|
+
return _context27.stop();
|
|
1542
1637
|
}
|
|
1543
|
-
},
|
|
1638
|
+
}, _callee27);
|
|
1544
1639
|
})));
|
|
1545
|
-
it('state changes during unsuccessful outgoing call due to error in media ok', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1640
|
+
it('state changes during unsuccessful outgoing call due to error in media ok', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee28() {
|
|
1546
1641
|
var statusPayload, dummyEvent, warnSpy;
|
|
1547
|
-
return _regenerator.default.wrap(function (
|
|
1548
|
-
while (1) switch (
|
|
1642
|
+
return _regenerator.default.wrap(function (_context28) {
|
|
1643
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
1549
1644
|
case 0:
|
|
1550
1645
|
statusPayload = {
|
|
1551
1646
|
statusCode: 403,
|
|
@@ -1564,10 +1659,10 @@ describe('State Machine handler tests', function () {
|
|
|
1564
1659
|
webex.request.mockRejectedValue(statusPayload);
|
|
1565
1660
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
1566
1661
|
jest.spyOn(Utils, 'uploadLogs').mockResolvedValue(undefined);
|
|
1567
|
-
|
|
1662
|
+
_context28.next = 1;
|
|
1568
1663
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
1569
1664
|
case 1:
|
|
1570
|
-
|
|
1665
|
+
_context28.next = 2;
|
|
1571
1666
|
return (0, _testUtil.flushPromises)(2);
|
|
1572
1667
|
case 2:
|
|
1573
1668
|
expect(call.isConnected()).toBe(false);
|
|
@@ -1583,14 +1678,14 @@ describe('State Machine handler tests', function () {
|
|
|
1583
1678
|
});
|
|
1584
1679
|
case 3:
|
|
1585
1680
|
case "end":
|
|
1586
|
-
return
|
|
1681
|
+
return _context28.stop();
|
|
1587
1682
|
}
|
|
1588
|
-
},
|
|
1683
|
+
}, _callee28);
|
|
1589
1684
|
})));
|
|
1590
|
-
it('state changes during unsuccessful outgoing call since no sdp in offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1685
|
+
it('state changes during unsuccessful outgoing call since no sdp in offer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee29() {
|
|
1591
1686
|
var statusPayload, dummyEvent;
|
|
1592
|
-
return _regenerator.default.wrap(function (
|
|
1593
|
-
while (1) switch (
|
|
1687
|
+
return _regenerator.default.wrap(function (_context29) {
|
|
1688
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
1594
1689
|
case 0:
|
|
1595
1690
|
statusPayload = {
|
|
1596
1691
|
statusCode: 403,
|
|
@@ -1613,14 +1708,14 @@ describe('State Machine handler tests', function () {
|
|
|
1613
1708
|
expect(_testUtil.mediaConnection.initiateOffer).toBeCalledOnceWith();
|
|
1614
1709
|
case 1:
|
|
1615
1710
|
case "end":
|
|
1616
|
-
return
|
|
1711
|
+
return _context29.stop();
|
|
1617
1712
|
}
|
|
1618
|
-
},
|
|
1713
|
+
}, _callee29);
|
|
1619
1714
|
})));
|
|
1620
|
-
it('Outgoing Roap offer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1715
|
+
it('Outgoing Roap offer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee30() {
|
|
1621
1716
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1622
|
-
return _regenerator.default.wrap(function (
|
|
1623
|
-
while (1) switch (
|
|
1717
|
+
return _regenerator.default.wrap(function (_context30) {
|
|
1718
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
1624
1719
|
case 0:
|
|
1625
1720
|
statusPayload = {
|
|
1626
1721
|
statusCode: 503,
|
|
@@ -1642,7 +1737,7 @@ describe('State Machine handler tests', function () {
|
|
|
1642
1737
|
}
|
|
1643
1738
|
};
|
|
1644
1739
|
call['connected'] = true;
|
|
1645
|
-
|
|
1740
|
+
_context30.next = 1;
|
|
1646
1741
|
return call['handleOutgoingRoapOffer']({}, dummyEvent);
|
|
1647
1742
|
case 1:
|
|
1648
1743
|
jest.advanceTimersByTime(1005);
|
|
@@ -1654,14 +1749,14 @@ describe('State Machine handler tests', function () {
|
|
|
1654
1749
|
expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
|
|
1655
1750
|
case 2:
|
|
1656
1751
|
case "end":
|
|
1657
|
-
return
|
|
1752
|
+
return _context30.stop();
|
|
1658
1753
|
}
|
|
1659
|
-
},
|
|
1754
|
+
}, _callee30);
|
|
1660
1755
|
})));
|
|
1661
|
-
it('Outgoing Roap offer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1756
|
+
it('Outgoing Roap offer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee31() {
|
|
1662
1757
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1663
|
-
return _regenerator.default.wrap(function (
|
|
1664
|
-
while (1) switch (
|
|
1758
|
+
return _regenerator.default.wrap(function (_context31) {
|
|
1759
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
1665
1760
|
case 0:
|
|
1666
1761
|
statusPayload = {
|
|
1667
1762
|
statusCode: 503,
|
|
@@ -1683,7 +1778,7 @@ describe('State Machine handler tests', function () {
|
|
|
1683
1778
|
}
|
|
1684
1779
|
};
|
|
1685
1780
|
call['connected'] = false;
|
|
1686
|
-
|
|
1781
|
+
_context31.next = 1;
|
|
1687
1782
|
return call['handleOutgoingRoapOffer']({}, dummyEvent);
|
|
1688
1783
|
case 1:
|
|
1689
1784
|
jest.advanceTimersByTime(1005);
|
|
@@ -1694,14 +1789,14 @@ describe('State Machine handler tests', function () {
|
|
|
1694
1789
|
expect(stateMachineSpy).not.toBeCalled();
|
|
1695
1790
|
case 2:
|
|
1696
1791
|
case "end":
|
|
1697
|
-
return
|
|
1792
|
+
return _context31.stop();
|
|
1698
1793
|
}
|
|
1699
|
-
},
|
|
1794
|
+
}, _callee31);
|
|
1700
1795
|
})));
|
|
1701
|
-
it('Outgoing Roap Answer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1796
|
+
it('Outgoing Roap Answer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee32() {
|
|
1702
1797
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1703
|
-
return _regenerator.default.wrap(function (
|
|
1704
|
-
while (1) switch (
|
|
1798
|
+
return _regenerator.default.wrap(function (_context32) {
|
|
1799
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
1705
1800
|
case 0:
|
|
1706
1801
|
statusPayload = {
|
|
1707
1802
|
statusCode: 503,
|
|
@@ -1723,7 +1818,7 @@ describe('State Machine handler tests', function () {
|
|
|
1723
1818
|
};
|
|
1724
1819
|
call['connected'] = true;
|
|
1725
1820
|
call['mediaStateMachine'].state.value = 'S_RECV_ROAP_OFFER';
|
|
1726
|
-
|
|
1821
|
+
_context32.next = 1;
|
|
1727
1822
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
1728
1823
|
case 1:
|
|
1729
1824
|
jest.advanceTimersByTime(1005);
|
|
@@ -1735,14 +1830,14 @@ describe('State Machine handler tests', function () {
|
|
|
1735
1830
|
expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
|
|
1736
1831
|
case 2:
|
|
1737
1832
|
case "end":
|
|
1738
|
-
return
|
|
1833
|
+
return _context32.stop();
|
|
1739
1834
|
}
|
|
1740
|
-
},
|
|
1835
|
+
}, _callee32);
|
|
1741
1836
|
})));
|
|
1742
|
-
it('Outgoing Roap answer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1837
|
+
it('Outgoing Roap answer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee33() {
|
|
1743
1838
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1744
|
-
return _regenerator.default.wrap(function (
|
|
1745
|
-
while (1) switch (
|
|
1839
|
+
return _regenerator.default.wrap(function (_context33) {
|
|
1840
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
1746
1841
|
case 0:
|
|
1747
1842
|
statusPayload = {
|
|
1748
1843
|
statusCode: 503,
|
|
@@ -1763,7 +1858,7 @@ describe('State Machine handler tests', function () {
|
|
|
1763
1858
|
}
|
|
1764
1859
|
};
|
|
1765
1860
|
call['connected'] = false;
|
|
1766
|
-
|
|
1861
|
+
_context33.next = 1;
|
|
1767
1862
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
1768
1863
|
case 1:
|
|
1769
1864
|
jest.advanceTimersByTime(1005);
|
|
@@ -1775,14 +1870,14 @@ describe('State Machine handler tests', function () {
|
|
|
1775
1870
|
expect(stateMachineSpy).not.toBeCalled();
|
|
1776
1871
|
case 2:
|
|
1777
1872
|
case "end":
|
|
1778
|
-
return
|
|
1873
|
+
return _context33.stop();
|
|
1779
1874
|
}
|
|
1780
|
-
},
|
|
1875
|
+
}, _callee33);
|
|
1781
1876
|
})));
|
|
1782
|
-
it('ROAP error during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1877
|
+
it('ROAP error during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee34() {
|
|
1783
1878
|
var statusPayload, warnSpy, stateMachineSpy, funcSpy, errorEvent;
|
|
1784
|
-
return _regenerator.default.wrap(function (
|
|
1785
|
-
while (1) switch (
|
|
1879
|
+
return _regenerator.default.wrap(function (_context34) {
|
|
1880
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
1786
1881
|
case 0:
|
|
1787
1882
|
statusPayload = {
|
|
1788
1883
|
statusCode: 200,
|
|
@@ -1807,14 +1902,14 @@ describe('State Machine handler tests', function () {
|
|
|
1807
1902
|
expect(stateMachineSpy).not.toHaveBeenCalled();
|
|
1808
1903
|
case 1:
|
|
1809
1904
|
case "end":
|
|
1810
|
-
return
|
|
1905
|
+
return _context34.stop();
|
|
1811
1906
|
}
|
|
1812
|
-
},
|
|
1907
|
+
}, _callee34);
|
|
1813
1908
|
})));
|
|
1814
|
-
it('ROAP ok retry-after during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1909
|
+
it('ROAP ok retry-after during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee35() {
|
|
1815
1910
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1816
|
-
return _regenerator.default.wrap(function (
|
|
1817
|
-
while (1) switch (
|
|
1911
|
+
return _regenerator.default.wrap(function (_context35) {
|
|
1912
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
1818
1913
|
case 0:
|
|
1819
1914
|
statusPayload = {
|
|
1820
1915
|
statusCode: 503,
|
|
@@ -1836,7 +1931,7 @@ describe('State Machine handler tests', function () {
|
|
|
1836
1931
|
};
|
|
1837
1932
|
call['connected'] = true;
|
|
1838
1933
|
call['mediaStateMachine'].state.value = 'S_RECV_ROAP_ANSWER';
|
|
1839
|
-
|
|
1934
|
+
_context35.next = 1;
|
|
1840
1935
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
1841
1936
|
case 1:
|
|
1842
1937
|
jest.advanceTimersByTime(1005);
|
|
@@ -1848,14 +1943,14 @@ describe('State Machine handler tests', function () {
|
|
|
1848
1943
|
expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
|
|
1849
1944
|
case 2:
|
|
1850
1945
|
case "end":
|
|
1851
|
-
return
|
|
1946
|
+
return _context35.stop();
|
|
1852
1947
|
}
|
|
1853
|
-
},
|
|
1948
|
+
}, _callee35);
|
|
1854
1949
|
})));
|
|
1855
|
-
it('Unable to communicate roap error with mobius', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1950
|
+
it('Unable to communicate roap error with mobius', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee36() {
|
|
1856
1951
|
var statusPayload, stateMachineSpy, funcSpy, errorEvent;
|
|
1857
|
-
return _regenerator.default.wrap(function (
|
|
1858
|
-
while (1) switch (
|
|
1952
|
+
return _regenerator.default.wrap(function (_context36) {
|
|
1953
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
1859
1954
|
case 0:
|
|
1860
1955
|
statusPayload = {
|
|
1861
1956
|
statusCode: 403,
|
|
@@ -1878,14 +1973,14 @@ describe('State Machine handler tests', function () {
|
|
|
1878
1973
|
expect(stateMachineSpy).not.toHaveBeenCalled();
|
|
1879
1974
|
case 1:
|
|
1880
1975
|
case "end":
|
|
1881
|
-
return
|
|
1976
|
+
return _context36.stop();
|
|
1882
1977
|
}
|
|
1883
|
-
},
|
|
1978
|
+
}, _callee36);
|
|
1884
1979
|
})));
|
|
1885
|
-
it('ROAP error during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
1980
|
+
it('ROAP error during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee37() {
|
|
1886
1981
|
var statusPayload, warnSpy, stateMachineSpy, funcSpy, errorEvent;
|
|
1887
|
-
return _regenerator.default.wrap(function (
|
|
1888
|
-
while (1) switch (
|
|
1982
|
+
return _regenerator.default.wrap(function (_context37) {
|
|
1983
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
1889
1984
|
case 0:
|
|
1890
1985
|
statusPayload = {
|
|
1891
1986
|
statusCode: 200,
|
|
@@ -1903,7 +1998,7 @@ describe('State Machine handler tests', function () {
|
|
|
1903
1998
|
}
|
|
1904
1999
|
};
|
|
1905
2000
|
call['connected'] = false;
|
|
1906
|
-
|
|
2001
|
+
_context37.next = 1;
|
|
1907
2002
|
return call['handleRoapError']({}, errorEvent);
|
|
1908
2003
|
case 1:
|
|
1909
2004
|
expect(funcSpy).toBeCalledOnceWith(errorEvent.data);
|
|
@@ -1919,14 +2014,14 @@ describe('State Machine handler tests', function () {
|
|
|
1919
2014
|
});
|
|
1920
2015
|
case 2:
|
|
1921
2016
|
case "end":
|
|
1922
|
-
return
|
|
2017
|
+
return _context37.stop();
|
|
1923
2018
|
}
|
|
1924
|
-
},
|
|
2019
|
+
}, _callee37);
|
|
1925
2020
|
})));
|
|
1926
|
-
it('incoming call: failing ROAP_ANSWER posts error path and tears down', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2021
|
+
it('incoming call: failing ROAP_ANSWER posts error path and tears down', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee38() {
|
|
1927
2022
|
var statusPayload, warnSpy, postMediaSpy, setupEvent, connectEvent, offerEvent, answerEvent;
|
|
1928
|
-
return _regenerator.default.wrap(function (
|
|
1929
|
-
while (1) switch (
|
|
2023
|
+
return _regenerator.default.wrap(function (_context38) {
|
|
2024
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
1930
2025
|
case 0:
|
|
1931
2026
|
statusPayload = {
|
|
1932
2027
|
statusCode: 403,
|
|
@@ -1964,10 +2059,10 @@ describe('State Machine handler tests', function () {
|
|
|
1964
2059
|
messageType: 'ANSWER'
|
|
1965
2060
|
}
|
|
1966
2061
|
};
|
|
1967
|
-
|
|
2062
|
+
_context38.next = 1;
|
|
1968
2063
|
return call.sendMediaStateMachineEvt(answerEvent);
|
|
1969
2064
|
case 1:
|
|
1970
|
-
|
|
2065
|
+
_context38.next = 2;
|
|
1971
2066
|
return (0, _testUtil.flushPromises)(2);
|
|
1972
2067
|
case 2:
|
|
1973
2068
|
expect(postMediaSpy).toBeCalledOnceWith(answerEvent.data);
|
|
@@ -1985,14 +2080,14 @@ describe('State Machine handler tests', function () {
|
|
|
1985
2080
|
expect(call['callStateMachine'].state.value).toBe('S_CALL_CLEARED');
|
|
1986
2081
|
case 3:
|
|
1987
2082
|
case "end":
|
|
1988
|
-
return
|
|
2083
|
+
return _context38.stop();
|
|
1989
2084
|
}
|
|
1990
|
-
},
|
|
2085
|
+
}, _callee38);
|
|
1991
2086
|
})));
|
|
1992
|
-
it('state changes during successful incoming call with out of order events', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2087
|
+
it('state changes during successful incoming call with out of order events', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee39() {
|
|
1993
2088
|
var statusPayload, dummyEvent, postMediaSpy, dummyOkEvent, dummyOfferEvent;
|
|
1994
|
-
return _regenerator.default.wrap(function (
|
|
1995
|
-
while (1) switch (
|
|
2089
|
+
return _regenerator.default.wrap(function (_context39) {
|
|
2090
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
1996
2091
|
case 0:
|
|
1997
2092
|
statusPayload = {
|
|
1998
2093
|
statusCode: 200,
|
|
@@ -2025,7 +2120,7 @@ describe('State Machine handler tests', function () {
|
|
|
2025
2120
|
seq: 1,
|
|
2026
2121
|
messageType: 'ANSWER'
|
|
2027
2122
|
};
|
|
2028
|
-
|
|
2123
|
+
_context39.next = 1;
|
|
2029
2124
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
2030
2125
|
case 1:
|
|
2031
2126
|
expect(postMediaSpy).toBeCalledOnceWith(dummyEvent.data);
|
|
@@ -2047,7 +2142,7 @@ describe('State Machine handler tests', function () {
|
|
|
2047
2142
|
seq: 2,
|
|
2048
2143
|
messageType: 'OFFER_REQUEST'
|
|
2049
2144
|
};
|
|
2050
|
-
|
|
2145
|
+
_context39.next = 2;
|
|
2051
2146
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
2052
2147
|
case 2:
|
|
2053
2148
|
expect(call['receivedRoapOKSeq']).toBe(0);
|
|
@@ -2097,7 +2192,7 @@ describe('State Machine handler tests', function () {
|
|
|
2097
2192
|
};
|
|
2098
2193
|
call.sendCallStateMachineEvt(dummyEvent);
|
|
2099
2194
|
dummyEvent.type = 'E_RECV_ROAP_OFFER';
|
|
2100
|
-
|
|
2195
|
+
_context39.next = 3;
|
|
2101
2196
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
2102
2197
|
case 3:
|
|
2103
2198
|
expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
@@ -2106,7 +2201,7 @@ describe('State Machine handler tests', function () {
|
|
|
2106
2201
|
seq: 3,
|
|
2107
2202
|
messageType: 'ANSWER'
|
|
2108
2203
|
};
|
|
2109
|
-
|
|
2204
|
+
_context39.next = 4;
|
|
2110
2205
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
2111
2206
|
case 4:
|
|
2112
2207
|
expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
@@ -2125,7 +2220,7 @@ describe('State Machine handler tests', function () {
|
|
|
2125
2220
|
messageType: 'OK'
|
|
2126
2221
|
}
|
|
2127
2222
|
};
|
|
2128
|
-
|
|
2223
|
+
_context39.next = 5;
|
|
2129
2224
|
return call.sendMediaStateMachineEvt(dummyOkEvent);
|
|
2130
2225
|
case 5:
|
|
2131
2226
|
expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenNthCalledWith(6, dummyOkEvent.data.message);
|
|
@@ -2140,14 +2235,14 @@ describe('State Machine handler tests', function () {
|
|
|
2140
2235
|
expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
2141
2236
|
case 6:
|
|
2142
2237
|
case "end":
|
|
2143
|
-
return
|
|
2238
|
+
return _context39.stop();
|
|
2144
2239
|
}
|
|
2145
|
-
},
|
|
2240
|
+
}, _callee39);
|
|
2146
2241
|
})));
|
|
2147
|
-
it('successfully handles out of order events when ROAP OK is received while executing outgoingRoapAnswer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2242
|
+
it('successfully handles out of order events when ROAP OK is received while executing outgoingRoapAnswer', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee40() {
|
|
2148
2243
|
var mockStatusBody, statusPayload, dummyEvent, postMediaSpy, dummyOkEvent, dummyOfferEvent;
|
|
2149
|
-
return _regenerator.default.wrap(function (
|
|
2150
|
-
while (1) switch (
|
|
2244
|
+
return _regenerator.default.wrap(function (_context40) {
|
|
2245
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
2151
2246
|
case 0:
|
|
2152
2247
|
mockStatusBody = {
|
|
2153
2248
|
device: {
|
|
@@ -2187,7 +2282,7 @@ describe('State Machine handler tests', function () {
|
|
|
2187
2282
|
seq: 1,
|
|
2188
2283
|
messageType: 'ANSWER'
|
|
2189
2284
|
};
|
|
2190
|
-
|
|
2285
|
+
_context40.next = 1;
|
|
2191
2286
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
2192
2287
|
case 1:
|
|
2193
2288
|
expect(postMediaSpy).toBeCalledOnceWith(dummyEvent.data);
|
|
@@ -2209,7 +2304,7 @@ describe('State Machine handler tests', function () {
|
|
|
2209
2304
|
seq: 2,
|
|
2210
2305
|
messageType: 'OFFER_REQUEST'
|
|
2211
2306
|
};
|
|
2212
|
-
|
|
2307
|
+
_context40.next = 2;
|
|
2213
2308
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
2214
2309
|
case 2:
|
|
2215
2310
|
expect(call['receivedRoapOKSeq']).toBe(0);
|
|
@@ -2259,7 +2354,7 @@ describe('State Machine handler tests', function () {
|
|
|
2259
2354
|
};
|
|
2260
2355
|
call.sendCallStateMachineEvt(dummyEvent);
|
|
2261
2356
|
dummyEvent.type = 'E_RECV_ROAP_OFFER';
|
|
2262
|
-
|
|
2357
|
+
_context40.next = 3;
|
|
2263
2358
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
2264
2359
|
case 3:
|
|
2265
2360
|
expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
@@ -2268,7 +2363,7 @@ describe('State Machine handler tests', function () {
|
|
|
2268
2363
|
seq: 3,
|
|
2269
2364
|
messageType: 'ANSWER'
|
|
2270
2365
|
};
|
|
2271
|
-
|
|
2366
|
+
_context40.next = 4;
|
|
2272
2367
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
2273
2368
|
case 4:
|
|
2274
2369
|
expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
@@ -2285,7 +2380,7 @@ describe('State Machine handler tests', function () {
|
|
|
2285
2380
|
}
|
|
2286
2381
|
};
|
|
2287
2382
|
call.sendMediaStateMachineEvt(dummyEvent);
|
|
2288
|
-
|
|
2383
|
+
_context40.next = 5;
|
|
2289
2384
|
return call.sendMediaStateMachineEvt(dummyOkEvent);
|
|
2290
2385
|
case 5:
|
|
2291
2386
|
expect(call['receivedRoapOKSeq']).toBe(3);
|
|
@@ -2301,14 +2396,14 @@ describe('State Machine handler tests', function () {
|
|
|
2301
2396
|
expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
2302
2397
|
case 6:
|
|
2303
2398
|
case "end":
|
|
2304
|
-
return
|
|
2399
|
+
return _context40.stop();
|
|
2305
2400
|
}
|
|
2306
|
-
},
|
|
2401
|
+
}, _callee40);
|
|
2307
2402
|
})));
|
|
2308
|
-
it('handle hold event successfully when media received after progress but before connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2403
|
+
it('handle hold event successfully when media received after progress but before connect', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee41() {
|
|
2309
2404
|
var statusPayload, dummyEvent, postMediaSpy, infoSpy, dummyOkEvent;
|
|
2310
|
-
return _regenerator.default.wrap(function (
|
|
2311
|
-
while (1) switch (
|
|
2405
|
+
return _regenerator.default.wrap(function (_context41) {
|
|
2406
|
+
while (1) switch (_context41.prev = _context41.next) {
|
|
2312
2407
|
case 0:
|
|
2313
2408
|
statusPayload = {
|
|
2314
2409
|
statusCode: 200,
|
|
@@ -2375,14 +2470,14 @@ describe('State Machine handler tests', function () {
|
|
|
2375
2470
|
});
|
|
2376
2471
|
case 1:
|
|
2377
2472
|
case "end":
|
|
2378
|
-
return
|
|
2473
|
+
return _context41.stop();
|
|
2379
2474
|
}
|
|
2380
|
-
},
|
|
2475
|
+
}, _callee41);
|
|
2381
2476
|
})));
|
|
2382
|
-
it('emits DISCONNECT before mobius delete request is invoked', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2477
|
+
it('emits DISCONNECT before mobius delete request is invoked', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee42() {
|
|
2383
2478
|
var emitSpy, deleteSpy;
|
|
2384
|
-
return _regenerator.default.wrap(function (
|
|
2385
|
-
while (1) switch (
|
|
2479
|
+
return _regenerator.default.wrap(function (_context42) {
|
|
2480
|
+
while (1) switch (_context42.prev = _context42.next) {
|
|
2386
2481
|
case 0:
|
|
2387
2482
|
emitSpy = jest.spyOn(call, 'emit');
|
|
2388
2483
|
deleteSpy = jest.spyOn(call, 'delete').mockResolvedValue({
|
|
@@ -2391,7 +2486,7 @@ describe('State Machine handler tests', function () {
|
|
|
2391
2486
|
call.sendCallStateMachineEvt({
|
|
2392
2487
|
type: 'E_RECV_CALL_DISCONNECT'
|
|
2393
2488
|
});
|
|
2394
|
-
|
|
2489
|
+
_context42.next = 1;
|
|
2395
2490
|
return (0, _testUtil.flushPromises)(1);
|
|
2396
2491
|
case 1:
|
|
2397
2492
|
expect(emitSpy).toHaveBeenCalledWith(_types2.CALL_EVENT_KEYS.DISCONNECT, call.getCorrelationId());
|
|
@@ -2399,9 +2494,9 @@ describe('State Machine handler tests', function () {
|
|
|
2399
2494
|
expect(emitSpy.mock.invocationCallOrder[0]).toBeLessThan(deleteSpy.mock.invocationCallOrder[0]);
|
|
2400
2495
|
case 2:
|
|
2401
2496
|
case "end":
|
|
2402
|
-
return
|
|
2497
|
+
return _context42.stop();
|
|
2403
2498
|
}
|
|
2404
|
-
},
|
|
2499
|
+
}, _callee42);
|
|
2405
2500
|
})));
|
|
2406
2501
|
describe('Call event timers tests', function () {
|
|
2407
2502
|
var callManager;
|
|
@@ -2412,10 +2507,10 @@ describe('State Machine handler tests', function () {
|
|
|
2412
2507
|
afterEach(function () {
|
|
2413
2508
|
jest.clearAllTimers();
|
|
2414
2509
|
});
|
|
2415
|
-
it('times out if the next event is not received - 60 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2510
|
+
it('times out if the next event is not received - 60 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee43() {
|
|
2416
2511
|
var statusPayload, dummyEvent, logSpy, emitSpy, deleteSpy, dummyOkEvent;
|
|
2417
|
-
return _regenerator.default.wrap(function (
|
|
2418
|
-
while (1) switch (
|
|
2512
|
+
return _regenerator.default.wrap(function (_context43) {
|
|
2513
|
+
while (1) switch (_context43.prev = _context43.next) {
|
|
2419
2514
|
case 0:
|
|
2420
2515
|
statusPayload = {
|
|
2421
2516
|
statusCode: 200,
|
|
@@ -2432,7 +2527,7 @@ describe('State Machine handler tests', function () {
|
|
|
2432
2527
|
webex.request.mockReturnValue(statusPayload);
|
|
2433
2528
|
|
|
2434
2529
|
// handleOutgoingCallSetup is asynchronous
|
|
2435
|
-
|
|
2530
|
+
_context43.next = 1;
|
|
2436
2531
|
return call.sendCallStateMachineEvt(dummyEvent);
|
|
2437
2532
|
case 1:
|
|
2438
2533
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_SETUP');
|
|
@@ -2475,14 +2570,14 @@ describe('State Machine handler tests', function () {
|
|
|
2475
2570
|
expect(callManager.callCollection).toStrictEqual({});
|
|
2476
2571
|
case 2:
|
|
2477
2572
|
case "end":
|
|
2478
|
-
return
|
|
2573
|
+
return _context43.stop();
|
|
2479
2574
|
}
|
|
2480
|
-
},
|
|
2575
|
+
}, _callee43);
|
|
2481
2576
|
})));
|
|
2482
|
-
it('times out if the next event is not received - 10 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2577
|
+
it('times out if the next event is not received - 10 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee44() {
|
|
2483
2578
|
var statusPayload, dummyEvent, call, emitSpy, deleteSpy, logSpy;
|
|
2484
|
-
return _regenerator.default.wrap(function (
|
|
2485
|
-
while (1) switch (
|
|
2579
|
+
return _regenerator.default.wrap(function (_context44) {
|
|
2580
|
+
while (1) switch (_context44.prev = _context44.next) {
|
|
2486
2581
|
case 0:
|
|
2487
2582
|
statusPayload = {
|
|
2488
2583
|
statusCode: 200,
|
|
@@ -2501,7 +2596,7 @@ describe('State Machine handler tests', function () {
|
|
|
2501
2596
|
expect((0, _keys.default)(callManager.callCollection)[0]).toBe(call.getCorrelationId());
|
|
2502
2597
|
|
|
2503
2598
|
// handleOutgoingCallSetup is asynchronous
|
|
2504
|
-
|
|
2599
|
+
_context44.next = 1;
|
|
2505
2600
|
return call.sendCallStateMachineEvt(dummyEvent);
|
|
2506
2601
|
case 1:
|
|
2507
2602
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_SETUP');
|
|
@@ -2513,9 +2608,9 @@ describe('State Machine handler tests', function () {
|
|
|
2513
2608
|
expect(callManager.callCollection).toStrictEqual({});
|
|
2514
2609
|
case 2:
|
|
2515
2610
|
case "end":
|
|
2516
|
-
return
|
|
2611
|
+
return _context44.stop();
|
|
2517
2612
|
}
|
|
2518
|
-
},
|
|
2613
|
+
}, _callee44);
|
|
2519
2614
|
})));
|
|
2520
2615
|
});
|
|
2521
2616
|
});
|
|
@@ -2575,10 +2670,10 @@ describe('Supplementary Services tests', function () {
|
|
|
2575
2670
|
beforeEach(function () {
|
|
2576
2671
|
call.removeAllListeners();
|
|
2577
2672
|
});
|
|
2578
|
-
it('Handle successful Call hold case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2673
|
+
it('Handle successful Call hold case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee46() {
|
|
2579
2674
|
var responsePayload, warnSpy, roapEvent;
|
|
2580
|
-
return _regenerator.default.wrap(function (
|
|
2581
|
-
while (1) switch (
|
|
2675
|
+
return _regenerator.default.wrap(function (_context46) {
|
|
2676
|
+
while (1) switch (_context46.prev = _context46.next) {
|
|
2582
2677
|
case 0:
|
|
2583
2678
|
expect.assertions(7);
|
|
2584
2679
|
responsePayload = {
|
|
@@ -2591,25 +2686,25 @@ describe('Supplementary Services tests', function () {
|
|
|
2591
2686
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2592
2687
|
call['held'] = false;
|
|
2593
2688
|
call.on(_types2.CALL_EVENT_KEYS.HELD, /*#__PURE__*/function () {
|
|
2594
|
-
var
|
|
2595
|
-
return _regenerator.default.wrap(function (
|
|
2596
|
-
while (1) switch (
|
|
2689
|
+
var _ref48 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee45(correlationId) {
|
|
2690
|
+
return _regenerator.default.wrap(function (_context45) {
|
|
2691
|
+
while (1) switch (_context45.prev = _context45.next) {
|
|
2597
2692
|
case 0:
|
|
2598
2693
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
2599
2694
|
case 1:
|
|
2600
2695
|
case "end":
|
|
2601
|
-
return
|
|
2696
|
+
return _context45.stop();
|
|
2602
2697
|
}
|
|
2603
|
-
},
|
|
2698
|
+
}, _callee45);
|
|
2604
2699
|
}));
|
|
2605
2700
|
return function (_x) {
|
|
2606
|
-
return
|
|
2701
|
+
return _ref48.apply(this, arguments);
|
|
2607
2702
|
};
|
|
2608
2703
|
}());
|
|
2609
|
-
|
|
2704
|
+
_context46.next = 1;
|
|
2610
2705
|
return call.doHoldResume();
|
|
2611
2706
|
case 1:
|
|
2612
|
-
|
|
2707
|
+
_context46.next = 2;
|
|
2613
2708
|
return (0, _testUtil.flushPromises)(2);
|
|
2614
2709
|
case 2:
|
|
2615
2710
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2625,11 +2720,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2625
2720
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2626
2721
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2627
2722
|
roapEvent.data.type = 'ANSWER';
|
|
2628
|
-
|
|
2723
|
+
_context46.next = 3;
|
|
2629
2724
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2630
2725
|
case 3:
|
|
2631
2726
|
roapEvent.data.type = 'OK';
|
|
2632
|
-
|
|
2727
|
+
_context46.next = 4;
|
|
2633
2728
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2634
2729
|
case 4:
|
|
2635
2730
|
expect(clearTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2644,14 +2739,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2644
2739
|
});
|
|
2645
2740
|
case 5:
|
|
2646
2741
|
case "end":
|
|
2647
|
-
return
|
|
2742
|
+
return _context46.stop();
|
|
2648
2743
|
}
|
|
2649
|
-
},
|
|
2744
|
+
}, _callee46);
|
|
2650
2745
|
})));
|
|
2651
|
-
it('Handle successful Call hold case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2746
|
+
it('Handle successful Call hold case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee48() {
|
|
2652
2747
|
var responsePayload, warnSpy, roapEvent;
|
|
2653
|
-
return _regenerator.default.wrap(function (
|
|
2654
|
-
while (1) switch (
|
|
2748
|
+
return _regenerator.default.wrap(function (_context48) {
|
|
2749
|
+
while (1) switch (_context48.prev = _context48.next) {
|
|
2655
2750
|
case 0:
|
|
2656
2751
|
expect.assertions(8);
|
|
2657
2752
|
responsePayload = {
|
|
@@ -2664,26 +2759,26 @@ describe('Supplementary Services tests', function () {
|
|
|
2664
2759
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2665
2760
|
call['held'] = false;
|
|
2666
2761
|
call.on(_types2.CALL_EVENT_KEYS.HELD, /*#__PURE__*/function () {
|
|
2667
|
-
var
|
|
2668
|
-
return _regenerator.default.wrap(function (
|
|
2669
|
-
while (1) switch (
|
|
2762
|
+
var _ref50 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee47(correlationId) {
|
|
2763
|
+
return _regenerator.default.wrap(function (_context47) {
|
|
2764
|
+
while (1) switch (_context47.prev = _context47.next) {
|
|
2670
2765
|
case 0:
|
|
2671
2766
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
2672
2767
|
case 1:
|
|
2673
2768
|
case "end":
|
|
2674
|
-
return
|
|
2769
|
+
return _context47.stop();
|
|
2675
2770
|
}
|
|
2676
|
-
},
|
|
2771
|
+
}, _callee47);
|
|
2677
2772
|
}));
|
|
2678
2773
|
return function (_x2) {
|
|
2679
|
-
return
|
|
2774
|
+
return _ref50.apply(this, arguments);
|
|
2680
2775
|
};
|
|
2681
2776
|
}());
|
|
2682
2777
|
call.doHoldResume();
|
|
2683
|
-
|
|
2778
|
+
_context48.next = 1;
|
|
2684
2779
|
return _promise.default.resolve();
|
|
2685
2780
|
case 1:
|
|
2686
|
-
|
|
2781
|
+
_context48.next = 2;
|
|
2687
2782
|
return _promise.default.resolve();
|
|
2688
2783
|
case 2:
|
|
2689
2784
|
expect(setTimeout).not.toHaveBeenCalled();
|
|
@@ -2699,11 +2794,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2699
2794
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2700
2795
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2701
2796
|
roapEvent.data.type = 'ANSWER';
|
|
2702
|
-
|
|
2797
|
+
_context48.next = 3;
|
|
2703
2798
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2704
2799
|
case 3:
|
|
2705
2800
|
roapEvent.data.type = 'OK';
|
|
2706
|
-
|
|
2801
|
+
_context48.next = 4;
|
|
2707
2802
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2708
2803
|
case 4:
|
|
2709
2804
|
expect(clearTimeout).not.toHaveBeenCalled();
|
|
@@ -2718,14 +2813,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2718
2813
|
});
|
|
2719
2814
|
case 5:
|
|
2720
2815
|
case "end":
|
|
2721
|
-
return
|
|
2816
|
+
return _context48.stop();
|
|
2722
2817
|
}
|
|
2723
|
-
},
|
|
2818
|
+
}, _callee48);
|
|
2724
2819
|
})));
|
|
2725
|
-
it('Handle failure Call Hold case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2820
|
+
it('Handle failure Call Hold case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee50() {
|
|
2726
2821
|
var responsePayload;
|
|
2727
|
-
return _regenerator.default.wrap(function (
|
|
2728
|
-
while (1) switch (
|
|
2822
|
+
return _regenerator.default.wrap(function (_context50) {
|
|
2823
|
+
while (1) switch (_context50.prev = _context50.next) {
|
|
2729
2824
|
case 0:
|
|
2730
2825
|
expect.assertions(4);
|
|
2731
2826
|
responsePayload = {
|
|
@@ -2735,26 +2830,26 @@ describe('Supplementary Services tests', function () {
|
|
|
2735
2830
|
jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
|
|
2736
2831
|
call['held'] = false;
|
|
2737
2832
|
call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
|
|
2738
|
-
var
|
|
2739
|
-
return _regenerator.default.wrap(function (
|
|
2740
|
-
while (1) switch (
|
|
2833
|
+
var _ref52 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee49(errObj) {
|
|
2834
|
+
return _regenerator.default.wrap(function (_context49) {
|
|
2835
|
+
while (1) switch (_context49.prev = _context49.next) {
|
|
2741
2836
|
case 0:
|
|
2742
2837
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
|
|
2743
2838
|
expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
|
|
2744
2839
|
case 1:
|
|
2745
2840
|
case "end":
|
|
2746
|
-
return
|
|
2841
|
+
return _context49.stop();
|
|
2747
2842
|
}
|
|
2748
|
-
},
|
|
2843
|
+
}, _callee49);
|
|
2749
2844
|
}));
|
|
2750
2845
|
return function (_x3) {
|
|
2751
|
-
return
|
|
2846
|
+
return _ref52.apply(this, arguments);
|
|
2752
2847
|
};
|
|
2753
2848
|
}());
|
|
2754
|
-
|
|
2849
|
+
_context50.next = 1;
|
|
2755
2850
|
return call.doHoldResume();
|
|
2756
2851
|
case 1:
|
|
2757
|
-
|
|
2852
|
+
_context50.next = 2;
|
|
2758
2853
|
return (0, _testUtil.flushPromises)(2);
|
|
2759
2854
|
case 2:
|
|
2760
2855
|
expect(call.isHeld()).toStrictEqual(false);
|
|
@@ -2764,14 +2859,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2764
2859
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
2765
2860
|
case 3:
|
|
2766
2861
|
case "end":
|
|
2767
|
-
return
|
|
2862
|
+
return _context50.stop();
|
|
2768
2863
|
}
|
|
2769
|
-
},
|
|
2864
|
+
}, _callee50);
|
|
2770
2865
|
})));
|
|
2771
|
-
it('Handle failure Call Hold case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2866
|
+
it('Handle failure Call Hold case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee52() {
|
|
2772
2867
|
var responsePayload, rejectPayload, roapEvent;
|
|
2773
|
-
return _regenerator.default.wrap(function (
|
|
2774
|
-
while (1) switch (
|
|
2868
|
+
return _regenerator.default.wrap(function (_context52) {
|
|
2869
|
+
while (1) switch (_context52.prev = _context52.next) {
|
|
2775
2870
|
case 0:
|
|
2776
2871
|
expect.assertions(5);
|
|
2777
2872
|
responsePayload = {
|
|
@@ -2785,24 +2880,24 @@ describe('Supplementary Services tests', function () {
|
|
|
2785
2880
|
jest.spyOn(webex, 'request').mockResolvedValueOnce(responsePayload).mockRejectedValueOnce(rejectPayload);
|
|
2786
2881
|
call['held'] = false;
|
|
2787
2882
|
call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
|
|
2788
|
-
var
|
|
2789
|
-
return _regenerator.default.wrap(function (
|
|
2790
|
-
while (1) switch (
|
|
2883
|
+
var _ref54 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee51(errObj) {
|
|
2884
|
+
return _regenerator.default.wrap(function (_context51) {
|
|
2885
|
+
while (1) switch (_context51.prev = _context51.next) {
|
|
2791
2886
|
case 0:
|
|
2792
2887
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
|
|
2793
2888
|
expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
|
|
2794
2889
|
case 1:
|
|
2795
2890
|
case "end":
|
|
2796
|
-
return
|
|
2891
|
+
return _context51.stop();
|
|
2797
2892
|
}
|
|
2798
|
-
},
|
|
2893
|
+
}, _callee51);
|
|
2799
2894
|
}));
|
|
2800
2895
|
return function (_x4) {
|
|
2801
|
-
return
|
|
2896
|
+
return _ref54.apply(this, arguments);
|
|
2802
2897
|
};
|
|
2803
2898
|
}());
|
|
2804
2899
|
call.doHoldResume();
|
|
2805
|
-
|
|
2900
|
+
_context52.next = 1;
|
|
2806
2901
|
return (0, _testUtil.flushPromises)(2);
|
|
2807
2902
|
case 1:
|
|
2808
2903
|
/* the Call State should transition to S_CALL_ESTABLISHED
|
|
@@ -2812,7 +2907,7 @@ describe('Supplementary Services tests', function () {
|
|
|
2812
2907
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2813
2908
|
/* We are intentionally failing the ROAP ANSWER */
|
|
2814
2909
|
roapEvent.data.type = 'ANSWER';
|
|
2815
|
-
|
|
2910
|
+
_context52.next = 2;
|
|
2816
2911
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2817
2912
|
case 2:
|
|
2818
2913
|
expect(call.isHeld()).toStrictEqual(false);
|
|
@@ -2820,14 +2915,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2820
2915
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
2821
2916
|
case 3:
|
|
2822
2917
|
case "end":
|
|
2823
|
-
return
|
|
2918
|
+
return _context52.stop();
|
|
2824
2919
|
}
|
|
2825
|
-
},
|
|
2920
|
+
}, _callee52);
|
|
2826
2921
|
})));
|
|
2827
|
-
it('Handle failure Call Hold case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2922
|
+
it('Handle failure Call Hold case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee53() {
|
|
2828
2923
|
var responsePayload, warnSpy, roapEvent;
|
|
2829
|
-
return _regenerator.default.wrap(function (
|
|
2830
|
-
while (1) switch (
|
|
2924
|
+
return _regenerator.default.wrap(function (_context53) {
|
|
2925
|
+
while (1) switch (_context53.prev = _context53.next) {
|
|
2831
2926
|
case 0:
|
|
2832
2927
|
responsePayload = {
|
|
2833
2928
|
statusCode: 200,
|
|
@@ -2838,10 +2933,10 @@ describe('Supplementary Services tests', function () {
|
|
|
2838
2933
|
jest.spyOn(global, 'clearTimeout');
|
|
2839
2934
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2840
2935
|
call['held'] = false;
|
|
2841
|
-
|
|
2936
|
+
_context53.next = 1;
|
|
2842
2937
|
return call.doHoldResume();
|
|
2843
2938
|
case 1:
|
|
2844
|
-
|
|
2939
|
+
_context53.next = 2;
|
|
2845
2940
|
return (0, _testUtil.flushPromises)(2);
|
|
2846
2941
|
case 2:
|
|
2847
2942
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2856,19 +2951,19 @@ describe('Supplementary Services tests', function () {
|
|
|
2856
2951
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2857
2952
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2858
2953
|
roapEvent.data.type = 'ANSWER';
|
|
2859
|
-
|
|
2954
|
+
_context53.next = 3;
|
|
2860
2955
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2861
2956
|
case 3:
|
|
2862
2957
|
jest.spyOn(webex, 'request').mockRejectedValue({
|
|
2863
2958
|
statusCode: 403
|
|
2864
2959
|
});
|
|
2865
2960
|
roapEvent.data.type = 'OK';
|
|
2866
|
-
|
|
2961
|
+
_context53.next = 4;
|
|
2867
2962
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2868
2963
|
case 4:
|
|
2869
2964
|
/* this is for coverage */
|
|
2870
2965
|
call['callStateMachine'].state.value = 'S_CALL_HOLD';
|
|
2871
|
-
|
|
2966
|
+
_context53.next = 5;
|
|
2872
2967
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2873
2968
|
case 5:
|
|
2874
2969
|
expect(call.isHeld()).toStrictEqual(false);
|
|
@@ -2880,14 +2975,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2880
2975
|
});
|
|
2881
2976
|
case 6:
|
|
2882
2977
|
case "end":
|
|
2883
|
-
return
|
|
2978
|
+
return _context53.stop();
|
|
2884
2979
|
}
|
|
2885
|
-
},
|
|
2980
|
+
}, _callee53);
|
|
2886
2981
|
})));
|
|
2887
|
-
it('Handle failure Call resume case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
2982
|
+
it('Handle failure Call resume case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee54() {
|
|
2888
2983
|
var responsePayload, warnSpy, roapEvent;
|
|
2889
|
-
return _regenerator.default.wrap(function (
|
|
2890
|
-
while (1) switch (
|
|
2984
|
+
return _regenerator.default.wrap(function (_context54) {
|
|
2985
|
+
while (1) switch (_context54.prev = _context54.next) {
|
|
2891
2986
|
case 0:
|
|
2892
2987
|
responsePayload = {
|
|
2893
2988
|
statusCode: 200,
|
|
@@ -2898,10 +2993,10 @@ describe('Supplementary Services tests', function () {
|
|
|
2898
2993
|
jest.spyOn(global, 'clearTimeout');
|
|
2899
2994
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2900
2995
|
call['held'] = true;
|
|
2901
|
-
|
|
2996
|
+
_context54.next = 1;
|
|
2902
2997
|
return call.doHoldResume();
|
|
2903
2998
|
case 1:
|
|
2904
|
-
|
|
2999
|
+
_context54.next = 2;
|
|
2905
3000
|
return (0, _testUtil.flushPromises)(2);
|
|
2906
3001
|
case 2:
|
|
2907
3002
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2916,14 +3011,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2916
3011
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2917
3012
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2918
3013
|
roapEvent.data.type = 'ANSWER';
|
|
2919
|
-
|
|
3014
|
+
_context54.next = 3;
|
|
2920
3015
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2921
3016
|
case 3:
|
|
2922
3017
|
jest.spyOn(webex, 'request').mockRejectedValue({
|
|
2923
3018
|
statusCode: 403
|
|
2924
3019
|
});
|
|
2925
3020
|
roapEvent.data.type = 'OK';
|
|
2926
|
-
|
|
3021
|
+
_context54.next = 4;
|
|
2927
3022
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2928
3023
|
case 4:
|
|
2929
3024
|
expect(call.isHeld()).toStrictEqual(true);
|
|
@@ -2935,14 +3030,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2935
3030
|
});
|
|
2936
3031
|
case 5:
|
|
2937
3032
|
case "end":
|
|
2938
|
-
return
|
|
3033
|
+
return _context54.stop();
|
|
2939
3034
|
}
|
|
2940
|
-
},
|
|
3035
|
+
}, _callee54);
|
|
2941
3036
|
})));
|
|
2942
|
-
it('Handle Call hold case where successful Held response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3037
|
+
it('Handle Call hold case where successful Held response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee56() {
|
|
2943
3038
|
var responsePayload, roapEvent;
|
|
2944
|
-
return _regenerator.default.wrap(function (
|
|
2945
|
-
while (1) switch (
|
|
3039
|
+
return _regenerator.default.wrap(function (_context56) {
|
|
3040
|
+
while (1) switch (_context56.prev = _context56.next) {
|
|
2946
3041
|
case 0:
|
|
2947
3042
|
expect.assertions(5);
|
|
2948
3043
|
responsePayload = {
|
|
@@ -2952,25 +3047,25 @@ describe('Supplementary Services tests', function () {
|
|
|
2952
3047
|
jest.spyOn(webex, 'request').mockResolvedValue(responsePayload);
|
|
2953
3048
|
call['held'] = false;
|
|
2954
3049
|
call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
|
|
2955
|
-
var
|
|
2956
|
-
return _regenerator.default.wrap(function (
|
|
2957
|
-
while (1) switch (
|
|
3050
|
+
var _ref58 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee55(errObj) {
|
|
3051
|
+
return _regenerator.default.wrap(function (_context55) {
|
|
3052
|
+
while (1) switch (_context55.prev = _context55.next) {
|
|
2958
3053
|
case 0:
|
|
2959
3054
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.TIMEOUT);
|
|
2960
3055
|
expect(errObj.message).toStrictEqual('An error occurred while placing the call on hold. Wait a moment and try again.');
|
|
2961
3056
|
case 1:
|
|
2962
3057
|
case "end":
|
|
2963
|
-
return
|
|
3058
|
+
return _context55.stop();
|
|
2964
3059
|
}
|
|
2965
|
-
},
|
|
3060
|
+
}, _callee55);
|
|
2966
3061
|
}));
|
|
2967
3062
|
return function (_x5) {
|
|
2968
|
-
return
|
|
3063
|
+
return _ref58.apply(this, arguments);
|
|
2969
3064
|
};
|
|
2970
3065
|
}());
|
|
2971
3066
|
jest.runAllTimers();
|
|
2972
3067
|
call.doHoldResume();
|
|
2973
|
-
|
|
3068
|
+
_context56.next = 1;
|
|
2974
3069
|
return (0, _testUtil.flushPromises)(2);
|
|
2975
3070
|
case 1:
|
|
2976
3071
|
/* At this point, the Call State should be S_CALL_HOLD
|
|
@@ -2983,11 +3078,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2983
3078
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2984
3079
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2985
3080
|
roapEvent.data.type = 'ANSWER';
|
|
2986
|
-
|
|
3081
|
+
_context56.next = 2;
|
|
2987
3082
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2988
3083
|
case 2:
|
|
2989
3084
|
roapEvent.data.type = 'OK';
|
|
2990
|
-
|
|
3085
|
+
_context56.next = 3;
|
|
2991
3086
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2992
3087
|
case 3:
|
|
2993
3088
|
/* Advancing timer by 12 seconds so that it gets timed out */
|
|
@@ -2999,14 +3094,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2999
3094
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
3000
3095
|
case 4:
|
|
3001
3096
|
case "end":
|
|
3002
|
-
return
|
|
3097
|
+
return _context56.stop();
|
|
3003
3098
|
}
|
|
3004
|
-
},
|
|
3099
|
+
}, _callee56);
|
|
3005
3100
|
})));
|
|
3006
|
-
it('Handle successful Call Resume case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3101
|
+
it('Handle successful Call Resume case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee58() {
|
|
3007
3102
|
var responsePayload, warnSpy, roapEvent;
|
|
3008
|
-
return _regenerator.default.wrap(function (
|
|
3009
|
-
while (1) switch (
|
|
3103
|
+
return _regenerator.default.wrap(function (_context58) {
|
|
3104
|
+
while (1) switch (_context58.prev = _context58.next) {
|
|
3010
3105
|
case 0:
|
|
3011
3106
|
expect.assertions(7);
|
|
3012
3107
|
responsePayload = {
|
|
@@ -3019,25 +3114,25 @@ describe('Supplementary Services tests', function () {
|
|
|
3019
3114
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3020
3115
|
call['held'] = true;
|
|
3021
3116
|
call.on(_types2.CALL_EVENT_KEYS.RESUMED, /*#__PURE__*/function () {
|
|
3022
|
-
var
|
|
3023
|
-
return _regenerator.default.wrap(function (
|
|
3024
|
-
while (1) switch (
|
|
3117
|
+
var _ref60 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee57(correlationId) {
|
|
3118
|
+
return _regenerator.default.wrap(function (_context57) {
|
|
3119
|
+
while (1) switch (_context57.prev = _context57.next) {
|
|
3025
3120
|
case 0:
|
|
3026
3121
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
3027
3122
|
case 1:
|
|
3028
3123
|
case "end":
|
|
3029
|
-
return
|
|
3124
|
+
return _context57.stop();
|
|
3030
3125
|
}
|
|
3031
|
-
},
|
|
3126
|
+
}, _callee57);
|
|
3032
3127
|
}));
|
|
3033
3128
|
return function (_x6) {
|
|
3034
|
-
return
|
|
3129
|
+
return _ref60.apply(this, arguments);
|
|
3035
3130
|
};
|
|
3036
3131
|
}());
|
|
3037
|
-
|
|
3132
|
+
_context58.next = 1;
|
|
3038
3133
|
return call.doHoldResume();
|
|
3039
3134
|
case 1:
|
|
3040
|
-
|
|
3135
|
+
_context58.next = 2;
|
|
3041
3136
|
return (0, _testUtil.flushPromises)(2);
|
|
3042
3137
|
case 2:
|
|
3043
3138
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -3053,11 +3148,11 @@ describe('Supplementary Services tests', function () {
|
|
|
3053
3148
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
3054
3149
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
3055
3150
|
roapEvent.data.type = 'ANSWER';
|
|
3056
|
-
|
|
3151
|
+
_context58.next = 3;
|
|
3057
3152
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
3058
3153
|
case 3:
|
|
3059
3154
|
roapEvent.data.type = 'OK';
|
|
3060
|
-
|
|
3155
|
+
_context58.next = 4;
|
|
3061
3156
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
3062
3157
|
case 4:
|
|
3063
3158
|
expect(clearTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -3072,14 +3167,14 @@ describe('Supplementary Services tests', function () {
|
|
|
3072
3167
|
});
|
|
3073
3168
|
case 5:
|
|
3074
3169
|
case "end":
|
|
3075
|
-
return
|
|
3170
|
+
return _context58.stop();
|
|
3076
3171
|
}
|
|
3077
|
-
},
|
|
3172
|
+
}, _callee58);
|
|
3078
3173
|
})));
|
|
3079
|
-
it('Handle successful Call Resume case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3174
|
+
it('Handle successful Call Resume case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee60() {
|
|
3080
3175
|
var responsePayload, warnSpy, roapEvent;
|
|
3081
|
-
return _regenerator.default.wrap(function (
|
|
3082
|
-
while (1) switch (
|
|
3176
|
+
return _regenerator.default.wrap(function (_context60) {
|
|
3177
|
+
while (1) switch (_context60.prev = _context60.next) {
|
|
3083
3178
|
case 0:
|
|
3084
3179
|
expect.assertions(7);
|
|
3085
3180
|
responsePayload = {
|
|
@@ -3092,26 +3187,26 @@ describe('Supplementary Services tests', function () {
|
|
|
3092
3187
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3093
3188
|
call['held'] = true;
|
|
3094
3189
|
call.on(_types2.CALL_EVENT_KEYS.RESUMED, /*#__PURE__*/function () {
|
|
3095
|
-
var
|
|
3096
|
-
return _regenerator.default.wrap(function (
|
|
3097
|
-
while (1) switch (
|
|
3190
|
+
var _ref62 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee59(correlationId) {
|
|
3191
|
+
return _regenerator.default.wrap(function (_context59) {
|
|
3192
|
+
while (1) switch (_context59.prev = _context59.next) {
|
|
3098
3193
|
case 0:
|
|
3099
3194
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
3100
3195
|
case 1:
|
|
3101
3196
|
case "end":
|
|
3102
|
-
return
|
|
3197
|
+
return _context59.stop();
|
|
3103
3198
|
}
|
|
3104
|
-
},
|
|
3199
|
+
}, _callee59);
|
|
3105
3200
|
}));
|
|
3106
3201
|
return function (_x7) {
|
|
3107
|
-
return
|
|
3202
|
+
return _ref62.apply(this, arguments);
|
|
3108
3203
|
};
|
|
3109
3204
|
}());
|
|
3110
3205
|
call.doHoldResume();
|
|
3111
|
-
|
|
3206
|
+
_context60.next = 1;
|
|
3112
3207
|
return _promise.default.resolve();
|
|
3113
3208
|
case 1:
|
|
3114
|
-
|
|
3209
|
+
_context60.next = 2;
|
|
3115
3210
|
return _promise.default.resolve();
|
|
3116
3211
|
case 2:
|
|
3117
3212
|
expect(setTimeout).not.toHaveBeenCalled();
|
|
@@ -3127,11 +3222,11 @@ describe('Supplementary Services tests', function () {
|
|
|
3127
3222
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
3128
3223
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
3129
3224
|
roapEvent.data.type = 'ANSWER';
|
|
3130
|
-
|
|
3225
|
+
_context60.next = 3;
|
|
3131
3226
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
3132
3227
|
case 3:
|
|
3133
3228
|
roapEvent.data.type = 'OK';
|
|
3134
|
-
|
|
3229
|
+
_context60.next = 4;
|
|
3135
3230
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
3136
3231
|
case 4:
|
|
3137
3232
|
expect(clearTimeout).not.toHaveBeenCalled();
|
|
@@ -3146,14 +3241,14 @@ describe('Supplementary Services tests', function () {
|
|
|
3146
3241
|
});
|
|
3147
3242
|
case 5:
|
|
3148
3243
|
case "end":
|
|
3149
|
-
return
|
|
3244
|
+
return _context60.stop();
|
|
3150
3245
|
}
|
|
3151
|
-
},
|
|
3246
|
+
}, _callee60);
|
|
3152
3247
|
})));
|
|
3153
|
-
it('Handle failure Call Resume case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3248
|
+
it('Handle failure Call Resume case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee62() {
|
|
3154
3249
|
var responsePayload;
|
|
3155
|
-
return _regenerator.default.wrap(function (
|
|
3156
|
-
while (1) switch (
|
|
3250
|
+
return _regenerator.default.wrap(function (_context62) {
|
|
3251
|
+
while (1) switch (_context62.prev = _context62.next) {
|
|
3157
3252
|
case 0:
|
|
3158
3253
|
expect.assertions(4);
|
|
3159
3254
|
responsePayload = {
|
|
@@ -3163,26 +3258,26 @@ describe('Supplementary Services tests', function () {
|
|
|
3163
3258
|
jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
|
|
3164
3259
|
call['held'] = true;
|
|
3165
3260
|
call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
|
|
3166
|
-
var
|
|
3167
|
-
return _regenerator.default.wrap(function (
|
|
3168
|
-
while (1) switch (
|
|
3261
|
+
var _ref64 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee61(errObj) {
|
|
3262
|
+
return _regenerator.default.wrap(function (_context61) {
|
|
3263
|
+
while (1) switch (_context61.prev = _context61.next) {
|
|
3169
3264
|
case 0:
|
|
3170
3265
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
|
|
3171
3266
|
expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
|
|
3172
3267
|
case 1:
|
|
3173
3268
|
case "end":
|
|
3174
|
-
return
|
|
3269
|
+
return _context61.stop();
|
|
3175
3270
|
}
|
|
3176
|
-
},
|
|
3271
|
+
}, _callee61);
|
|
3177
3272
|
}));
|
|
3178
3273
|
return function (_x8) {
|
|
3179
|
-
return
|
|
3274
|
+
return _ref64.apply(this, arguments);
|
|
3180
3275
|
};
|
|
3181
3276
|
}());
|
|
3182
|
-
|
|
3277
|
+
_context62.next = 1;
|
|
3183
3278
|
return call.doHoldResume();
|
|
3184
3279
|
case 1:
|
|
3185
|
-
|
|
3280
|
+
_context62.next = 2;
|
|
3186
3281
|
return (0, _testUtil.flushPromises)(2);
|
|
3187
3282
|
case 2:
|
|
3188
3283
|
expect(call.isHeld()).toStrictEqual(true);
|
|
@@ -3193,14 +3288,14 @@ describe('Supplementary Services tests', function () {
|
|
|
3193
3288
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
3194
3289
|
case 3:
|
|
3195
3290
|
case "end":
|
|
3196
|
-
return
|
|
3291
|
+
return _context62.stop();
|
|
3197
3292
|
}
|
|
3198
|
-
},
|
|
3293
|
+
}, _callee62);
|
|
3199
3294
|
})));
|
|
3200
|
-
it('Handle failure Call Resume case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3295
|
+
it('Handle failure Call Resume case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee64() {
|
|
3201
3296
|
var responsePayload, rejectPayload, roapEvent;
|
|
3202
|
-
return _regenerator.default.wrap(function (
|
|
3203
|
-
while (1) switch (
|
|
3297
|
+
return _regenerator.default.wrap(function (_context64) {
|
|
3298
|
+
while (1) switch (_context64.prev = _context64.next) {
|
|
3204
3299
|
case 0:
|
|
3205
3300
|
expect.assertions(5);
|
|
3206
3301
|
responsePayload = {
|
|
@@ -3214,24 +3309,24 @@ describe('Supplementary Services tests', function () {
|
|
|
3214
3309
|
jest.spyOn(webex, 'request').mockResolvedValueOnce(responsePayload).mockRejectedValueOnce(rejectPayload);
|
|
3215
3310
|
call['held'] = true;
|
|
3216
3311
|
call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
|
|
3217
|
-
var
|
|
3218
|
-
return _regenerator.default.wrap(function (
|
|
3219
|
-
while (1) switch (
|
|
3312
|
+
var _ref66 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee63(errObj) {
|
|
3313
|
+
return _regenerator.default.wrap(function (_context63) {
|
|
3314
|
+
while (1) switch (_context63.prev = _context63.next) {
|
|
3220
3315
|
case 0:
|
|
3221
3316
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
|
|
3222
3317
|
expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
|
|
3223
3318
|
case 1:
|
|
3224
3319
|
case "end":
|
|
3225
|
-
return
|
|
3320
|
+
return _context63.stop();
|
|
3226
3321
|
}
|
|
3227
|
-
},
|
|
3322
|
+
}, _callee63);
|
|
3228
3323
|
}));
|
|
3229
3324
|
return function (_x9) {
|
|
3230
|
-
return
|
|
3325
|
+
return _ref66.apply(this, arguments);
|
|
3231
3326
|
};
|
|
3232
3327
|
}());
|
|
3233
3328
|
call.doHoldResume();
|
|
3234
|
-
|
|
3329
|
+
_context64.next = 1;
|
|
3235
3330
|
return (0, _testUtil.flushPromises)(2);
|
|
3236
3331
|
case 1:
|
|
3237
3332
|
/* At this point , the Call State should transition to S_CALL_ESTABLISHED
|
|
@@ -3242,7 +3337,7 @@ describe('Supplementary Services tests', function () {
|
|
|
3242
3337
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
3243
3338
|
/* We are intentionally failing the ROAP ANSWER */
|
|
3244
3339
|
roapEvent.data.type = 'ANSWER';
|
|
3245
|
-
|
|
3340
|
+
_context64.next = 2;
|
|
3246
3341
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
3247
3342
|
case 2:
|
|
3248
3343
|
expect(call.isHeld()).toStrictEqual(true);
|
|
@@ -3250,14 +3345,14 @@ describe('Supplementary Services tests', function () {
|
|
|
3250
3345
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
3251
3346
|
case 3:
|
|
3252
3347
|
case "end":
|
|
3253
|
-
return
|
|
3348
|
+
return _context64.stop();
|
|
3254
3349
|
}
|
|
3255
|
-
},
|
|
3350
|
+
}, _callee64);
|
|
3256
3351
|
})));
|
|
3257
|
-
it('Handle Call resume case where successful response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3352
|
+
it('Handle Call resume case where successful response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee66() {
|
|
3258
3353
|
var responsePayload, roapEvent;
|
|
3259
|
-
return _regenerator.default.wrap(function (
|
|
3260
|
-
while (1) switch (
|
|
3354
|
+
return _regenerator.default.wrap(function (_context66) {
|
|
3355
|
+
while (1) switch (_context66.prev = _context66.next) {
|
|
3261
3356
|
case 0:
|
|
3262
3357
|
expect.assertions(5);
|
|
3263
3358
|
responsePayload = {
|
|
@@ -3267,24 +3362,24 @@ describe('Supplementary Services tests', function () {
|
|
|
3267
3362
|
jest.spyOn(webex, 'request').mockResolvedValue(responsePayload);
|
|
3268
3363
|
call['held'] = true;
|
|
3269
3364
|
call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
|
|
3270
|
-
var
|
|
3271
|
-
return _regenerator.default.wrap(function (
|
|
3272
|
-
while (1) switch (
|
|
3365
|
+
var _ref68 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee65(errObj) {
|
|
3366
|
+
return _regenerator.default.wrap(function (_context65) {
|
|
3367
|
+
while (1) switch (_context65.prev = _context65.next) {
|
|
3273
3368
|
case 0:
|
|
3274
3369
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.TIMEOUT);
|
|
3275
3370
|
expect(errObj.message).toStrictEqual('An error occurred while resuming the call. Wait a moment and try again.');
|
|
3276
3371
|
case 1:
|
|
3277
3372
|
case "end":
|
|
3278
|
-
return
|
|
3373
|
+
return _context65.stop();
|
|
3279
3374
|
}
|
|
3280
|
-
},
|
|
3375
|
+
}, _callee65);
|
|
3281
3376
|
}));
|
|
3282
3377
|
return function (_x0) {
|
|
3283
|
-
return
|
|
3378
|
+
return _ref68.apply(this, arguments);
|
|
3284
3379
|
};
|
|
3285
3380
|
}());
|
|
3286
3381
|
call.doHoldResume();
|
|
3287
|
-
|
|
3382
|
+
_context66.next = 1;
|
|
3288
3383
|
return (0, _testUtil.flushPromises)(2);
|
|
3289
3384
|
case 1:
|
|
3290
3385
|
/* At this point ,the Call State should be S_CALL_RESUME
|
|
@@ -3297,11 +3392,11 @@ describe('Supplementary Services tests', function () {
|
|
|
3297
3392
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
3298
3393
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
3299
3394
|
roapEvent.data.type = 'ANSWER';
|
|
3300
|
-
|
|
3395
|
+
_context66.next = 2;
|
|
3301
3396
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
3302
3397
|
case 2:
|
|
3303
3398
|
roapEvent.data.type = 'OK';
|
|
3304
|
-
|
|
3399
|
+
_context66.next = 3;
|
|
3305
3400
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
3306
3401
|
case 3:
|
|
3307
3402
|
/* Advancing timer by 12 seconds so that it gets timed out */
|
|
@@ -3311,9 +3406,9 @@ describe('Supplementary Services tests', function () {
|
|
|
3311
3406
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
3312
3407
|
case 4:
|
|
3313
3408
|
case "end":
|
|
3314
|
-
return
|
|
3409
|
+
return _context66.stop();
|
|
3315
3410
|
}
|
|
3316
|
-
},
|
|
3411
|
+
}, _callee66);
|
|
3317
3412
|
})));
|
|
3318
3413
|
});
|
|
3319
3414
|
describe('Call transfer tests', function () {
|
|
@@ -3346,10 +3441,10 @@ describe('Supplementary Services tests', function () {
|
|
|
3346
3441
|
secondCall.removeAllListeners(_types2.CALL_EVENT_KEYS.CALL_ERROR);
|
|
3347
3442
|
secondCall['held'] = false;
|
|
3348
3443
|
});
|
|
3349
|
-
it('Handle successful consult transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3444
|
+
it('Handle successful consult transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee69() {
|
|
3350
3445
|
var responsePayload, requestSpy, warnSpy, infoSpy, metricSpy;
|
|
3351
|
-
return _regenerator.default.wrap(function (
|
|
3352
|
-
while (1) switch (
|
|
3446
|
+
return _regenerator.default.wrap(function (_context69) {
|
|
3447
|
+
while (1) switch (_context69.prev = _context69.next) {
|
|
3353
3448
|
case 0:
|
|
3354
3449
|
expect.assertions(12); // Updated to match actual assertion count
|
|
3355
3450
|
responsePayload = {
|
|
@@ -3361,41 +3456,41 @@ describe('Supplementary Services tests', function () {
|
|
|
3361
3456
|
infoSpy = jest.spyOn(_Logger.default, 'info');
|
|
3362
3457
|
metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
|
|
3363
3458
|
call.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
|
|
3364
|
-
var
|
|
3365
|
-
return _regenerator.default.wrap(function (
|
|
3366
|
-
while (1) switch (
|
|
3459
|
+
var _ref70 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee67(correlationId) {
|
|
3460
|
+
return _regenerator.default.wrap(function (_context67) {
|
|
3461
|
+
while (1) switch (_context67.prev = _context67.next) {
|
|
3367
3462
|
case 0:
|
|
3368
3463
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
3369
3464
|
case 1:
|
|
3370
3465
|
case "end":
|
|
3371
|
-
return
|
|
3466
|
+
return _context67.stop();
|
|
3372
3467
|
}
|
|
3373
|
-
},
|
|
3468
|
+
}, _callee67);
|
|
3374
3469
|
}));
|
|
3375
3470
|
return function (_x1) {
|
|
3376
|
-
return
|
|
3471
|
+
return _ref70.apply(this, arguments);
|
|
3377
3472
|
};
|
|
3378
3473
|
}());
|
|
3379
3474
|
secondCall.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
|
|
3380
|
-
var
|
|
3381
|
-
return _regenerator.default.wrap(function (
|
|
3382
|
-
while (1) switch (
|
|
3475
|
+
var _ref71 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee68(correlationId) {
|
|
3476
|
+
return _regenerator.default.wrap(function (_context68) {
|
|
3477
|
+
while (1) switch (_context68.prev = _context68.next) {
|
|
3383
3478
|
case 0:
|
|
3384
3479
|
expect(correlationId).toStrictEqual(secondCall.getCorrelationId());
|
|
3385
3480
|
case 1:
|
|
3386
3481
|
case "end":
|
|
3387
|
-
return
|
|
3482
|
+
return _context68.stop();
|
|
3388
3483
|
}
|
|
3389
|
-
},
|
|
3484
|
+
}, _callee68);
|
|
3390
3485
|
}));
|
|
3391
3486
|
return function (_x10) {
|
|
3392
|
-
return
|
|
3487
|
+
return _ref71.apply(this, arguments);
|
|
3393
3488
|
};
|
|
3394
3489
|
}());
|
|
3395
|
-
|
|
3490
|
+
_context69.next = 1;
|
|
3396
3491
|
return call.completeTransfer(_types5.TransferType.CONSULT, secondCall.getCallId(), undefined);
|
|
3397
3492
|
case 1:
|
|
3398
|
-
|
|
3493
|
+
_context69.next = 2;
|
|
3399
3494
|
return (0, _testUtil.flushPromises)(2);
|
|
3400
3495
|
case 2:
|
|
3401
3496
|
expect(requestSpy).toBeCalled();
|
|
@@ -3418,14 +3513,14 @@ describe('Supplementary Services tests', function () {
|
|
|
3418
3513
|
expect(warnSpy).not.toHaveBeenCalledWith("Consult Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
|
|
3419
3514
|
case 3:
|
|
3420
3515
|
case "end":
|
|
3421
|
-
return
|
|
3516
|
+
return _context69.stop();
|
|
3422
3517
|
}
|
|
3423
|
-
},
|
|
3518
|
+
}, _callee69);
|
|
3424
3519
|
})));
|
|
3425
|
-
it('Handle successful blind transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3520
|
+
it('Handle successful blind transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee71() {
|
|
3426
3521
|
var responsePayload, requestSpy, warnSpy, infoSpy, metricSpy;
|
|
3427
|
-
return _regenerator.default.wrap(function (
|
|
3428
|
-
while (1) switch (
|
|
3522
|
+
return _regenerator.default.wrap(function (_context71) {
|
|
3523
|
+
while (1) switch (_context71.prev = _context71.next) {
|
|
3429
3524
|
case 0:
|
|
3430
3525
|
expect.assertions(10); // Updated to match actual assertion count
|
|
3431
3526
|
responsePayload = {
|
|
@@ -3437,25 +3532,25 @@ describe('Supplementary Services tests', function () {
|
|
|
3437
3532
|
infoSpy = jest.spyOn(_Logger.default, 'info');
|
|
3438
3533
|
metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
|
|
3439
3534
|
call.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
|
|
3440
|
-
var
|
|
3441
|
-
return _regenerator.default.wrap(function (
|
|
3442
|
-
while (1) switch (
|
|
3535
|
+
var _ref73 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee70(correlationId) {
|
|
3536
|
+
return _regenerator.default.wrap(function (_context70) {
|
|
3537
|
+
while (1) switch (_context70.prev = _context70.next) {
|
|
3443
3538
|
case 0:
|
|
3444
3539
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
3445
3540
|
case 1:
|
|
3446
3541
|
case "end":
|
|
3447
|
-
return
|
|
3542
|
+
return _context70.stop();
|
|
3448
3543
|
}
|
|
3449
|
-
},
|
|
3544
|
+
}, _callee70);
|
|
3450
3545
|
}));
|
|
3451
3546
|
return function (_x11) {
|
|
3452
|
-
return
|
|
3547
|
+
return _ref73.apply(this, arguments);
|
|
3453
3548
|
};
|
|
3454
3549
|
}());
|
|
3455
|
-
|
|
3550
|
+
_context71.next = 1;
|
|
3456
3551
|
return call.completeTransfer(_types5.TransferType.BLIND, undefined, transfereeNumber);
|
|
3457
3552
|
case 1:
|
|
3458
|
-
|
|
3553
|
+
_context71.next = 2;
|
|
3459
3554
|
return (0, _testUtil.flushPromises)(2);
|
|
3460
3555
|
case 2:
|
|
3461
3556
|
expect(requestSpy).toBeCalled();
|
|
@@ -3474,14 +3569,14 @@ describe('Supplementary Services tests', function () {
|
|
|
3474
3569
|
expect(warnSpy).not.toHaveBeenCalledWith("Blind Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
|
|
3475
3570
|
case 3:
|
|
3476
3571
|
case "end":
|
|
3477
|
-
return
|
|
3572
|
+
return _context71.stop();
|
|
3478
3573
|
}
|
|
3479
|
-
},
|
|
3574
|
+
}, _callee71);
|
|
3480
3575
|
})));
|
|
3481
|
-
it('Handle unsuccessful blind transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3576
|
+
it('Handle unsuccessful blind transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee72() {
|
|
3482
3577
|
var responsePayload, emitSpy, requestSpy, warnSpy, metricSpy;
|
|
3483
|
-
return _regenerator.default.wrap(function (
|
|
3484
|
-
while (1) switch (
|
|
3578
|
+
return _regenerator.default.wrap(function (_context72) {
|
|
3579
|
+
while (1) switch (_context72.prev = _context72.next) {
|
|
3485
3580
|
case 0:
|
|
3486
3581
|
responsePayload = {
|
|
3487
3582
|
statusCode: 403,
|
|
@@ -3492,10 +3587,10 @@ describe('Supplementary Services tests', function () {
|
|
|
3492
3587
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3493
3588
|
metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
|
|
3494
3589
|
call['broadworksCorrelationInfo'] = 'dummy-broadworks-correlation-info';
|
|
3495
|
-
|
|
3590
|
+
_context72.next = 1;
|
|
3496
3591
|
return call.completeTransfer(_types5.TransferType.BLIND, undefined, transfereeNumber);
|
|
3497
3592
|
case 1:
|
|
3498
|
-
|
|
3593
|
+
_context72.next = 2;
|
|
3499
3594
|
return (0, _testUtil.flushPromises)(1);
|
|
3500
3595
|
case 2:
|
|
3501
3596
|
expect(requestSpy).toBeCalled();
|
|
@@ -3516,14 +3611,14 @@ describe('Supplementary Services tests', function () {
|
|
|
3516
3611
|
expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.CALL_ERROR, _types4.TRANSFER_ACTION.BLIND, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), expect.any(_Errors.CallError));
|
|
3517
3612
|
case 3:
|
|
3518
3613
|
case "end":
|
|
3519
|
-
return
|
|
3614
|
+
return _context72.stop();
|
|
3520
3615
|
}
|
|
3521
|
-
},
|
|
3616
|
+
}, _callee72);
|
|
3522
3617
|
})));
|
|
3523
|
-
it('Handle unsuccessful consult transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3618
|
+
it('Handle unsuccessful consult transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee73() {
|
|
3524
3619
|
var responsePayload, emitSpy, requestSpy, warnSpy, metricSpy;
|
|
3525
|
-
return _regenerator.default.wrap(function (
|
|
3526
|
-
while (1) switch (
|
|
3620
|
+
return _regenerator.default.wrap(function (_context73) {
|
|
3621
|
+
while (1) switch (_context73.prev = _context73.next) {
|
|
3527
3622
|
case 0:
|
|
3528
3623
|
responsePayload = {
|
|
3529
3624
|
statusCode: 403,
|
|
@@ -3533,10 +3628,10 @@ describe('Supplementary Services tests', function () {
|
|
|
3533
3628
|
requestSpy = jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
|
|
3534
3629
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3535
3630
|
metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
|
|
3536
|
-
|
|
3631
|
+
_context73.next = 1;
|
|
3537
3632
|
return call.completeTransfer(_types5.TransferType.CONSULT, secondCall.getCallId(), undefined);
|
|
3538
3633
|
case 1:
|
|
3539
|
-
|
|
3634
|
+
_context73.next = 2;
|
|
3540
3635
|
return (0, _testUtil.flushPromises)(2);
|
|
3541
3636
|
case 2:
|
|
3542
3637
|
expect(requestSpy).toBeCalled();
|
|
@@ -3557,18 +3652,18 @@ describe('Supplementary Services tests', function () {
|
|
|
3557
3652
|
expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.CALL_ERROR, _types4.TRANSFER_ACTION.CONSULT, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), expect.any(_Errors.CallError));
|
|
3558
3653
|
case 3:
|
|
3559
3654
|
case "end":
|
|
3560
|
-
return
|
|
3655
|
+
return _context73.stop();
|
|
3561
3656
|
}
|
|
3562
|
-
},
|
|
3657
|
+
}, _callee73);
|
|
3563
3658
|
})));
|
|
3564
|
-
it('Handle blind transfer with undefined transferTarget', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3659
|
+
it('Handle blind transfer with undefined transferTarget', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee74() {
|
|
3565
3660
|
var requestSpy, warnSpy;
|
|
3566
|
-
return _regenerator.default.wrap(function (
|
|
3567
|
-
while (1) switch (
|
|
3661
|
+
return _regenerator.default.wrap(function (_context74) {
|
|
3662
|
+
while (1) switch (_context74.prev = _context74.next) {
|
|
3568
3663
|
case 0:
|
|
3569
3664
|
requestSpy = jest.spyOn(webex, 'request');
|
|
3570
3665
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3571
|
-
|
|
3666
|
+
_context74.next = 1;
|
|
3572
3667
|
return call.completeTransfer(_types5.TransferType.BLIND, undefined, undefined);
|
|
3573
3668
|
case 1:
|
|
3574
3669
|
/* We should be in CALL_ESTABLISHED state */
|
|
@@ -3580,18 +3675,18 @@ describe('Supplementary Services tests', function () {
|
|
|
3580
3675
|
expect(warnSpy).toBeCalledOnceWith("Invalid information received, transfer failed for correlationId: ".concat(call.getCorrelationId()), transferLoggingContext);
|
|
3581
3676
|
case 2:
|
|
3582
3677
|
case "end":
|
|
3583
|
-
return
|
|
3678
|
+
return _context74.stop();
|
|
3584
3679
|
}
|
|
3585
|
-
},
|
|
3680
|
+
}, _callee74);
|
|
3586
3681
|
})));
|
|
3587
|
-
it('Handle consult transfer with undefined transferCallId', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
3682
|
+
it('Handle consult transfer with undefined transferCallId', /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee75() {
|
|
3588
3683
|
var requestSpy, warnSpy;
|
|
3589
|
-
return _regenerator.default.wrap(function (
|
|
3590
|
-
while (1) switch (
|
|
3684
|
+
return _regenerator.default.wrap(function (_context75) {
|
|
3685
|
+
while (1) switch (_context75.prev = _context75.next) {
|
|
3591
3686
|
case 0:
|
|
3592
3687
|
requestSpy = jest.spyOn(webex, 'request');
|
|
3593
3688
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3594
|
-
|
|
3689
|
+
_context75.next = 1;
|
|
3595
3690
|
return call.completeTransfer(_types5.TransferType.CONSULT, undefined, undefined);
|
|
3596
3691
|
case 1:
|
|
3597
3692
|
/* We should be in CALL_ESTABLISHED state */
|
|
@@ -3603,9 +3698,9 @@ describe('Supplementary Services tests', function () {
|
|
|
3603
3698
|
expect(warnSpy).toBeCalledOnceWith("Invalid information received, transfer failed for correlationId: ".concat(call.getCorrelationId()), transferLoggingContext);
|
|
3604
3699
|
case 2:
|
|
3605
3700
|
case "end":
|
|
3606
|
-
return
|
|
3701
|
+
return _context75.stop();
|
|
3607
3702
|
}
|
|
3608
|
-
},
|
|
3703
|
+
}, _callee75);
|
|
3609
3704
|
})));
|
|
3610
3705
|
});
|
|
3611
3706
|
});
|