@webex/calling 3.5.0-next.20 → 3.5.0-next.21
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 +26 -4
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +456 -373
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js +6 -1
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/module/CallingClient/calling/call.js +22 -4
- package/dist/module/CallingClient/calling/types.js +5 -0
- package/dist/types/CallingClient/calling/call.d.ts +2 -2
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +5 -1
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -625,16 +625,99 @@ describe('Call Tests', function () {
|
|
|
625
625
|
method: 'updateMedia'
|
|
626
626
|
});
|
|
627
627
|
});
|
|
628
|
+
it('test system mute and user mute different scnearios', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
|
|
629
|
+
var logSpy, callManager, mockStream, localAudioStream, call;
|
|
630
|
+
return _regenerator.default.wrap(function _callee12$(_context12) {
|
|
631
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
632
|
+
case 0:
|
|
633
|
+
logSpy = jest.spyOn(_Logger.default, 'info');
|
|
634
|
+
webex.request.mockReturnValue({
|
|
635
|
+
statusCode: 200,
|
|
636
|
+
body: {
|
|
637
|
+
device: {
|
|
638
|
+
deviceId: '8a67806f-fc4d-446b-a131-31e71ea5b010',
|
|
639
|
+
correlationId: '8a67806f-fc4d-446b-a131-31e71ea5b011'
|
|
640
|
+
},
|
|
641
|
+
callId: '8a67806f-fc4d-446b-a131-31e71ea5b020'
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
|
|
645
|
+
mockStream = {
|
|
646
|
+
on: jest.fn(),
|
|
647
|
+
setUserMuted: jest.fn(),
|
|
648
|
+
systemMuted: false,
|
|
649
|
+
userMuted: false
|
|
650
|
+
};
|
|
651
|
+
localAudioStream = mockStream;
|
|
652
|
+
call = callManager.createCall(dest, _types3.CallDirection.OUTBOUND, deviceId, mockLineId);
|
|
653
|
+
expect(call).toBeTruthy();
|
|
654
|
+
/* System mute is being triggered, mute state within call object should update to true */
|
|
655
|
+
mockStream.systemMuted = true;
|
|
656
|
+
call.mute(localAudioStream, _types5.MUTE_TYPE.SYSTEM);
|
|
657
|
+
expect(call.isMuted()).toEqual(true);
|
|
658
|
+
|
|
659
|
+
/* User mute is triggered, but no change will happen to the call object mute state since it is system muted */
|
|
660
|
+
logSpy.mockClear();
|
|
661
|
+
call.mute(localAudioStream, _types5.MUTE_TYPE.USER);
|
|
662
|
+
expect(call.isMuted()).toEqual(true);
|
|
663
|
+
expect(mockStream.setUserMuted).not.toBeCalledOnceWith(true);
|
|
664
|
+
expect(logSpy).toBeCalledOnceWith("Call is muted on the system - ".concat(call.getCorrelationId(), "."), {
|
|
665
|
+
file: 'call',
|
|
666
|
+
method: 'mute'
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
/* System mute is being triggered, mute state within call object should update to false */
|
|
670
|
+
mockStream.systemMuted = false;
|
|
671
|
+
call.mute(localAudioStream, _types5.MUTE_TYPE.SYSTEM);
|
|
672
|
+
expect(call.isMuted()).toEqual(false);
|
|
673
|
+
|
|
674
|
+
/* User mute can be triggered now updating call object mute state as well */
|
|
675
|
+
call.mute(localAudioStream, _types5.MUTE_TYPE.USER);
|
|
676
|
+
expect(call.isMuted()).toEqual(true);
|
|
677
|
+
expect(mockStream.setUserMuted).toBeCalledOnceWith(true);
|
|
678
|
+
mockStream.userMuted = true;
|
|
679
|
+
|
|
680
|
+
/* System mute being triggered now won't update the mute state within call object but will block the user unmute */
|
|
681
|
+
logSpy.mockClear();
|
|
682
|
+
mockStream.systemMuted = true;
|
|
683
|
+
call.mute(localAudioStream, _types5.MUTE_TYPE.SYSTEM);
|
|
684
|
+
expect(call.isMuted()).toEqual(true);
|
|
685
|
+
expect(logSpy).toBeCalledOnceWith("Call is muted by the user already - ".concat(call.getCorrelationId(), "."), {
|
|
686
|
+
file: 'call',
|
|
687
|
+
method: 'mute'
|
|
688
|
+
});
|
|
689
|
+
|
|
690
|
+
/* User mute now won't be able to update mute state back to false as system mute is also set */
|
|
691
|
+
call.mute(localAudioStream, _types5.MUTE_TYPE.USER);
|
|
692
|
+
expect(call.isMuted()).toEqual(true);
|
|
693
|
+
expect(mockStream.setUserMuted).not.toBeCalledOnceWith(false);
|
|
694
|
+
|
|
695
|
+
/* Revert the system mute but call mute state remains same */
|
|
696
|
+
mockStream.systemMuted = false;
|
|
697
|
+
call.mute(localAudioStream, _types5.MUTE_TYPE.SYSTEM);
|
|
698
|
+
expect(call.isMuted()).toEqual(true);
|
|
699
|
+
|
|
700
|
+
/* User mute will be able update the mute state now */
|
|
701
|
+
mockStream.setUserMuted.mockClear();
|
|
702
|
+
call.mute(localAudioStream, _types5.MUTE_TYPE.USER);
|
|
703
|
+
expect(call.isMuted()).toEqual(false);
|
|
704
|
+
expect(mockStream.setUserMuted).toBeCalledOnceWith(false);
|
|
705
|
+
case 37:
|
|
706
|
+
case "end":
|
|
707
|
+
return _context12.stop();
|
|
708
|
+
}
|
|
709
|
+
}, _callee12);
|
|
710
|
+
})));
|
|
628
711
|
describe('Guest Calling Flow Tests', function () {
|
|
629
712
|
var dummyEvent = {
|
|
630
713
|
type: 'E_SEND_CALL_SETUP',
|
|
631
714
|
data: undefined
|
|
632
715
|
};
|
|
633
716
|
var call;
|
|
634
|
-
it('outgoing call without guest calling must have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
717
|
+
it('outgoing call without guest calling must have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
|
|
635
718
|
var requestSpy, requestArgs;
|
|
636
|
-
return _regenerator.default.wrap(function
|
|
637
|
-
while (1) switch (
|
|
719
|
+
return _regenerator.default.wrap(function _callee13$(_context13) {
|
|
720
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
638
721
|
case 0:
|
|
639
722
|
call = new _call.Call(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, function () {
|
|
640
723
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -647,14 +730,14 @@ describe('Call Tests', function () {
|
|
|
647
730
|
expect('callee' in requestArgs.body).toBe(true);
|
|
648
731
|
case 6:
|
|
649
732
|
case "end":
|
|
650
|
-
return
|
|
733
|
+
return _context13.stop();
|
|
651
734
|
}
|
|
652
|
-
},
|
|
735
|
+
}, _callee13);
|
|
653
736
|
})));
|
|
654
|
-
it('outgoing call for guest calling must not have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
737
|
+
it('outgoing call for guest calling must not have callee', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
|
|
655
738
|
var requestSpy, requestArgs;
|
|
656
|
-
return _regenerator.default.wrap(function
|
|
657
|
-
while (1) switch (
|
|
739
|
+
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
740
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
658
741
|
case 0:
|
|
659
742
|
call = new _call.Call(activeUrl, webex, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, function () {
|
|
660
743
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -667,9 +750,9 @@ describe('Call Tests', function () {
|
|
|
667
750
|
expect('callee' in requestArgs.body).toBe(false);
|
|
668
751
|
case 6:
|
|
669
752
|
case "end":
|
|
670
|
-
return
|
|
753
|
+
return _context14.stop();
|
|
671
754
|
}
|
|
672
|
-
},
|
|
755
|
+
}, _callee14);
|
|
673
756
|
})));
|
|
674
757
|
});
|
|
675
758
|
});
|
|
@@ -702,10 +785,10 @@ describe('State Machine handler tests', function () {
|
|
|
702
785
|
|
|
703
786
|
// afterEach(() => call.removeAllListeners());
|
|
704
787
|
|
|
705
|
-
it('successful session refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
788
|
+
it('successful session refresh', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
|
|
706
789
|
var statusPayload, dummyEvent, funcSpy, logSpy;
|
|
707
|
-
return _regenerator.default.wrap(function
|
|
708
|
-
while (1) switch (
|
|
790
|
+
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
791
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
709
792
|
case 0:
|
|
710
793
|
statusPayload = {
|
|
711
794
|
statusCode: 200,
|
|
@@ -725,7 +808,7 @@ describe('State Machine handler tests', function () {
|
|
|
725
808
|
/* This is to flush all the promises from the Promise queue so that
|
|
726
809
|
* Jest.fakeTimers can advance time and also clear the promise Queue
|
|
727
810
|
*/
|
|
728
|
-
|
|
811
|
+
_context15.next = 11;
|
|
729
812
|
return (0, _testUtil.flushPromises)(3);
|
|
730
813
|
case 11:
|
|
731
814
|
expect(setInterval).toHaveBeenCalledTimes(1);
|
|
@@ -736,14 +819,14 @@ describe('State Machine handler tests', function () {
|
|
|
736
819
|
});
|
|
737
820
|
case 14:
|
|
738
821
|
case "end":
|
|
739
|
-
return
|
|
822
|
+
return _context15.stop();
|
|
740
823
|
}
|
|
741
|
-
},
|
|
824
|
+
}, _callee15);
|
|
742
825
|
})));
|
|
743
|
-
it('session refresh failure', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
826
|
+
it('session refresh failure', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
|
|
744
827
|
var statusPayload, funcSpy;
|
|
745
|
-
return _regenerator.default.wrap(function
|
|
746
|
-
while (1) switch (
|
|
828
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
829
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
747
830
|
case 0:
|
|
748
831
|
expect.assertions(4);
|
|
749
832
|
statusPayload = {
|
|
@@ -767,24 +850,24 @@ describe('State Machine handler tests', function () {
|
|
|
767
850
|
/* This is to flush all the promises from the Promise queue so that
|
|
768
851
|
* Jest.fakeTimers can advance time and also clear the promise Queue
|
|
769
852
|
*/
|
|
770
|
-
|
|
853
|
+
_context16.next = 11;
|
|
771
854
|
return _promise.default.resolve();
|
|
772
855
|
case 11:
|
|
773
|
-
|
|
856
|
+
_context16.next = 13;
|
|
774
857
|
return _promise.default.resolve();
|
|
775
858
|
case 13:
|
|
776
859
|
expect(clearInterval).toHaveBeenCalledTimes(1);
|
|
777
860
|
expect(funcSpy).toBeCalledTimes(1);
|
|
778
861
|
case 15:
|
|
779
862
|
case "end":
|
|
780
|
-
return
|
|
863
|
+
return _context16.stop();
|
|
781
864
|
}
|
|
782
|
-
},
|
|
865
|
+
}, _callee16);
|
|
783
866
|
})));
|
|
784
|
-
it('state changes during successful incoming call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
867
|
+
it('state changes during successful incoming call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
|
|
785
868
|
var statusPayload, dummyEvent, postMediaSpy, deleteSpy, dummyOkEvent;
|
|
786
|
-
return _regenerator.default.wrap(function
|
|
787
|
-
while (1) switch (
|
|
869
|
+
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
870
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
788
871
|
case 0:
|
|
789
872
|
statusPayload = {
|
|
790
873
|
statusCode: 200,
|
|
@@ -840,14 +923,14 @@ describe('State Machine handler tests', function () {
|
|
|
840
923
|
expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
|
|
841
924
|
case 27:
|
|
842
925
|
case "end":
|
|
843
|
-
return
|
|
926
|
+
return _context17.stop();
|
|
844
927
|
}
|
|
845
|
-
},
|
|
928
|
+
}, _callee17);
|
|
846
929
|
})));
|
|
847
|
-
it('state changes during unsuccessful incoming call due to no offer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
930
|
+
it('state changes during unsuccessful incoming call due to no offer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
|
|
848
931
|
var statusPayload, dummyEvent;
|
|
849
|
-
return _regenerator.default.wrap(function
|
|
850
|
-
while (1) switch (
|
|
932
|
+
return _regenerator.default.wrap(function _callee18$(_context18) {
|
|
933
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
851
934
|
case 0:
|
|
852
935
|
call['direction'] = _types3.CallDirection.INBOUND;
|
|
853
936
|
statusPayload = {
|
|
@@ -865,7 +948,7 @@ describe('State Machine handler tests', function () {
|
|
|
865
948
|
webex.request.mockReturnValue(statusPayload);
|
|
866
949
|
call.sendCallStateMachineEvt(dummyEvent);
|
|
867
950
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_PROGRESS');
|
|
868
|
-
|
|
951
|
+
_context18.next = 8;
|
|
869
952
|
return call['handleOutgoingCallConnect']({
|
|
870
953
|
type: 'E_SEND_CALL_CONNECT'
|
|
871
954
|
});
|
|
@@ -879,14 +962,14 @@ describe('State Machine handler tests', function () {
|
|
|
879
962
|
expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
|
|
880
963
|
case 12:
|
|
881
964
|
case "end":
|
|
882
|
-
return
|
|
965
|
+
return _context18.stop();
|
|
883
966
|
}
|
|
884
|
-
},
|
|
967
|
+
}, _callee18);
|
|
885
968
|
})));
|
|
886
|
-
it('state changes during unsuccessful incoming call due error in call connect', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
969
|
+
it('state changes during unsuccessful incoming call due error in call connect', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
|
|
887
970
|
var warnSpy, stateMachineSpy, statusPayload, roapMessage;
|
|
888
|
-
return _regenerator.default.wrap(function
|
|
889
|
-
while (1) switch (
|
|
971
|
+
return _regenerator.default.wrap(function _callee19$(_context19) {
|
|
972
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
890
973
|
case 0:
|
|
891
974
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
892
975
|
stateMachineSpy = jest.spyOn(call, 'sendCallStateMachineEvt');
|
|
@@ -912,7 +995,7 @@ describe('State Machine handler tests', function () {
|
|
|
912
995
|
webex.request.mockRejectedValueOnce({
|
|
913
996
|
statusCode: 403
|
|
914
997
|
}).mockResolvedValue(statusPayload);
|
|
915
|
-
|
|
998
|
+
_context19.next = 12;
|
|
916
999
|
return call['handleOutgoingCallConnect']({
|
|
917
1000
|
type: 'E_SEND_CALL_CONNECT'
|
|
918
1001
|
});
|
|
@@ -922,14 +1005,14 @@ describe('State Machine handler tests', function () {
|
|
|
922
1005
|
expect(warnSpy).toBeCalledTimes(4);
|
|
923
1006
|
case 15:
|
|
924
1007
|
case "end":
|
|
925
|
-
return
|
|
1008
|
+
return _context19.stop();
|
|
926
1009
|
}
|
|
927
|
-
},
|
|
1010
|
+
}, _callee19);
|
|
928
1011
|
})));
|
|
929
|
-
it('state changes during successful outgoing call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1012
|
+
it('state changes during successful outgoing call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
|
|
930
1013
|
var statusPayload, dummyEvent, postMediaSpy, dummyOkEvent;
|
|
931
|
-
return _regenerator.default.wrap(function
|
|
932
|
-
while (1) switch (
|
|
1014
|
+
return _regenerator.default.wrap(function _callee20$(_context20) {
|
|
1015
|
+
while (1) switch (_context20.prev = _context20.next) {
|
|
933
1016
|
case 0:
|
|
934
1017
|
statusPayload = {
|
|
935
1018
|
statusCode: 200,
|
|
@@ -1003,14 +1086,14 @@ describe('State Machine handler tests', function () {
|
|
|
1003
1086
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_DISCONNECT');
|
|
1004
1087
|
case 40:
|
|
1005
1088
|
case "end":
|
|
1006
|
-
return
|
|
1089
|
+
return _context20.stop();
|
|
1007
1090
|
}
|
|
1008
|
-
},
|
|
1091
|
+
}, _callee20);
|
|
1009
1092
|
})));
|
|
1010
|
-
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
|
|
1093
|
+
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 _callee21() {
|
|
1011
1094
|
var statusPayload, dummySetupEvent, dummyConnectEvent, dummyOfferEvent, dummyAnswerEvent, dummyOkEvent, postMediaSpy;
|
|
1012
|
-
return _regenerator.default.wrap(function
|
|
1013
|
-
while (1) switch (
|
|
1095
|
+
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
1096
|
+
while (1) switch (_context21.prev = _context21.next) {
|
|
1014
1097
|
case 0:
|
|
1015
1098
|
statusPayload = {
|
|
1016
1099
|
statusCode: 200,
|
|
@@ -1078,14 +1161,14 @@ describe('State Machine handler tests', function () {
|
|
|
1078
1161
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_DISCONNECT');
|
|
1079
1162
|
case 25:
|
|
1080
1163
|
case "end":
|
|
1081
|
-
return
|
|
1164
|
+
return _context21.stop();
|
|
1082
1165
|
}
|
|
1083
|
-
},
|
|
1166
|
+
}, _callee21);
|
|
1084
1167
|
})));
|
|
1085
|
-
it('state changes during successful outgoing call with early media', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1168
|
+
it('state changes during successful outgoing call with early media', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
|
|
1086
1169
|
var statusPayload, dummyEvent;
|
|
1087
|
-
return _regenerator.default.wrap(function
|
|
1088
|
-
while (1) switch (
|
|
1170
|
+
return _regenerator.default.wrap(function _callee22$(_context22) {
|
|
1171
|
+
while (1) switch (_context22.prev = _context22.next) {
|
|
1089
1172
|
case 0:
|
|
1090
1173
|
statusPayload = {
|
|
1091
1174
|
statusCode: 200,
|
|
@@ -1124,14 +1207,14 @@ describe('State Machine handler tests', function () {
|
|
|
1124
1207
|
expect(call['callStateMachine'].state.value).toBe('S_RECV_CALL_DISCONNECT');
|
|
1125
1208
|
case 17:
|
|
1126
1209
|
case "end":
|
|
1127
|
-
return
|
|
1210
|
+
return _context22.stop();
|
|
1128
1211
|
}
|
|
1129
|
-
},
|
|
1212
|
+
}, _callee22);
|
|
1130
1213
|
})));
|
|
1131
|
-
it('state changes during unsuccessful outgoing call due to error in call setup', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1214
|
+
it('state changes during unsuccessful outgoing call due to error in call setup', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
|
|
1132
1215
|
var statusPayload, dummyEvent;
|
|
1133
|
-
return _regenerator.default.wrap(function
|
|
1134
|
-
while (1) switch (
|
|
1216
|
+
return _regenerator.default.wrap(function _callee23$(_context23) {
|
|
1217
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1135
1218
|
case 0:
|
|
1136
1219
|
statusPayload = {
|
|
1137
1220
|
statusCode: 403,
|
|
@@ -1147,20 +1230,20 @@ describe('State Machine handler tests', function () {
|
|
|
1147
1230
|
};
|
|
1148
1231
|
webex.request.mockRejectedValueOnce(statusPayload);
|
|
1149
1232
|
call.sendCallStateMachineEvt(dummyEvent);
|
|
1150
|
-
|
|
1233
|
+
_context23.next = 6;
|
|
1151
1234
|
return (0, _testUtil.flushPromises)(3);
|
|
1152
1235
|
case 6:
|
|
1153
1236
|
expect(call['callStateMachine'].state.value).toBe('S_UNKNOWN');
|
|
1154
1237
|
case 7:
|
|
1155
1238
|
case "end":
|
|
1156
|
-
return
|
|
1239
|
+
return _context23.stop();
|
|
1157
1240
|
}
|
|
1158
|
-
},
|
|
1241
|
+
}, _callee23);
|
|
1159
1242
|
})));
|
|
1160
|
-
it('state changes during unsuccessful outgoing call due to error in media ok', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1243
|
+
it('state changes during unsuccessful outgoing call due to error in media ok', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
|
|
1161
1244
|
var statusPayload, dummyEvent;
|
|
1162
|
-
return _regenerator.default.wrap(function
|
|
1163
|
-
while (1) switch (
|
|
1245
|
+
return _regenerator.default.wrap(function _callee24$(_context24) {
|
|
1246
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
1164
1247
|
case 0:
|
|
1165
1248
|
statusPayload = {
|
|
1166
1249
|
statusCode: 403,
|
|
@@ -1177,10 +1260,10 @@ describe('State Machine handler tests', function () {
|
|
|
1177
1260
|
call['earlyMedia'] = true;
|
|
1178
1261
|
call['mediaStateMachine'].state.value = 'S_RECV_ROAP_ANSWER';
|
|
1179
1262
|
webex.request.mockRejectedValue(statusPayload);
|
|
1180
|
-
|
|
1263
|
+
_context24.next = 8;
|
|
1181
1264
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
1182
1265
|
case 8:
|
|
1183
|
-
|
|
1266
|
+
_context24.next = 10;
|
|
1184
1267
|
return (0, _testUtil.flushPromises)(2);
|
|
1185
1268
|
case 10:
|
|
1186
1269
|
expect(call.isConnected()).toBe(false);
|
|
@@ -1188,14 +1271,14 @@ describe('State Machine handler tests', function () {
|
|
|
1188
1271
|
expect(call['callStateMachine'].state.value).toBe('S_UNKNOWN');
|
|
1189
1272
|
case 13:
|
|
1190
1273
|
case "end":
|
|
1191
|
-
return
|
|
1274
|
+
return _context24.stop();
|
|
1192
1275
|
}
|
|
1193
|
-
},
|
|
1276
|
+
}, _callee24);
|
|
1194
1277
|
})));
|
|
1195
|
-
it('state changes during unsuccessful outgoing call since no sdp in offer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1278
|
+
it('state changes during unsuccessful outgoing call since no sdp in offer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
|
|
1196
1279
|
var statusPayload, dummyEvent;
|
|
1197
|
-
return _regenerator.default.wrap(function
|
|
1198
|
-
while (1) switch (
|
|
1280
|
+
return _regenerator.default.wrap(function _callee25$(_context25) {
|
|
1281
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
1199
1282
|
case 0:
|
|
1200
1283
|
statusPayload = {
|
|
1201
1284
|
statusCode: 403,
|
|
@@ -1218,14 +1301,14 @@ describe('State Machine handler tests', function () {
|
|
|
1218
1301
|
expect(_testUtil.mediaConnection.initiateOffer).toBeCalledOnceWith();
|
|
1219
1302
|
case 8:
|
|
1220
1303
|
case "end":
|
|
1221
|
-
return
|
|
1304
|
+
return _context25.stop();
|
|
1222
1305
|
}
|
|
1223
|
-
},
|
|
1306
|
+
}, _callee25);
|
|
1224
1307
|
})));
|
|
1225
|
-
it('Outgoing Roap offer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1308
|
+
it('Outgoing Roap offer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
|
|
1226
1309
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1227
|
-
return _regenerator.default.wrap(function
|
|
1228
|
-
while (1) switch (
|
|
1310
|
+
return _regenerator.default.wrap(function _callee26$(_context26) {
|
|
1311
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
1229
1312
|
case 0:
|
|
1230
1313
|
statusPayload = {
|
|
1231
1314
|
statusCode: 503,
|
|
@@ -1247,7 +1330,7 @@ describe('State Machine handler tests', function () {
|
|
|
1247
1330
|
}
|
|
1248
1331
|
};
|
|
1249
1332
|
call['connected'] = true;
|
|
1250
|
-
|
|
1333
|
+
_context26.next = 8;
|
|
1251
1334
|
return call['handleOutgoingRoapOffer']({}, dummyEvent);
|
|
1252
1335
|
case 8:
|
|
1253
1336
|
jest.advanceTimersByTime(1005);
|
|
@@ -1259,14 +1342,14 @@ describe('State Machine handler tests', function () {
|
|
|
1259
1342
|
expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
|
|
1260
1343
|
case 13:
|
|
1261
1344
|
case "end":
|
|
1262
|
-
return
|
|
1345
|
+
return _context26.stop();
|
|
1263
1346
|
}
|
|
1264
|
-
},
|
|
1347
|
+
}, _callee26);
|
|
1265
1348
|
})));
|
|
1266
|
-
it('Outgoing Roap offer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1349
|
+
it('Outgoing Roap offer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
|
|
1267
1350
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1268
|
-
return _regenerator.default.wrap(function
|
|
1269
|
-
while (1) switch (
|
|
1351
|
+
return _regenerator.default.wrap(function _callee27$(_context27) {
|
|
1352
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
1270
1353
|
case 0:
|
|
1271
1354
|
statusPayload = {
|
|
1272
1355
|
statusCode: 503,
|
|
@@ -1288,7 +1371,7 @@ describe('State Machine handler tests', function () {
|
|
|
1288
1371
|
}
|
|
1289
1372
|
};
|
|
1290
1373
|
call['connected'] = false;
|
|
1291
|
-
|
|
1374
|
+
_context27.next = 8;
|
|
1292
1375
|
return call['handleOutgoingRoapOffer']({}, dummyEvent);
|
|
1293
1376
|
case 8:
|
|
1294
1377
|
jest.advanceTimersByTime(1005);
|
|
@@ -1299,14 +1382,14 @@ describe('State Machine handler tests', function () {
|
|
|
1299
1382
|
expect(stateMachineSpy).not.toBeCalled();
|
|
1300
1383
|
case 12:
|
|
1301
1384
|
case "end":
|
|
1302
|
-
return
|
|
1385
|
+
return _context27.stop();
|
|
1303
1386
|
}
|
|
1304
|
-
},
|
|
1387
|
+
}, _callee27);
|
|
1305
1388
|
})));
|
|
1306
|
-
it('Outgoing Roap Answer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1389
|
+
it('Outgoing Roap Answer retry-after error case during midcall', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
|
|
1307
1390
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1308
|
-
return _regenerator.default.wrap(function
|
|
1309
|
-
while (1) switch (
|
|
1391
|
+
return _regenerator.default.wrap(function _callee28$(_context28) {
|
|
1392
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
1310
1393
|
case 0:
|
|
1311
1394
|
statusPayload = {
|
|
1312
1395
|
statusCode: 503,
|
|
@@ -1328,7 +1411,7 @@ describe('State Machine handler tests', function () {
|
|
|
1328
1411
|
};
|
|
1329
1412
|
call['connected'] = true;
|
|
1330
1413
|
call['mediaStateMachine'].state.value = 'S_RECV_ROAP_OFFER';
|
|
1331
|
-
|
|
1414
|
+
_context28.next = 9;
|
|
1332
1415
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
1333
1416
|
case 9:
|
|
1334
1417
|
jest.advanceTimersByTime(1005);
|
|
@@ -1340,14 +1423,14 @@ describe('State Machine handler tests', function () {
|
|
|
1340
1423
|
expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
|
|
1341
1424
|
case 14:
|
|
1342
1425
|
case "end":
|
|
1343
|
-
return
|
|
1426
|
+
return _context28.stop();
|
|
1344
1427
|
}
|
|
1345
|
-
},
|
|
1428
|
+
}, _callee28);
|
|
1346
1429
|
})));
|
|
1347
|
-
it('Outgoing Roap answer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1430
|
+
it('Outgoing Roap answer retry-after error case during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
|
|
1348
1431
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1349
|
-
return _regenerator.default.wrap(function
|
|
1350
|
-
while (1) switch (
|
|
1432
|
+
return _regenerator.default.wrap(function _callee29$(_context29) {
|
|
1433
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
1351
1434
|
case 0:
|
|
1352
1435
|
statusPayload = {
|
|
1353
1436
|
statusCode: 503,
|
|
@@ -1368,7 +1451,7 @@ describe('State Machine handler tests', function () {
|
|
|
1368
1451
|
}
|
|
1369
1452
|
};
|
|
1370
1453
|
call['connected'] = false;
|
|
1371
|
-
|
|
1454
|
+
_context29.next = 8;
|
|
1372
1455
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
1373
1456
|
case 8:
|
|
1374
1457
|
jest.advanceTimersByTime(1005);
|
|
@@ -1380,14 +1463,14 @@ describe('State Machine handler tests', function () {
|
|
|
1380
1463
|
expect(stateMachineSpy).not.toBeCalled();
|
|
1381
1464
|
case 13:
|
|
1382
1465
|
case "end":
|
|
1383
|
-
return
|
|
1466
|
+
return _context29.stop();
|
|
1384
1467
|
}
|
|
1385
|
-
},
|
|
1468
|
+
}, _callee29);
|
|
1386
1469
|
})));
|
|
1387
|
-
it('ROAP error during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1470
|
+
it('ROAP error during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
|
|
1388
1471
|
var statusPayload, warnSpy, stateMachineSpy, funcSpy, errorEvent;
|
|
1389
|
-
return _regenerator.default.wrap(function
|
|
1390
|
-
while (1) switch (
|
|
1472
|
+
return _regenerator.default.wrap(function _callee30$(_context30) {
|
|
1473
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
1391
1474
|
case 0:
|
|
1392
1475
|
statusPayload = {
|
|
1393
1476
|
statusCode: 200,
|
|
@@ -1412,14 +1495,14 @@ describe('State Machine handler tests', function () {
|
|
|
1412
1495
|
expect(stateMachineSpy).not.toHaveBeenCalled();
|
|
1413
1496
|
case 11:
|
|
1414
1497
|
case "end":
|
|
1415
|
-
return
|
|
1498
|
+
return _context30.stop();
|
|
1416
1499
|
}
|
|
1417
|
-
},
|
|
1500
|
+
}, _callee30);
|
|
1418
1501
|
})));
|
|
1419
|
-
it('ROAP ok retry-after during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1502
|
+
it('ROAP ok retry-after during mid call', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
|
|
1420
1503
|
var statusPayload, funcSpy, stateMachineSpy, dummyEvent;
|
|
1421
|
-
return _regenerator.default.wrap(function
|
|
1422
|
-
while (1) switch (
|
|
1504
|
+
return _regenerator.default.wrap(function _callee31$(_context31) {
|
|
1505
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
1423
1506
|
case 0:
|
|
1424
1507
|
statusPayload = {
|
|
1425
1508
|
statusCode: 503,
|
|
@@ -1441,7 +1524,7 @@ describe('State Machine handler tests', function () {
|
|
|
1441
1524
|
};
|
|
1442
1525
|
call['connected'] = true;
|
|
1443
1526
|
call['mediaStateMachine'].state.value = 'S_RECV_ROAP_ANSWER';
|
|
1444
|
-
|
|
1527
|
+
_context31.next = 9;
|
|
1445
1528
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
1446
1529
|
case 9:
|
|
1447
1530
|
jest.advanceTimersByTime(1005);
|
|
@@ -1453,14 +1536,14 @@ describe('State Machine handler tests', function () {
|
|
|
1453
1536
|
expect(stateMachineSpy).toBeCalledOnceWith(dummyEvent);
|
|
1454
1537
|
case 14:
|
|
1455
1538
|
case "end":
|
|
1456
|
-
return
|
|
1539
|
+
return _context31.stop();
|
|
1457
1540
|
}
|
|
1458
|
-
},
|
|
1541
|
+
}, _callee31);
|
|
1459
1542
|
})));
|
|
1460
|
-
it('Unable to communicate roap error with mobius', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1543
|
+
it('Unable to communicate roap error with mobius', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
|
|
1461
1544
|
var statusPayload, stateMachineSpy, funcSpy, errorEvent;
|
|
1462
|
-
return _regenerator.default.wrap(function
|
|
1463
|
-
while (1) switch (
|
|
1545
|
+
return _regenerator.default.wrap(function _callee32$(_context32) {
|
|
1546
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
1464
1547
|
case 0:
|
|
1465
1548
|
statusPayload = {
|
|
1466
1549
|
statusCode: 403,
|
|
@@ -1483,14 +1566,14 @@ describe('State Machine handler tests', function () {
|
|
|
1483
1566
|
expect(stateMachineSpy).not.toHaveBeenCalled();
|
|
1484
1567
|
case 9:
|
|
1485
1568
|
case "end":
|
|
1486
|
-
return
|
|
1569
|
+
return _context32.stop();
|
|
1487
1570
|
}
|
|
1488
|
-
},
|
|
1571
|
+
}, _callee32);
|
|
1489
1572
|
})));
|
|
1490
|
-
it('ROAP error during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1573
|
+
it('ROAP error during call establishment', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
|
|
1491
1574
|
var statusPayload, warnSpy, stateMachineSpy, funcSpy, errorEvent;
|
|
1492
|
-
return _regenerator.default.wrap(function
|
|
1493
|
-
while (1) switch (
|
|
1575
|
+
return _regenerator.default.wrap(function _callee33$(_context33) {
|
|
1576
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
1494
1577
|
case 0:
|
|
1495
1578
|
statusPayload = {
|
|
1496
1579
|
statusCode: 200,
|
|
@@ -1508,7 +1591,7 @@ describe('State Machine handler tests', function () {
|
|
|
1508
1591
|
}
|
|
1509
1592
|
};
|
|
1510
1593
|
call['connected'] = false;
|
|
1511
|
-
|
|
1594
|
+
_context33.next = 8;
|
|
1512
1595
|
return call['handleRoapError']({}, errorEvent);
|
|
1513
1596
|
case 8:
|
|
1514
1597
|
expect(funcSpy).toBeCalledOnceWith(errorEvent.data);
|
|
@@ -1524,14 +1607,14 @@ describe('State Machine handler tests', function () {
|
|
|
1524
1607
|
});
|
|
1525
1608
|
case 11:
|
|
1526
1609
|
case "end":
|
|
1527
|
-
return
|
|
1610
|
+
return _context33.stop();
|
|
1528
1611
|
}
|
|
1529
|
-
},
|
|
1612
|
+
}, _callee33);
|
|
1530
1613
|
})));
|
|
1531
|
-
it('state changes during successful incoming call with out of order events', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1614
|
+
it('state changes during successful incoming call with out of order events', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34() {
|
|
1532
1615
|
var statusPayload, dummyEvent, postMediaSpy, dummyOkEvent, dummyOfferEvent;
|
|
1533
|
-
return _regenerator.default.wrap(function
|
|
1534
|
-
while (1) switch (
|
|
1616
|
+
return _regenerator.default.wrap(function _callee34$(_context34) {
|
|
1617
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
1535
1618
|
case 0:
|
|
1536
1619
|
statusPayload = {
|
|
1537
1620
|
statusCode: 200,
|
|
@@ -1564,7 +1647,7 @@ describe('State Machine handler tests', function () {
|
|
|
1564
1647
|
seq: 1,
|
|
1565
1648
|
messageType: 'ANSWER'
|
|
1566
1649
|
};
|
|
1567
|
-
|
|
1650
|
+
_context34.next = 17;
|
|
1568
1651
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
1569
1652
|
case 17:
|
|
1570
1653
|
expect(postMediaSpy).toBeCalledOnceWith(dummyEvent.data);
|
|
@@ -1586,7 +1669,7 @@ describe('State Machine handler tests', function () {
|
|
|
1586
1669
|
seq: 2,
|
|
1587
1670
|
messageType: 'OFFER_REQUEST'
|
|
1588
1671
|
};
|
|
1589
|
-
|
|
1672
|
+
_context34.next = 23;
|
|
1590
1673
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
1591
1674
|
case 23:
|
|
1592
1675
|
expect(call['receivedRoapOKSeq']).toBe(0);
|
|
@@ -1636,7 +1719,7 @@ describe('State Machine handler tests', function () {
|
|
|
1636
1719
|
};
|
|
1637
1720
|
call.sendCallStateMachineEvt(dummyEvent);
|
|
1638
1721
|
dummyEvent.type = 'E_RECV_ROAP_OFFER';
|
|
1639
|
-
|
|
1722
|
+
_context34.next = 49;
|
|
1640
1723
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
1641
1724
|
case 49:
|
|
1642
1725
|
expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
@@ -1645,7 +1728,7 @@ describe('State Machine handler tests', function () {
|
|
|
1645
1728
|
seq: 3,
|
|
1646
1729
|
messageType: 'ANSWER'
|
|
1647
1730
|
};
|
|
1648
|
-
|
|
1731
|
+
_context34.next = 54;
|
|
1649
1732
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
1650
1733
|
case 54:
|
|
1651
1734
|
expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
@@ -1664,7 +1747,7 @@ describe('State Machine handler tests', function () {
|
|
|
1664
1747
|
messageType: 'OK'
|
|
1665
1748
|
}
|
|
1666
1749
|
};
|
|
1667
|
-
|
|
1750
|
+
_context34.next = 63;
|
|
1668
1751
|
return call.sendMediaStateMachineEvt(dummyOkEvent);
|
|
1669
1752
|
case 63:
|
|
1670
1753
|
expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenNthCalledWith(6, dummyOkEvent.data.message);
|
|
@@ -1679,14 +1762,14 @@ describe('State Machine handler tests', function () {
|
|
|
1679
1762
|
expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
1680
1763
|
case 70:
|
|
1681
1764
|
case "end":
|
|
1682
|
-
return
|
|
1765
|
+
return _context34.stop();
|
|
1683
1766
|
}
|
|
1684
|
-
},
|
|
1767
|
+
}, _callee34);
|
|
1685
1768
|
})));
|
|
1686
|
-
it('successfully handles out of order events when ROAP OK is received while executing outgoingRoapAnswer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1769
|
+
it('successfully handles out of order events when ROAP OK is received while executing outgoingRoapAnswer', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35() {
|
|
1687
1770
|
var mockStatusBody, statusPayload, dummyEvent, postMediaSpy, dummyOkEvent, dummyOfferEvent;
|
|
1688
|
-
return _regenerator.default.wrap(function
|
|
1689
|
-
while (1) switch (
|
|
1771
|
+
return _regenerator.default.wrap(function _callee35$(_context35) {
|
|
1772
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
1690
1773
|
case 0:
|
|
1691
1774
|
mockStatusBody = {
|
|
1692
1775
|
device: {
|
|
@@ -1726,7 +1809,7 @@ describe('State Machine handler tests', function () {
|
|
|
1726
1809
|
seq: 1,
|
|
1727
1810
|
messageType: 'ANSWER'
|
|
1728
1811
|
};
|
|
1729
|
-
|
|
1812
|
+
_context35.next = 18;
|
|
1730
1813
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
1731
1814
|
case 18:
|
|
1732
1815
|
expect(postMediaSpy).toBeCalledOnceWith(dummyEvent.data);
|
|
@@ -1748,7 +1831,7 @@ describe('State Machine handler tests', function () {
|
|
|
1748
1831
|
seq: 2,
|
|
1749
1832
|
messageType: 'OFFER_REQUEST'
|
|
1750
1833
|
};
|
|
1751
|
-
|
|
1834
|
+
_context35.next = 24;
|
|
1752
1835
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
1753
1836
|
case 24:
|
|
1754
1837
|
expect(call['receivedRoapOKSeq']).toBe(0);
|
|
@@ -1798,7 +1881,7 @@ describe('State Machine handler tests', function () {
|
|
|
1798
1881
|
};
|
|
1799
1882
|
call.sendCallStateMachineEvt(dummyEvent);
|
|
1800
1883
|
dummyEvent.type = 'E_RECV_ROAP_OFFER';
|
|
1801
|
-
|
|
1884
|
+
_context35.next = 50;
|
|
1802
1885
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
1803
1886
|
case 50:
|
|
1804
1887
|
expect(_testUtil.mediaConnection.roapMessageReceived).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
@@ -1807,7 +1890,7 @@ describe('State Machine handler tests', function () {
|
|
|
1807
1890
|
seq: 3,
|
|
1808
1891
|
messageType: 'ANSWER'
|
|
1809
1892
|
};
|
|
1810
|
-
|
|
1893
|
+
_context35.next = 55;
|
|
1811
1894
|
return call.sendMediaStateMachineEvt(dummyEvent);
|
|
1812
1895
|
case 55:
|
|
1813
1896
|
expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
@@ -1824,7 +1907,7 @@ describe('State Machine handler tests', function () {
|
|
|
1824
1907
|
}
|
|
1825
1908
|
};
|
|
1826
1909
|
call.sendMediaStateMachineEvt(dummyEvent);
|
|
1827
|
-
|
|
1910
|
+
_context35.next = 62;
|
|
1828
1911
|
return call.sendMediaStateMachineEvt(dummyOkEvent);
|
|
1829
1912
|
case 62:
|
|
1830
1913
|
expect(call['receivedRoapOKSeq']).toBe(3);
|
|
@@ -1840,14 +1923,14 @@ describe('State Machine handler tests', function () {
|
|
|
1840
1923
|
expect(postMediaSpy).toHaveBeenLastCalledWith(dummyEvent.data);
|
|
1841
1924
|
case 70:
|
|
1842
1925
|
case "end":
|
|
1843
|
-
return
|
|
1926
|
+
return _context35.stop();
|
|
1844
1927
|
}
|
|
1845
|
-
},
|
|
1928
|
+
}, _callee35);
|
|
1846
1929
|
})));
|
|
1847
|
-
it('handle hold event successfully when media received after progress but before connect', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1930
|
+
it('handle hold event successfully when media received after progress but before connect', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
|
|
1848
1931
|
var statusPayload, dummyEvent, postMediaSpy, infoSpy, dummyOkEvent;
|
|
1849
|
-
return _regenerator.default.wrap(function
|
|
1850
|
-
while (1) switch (
|
|
1932
|
+
return _regenerator.default.wrap(function _callee36$(_context36) {
|
|
1933
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
1851
1934
|
case 0:
|
|
1852
1935
|
statusPayload = {
|
|
1853
1936
|
statusCode: 200,
|
|
@@ -1914,9 +1997,9 @@ describe('State Machine handler tests', function () {
|
|
|
1914
1997
|
});
|
|
1915
1998
|
case 33:
|
|
1916
1999
|
case "end":
|
|
1917
|
-
return
|
|
2000
|
+
return _context36.stop();
|
|
1918
2001
|
}
|
|
1919
|
-
},
|
|
2002
|
+
}, _callee36);
|
|
1920
2003
|
})));
|
|
1921
2004
|
describe('Call event timers tests', function () {
|
|
1922
2005
|
var callManager;
|
|
@@ -1927,10 +2010,10 @@ describe('State Machine handler tests', function () {
|
|
|
1927
2010
|
afterEach(function () {
|
|
1928
2011
|
jest.clearAllTimers();
|
|
1929
2012
|
});
|
|
1930
|
-
it('times out if the next event is not received - 60 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2013
|
+
it('times out if the next event is not received - 60 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
|
|
1931
2014
|
var statusPayload, dummyEvent, logSpy, emitSpy, deleteSpy, dummyOkEvent;
|
|
1932
|
-
return _regenerator.default.wrap(function
|
|
1933
|
-
while (1) switch (
|
|
2015
|
+
return _regenerator.default.wrap(function _callee37$(_context37) {
|
|
2016
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
1934
2017
|
case 0:
|
|
1935
2018
|
statusPayload = {
|
|
1936
2019
|
statusCode: 200,
|
|
@@ -1947,7 +2030,7 @@ describe('State Machine handler tests', function () {
|
|
|
1947
2030
|
webex.request.mockReturnValue(statusPayload);
|
|
1948
2031
|
|
|
1949
2032
|
// handleOutgoingCallSetup is asynchronous
|
|
1950
|
-
|
|
2033
|
+
_context37.next = 9;
|
|
1951
2034
|
return call.sendCallStateMachineEvt(dummyEvent);
|
|
1952
2035
|
case 9:
|
|
1953
2036
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_SETUP');
|
|
@@ -1990,14 +2073,14 @@ describe('State Machine handler tests', function () {
|
|
|
1990
2073
|
expect(callManager.callCollection).toStrictEqual({});
|
|
1991
2074
|
case 32:
|
|
1992
2075
|
case "end":
|
|
1993
|
-
return
|
|
2076
|
+
return _context37.stop();
|
|
1994
2077
|
}
|
|
1995
|
-
},
|
|
2078
|
+
}, _callee37);
|
|
1996
2079
|
})));
|
|
1997
|
-
it('times out if the next event is not received - 10 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2080
|
+
it('times out if the next event is not received - 10 seconds timeout', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
|
|
1998
2081
|
var statusPayload, dummyEvent, call, emitSpy, deleteSpy, logSpy;
|
|
1999
|
-
return _regenerator.default.wrap(function
|
|
2000
|
-
while (1) switch (
|
|
2082
|
+
return _regenerator.default.wrap(function _callee38$(_context38) {
|
|
2083
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
2001
2084
|
case 0:
|
|
2002
2085
|
statusPayload = {
|
|
2003
2086
|
statusCode: 200,
|
|
@@ -2016,7 +2099,7 @@ describe('State Machine handler tests', function () {
|
|
|
2016
2099
|
expect((0, _keys.default)(callManager.callCollection)[0]).toBe(call.getCorrelationId());
|
|
2017
2100
|
|
|
2018
2101
|
// handleOutgoingCallSetup is asynchronous
|
|
2019
|
-
|
|
2102
|
+
_context38.next = 11;
|
|
2020
2103
|
return call.sendCallStateMachineEvt(dummyEvent);
|
|
2021
2104
|
case 11:
|
|
2022
2105
|
expect(call['callStateMachine'].state.value).toBe('S_SEND_CALL_SETUP');
|
|
@@ -2028,9 +2111,9 @@ describe('State Machine handler tests', function () {
|
|
|
2028
2111
|
expect(callManager.callCollection).toStrictEqual({});
|
|
2029
2112
|
case 18:
|
|
2030
2113
|
case "end":
|
|
2031
|
-
return
|
|
2114
|
+
return _context38.stop();
|
|
2032
2115
|
}
|
|
2033
|
-
},
|
|
2116
|
+
}, _callee38);
|
|
2034
2117
|
})));
|
|
2035
2118
|
});
|
|
2036
2119
|
});
|
|
@@ -2090,10 +2173,10 @@ describe('Supplementary Services tests', function () {
|
|
|
2090
2173
|
beforeEach(function () {
|
|
2091
2174
|
call.removeAllListeners();
|
|
2092
2175
|
});
|
|
2093
|
-
it('Handle successful Call hold case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2176
|
+
it('Handle successful Call hold case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
|
|
2094
2177
|
var responsePayload, warnSpy, roapEvent;
|
|
2095
|
-
return _regenerator.default.wrap(function
|
|
2096
|
-
while (1) switch (
|
|
2178
|
+
return _regenerator.default.wrap(function _callee40$(_context40) {
|
|
2179
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
2097
2180
|
case 0:
|
|
2098
2181
|
expect.assertions(7);
|
|
2099
2182
|
responsePayload = {
|
|
@@ -2106,25 +2189,25 @@ describe('Supplementary Services tests', function () {
|
|
|
2106
2189
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2107
2190
|
call['held'] = false;
|
|
2108
2191
|
call.on(_types2.CALL_EVENT_KEYS.HELD, /*#__PURE__*/function () {
|
|
2109
|
-
var
|
|
2110
|
-
return _regenerator.default.wrap(function
|
|
2111
|
-
while (1) switch (
|
|
2192
|
+
var _ref40 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39(correlationId) {
|
|
2193
|
+
return _regenerator.default.wrap(function _callee39$(_context39) {
|
|
2194
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
2112
2195
|
case 0:
|
|
2113
2196
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
2114
2197
|
case 1:
|
|
2115
2198
|
case "end":
|
|
2116
|
-
return
|
|
2199
|
+
return _context39.stop();
|
|
2117
2200
|
}
|
|
2118
|
-
},
|
|
2201
|
+
}, _callee39);
|
|
2119
2202
|
}));
|
|
2120
2203
|
return function (_x) {
|
|
2121
|
-
return
|
|
2204
|
+
return _ref40.apply(this, arguments);
|
|
2122
2205
|
};
|
|
2123
2206
|
}());
|
|
2124
|
-
|
|
2207
|
+
_context40.next = 10;
|
|
2125
2208
|
return call.doHoldResume();
|
|
2126
2209
|
case 10:
|
|
2127
|
-
|
|
2210
|
+
_context40.next = 12;
|
|
2128
2211
|
return (0, _testUtil.flushPromises)(2);
|
|
2129
2212
|
case 12:
|
|
2130
2213
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2140,11 +2223,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2140
2223
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2141
2224
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2142
2225
|
roapEvent.data.type = 'ANSWER';
|
|
2143
|
-
|
|
2226
|
+
_context40.next = 20;
|
|
2144
2227
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2145
2228
|
case 20:
|
|
2146
2229
|
roapEvent.data.type = 'OK';
|
|
2147
|
-
|
|
2230
|
+
_context40.next = 23;
|
|
2148
2231
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2149
2232
|
case 23:
|
|
2150
2233
|
expect(clearTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2159,14 +2242,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2159
2242
|
});
|
|
2160
2243
|
case 28:
|
|
2161
2244
|
case "end":
|
|
2162
|
-
return
|
|
2245
|
+
return _context40.stop();
|
|
2163
2246
|
}
|
|
2164
|
-
},
|
|
2247
|
+
}, _callee40);
|
|
2165
2248
|
})));
|
|
2166
|
-
it('Handle successful Call hold case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2249
|
+
it('Handle successful Call hold case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
|
|
2167
2250
|
var responsePayload, warnSpy, roapEvent;
|
|
2168
|
-
return _regenerator.default.wrap(function
|
|
2169
|
-
while (1) switch (
|
|
2251
|
+
return _regenerator.default.wrap(function _callee42$(_context42) {
|
|
2252
|
+
while (1) switch (_context42.prev = _context42.next) {
|
|
2170
2253
|
case 0:
|
|
2171
2254
|
expect.assertions(8);
|
|
2172
2255
|
responsePayload = {
|
|
@@ -2179,26 +2262,26 @@ describe('Supplementary Services tests', function () {
|
|
|
2179
2262
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2180
2263
|
call['held'] = false;
|
|
2181
2264
|
call.on(_types2.CALL_EVENT_KEYS.HELD, /*#__PURE__*/function () {
|
|
2182
|
-
var
|
|
2183
|
-
return _regenerator.default.wrap(function
|
|
2184
|
-
while (1) switch (
|
|
2265
|
+
var _ref42 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(correlationId) {
|
|
2266
|
+
return _regenerator.default.wrap(function _callee41$(_context41) {
|
|
2267
|
+
while (1) switch (_context41.prev = _context41.next) {
|
|
2185
2268
|
case 0:
|
|
2186
2269
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
2187
2270
|
case 1:
|
|
2188
2271
|
case "end":
|
|
2189
|
-
return
|
|
2272
|
+
return _context41.stop();
|
|
2190
2273
|
}
|
|
2191
|
-
},
|
|
2274
|
+
}, _callee41);
|
|
2192
2275
|
}));
|
|
2193
2276
|
return function (_x2) {
|
|
2194
|
-
return
|
|
2277
|
+
return _ref42.apply(this, arguments);
|
|
2195
2278
|
};
|
|
2196
2279
|
}());
|
|
2197
2280
|
call.doHoldResume();
|
|
2198
|
-
|
|
2281
|
+
_context42.next = 11;
|
|
2199
2282
|
return _promise.default.resolve();
|
|
2200
2283
|
case 11:
|
|
2201
|
-
|
|
2284
|
+
_context42.next = 13;
|
|
2202
2285
|
return _promise.default.resolve();
|
|
2203
2286
|
case 13:
|
|
2204
2287
|
expect(setTimeout).not.toHaveBeenCalled();
|
|
@@ -2214,11 +2297,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2214
2297
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2215
2298
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2216
2299
|
roapEvent.data.type = 'ANSWER';
|
|
2217
|
-
|
|
2300
|
+
_context42.next = 22;
|
|
2218
2301
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2219
2302
|
case 22:
|
|
2220
2303
|
roapEvent.data.type = 'OK';
|
|
2221
|
-
|
|
2304
|
+
_context42.next = 25;
|
|
2222
2305
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2223
2306
|
case 25:
|
|
2224
2307
|
expect(clearTimeout).not.toHaveBeenCalled();
|
|
@@ -2233,14 +2316,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2233
2316
|
});
|
|
2234
2317
|
case 30:
|
|
2235
2318
|
case "end":
|
|
2236
|
-
return
|
|
2319
|
+
return _context42.stop();
|
|
2237
2320
|
}
|
|
2238
|
-
},
|
|
2321
|
+
}, _callee42);
|
|
2239
2322
|
})));
|
|
2240
|
-
it('Handle failure Call Hold case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2323
|
+
it('Handle failure Call Hold case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
|
|
2241
2324
|
var responsePayload;
|
|
2242
|
-
return _regenerator.default.wrap(function
|
|
2243
|
-
while (1) switch (
|
|
2325
|
+
return _regenerator.default.wrap(function _callee44$(_context44) {
|
|
2326
|
+
while (1) switch (_context44.prev = _context44.next) {
|
|
2244
2327
|
case 0:
|
|
2245
2328
|
expect.assertions(4);
|
|
2246
2329
|
responsePayload = {
|
|
@@ -2250,26 +2333,26 @@ describe('Supplementary Services tests', function () {
|
|
|
2250
2333
|
jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
|
|
2251
2334
|
call['held'] = false;
|
|
2252
2335
|
call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
|
|
2253
|
-
var
|
|
2254
|
-
return _regenerator.default.wrap(function
|
|
2255
|
-
while (1) switch (
|
|
2336
|
+
var _ref44 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43(errObj) {
|
|
2337
|
+
return _regenerator.default.wrap(function _callee43$(_context43) {
|
|
2338
|
+
while (1) switch (_context43.prev = _context43.next) {
|
|
2256
2339
|
case 0:
|
|
2257
2340
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
|
|
2258
2341
|
expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
|
|
2259
2342
|
case 2:
|
|
2260
2343
|
case "end":
|
|
2261
|
-
return
|
|
2344
|
+
return _context43.stop();
|
|
2262
2345
|
}
|
|
2263
|
-
},
|
|
2346
|
+
}, _callee43);
|
|
2264
2347
|
}));
|
|
2265
2348
|
return function (_x3) {
|
|
2266
|
-
return
|
|
2349
|
+
return _ref44.apply(this, arguments);
|
|
2267
2350
|
};
|
|
2268
2351
|
}());
|
|
2269
|
-
|
|
2352
|
+
_context44.next = 7;
|
|
2270
2353
|
return call.doHoldResume();
|
|
2271
2354
|
case 7:
|
|
2272
|
-
|
|
2355
|
+
_context44.next = 9;
|
|
2273
2356
|
return (0, _testUtil.flushPromises)(2);
|
|
2274
2357
|
case 9:
|
|
2275
2358
|
expect(call.isHeld()).toStrictEqual(false);
|
|
@@ -2279,14 +2362,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2279
2362
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
2280
2363
|
case 11:
|
|
2281
2364
|
case "end":
|
|
2282
|
-
return
|
|
2365
|
+
return _context44.stop();
|
|
2283
2366
|
}
|
|
2284
|
-
},
|
|
2367
|
+
}, _callee44);
|
|
2285
2368
|
})));
|
|
2286
|
-
it('Handle failure Call Hold case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2369
|
+
it('Handle failure Call Hold case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
|
|
2287
2370
|
var responsePayload, rejectPayload, roapEvent;
|
|
2288
|
-
return _regenerator.default.wrap(function
|
|
2289
|
-
while (1) switch (
|
|
2371
|
+
return _regenerator.default.wrap(function _callee46$(_context46) {
|
|
2372
|
+
while (1) switch (_context46.prev = _context46.next) {
|
|
2290
2373
|
case 0:
|
|
2291
2374
|
expect.assertions(5);
|
|
2292
2375
|
responsePayload = {
|
|
@@ -2300,24 +2383,24 @@ describe('Supplementary Services tests', function () {
|
|
|
2300
2383
|
jest.spyOn(webex, 'request').mockResolvedValueOnce(responsePayload).mockRejectedValueOnce(rejectPayload);
|
|
2301
2384
|
call['held'] = false;
|
|
2302
2385
|
call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
|
|
2303
|
-
var
|
|
2304
|
-
return _regenerator.default.wrap(function
|
|
2305
|
-
while (1) switch (
|
|
2386
|
+
var _ref46 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45(errObj) {
|
|
2387
|
+
return _regenerator.default.wrap(function _callee45$(_context45) {
|
|
2388
|
+
while (1) switch (_context45.prev = _context45.next) {
|
|
2306
2389
|
case 0:
|
|
2307
2390
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
|
|
2308
2391
|
expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
|
|
2309
2392
|
case 2:
|
|
2310
2393
|
case "end":
|
|
2311
|
-
return
|
|
2394
|
+
return _context45.stop();
|
|
2312
2395
|
}
|
|
2313
|
-
},
|
|
2396
|
+
}, _callee45);
|
|
2314
2397
|
}));
|
|
2315
2398
|
return function (_x4) {
|
|
2316
|
-
return
|
|
2399
|
+
return _ref46.apply(this, arguments);
|
|
2317
2400
|
};
|
|
2318
2401
|
}());
|
|
2319
2402
|
call.doHoldResume();
|
|
2320
|
-
|
|
2403
|
+
_context46.next = 9;
|
|
2321
2404
|
return (0, _testUtil.flushPromises)(2);
|
|
2322
2405
|
case 9:
|
|
2323
2406
|
/* the Call State should transition to S_CALL_ESTABLISHED
|
|
@@ -2327,7 +2410,7 @@ describe('Supplementary Services tests', function () {
|
|
|
2327
2410
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2328
2411
|
/* We are intentionally failing the ROAP ANSWER */
|
|
2329
2412
|
roapEvent.data.type = 'ANSWER';
|
|
2330
|
-
|
|
2413
|
+
_context46.next = 15;
|
|
2331
2414
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2332
2415
|
case 15:
|
|
2333
2416
|
expect(call.isHeld()).toStrictEqual(false);
|
|
@@ -2335,14 +2418,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2335
2418
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
2336
2419
|
case 17:
|
|
2337
2420
|
case "end":
|
|
2338
|
-
return
|
|
2421
|
+
return _context46.stop();
|
|
2339
2422
|
}
|
|
2340
|
-
},
|
|
2423
|
+
}, _callee46);
|
|
2341
2424
|
})));
|
|
2342
|
-
it('Handle failure Call Hold case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2425
|
+
it('Handle failure Call Hold case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
|
|
2343
2426
|
var responsePayload, warnSpy, roapEvent;
|
|
2344
|
-
return _regenerator.default.wrap(function
|
|
2345
|
-
while (1) switch (
|
|
2427
|
+
return _regenerator.default.wrap(function _callee47$(_context47) {
|
|
2428
|
+
while (1) switch (_context47.prev = _context47.next) {
|
|
2346
2429
|
case 0:
|
|
2347
2430
|
responsePayload = {
|
|
2348
2431
|
statusCode: 200,
|
|
@@ -2353,10 +2436,10 @@ describe('Supplementary Services tests', function () {
|
|
|
2353
2436
|
jest.spyOn(global, 'clearTimeout');
|
|
2354
2437
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2355
2438
|
call['held'] = false;
|
|
2356
|
-
|
|
2439
|
+
_context47.next = 8;
|
|
2357
2440
|
return call.doHoldResume();
|
|
2358
2441
|
case 8:
|
|
2359
|
-
|
|
2442
|
+
_context47.next = 10;
|
|
2360
2443
|
return (0, _testUtil.flushPromises)(2);
|
|
2361
2444
|
case 10:
|
|
2362
2445
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2371,19 +2454,19 @@ describe('Supplementary Services tests', function () {
|
|
|
2371
2454
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2372
2455
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2373
2456
|
roapEvent.data.type = 'ANSWER';
|
|
2374
|
-
|
|
2457
|
+
_context47.next = 17;
|
|
2375
2458
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2376
2459
|
case 17:
|
|
2377
2460
|
jest.spyOn(webex, 'request').mockRejectedValue({
|
|
2378
2461
|
statusCode: 403
|
|
2379
2462
|
});
|
|
2380
2463
|
roapEvent.data.type = 'OK';
|
|
2381
|
-
|
|
2464
|
+
_context47.next = 21;
|
|
2382
2465
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2383
2466
|
case 21:
|
|
2384
2467
|
/* this is for coverage */
|
|
2385
2468
|
call['callStateMachine'].state.value = 'S_CALL_HOLD';
|
|
2386
|
-
|
|
2469
|
+
_context47.next = 24;
|
|
2387
2470
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2388
2471
|
case 24:
|
|
2389
2472
|
expect(call.isHeld()).toStrictEqual(false);
|
|
@@ -2395,14 +2478,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2395
2478
|
});
|
|
2396
2479
|
case 27:
|
|
2397
2480
|
case "end":
|
|
2398
|
-
return
|
|
2481
|
+
return _context47.stop();
|
|
2399
2482
|
}
|
|
2400
|
-
},
|
|
2483
|
+
}, _callee47);
|
|
2401
2484
|
})));
|
|
2402
|
-
it('Handle failure Call resume case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2485
|
+
it('Handle failure Call resume case during roap ok out', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48() {
|
|
2403
2486
|
var responsePayload, warnSpy, roapEvent;
|
|
2404
|
-
return _regenerator.default.wrap(function
|
|
2405
|
-
while (1) switch (
|
|
2487
|
+
return _regenerator.default.wrap(function _callee48$(_context48) {
|
|
2488
|
+
while (1) switch (_context48.prev = _context48.next) {
|
|
2406
2489
|
case 0:
|
|
2407
2490
|
responsePayload = {
|
|
2408
2491
|
statusCode: 200,
|
|
@@ -2413,10 +2496,10 @@ describe('Supplementary Services tests', function () {
|
|
|
2413
2496
|
jest.spyOn(global, 'clearTimeout');
|
|
2414
2497
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2415
2498
|
call['held'] = true;
|
|
2416
|
-
|
|
2499
|
+
_context48.next = 8;
|
|
2417
2500
|
return call.doHoldResume();
|
|
2418
2501
|
case 8:
|
|
2419
|
-
|
|
2502
|
+
_context48.next = 10;
|
|
2420
2503
|
return (0, _testUtil.flushPromises)(2);
|
|
2421
2504
|
case 10:
|
|
2422
2505
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2431,14 +2514,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2431
2514
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2432
2515
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2433
2516
|
roapEvent.data.type = 'ANSWER';
|
|
2434
|
-
|
|
2517
|
+
_context48.next = 17;
|
|
2435
2518
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2436
2519
|
case 17:
|
|
2437
2520
|
jest.spyOn(webex, 'request').mockRejectedValue({
|
|
2438
2521
|
statusCode: 403
|
|
2439
2522
|
});
|
|
2440
2523
|
roapEvent.data.type = 'OK';
|
|
2441
|
-
|
|
2524
|
+
_context48.next = 21;
|
|
2442
2525
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2443
2526
|
case 21:
|
|
2444
2527
|
expect(call.isHeld()).toStrictEqual(true);
|
|
@@ -2450,14 +2533,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2450
2533
|
});
|
|
2451
2534
|
case 24:
|
|
2452
2535
|
case "end":
|
|
2453
|
-
return
|
|
2536
|
+
return _context48.stop();
|
|
2454
2537
|
}
|
|
2455
|
-
},
|
|
2538
|
+
}, _callee48);
|
|
2456
2539
|
})));
|
|
2457
|
-
it('Handle Call hold case where successful Held response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2540
|
+
it('Handle Call hold case where successful Held response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
|
|
2458
2541
|
var responsePayload, roapEvent;
|
|
2459
|
-
return _regenerator.default.wrap(function
|
|
2460
|
-
while (1) switch (
|
|
2542
|
+
return _regenerator.default.wrap(function _callee50$(_context50) {
|
|
2543
|
+
while (1) switch (_context50.prev = _context50.next) {
|
|
2461
2544
|
case 0:
|
|
2462
2545
|
expect.assertions(5);
|
|
2463
2546
|
responsePayload = {
|
|
@@ -2467,25 +2550,25 @@ describe('Supplementary Services tests', function () {
|
|
|
2467
2550
|
jest.spyOn(webex, 'request').mockResolvedValue(responsePayload);
|
|
2468
2551
|
call['held'] = false;
|
|
2469
2552
|
call.on(_types2.CALL_EVENT_KEYS.HOLD_ERROR, /*#__PURE__*/function () {
|
|
2470
|
-
var
|
|
2471
|
-
return _regenerator.default.wrap(function
|
|
2472
|
-
while (1) switch (
|
|
2553
|
+
var _ref50 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(errObj) {
|
|
2554
|
+
return _regenerator.default.wrap(function _callee49$(_context49) {
|
|
2555
|
+
while (1) switch (_context49.prev = _context49.next) {
|
|
2473
2556
|
case 0:
|
|
2474
2557
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.TIMEOUT);
|
|
2475
2558
|
expect(errObj.message).toStrictEqual('An error occurred while placing the call on hold. Wait a moment and try again.');
|
|
2476
2559
|
case 2:
|
|
2477
2560
|
case "end":
|
|
2478
|
-
return
|
|
2561
|
+
return _context49.stop();
|
|
2479
2562
|
}
|
|
2480
|
-
},
|
|
2563
|
+
}, _callee49);
|
|
2481
2564
|
}));
|
|
2482
2565
|
return function (_x5) {
|
|
2483
|
-
return
|
|
2566
|
+
return _ref50.apply(this, arguments);
|
|
2484
2567
|
};
|
|
2485
2568
|
}());
|
|
2486
2569
|
jest.runAllTimers();
|
|
2487
2570
|
call.doHoldResume();
|
|
2488
|
-
|
|
2571
|
+
_context50.next = 9;
|
|
2489
2572
|
return (0, _testUtil.flushPromises)(2);
|
|
2490
2573
|
case 9:
|
|
2491
2574
|
/* At this point, the Call State should be S_CALL_HOLD
|
|
@@ -2498,11 +2581,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2498
2581
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2499
2582
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2500
2583
|
roapEvent.data.type = 'ANSWER';
|
|
2501
|
-
|
|
2584
|
+
_context50.next = 15;
|
|
2502
2585
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2503
2586
|
case 15:
|
|
2504
2587
|
roapEvent.data.type = 'OK';
|
|
2505
|
-
|
|
2588
|
+
_context50.next = 18;
|
|
2506
2589
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2507
2590
|
case 18:
|
|
2508
2591
|
/* Advancing timer by 12 seconds so that it gets timed out */
|
|
@@ -2514,14 +2597,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2514
2597
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
2515
2598
|
case 21:
|
|
2516
2599
|
case "end":
|
|
2517
|
-
return
|
|
2600
|
+
return _context50.stop();
|
|
2518
2601
|
}
|
|
2519
|
-
},
|
|
2602
|
+
}, _callee50);
|
|
2520
2603
|
})));
|
|
2521
|
-
it('Handle successful Call Resume case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2604
|
+
it('Handle successful Call Resume case without delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
|
|
2522
2605
|
var responsePayload, warnSpy, roapEvent;
|
|
2523
|
-
return _regenerator.default.wrap(function
|
|
2524
|
-
while (1) switch (
|
|
2606
|
+
return _regenerator.default.wrap(function _callee52$(_context52) {
|
|
2607
|
+
while (1) switch (_context52.prev = _context52.next) {
|
|
2525
2608
|
case 0:
|
|
2526
2609
|
expect.assertions(7);
|
|
2527
2610
|
responsePayload = {
|
|
@@ -2534,25 +2617,25 @@ describe('Supplementary Services tests', function () {
|
|
|
2534
2617
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2535
2618
|
call['held'] = true;
|
|
2536
2619
|
call.on(_types2.CALL_EVENT_KEYS.RESUMED, /*#__PURE__*/function () {
|
|
2537
|
-
var
|
|
2538
|
-
return _regenerator.default.wrap(function
|
|
2539
|
-
while (1) switch (
|
|
2620
|
+
var _ref52 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51(correlationId) {
|
|
2621
|
+
return _regenerator.default.wrap(function _callee51$(_context51) {
|
|
2622
|
+
while (1) switch (_context51.prev = _context51.next) {
|
|
2540
2623
|
case 0:
|
|
2541
2624
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
2542
2625
|
case 1:
|
|
2543
2626
|
case "end":
|
|
2544
|
-
return
|
|
2627
|
+
return _context51.stop();
|
|
2545
2628
|
}
|
|
2546
|
-
},
|
|
2629
|
+
}, _callee51);
|
|
2547
2630
|
}));
|
|
2548
2631
|
return function (_x6) {
|
|
2549
|
-
return
|
|
2632
|
+
return _ref52.apply(this, arguments);
|
|
2550
2633
|
};
|
|
2551
2634
|
}());
|
|
2552
|
-
|
|
2635
|
+
_context52.next = 10;
|
|
2553
2636
|
return call.doHoldResume();
|
|
2554
2637
|
case 10:
|
|
2555
|
-
|
|
2638
|
+
_context52.next = 12;
|
|
2556
2639
|
return (0, _testUtil.flushPromises)(2);
|
|
2557
2640
|
case 12:
|
|
2558
2641
|
expect(setTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2568,11 +2651,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2568
2651
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2569
2652
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2570
2653
|
roapEvent.data.type = 'ANSWER';
|
|
2571
|
-
|
|
2654
|
+
_context52.next = 20;
|
|
2572
2655
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2573
2656
|
case 20:
|
|
2574
2657
|
roapEvent.data.type = 'OK';
|
|
2575
|
-
|
|
2658
|
+
_context52.next = 23;
|
|
2576
2659
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2577
2660
|
case 23:
|
|
2578
2661
|
expect(clearTimeout).toHaveBeenCalledTimes(1);
|
|
@@ -2587,14 +2670,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2587
2670
|
});
|
|
2588
2671
|
case 28:
|
|
2589
2672
|
case "end":
|
|
2590
|
-
return
|
|
2673
|
+
return _context52.stop();
|
|
2591
2674
|
}
|
|
2592
|
-
},
|
|
2675
|
+
}, _callee52);
|
|
2593
2676
|
})));
|
|
2594
|
-
it('Handle successful Call Resume case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2677
|
+
it('Handle successful Call Resume case with delayed http response', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
|
|
2595
2678
|
var responsePayload, warnSpy, roapEvent;
|
|
2596
|
-
return _regenerator.default.wrap(function
|
|
2597
|
-
while (1) switch (
|
|
2679
|
+
return _regenerator.default.wrap(function _callee54$(_context54) {
|
|
2680
|
+
while (1) switch (_context54.prev = _context54.next) {
|
|
2598
2681
|
case 0:
|
|
2599
2682
|
expect.assertions(7);
|
|
2600
2683
|
responsePayload = {
|
|
@@ -2607,26 +2690,26 @@ describe('Supplementary Services tests', function () {
|
|
|
2607
2690
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
2608
2691
|
call['held'] = true;
|
|
2609
2692
|
call.on(_types2.CALL_EVENT_KEYS.RESUMED, /*#__PURE__*/function () {
|
|
2610
|
-
var
|
|
2611
|
-
return _regenerator.default.wrap(function
|
|
2612
|
-
while (1) switch (
|
|
2693
|
+
var _ref54 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53(correlationId) {
|
|
2694
|
+
return _regenerator.default.wrap(function _callee53$(_context53) {
|
|
2695
|
+
while (1) switch (_context53.prev = _context53.next) {
|
|
2613
2696
|
case 0:
|
|
2614
2697
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
2615
2698
|
case 1:
|
|
2616
2699
|
case "end":
|
|
2617
|
-
return
|
|
2700
|
+
return _context53.stop();
|
|
2618
2701
|
}
|
|
2619
|
-
},
|
|
2702
|
+
}, _callee53);
|
|
2620
2703
|
}));
|
|
2621
2704
|
return function (_x7) {
|
|
2622
|
-
return
|
|
2705
|
+
return _ref54.apply(this, arguments);
|
|
2623
2706
|
};
|
|
2624
2707
|
}());
|
|
2625
2708
|
call.doHoldResume();
|
|
2626
|
-
|
|
2709
|
+
_context54.next = 11;
|
|
2627
2710
|
return _promise.default.resolve();
|
|
2628
2711
|
case 11:
|
|
2629
|
-
|
|
2712
|
+
_context54.next = 13;
|
|
2630
2713
|
return _promise.default.resolve();
|
|
2631
2714
|
case 13:
|
|
2632
2715
|
expect(setTimeout).not.toHaveBeenCalled();
|
|
@@ -2642,11 +2725,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2642
2725
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2643
2726
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2644
2727
|
roapEvent.data.type = 'ANSWER';
|
|
2645
|
-
|
|
2728
|
+
_context54.next = 21;
|
|
2646
2729
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2647
2730
|
case 21:
|
|
2648
2731
|
roapEvent.data.type = 'OK';
|
|
2649
|
-
|
|
2732
|
+
_context54.next = 24;
|
|
2650
2733
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2651
2734
|
case 24:
|
|
2652
2735
|
expect(clearTimeout).not.toHaveBeenCalled();
|
|
@@ -2661,14 +2744,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2661
2744
|
});
|
|
2662
2745
|
case 29:
|
|
2663
2746
|
case "end":
|
|
2664
|
-
return
|
|
2747
|
+
return _context54.stop();
|
|
2665
2748
|
}
|
|
2666
|
-
},
|
|
2749
|
+
}, _callee54);
|
|
2667
2750
|
})));
|
|
2668
|
-
it('Handle failure Call Resume case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2751
|
+
it('Handle failure Call Resume case during signalling', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56() {
|
|
2669
2752
|
var responsePayload;
|
|
2670
|
-
return _regenerator.default.wrap(function
|
|
2671
|
-
while (1) switch (
|
|
2753
|
+
return _regenerator.default.wrap(function _callee56$(_context56) {
|
|
2754
|
+
while (1) switch (_context56.prev = _context56.next) {
|
|
2672
2755
|
case 0:
|
|
2673
2756
|
expect.assertions(4);
|
|
2674
2757
|
responsePayload = {
|
|
@@ -2678,26 +2761,26 @@ describe('Supplementary Services tests', function () {
|
|
|
2678
2761
|
jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
|
|
2679
2762
|
call['held'] = true;
|
|
2680
2763
|
call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
|
|
2681
|
-
var
|
|
2682
|
-
return _regenerator.default.wrap(function
|
|
2683
|
-
while (1) switch (
|
|
2764
|
+
var _ref56 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55(errObj) {
|
|
2765
|
+
return _regenerator.default.wrap(function _callee55$(_context55) {
|
|
2766
|
+
while (1) switch (_context55.prev = _context55.next) {
|
|
2684
2767
|
case 0:
|
|
2685
2768
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
|
|
2686
2769
|
expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
|
|
2687
2770
|
case 2:
|
|
2688
2771
|
case "end":
|
|
2689
|
-
return
|
|
2772
|
+
return _context55.stop();
|
|
2690
2773
|
}
|
|
2691
|
-
},
|
|
2774
|
+
}, _callee55);
|
|
2692
2775
|
}));
|
|
2693
2776
|
return function (_x8) {
|
|
2694
|
-
return
|
|
2777
|
+
return _ref56.apply(this, arguments);
|
|
2695
2778
|
};
|
|
2696
2779
|
}());
|
|
2697
|
-
|
|
2780
|
+
_context56.next = 7;
|
|
2698
2781
|
return call.doHoldResume();
|
|
2699
2782
|
case 7:
|
|
2700
|
-
|
|
2783
|
+
_context56.next = 9;
|
|
2701
2784
|
return (0, _testUtil.flushPromises)(2);
|
|
2702
2785
|
case 9:
|
|
2703
2786
|
expect(call.isHeld()).toStrictEqual(true);
|
|
@@ -2708,14 +2791,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2708
2791
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
2709
2792
|
case 11:
|
|
2710
2793
|
case "end":
|
|
2711
|
-
return
|
|
2794
|
+
return _context56.stop();
|
|
2712
2795
|
}
|
|
2713
|
-
},
|
|
2796
|
+
}, _callee56);
|
|
2714
2797
|
})));
|
|
2715
|
-
it('Handle failure Call Resume case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2798
|
+
it('Handle failure Call Resume case during offer/answer exchange', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58() {
|
|
2716
2799
|
var responsePayload, rejectPayload, roapEvent;
|
|
2717
|
-
return _regenerator.default.wrap(function
|
|
2718
|
-
while (1) switch (
|
|
2800
|
+
return _regenerator.default.wrap(function _callee58$(_context58) {
|
|
2801
|
+
while (1) switch (_context58.prev = _context58.next) {
|
|
2719
2802
|
case 0:
|
|
2720
2803
|
expect.assertions(5);
|
|
2721
2804
|
responsePayload = {
|
|
@@ -2729,24 +2812,24 @@ describe('Supplementary Services tests', function () {
|
|
|
2729
2812
|
jest.spyOn(webex, 'request').mockResolvedValueOnce(responsePayload).mockRejectedValueOnce(rejectPayload);
|
|
2730
2813
|
call['held'] = true;
|
|
2731
2814
|
call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
|
|
2732
|
-
var
|
|
2733
|
-
return _regenerator.default.wrap(function
|
|
2734
|
-
while (1) switch (
|
|
2815
|
+
var _ref58 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(errObj) {
|
|
2816
|
+
return _regenerator.default.wrap(function _callee57$(_context57) {
|
|
2817
|
+
while (1) switch (_context57.prev = _context57.next) {
|
|
2735
2818
|
case 0:
|
|
2736
2819
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.SERVICE_UNAVAILABLE);
|
|
2737
2820
|
expect(errObj.message).toStrictEqual('An unknown error occurred. Wait a moment and try again.');
|
|
2738
2821
|
case 2:
|
|
2739
2822
|
case "end":
|
|
2740
|
-
return
|
|
2823
|
+
return _context57.stop();
|
|
2741
2824
|
}
|
|
2742
|
-
},
|
|
2825
|
+
}, _callee57);
|
|
2743
2826
|
}));
|
|
2744
2827
|
return function (_x9) {
|
|
2745
|
-
return
|
|
2828
|
+
return _ref58.apply(this, arguments);
|
|
2746
2829
|
};
|
|
2747
2830
|
}());
|
|
2748
2831
|
call.doHoldResume();
|
|
2749
|
-
|
|
2832
|
+
_context58.next = 9;
|
|
2750
2833
|
return (0, _testUtil.flushPromises)(2);
|
|
2751
2834
|
case 9:
|
|
2752
2835
|
/* At this point , the Call State should transition to S_CALL_ESTABLISHED
|
|
@@ -2757,7 +2840,7 @@ describe('Supplementary Services tests', function () {
|
|
|
2757
2840
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2758
2841
|
/* We are intentionally failing the ROAP ANSWER */
|
|
2759
2842
|
roapEvent.data.type = 'ANSWER';
|
|
2760
|
-
|
|
2843
|
+
_context58.next = 15;
|
|
2761
2844
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2762
2845
|
case 15:
|
|
2763
2846
|
expect(call.isHeld()).toStrictEqual(true);
|
|
@@ -2765,14 +2848,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2765
2848
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
2766
2849
|
case 17:
|
|
2767
2850
|
case "end":
|
|
2768
|
-
return
|
|
2851
|
+
return _context58.stop();
|
|
2769
2852
|
}
|
|
2770
|
-
},
|
|
2853
|
+
}, _callee58);
|
|
2771
2854
|
})));
|
|
2772
|
-
it('Handle Call resume case where successful response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2855
|
+
it('Handle Call resume case where successful response does not come', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee60() {
|
|
2773
2856
|
var responsePayload, roapEvent;
|
|
2774
|
-
return _regenerator.default.wrap(function
|
|
2775
|
-
while (1) switch (
|
|
2857
|
+
return _regenerator.default.wrap(function _callee60$(_context60) {
|
|
2858
|
+
while (1) switch (_context60.prev = _context60.next) {
|
|
2776
2859
|
case 0:
|
|
2777
2860
|
expect.assertions(5);
|
|
2778
2861
|
responsePayload = {
|
|
@@ -2782,24 +2865,24 @@ describe('Supplementary Services tests', function () {
|
|
|
2782
2865
|
jest.spyOn(webex, 'request').mockResolvedValue(responsePayload);
|
|
2783
2866
|
call['held'] = true;
|
|
2784
2867
|
call.on(_types2.CALL_EVENT_KEYS.RESUME_ERROR, /*#__PURE__*/function () {
|
|
2785
|
-
var
|
|
2786
|
-
return _regenerator.default.wrap(function
|
|
2787
|
-
while (1) switch (
|
|
2868
|
+
var _ref60 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(errObj) {
|
|
2869
|
+
return _regenerator.default.wrap(function _callee59$(_context59) {
|
|
2870
|
+
while (1) switch (_context59.prev = _context59.next) {
|
|
2788
2871
|
case 0:
|
|
2789
2872
|
expect(errObj.type).toStrictEqual(_types.ERROR_TYPE.TIMEOUT);
|
|
2790
2873
|
expect(errObj.message).toStrictEqual('An error occurred while resuming the call. Wait a moment and try again.');
|
|
2791
2874
|
case 2:
|
|
2792
2875
|
case "end":
|
|
2793
|
-
return
|
|
2876
|
+
return _context59.stop();
|
|
2794
2877
|
}
|
|
2795
|
-
},
|
|
2878
|
+
}, _callee59);
|
|
2796
2879
|
}));
|
|
2797
2880
|
return function (_x10) {
|
|
2798
|
-
return
|
|
2881
|
+
return _ref60.apply(this, arguments);
|
|
2799
2882
|
};
|
|
2800
2883
|
}());
|
|
2801
2884
|
call.doHoldResume();
|
|
2802
|
-
|
|
2885
|
+
_context60.next = 8;
|
|
2803
2886
|
return (0, _testUtil.flushPromises)(2);
|
|
2804
2887
|
case 8:
|
|
2805
2888
|
/* At this point ,the Call State should be S_CALL_RESUME
|
|
@@ -2812,11 +2895,11 @@ describe('Supplementary Services tests', function () {
|
|
|
2812
2895
|
call['handleIncomingRoapOffer']({}, dummyEvent);
|
|
2813
2896
|
roapEvent = JSON.parse((0, _stringify.default)(dummyEvent));
|
|
2814
2897
|
roapEvent.data.type = 'ANSWER';
|
|
2815
|
-
|
|
2898
|
+
_context60.next = 14;
|
|
2816
2899
|
return call['handleOutgoingRoapAnswer']({}, dummyEvent);
|
|
2817
2900
|
case 14:
|
|
2818
2901
|
roapEvent.data.type = 'OK';
|
|
2819
|
-
|
|
2902
|
+
_context60.next = 17;
|
|
2820
2903
|
return call['handleRoapEstablished']({}, dummyEvent);
|
|
2821
2904
|
case 17:
|
|
2822
2905
|
/* Advancing timer by 12 seconds so that it gets timed out */
|
|
@@ -2826,9 +2909,9 @@ describe('Supplementary Services tests', function () {
|
|
|
2826
2909
|
expect(call['callStateMachine'].state.value).toStrictEqual('S_CALL_ESTABLISHED');
|
|
2827
2910
|
case 20:
|
|
2828
2911
|
case "end":
|
|
2829
|
-
return
|
|
2912
|
+
return _context60.stop();
|
|
2830
2913
|
}
|
|
2831
|
-
},
|
|
2914
|
+
}, _callee60);
|
|
2832
2915
|
})));
|
|
2833
2916
|
});
|
|
2834
2917
|
describe('Call transfer tests', function () {
|
|
@@ -2860,10 +2943,10 @@ describe('Supplementary Services tests', function () {
|
|
|
2860
2943
|
secondCall.removeAllListeners(_types2.CALL_EVENT_KEYS.CALL_ERROR);
|
|
2861
2944
|
secondCall['held'] = false;
|
|
2862
2945
|
});
|
|
2863
|
-
it('Handle successful consult transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
2946
|
+
it('Handle successful consult transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee63() {
|
|
2864
2947
|
var responsePayload, requestSpy, warnSpy, infoSpy, metricSpy;
|
|
2865
|
-
return _regenerator.default.wrap(function
|
|
2866
|
-
while (1) switch (
|
|
2948
|
+
return _regenerator.default.wrap(function _callee63$(_context63) {
|
|
2949
|
+
while (1) switch (_context63.prev = _context63.next) {
|
|
2867
2950
|
case 0:
|
|
2868
2951
|
expect.assertions(9);
|
|
2869
2952
|
responsePayload = {
|
|
@@ -2875,41 +2958,41 @@ describe('Supplementary Services tests', function () {
|
|
|
2875
2958
|
infoSpy = jest.spyOn(_Logger.default, 'info');
|
|
2876
2959
|
metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
|
|
2877
2960
|
call.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
|
|
2878
|
-
var
|
|
2879
|
-
return _regenerator.default.wrap(function
|
|
2880
|
-
while (1) switch (
|
|
2961
|
+
var _ref62 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee61(correlationId) {
|
|
2962
|
+
return _regenerator.default.wrap(function _callee61$(_context61) {
|
|
2963
|
+
while (1) switch (_context61.prev = _context61.next) {
|
|
2881
2964
|
case 0:
|
|
2882
2965
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
2883
2966
|
case 1:
|
|
2884
2967
|
case "end":
|
|
2885
|
-
return
|
|
2968
|
+
return _context61.stop();
|
|
2886
2969
|
}
|
|
2887
|
-
},
|
|
2970
|
+
}, _callee61);
|
|
2888
2971
|
}));
|
|
2889
2972
|
return function (_x11) {
|
|
2890
|
-
return
|
|
2973
|
+
return _ref62.apply(this, arguments);
|
|
2891
2974
|
};
|
|
2892
2975
|
}());
|
|
2893
2976
|
secondCall.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
|
|
2894
|
-
var
|
|
2895
|
-
return _regenerator.default.wrap(function
|
|
2896
|
-
while (1) switch (
|
|
2977
|
+
var _ref63 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee62(correlationId) {
|
|
2978
|
+
return _regenerator.default.wrap(function _callee62$(_context62) {
|
|
2979
|
+
while (1) switch (_context62.prev = _context62.next) {
|
|
2897
2980
|
case 0:
|
|
2898
2981
|
expect(correlationId).toStrictEqual(secondCall.getCorrelationId());
|
|
2899
2982
|
case 1:
|
|
2900
2983
|
case "end":
|
|
2901
|
-
return
|
|
2984
|
+
return _context62.stop();
|
|
2902
2985
|
}
|
|
2903
|
-
},
|
|
2986
|
+
}, _callee62);
|
|
2904
2987
|
}));
|
|
2905
2988
|
return function (_x12) {
|
|
2906
|
-
return
|
|
2989
|
+
return _ref63.apply(this, arguments);
|
|
2907
2990
|
};
|
|
2908
2991
|
}());
|
|
2909
|
-
|
|
2992
|
+
_context63.next = 10;
|
|
2910
2993
|
return call.completeTransfer(_types5.TransferType.CONSULT, secondCall.getCallId(), undefined);
|
|
2911
2994
|
case 10:
|
|
2912
|
-
|
|
2995
|
+
_context63.next = 12;
|
|
2913
2996
|
return (0, _testUtil.flushPromises)(2);
|
|
2914
2997
|
case 12:
|
|
2915
2998
|
expect(requestSpy).toBeCalled();
|
|
@@ -2929,14 +3012,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2929
3012
|
expect(warnSpy).not.toHaveBeenCalledWith("Consult Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
|
|
2930
3013
|
case 21:
|
|
2931
3014
|
case "end":
|
|
2932
|
-
return
|
|
3015
|
+
return _context63.stop();
|
|
2933
3016
|
}
|
|
2934
|
-
},
|
|
3017
|
+
}, _callee63);
|
|
2935
3018
|
})));
|
|
2936
|
-
it('Handle successful blind transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
3019
|
+
it('Handle successful blind transfer case ', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee65() {
|
|
2937
3020
|
var responsePayload, requestSpy, warnSpy, infoSpy, metricSpy;
|
|
2938
|
-
return _regenerator.default.wrap(function
|
|
2939
|
-
while (1) switch (
|
|
3021
|
+
return _regenerator.default.wrap(function _callee65$(_context65) {
|
|
3022
|
+
while (1) switch (_context65.prev = _context65.next) {
|
|
2940
3023
|
case 0:
|
|
2941
3024
|
expect.assertions(7);
|
|
2942
3025
|
responsePayload = {
|
|
@@ -2948,25 +3031,25 @@ describe('Supplementary Services tests', function () {
|
|
|
2948
3031
|
infoSpy = jest.spyOn(_Logger.default, 'info');
|
|
2949
3032
|
metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
|
|
2950
3033
|
call.on(_types2.CALL_EVENT_KEYS.DISCONNECT, /*#__PURE__*/function () {
|
|
2951
|
-
var
|
|
2952
|
-
return _regenerator.default.wrap(function
|
|
2953
|
-
while (1) switch (
|
|
3034
|
+
var _ref65 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee64(correlationId) {
|
|
3035
|
+
return _regenerator.default.wrap(function _callee64$(_context64) {
|
|
3036
|
+
while (1) switch (_context64.prev = _context64.next) {
|
|
2954
3037
|
case 0:
|
|
2955
3038
|
expect(correlationId).toStrictEqual(call.getCorrelationId());
|
|
2956
3039
|
case 1:
|
|
2957
3040
|
case "end":
|
|
2958
|
-
return
|
|
3041
|
+
return _context64.stop();
|
|
2959
3042
|
}
|
|
2960
|
-
},
|
|
3043
|
+
}, _callee64);
|
|
2961
3044
|
}));
|
|
2962
3045
|
return function (_x13) {
|
|
2963
|
-
return
|
|
3046
|
+
return _ref65.apply(this, arguments);
|
|
2964
3047
|
};
|
|
2965
3048
|
}());
|
|
2966
|
-
|
|
3049
|
+
_context65.next = 9;
|
|
2967
3050
|
return call.completeTransfer(_types5.TransferType.BLIND, undefined, transfereeNumber);
|
|
2968
3051
|
case 9:
|
|
2969
|
-
|
|
3052
|
+
_context65.next = 11;
|
|
2970
3053
|
return (0, _testUtil.flushPromises)(2);
|
|
2971
3054
|
case 11:
|
|
2972
3055
|
expect(requestSpy).toBeCalled();
|
|
@@ -2982,14 +3065,14 @@ describe('Supplementary Services tests', function () {
|
|
|
2982
3065
|
expect(warnSpy).not.toHaveBeenCalledWith("Blind Transfer failed for correlationId ".concat(call.getCorrelationId()), transferLoggingContext);
|
|
2983
3066
|
case 18:
|
|
2984
3067
|
case "end":
|
|
2985
|
-
return
|
|
3068
|
+
return _context65.stop();
|
|
2986
3069
|
}
|
|
2987
|
-
},
|
|
3070
|
+
}, _callee65);
|
|
2988
3071
|
})));
|
|
2989
|
-
it('Handle unsuccessful blind transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
3072
|
+
it('Handle unsuccessful blind transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee66() {
|
|
2990
3073
|
var responsePayload, emitSpy, requestSpy, warnSpy, metricSpy;
|
|
2991
|
-
return _regenerator.default.wrap(function
|
|
2992
|
-
while (1) switch (
|
|
3074
|
+
return _regenerator.default.wrap(function _callee66$(_context66) {
|
|
3075
|
+
while (1) switch (_context66.prev = _context66.next) {
|
|
2993
3076
|
case 0:
|
|
2994
3077
|
responsePayload = {
|
|
2995
3078
|
statusCode: 403,
|
|
@@ -2999,10 +3082,10 @@ describe('Supplementary Services tests', function () {
|
|
|
2999
3082
|
requestSpy = jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
|
|
3000
3083
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3001
3084
|
metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
|
|
3002
|
-
|
|
3085
|
+
_context66.next = 7;
|
|
3003
3086
|
return call.completeTransfer(_types5.TransferType.BLIND, undefined, transfereeNumber);
|
|
3004
3087
|
case 7:
|
|
3005
|
-
|
|
3088
|
+
_context66.next = 9;
|
|
3006
3089
|
return (0, _testUtil.flushPromises)(1);
|
|
3007
3090
|
case 9:
|
|
3008
3091
|
expect(requestSpy).toBeCalled();
|
|
@@ -3018,14 +3101,14 @@ describe('Supplementary Services tests', function () {
|
|
|
3018
3101
|
expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.CALL_ERROR, _types4.TRANSFER_ACTION.BLIND, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), expect.any(_Errors.CallError));
|
|
3019
3102
|
case 16:
|
|
3020
3103
|
case "end":
|
|
3021
|
-
return
|
|
3104
|
+
return _context66.stop();
|
|
3022
3105
|
}
|
|
3023
|
-
},
|
|
3106
|
+
}, _callee66);
|
|
3024
3107
|
})));
|
|
3025
|
-
it('Handle unsuccessful consult transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
3108
|
+
it('Handle unsuccessful consult transfer case', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee67() {
|
|
3026
3109
|
var responsePayload, emitSpy, requestSpy, warnSpy, metricSpy;
|
|
3027
|
-
return _regenerator.default.wrap(function
|
|
3028
|
-
while (1) switch (
|
|
3110
|
+
return _regenerator.default.wrap(function _callee67$(_context67) {
|
|
3111
|
+
while (1) switch (_context67.prev = _context67.next) {
|
|
3029
3112
|
case 0:
|
|
3030
3113
|
responsePayload = {
|
|
3031
3114
|
statusCode: 403,
|
|
@@ -3035,10 +3118,10 @@ describe('Supplementary Services tests', function () {
|
|
|
3035
3118
|
requestSpy = jest.spyOn(webex, 'request').mockRejectedValue(responsePayload);
|
|
3036
3119
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3037
3120
|
metricSpy = jest.spyOn(call['metricManager'], 'submitCallMetric');
|
|
3038
|
-
|
|
3121
|
+
_context67.next = 7;
|
|
3039
3122
|
return call.completeTransfer(_types5.TransferType.CONSULT, secondCall.getCallId(), undefined);
|
|
3040
3123
|
case 7:
|
|
3041
|
-
|
|
3124
|
+
_context67.next = 9;
|
|
3042
3125
|
return (0, _testUtil.flushPromises)(2);
|
|
3043
3126
|
case 9:
|
|
3044
3127
|
expect(requestSpy).toBeCalled();
|
|
@@ -3055,18 +3138,18 @@ describe('Supplementary Services tests', function () {
|
|
|
3055
3138
|
expect(metricSpy).toHaveBeenCalledWith(_types4.METRIC_EVENT.CALL_ERROR, _types4.TRANSFER_ACTION.CONSULT, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId(), expect.any(_Errors.CallError));
|
|
3056
3139
|
case 17:
|
|
3057
3140
|
case "end":
|
|
3058
|
-
return
|
|
3141
|
+
return _context67.stop();
|
|
3059
3142
|
}
|
|
3060
|
-
},
|
|
3143
|
+
}, _callee67);
|
|
3061
3144
|
})));
|
|
3062
|
-
it('Handle blind transfer with undefined transferTarget', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
3145
|
+
it('Handle blind transfer with undefined transferTarget', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee68() {
|
|
3063
3146
|
var requestSpy, warnSpy;
|
|
3064
|
-
return _regenerator.default.wrap(function
|
|
3065
|
-
while (1) switch (
|
|
3147
|
+
return _regenerator.default.wrap(function _callee68$(_context68) {
|
|
3148
|
+
while (1) switch (_context68.prev = _context68.next) {
|
|
3066
3149
|
case 0:
|
|
3067
3150
|
requestSpy = jest.spyOn(webex, 'request');
|
|
3068
3151
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3069
|
-
|
|
3152
|
+
_context68.next = 4;
|
|
3070
3153
|
return call.completeTransfer(_types5.TransferType.BLIND, undefined, undefined);
|
|
3071
3154
|
case 4:
|
|
3072
3155
|
/* We should be in CALL_ESTABLISHED state */
|
|
@@ -3077,18 +3160,18 @@ describe('Supplementary Services tests', function () {
|
|
|
3077
3160
|
expect(warnSpy).toBeCalledOnceWith("Invalid information received, transfer failed for correlationId: ".concat(call.getCorrelationId()), transferLoggingContext);
|
|
3078
3161
|
case 9:
|
|
3079
3162
|
case "end":
|
|
3080
|
-
return
|
|
3163
|
+
return _context68.stop();
|
|
3081
3164
|
}
|
|
3082
|
-
},
|
|
3165
|
+
}, _callee68);
|
|
3083
3166
|
})));
|
|
3084
|
-
it('Handle consult transfer with undefined transferCallId', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
3167
|
+
it('Handle consult transfer with undefined transferCallId', /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee69() {
|
|
3085
3168
|
var requestSpy, warnSpy;
|
|
3086
|
-
return _regenerator.default.wrap(function
|
|
3087
|
-
while (1) switch (
|
|
3169
|
+
return _regenerator.default.wrap(function _callee69$(_context69) {
|
|
3170
|
+
while (1) switch (_context69.prev = _context69.next) {
|
|
3088
3171
|
case 0:
|
|
3089
3172
|
requestSpy = jest.spyOn(webex, 'request');
|
|
3090
3173
|
warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
3091
|
-
|
|
3174
|
+
_context69.next = 4;
|
|
3092
3175
|
return call.completeTransfer(_types5.TransferType.CONSULT, undefined, undefined);
|
|
3093
3176
|
case 4:
|
|
3094
3177
|
/* We should be in CALL_ESTABLISHED state */
|
|
@@ -3099,9 +3182,9 @@ describe('Supplementary Services tests', function () {
|
|
|
3099
3182
|
expect(warnSpy).toBeCalledOnceWith("Invalid information received, transfer failed for correlationId: ".concat(call.getCorrelationId()), transferLoggingContext);
|
|
3100
3183
|
case 9:
|
|
3101
3184
|
case "end":
|
|
3102
|
-
return
|
|
3185
|
+
return _context69.stop();
|
|
3103
3186
|
}
|
|
3104
|
-
},
|
|
3187
|
+
}, _callee69);
|
|
3105
3188
|
})));
|
|
3106
3189
|
});
|
|
3107
3190
|
});
|