@webex/plugin-meetings 3.12.0-next.8 → 3.12.0-task-refactor.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/annotation/index.js +5 -14
  2. package/dist/annotation/index.js.map +1 -1
  3. package/dist/breakouts/breakout.js +1 -1
  4. package/dist/breakouts/index.js +1 -1
  5. package/dist/config.js +2 -8
  6. package/dist/config.js.map +1 -1
  7. package/dist/constants.js +6 -29
  8. package/dist/constants.js.map +1 -1
  9. package/dist/hashTree/hashTreeParser.js +29 -1563
  10. package/dist/hashTree/hashTreeParser.js.map +1 -1
  11. package/dist/hashTree/types.js +3 -13
  12. package/dist/hashTree/types.js.map +1 -1
  13. package/dist/index.js +2 -11
  14. package/dist/index.js.map +1 -1
  15. package/dist/interceptors/index.js +0 -7
  16. package/dist/interceptors/index.js.map +1 -1
  17. package/dist/interceptors/locusRouteToken.js +5 -27
  18. package/dist/interceptors/locusRouteToken.js.map +1 -1
  19. package/dist/interpretation/index.js +2 -2
  20. package/dist/interpretation/index.js.map +1 -1
  21. package/dist/interpretation/siLanguage.js +1 -1
  22. package/dist/locus-info/controlsUtils.js +3 -7
  23. package/dist/locus-info/controlsUtils.js.map +1 -1
  24. package/dist/locus-info/index.js +247 -642
  25. package/dist/locus-info/index.js.map +1 -1
  26. package/dist/locus-info/selfUtils.js +0 -1
  27. package/dist/locus-info/selfUtils.js.map +1 -1
  28. package/dist/locus-info/types.js.map +1 -1
  29. package/dist/media/MediaConnectionAwaiter.js +1 -57
  30. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  31. package/dist/media/properties.js +2 -4
  32. package/dist/media/properties.js.map +1 -1
  33. package/dist/meeting/in-meeting-actions.js +1 -7
  34. package/dist/meeting/in-meeting-actions.js.map +1 -1
  35. package/dist/meeting/index.js +1036 -1481
  36. package/dist/meeting/index.js.map +1 -1
  37. package/dist/meeting/request.js +0 -50
  38. package/dist/meeting/request.js.map +1 -1
  39. package/dist/meeting/request.type.js.map +1 -1
  40. package/dist/meeting/util.js +3 -133
  41. package/dist/meeting/util.js.map +1 -1
  42. package/dist/meetings/index.js +59 -142
  43. package/dist/meetings/index.js.map +1 -1
  44. package/dist/meetings/util.js +7 -11
  45. package/dist/meetings/util.js.map +1 -1
  46. package/dist/member/index.js +0 -10
  47. package/dist/member/index.js.map +1 -1
  48. package/dist/member/util.js +0 -10
  49. package/dist/member/util.js.map +1 -1
  50. package/dist/metrics/constants.js +1 -7
  51. package/dist/metrics/constants.js.map +1 -1
  52. package/dist/multistream/mediaRequestManager.js +60 -9
  53. package/dist/multistream/mediaRequestManager.js.map +1 -1
  54. package/dist/multistream/remoteMediaManager.js +0 -11
  55. package/dist/multistream/remoteMediaManager.js.map +1 -1
  56. package/dist/multistream/sendSlotManager.js +2 -116
  57. package/dist/multistream/sendSlotManager.js.map +1 -1
  58. package/dist/reachability/clusterReachability.js +18 -171
  59. package/dist/reachability/clusterReachability.js.map +1 -1
  60. package/dist/reachability/index.js +11 -21
  61. package/dist/reachability/index.js.map +1 -1
  62. package/dist/reachability/reachabilityPeerConnection.js +1 -1
  63. package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
  64. package/dist/reactions/reactions.type.js.map +1 -1
  65. package/dist/reconnection-manager/index.js +1 -0
  66. package/dist/reconnection-manager/index.js.map +1 -1
  67. package/dist/types/common/browser-detection.d.ts +0 -1
  68. package/dist/types/common/events/events-scope.d.ts +0 -1
  69. package/dist/types/common/events/events.d.ts +0 -1
  70. package/dist/types/config.d.ts +0 -5
  71. package/dist/types/constants.d.ts +1 -24
  72. package/dist/types/hashTree/hashTreeParser.d.ts +11 -260
  73. package/dist/types/hashTree/types.d.ts +0 -20
  74. package/dist/types/index.d.ts +0 -1
  75. package/dist/types/interceptors/index.d.ts +1 -2
  76. package/dist/types/interceptors/locusRouteToken.d.ts +0 -2
  77. package/dist/types/locus-info/index.d.ts +47 -68
  78. package/dist/types/locus-info/types.d.ts +12 -28
  79. package/dist/types/media/MediaConnectionAwaiter.d.ts +1 -10
  80. package/dist/types/media/properties.d.ts +1 -2
  81. package/dist/types/meeting/in-meeting-actions.d.ts +0 -6
  82. package/dist/types/meeting/index.d.ts +7 -86
  83. package/dist/types/meeting/request.d.ts +1 -16
  84. package/dist/types/meeting/request.type.d.ts +0 -5
  85. package/dist/types/meeting/util.d.ts +0 -31
  86. package/dist/types/meeting-info/util.d.ts +0 -1
  87. package/dist/types/meeting-info/utilv2.d.ts +0 -1
  88. package/dist/types/meetings/index.d.ts +2 -4
  89. package/dist/types/member/index.d.ts +0 -1
  90. package/dist/types/member/types.d.ts +4 -4
  91. package/dist/types/member/util.d.ts +0 -5
  92. package/dist/types/metrics/constants.d.ts +0 -6
  93. package/dist/types/multistream/mediaRequestManager.d.ts +23 -0
  94. package/dist/types/multistream/sendSlotManager.d.ts +1 -23
  95. package/dist/types/reachability/clusterReachability.d.ts +3 -30
  96. package/dist/types/reactions/reactions.type.d.ts +0 -1
  97. package/dist/types/recording-controller/util.d.ts +5 -5
  98. package/dist/types/roap/index.d.ts +1 -1
  99. package/dist/webinar/index.js +163 -438
  100. package/dist/webinar/index.js.map +1 -1
  101. package/package.json +24 -26
  102. package/src/annotation/index.ts +7 -27
  103. package/src/config.ts +0 -5
  104. package/src/constants.ts +1 -30
  105. package/src/hashTree/hashTreeParser.ts +25 -1523
  106. package/src/hashTree/types.ts +1 -24
  107. package/src/index.ts +1 -8
  108. package/src/interceptors/index.ts +1 -2
  109. package/src/interceptors/locusRouteToken.ts +5 -22
  110. package/src/interpretation/index.ts +2 -2
  111. package/src/locus-info/controlsUtils.ts +0 -17
  112. package/src/locus-info/index.ts +213 -707
  113. package/src/locus-info/selfUtils.ts +0 -1
  114. package/src/locus-info/types.ts +12 -27
  115. package/src/media/MediaConnectionAwaiter.ts +1 -41
  116. package/src/media/properties.ts +1 -3
  117. package/src/meeting/in-meeting-actions.ts +0 -12
  118. package/src/meeting/index.ts +84 -461
  119. package/src/meeting/request.ts +0 -42
  120. package/src/meeting/request.type.ts +0 -6
  121. package/src/meeting/util.ts +2 -160
  122. package/src/meetings/index.ts +60 -180
  123. package/src/meetings/util.ts +9 -10
  124. package/src/member/index.ts +0 -10
  125. package/src/member/util.ts +0 -12
  126. package/src/metrics/constants.ts +0 -7
  127. package/src/multistream/mediaRequestManager.ts +54 -4
  128. package/src/multistream/remoteMediaManager.ts +0 -13
  129. package/src/multistream/sendSlotManager.ts +3 -97
  130. package/src/reachability/clusterReachability.ts +27 -153
  131. package/src/reachability/index.ts +1 -15
  132. package/src/reachability/reachabilityPeerConnection.ts +1 -3
  133. package/src/reactions/reactions.type.ts +0 -1
  134. package/src/reconnection-manager/index.ts +1 -0
  135. package/src/webinar/index.ts +6 -265
  136. package/test/unit/spec/annotation/index.ts +7 -69
  137. package/test/unit/spec/interceptors/locusRouteToken.ts +0 -44
  138. package/test/unit/spec/locus-info/controlsUtils.js +1 -56
  139. package/test/unit/spec/locus-info/index.js +90 -1457
  140. package/test/unit/spec/media/MediaConnectionAwaiter.ts +1 -41
  141. package/test/unit/spec/media/properties.ts +3 -12
  142. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -8
  143. package/test/unit/spec/meeting/index.js +128 -981
  144. package/test/unit/spec/meeting/request.js +0 -70
  145. package/test/unit/spec/meeting/utils.js +26 -438
  146. package/test/unit/spec/meetings/index.js +33 -845
  147. package/test/unit/spec/meetings/utils.js +1 -51
  148. package/test/unit/spec/member/index.js +4 -28
  149. package/test/unit/spec/member/util.js +27 -65
  150. package/test/unit/spec/multistream/mediaRequestManager.ts +85 -2
  151. package/test/unit/spec/multistream/remoteMediaManager.ts +0 -30
  152. package/test/unit/spec/multistream/sendSlotManager.ts +36 -135
  153. package/test/unit/spec/reachability/clusterReachability.ts +1 -125
  154. package/test/unit/spec/reachability/index.ts +3 -26
  155. package/test/unit/spec/reconnection-manager/index.js +8 -4
  156. package/test/unit/spec/webinar/index.ts +37 -534
  157. package/dist/aiEnableRequest/index.js +0 -184
  158. package/dist/aiEnableRequest/index.js.map +0 -1
  159. package/dist/aiEnableRequest/utils.js +0 -36
  160. package/dist/aiEnableRequest/utils.js.map +0 -1
  161. package/dist/hashTree/constants.js +0 -22
  162. package/dist/hashTree/constants.js.map +0 -1
  163. package/dist/hashTree/hashTree.js +0 -533
  164. package/dist/hashTree/hashTree.js.map +0 -1
  165. package/dist/hashTree/utils.js +0 -69
  166. package/dist/hashTree/utils.js.map +0 -1
  167. package/dist/interceptors/constant.js +0 -12
  168. package/dist/interceptors/constant.js.map +0 -1
  169. package/dist/interceptors/dataChannelAuthToken.js +0 -290
  170. package/dist/interceptors/dataChannelAuthToken.js.map +0 -1
  171. package/dist/interceptors/utils.js +0 -27
  172. package/dist/interceptors/utils.js.map +0 -1
  173. package/dist/types/aiEnableRequest/index.d.ts +0 -5
  174. package/dist/types/aiEnableRequest/utils.d.ts +0 -2
  175. package/dist/types/hashTree/constants.d.ts +0 -9
  176. package/dist/types/hashTree/hashTree.d.ts +0 -136
  177. package/dist/types/hashTree/utils.d.ts +0 -22
  178. package/dist/types/interceptors/constant.d.ts +0 -5
  179. package/dist/types/interceptors/dataChannelAuthToken.d.ts +0 -43
  180. package/dist/types/interceptors/utils.d.ts +0 -1
  181. package/dist/types/webinar/utils.d.ts +0 -6
  182. package/dist/webinar/utils.js +0 -25
  183. package/dist/webinar/utils.js.map +0 -1
  184. package/src/aiEnableRequest/README.md +0 -84
  185. package/src/aiEnableRequest/index.ts +0 -170
  186. package/src/aiEnableRequest/utils.ts +0 -25
  187. package/src/hashTree/constants.ts +0 -10
  188. package/src/hashTree/hashTree.ts +0 -480
  189. package/src/hashTree/utils.ts +0 -62
  190. package/src/interceptors/constant.ts +0 -6
  191. package/src/interceptors/dataChannelAuthToken.ts +0 -170
  192. package/src/interceptors/utils.ts +0 -16
  193. package/src/webinar/utils.ts +0 -16
  194. package/test/unit/spec/aiEnableRequest/index.ts +0 -981
  195. package/test/unit/spec/aiEnableRequest/utils.ts +0 -130
  196. package/test/unit/spec/hashTree/hashTree.ts +0 -721
  197. package/test/unit/spec/hashTree/hashTreeParser.ts +0 -3670
  198. package/test/unit/spec/hashTree/utils.ts +0 -140
  199. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +0 -210
  200. package/test/unit/spec/interceptors/utils.ts +0 -75
  201. package/test/unit/spec/webinar/utils.ts +0 -39
@@ -425,10 +425,7 @@ describe('plugin-meetings', () => {
425
425
 
426
426
  describe('#_toggleStopIceGatheringAfterFirstRelayCandidate', () => {
427
427
  it('should have _toggleStopIceGatheringAfterFirstRelayCandidate', () => {
428
- assert.equal(
429
- typeof webex.meetings._toggleStopIceGatheringAfterFirstRelayCandidate,
430
- 'function'
431
- );
428
+ assert.equal(typeof webex.meetings._toggleStopIceGatheringAfterFirstRelayCandidate, 'function');
432
429
  });
433
430
 
434
431
  describe('success', () => {
@@ -605,196 +602,6 @@ describe('plugin-meetings', () => {
605
602
 
606
603
  clock.restore();
607
604
  });
608
-
609
- it('returns the same promise when register is called multiple times concurrently', async () => {
610
- webex.canAuthorize = true;
611
- webex.meetings.registered = false;
612
-
613
- // Make registration take some time
614
- let resolveRegistration;
615
- const registrationDelay = new Promise((resolve) => {
616
- resolveRegistration = resolve;
617
- });
618
-
619
- webex.internal.device.register.returns(registrationDelay);
620
- webex.internal.mercury.connect.returns(Promise.resolve());
621
-
622
- // Start first registration
623
- const firstRegisterPromise = webex.meetings.register();
624
-
625
- // Immediately start second registration while first is in progress
626
- const secondRegisterPromise = webex.meetings.register();
627
-
628
- // Start third registration
629
- const thirdRegisterPromise = webex.meetings.register();
630
-
631
- // All should return the same promise
632
- assert.strictEqual(firstRegisterPromise, secondRegisterPromise);
633
- assert.strictEqual(secondRegisterPromise, thirdRegisterPromise);
634
-
635
- // Complete the registration
636
- resolveRegistration();
637
-
638
- await firstRegisterPromise;
639
- await secondRegisterPromise;
640
- await thirdRegisterPromise;
641
-
642
- // Device registration and mercury connect should only be called once
643
- assert.calledOnce(webex.internal.device.register);
644
- assert.calledOnce(webex.internal.mercury.connect);
645
- assert.isTrue(webex.meetings.registered);
646
- });
647
-
648
- it('prevents duplicate registrations when register is called during in-flight registration', async () => {
649
- webex.canAuthorize = true;
650
- webex.meetings.registered = false;
651
-
652
- let deviceRegisterCallCount = 0;
653
- let mercuryConnectCallCount = 0;
654
-
655
- // Track actual calls
656
- webex.internal.device.register = sinon.stub().callsFake(() => {
657
- deviceRegisterCallCount++;
658
- return Promise.resolve();
659
- });
660
- webex.internal.mercury.connect = sinon.stub().callsFake(() => {
661
- mercuryConnectCallCount++;
662
- return Promise.resolve();
663
- });
664
-
665
- // Start registration without awaiting
666
- const promise1 = webex.meetings.register();
667
-
668
- // Call register again while first is in progress
669
- const promise2 = webex.meetings.register();
670
-
671
- // Wait for both
672
- await Promise.all([promise1, promise2]);
673
-
674
- // Should only register once
675
- assert.equal(deviceRegisterCallCount, 1, 'device.register should only be called once');
676
- assert.equal(mercuryConnectCallCount, 1, 'mercury.connect should only be called once');
677
- assert.isTrue(webex.meetings.registered);
678
- });
679
-
680
- it('handles concurrent register calls when first registration fails', async () => {
681
- webex.canAuthorize = true;
682
- webex.meetings.registered = false;
683
-
684
- const registrationError = new Error('registration failed');
685
- webex.internal.device.register.rejects(registrationError);
686
-
687
- // Start first registration
688
- const firstRegisterPromise = webex.meetings.register();
689
-
690
- // Start second registration while first is in progress
691
- const secondRegisterPromise = webex.meetings.register();
692
-
693
- // Both should reject with the same error
694
- await assert.isRejected(firstRegisterPromise, 'registration failed');
695
- await assert.isRejected(secondRegisterPromise, 'registration failed');
696
-
697
- // Should still only attempt registration once
698
- assert.calledOnce(webex.internal.device.register);
699
- assert.isFalse(webex.meetings.registered);
700
- });
701
-
702
- it('allows new registration after previous registration completes', async () => {
703
- webex.canAuthorize = true;
704
- webex.meetings.registered = false;
705
-
706
- // First registration
707
- await webex.meetings.register();
708
- assert.isTrue(webex.meetings.registered);
709
-
710
- // Reset for second registration
711
- webex.meetings.registered = false;
712
- webex.internal.device.register.resetHistory();
713
- webex.internal.mercury.connect.resetHistory();
714
-
715
- // Second registration should work normally
716
- await webex.meetings.register();
717
- assert.calledOnce(webex.internal.device.register);
718
- assert.calledOnce(webex.internal.mercury.connect);
719
- assert.isTrue(webex.meetings.registered);
720
- });
721
-
722
- it('clears registrationPromise after successful registration', async () => {
723
- webex.canAuthorize = true;
724
- webex.meetings.registered = false;
725
-
726
- await webex.meetings.register();
727
-
728
- assert.isTrue(webex.meetings.registered);
729
- assert.isNull(webex.meetings.registrationPromise);
730
- });
731
-
732
- it('clears registrationPromise after failed registration', async () => {
733
- webex.canAuthorize = true;
734
- webex.meetings.registered = false;
735
-
736
- webex.internal.device.register.rejects(new Error('registration failed'));
737
-
738
- await assert.isRejected(webex.meetings.register());
739
-
740
- assert.isFalse(webex.meetings.registered);
741
- assert.isNull(webex.meetings.registrationPromise);
742
- });
743
-
744
- it('waits for unregistration to complete before registering', async () => {
745
- webex.canAuthorize = true;
746
-
747
- assert.isFalse(webex.meetings.registered);
748
-
749
- // First, register successfully
750
- await webex.meetings.register();
751
- assert.isTrue(webex.meetings.registered);
752
-
753
- // Start unregistration (but don't await it)
754
- const unregisterPromise = webex.meetings.unregister();
755
- assert.isDefined(webex.meetings.unregistrationPromise);
756
-
757
- // Immediately try to register while unregister is in progress
758
- const registerPromise = webex.meetings.register();
759
-
760
- // Wait for register to complete
761
- await registerPromise;
762
-
763
- // Should have completed registration
764
- assert.isTrue(webex.meetings.registered);
765
-
766
- // Now await the original unregister promise - this should have already completed
767
- // and should NOT affect the registered state since register() took over
768
- await unregisterPromise;
769
-
770
- // Should STILL be registered because register() took over
771
- assert.isTrue(webex.meetings.registered);
772
- });
773
-
774
- it('handles multiple register calls during unregistration', async () => {
775
- webex.canAuthorize = true;
776
-
777
- // First, register successfully
778
- await webex.meetings.register();
779
- assert.isTrue(webex.meetings.registered);
780
-
781
- // Start unregistration
782
- const unregistrationPromise = webex.meetings.unregister();
783
-
784
- // Try to register once while unregister is in progress
785
- await webex.meetings.register();
786
-
787
- // Should be registered again
788
- assert.isTrue(
789
- webex.meetings.registered,
790
- 'Expected meetings to be registered after unregister and register cycle'
791
- );
792
-
793
- await unregistrationPromise;
794
-
795
- // Should STILL be registered because register() took over
796
- assert.isTrue(webex.meetings.registered);
797
- });
798
605
  });
799
606
 
800
607
  describe('#unregister', () => {
@@ -815,18 +622,6 @@ describe('plugin-meetings', () => {
815
622
  });
816
623
  });
817
624
 
818
- it('calls mercury.disconnect with code 3050 and reason to prevent auto-reconnect', (done) => {
819
- webex.meetings.registered = true;
820
- webex.meetings.unregister().then(() => {
821
- assert.calledOnce(webex.internal.mercury.disconnect);
822
- assert.calledWith(webex.internal.mercury.disconnect, {
823
- code: 3050,
824
- reason: 'meetings unregister',
825
- });
826
- done();
827
- });
828
- });
829
-
830
625
  it('rejects when device.unregister fails', async () => {
831
626
  webex.meetings.registered = true;
832
627
  webex.internal.device.unregister = sinon.stub().returns(Promise.reject());
@@ -875,335 +670,6 @@ describe('plugin-meetings', () => {
875
670
  done();
876
671
  });
877
672
  });
878
-
879
- it('waits for registration to complete before unregistering when called during registration', async () => {
880
- webex.canAuthorize = true;
881
- webex.meetings.registered = false;
882
-
883
- let resolveRegistration;
884
- const registrationDelay = new Promise((resolve) => {
885
- resolveRegistration = resolve;
886
- });
887
-
888
- webex.internal.device.register.returns(registrationDelay);
889
- webex.internal.mercury.connect.returns(Promise.resolve());
890
-
891
- // Start registration (don't await)
892
- const registerPromise = webex.meetings.register();
893
-
894
- // Verify registration is in progress
895
- assert.exists(webex.meetings.registrationPromise);
896
- assert.isFalse(webex.meetings.registered);
897
-
898
- // Call unregister while registration is in progress
899
- const unregisterPromise = webex.meetings.unregister();
900
-
901
- // Registration should still be in progress
902
- assert.exists(webex.meetings.registrationPromise);
903
-
904
- // Complete the registration
905
- resolveRegistration();
906
- await registerPromise;
907
-
908
- // Now unregister should proceed
909
- await unregisterPromise;
910
-
911
- // Verify final state
912
- assert.isFalse(webex.meetings.registered);
913
- assert.isNull(webex.meetings.registrationPromise);
914
- assert.calledOnce(webex.internal.device.unregister);
915
- assert.calledOnce(webex.internal.mercury.disconnect);
916
- });
917
-
918
- it('handles unregister called during registration that fails', async () => {
919
- webex.canAuthorize = true;
920
- webex.meetings.registered = false;
921
-
922
- const registrationError = new Error('registration failed');
923
- let rejectRegistration;
924
- const registrationDelay = new Promise((resolve, reject) => {
925
- rejectRegistration = reject;
926
- });
927
-
928
- webex.internal.device.register.returns(registrationDelay);
929
-
930
- // Start registration (don't await)
931
- const registerPromise = webex.meetings.register();
932
-
933
- // Call unregister while registration is in progress
934
- const unregisterPromise = webex.meetings.unregister();
935
-
936
- // Fail the registration
937
- rejectRegistration(registrationError);
938
-
939
- // Registration should fail
940
- await assert.isRejected(registerPromise, 'registration failed');
941
-
942
- // // Unregister should resolve immediately since registration failed
943
- await unregisterPromise;
944
-
945
- // Verify final state - not registered
946
- assert.isFalse(webex.meetings.registered);
947
- assert.isNull(webex.meetings.registrationPromise);
948
- // Device unregister should not be called because registration never completed
949
- assert.notCalled(webex.internal.device.unregister);
950
- });
951
-
952
- it('handles multiple unregister calls during registration', async () => {
953
- webex.canAuthorize = true;
954
- webex.meetings.registered = false;
955
-
956
- let resolveRegistration;
957
- const registrationDelay = new Promise((resolve) => {
958
- resolveRegistration = resolve;
959
- });
960
-
961
- webex.internal.device.register.returns(registrationDelay);
962
- webex.internal.mercury.connect.returns(Promise.resolve());
963
-
964
- // Start registration
965
- const registerPromise = webex.meetings.register();
966
-
967
- // Call unregister multiple times while registration is in progress
968
- const unregisterPromise1 = webex.meetings.unregister();
969
- const unregisterPromise2 = webex.meetings.unregister();
970
- const unregisterPromise3 = webex.meetings.unregister();
971
-
972
- // Complete registration
973
- resolveRegistration();
974
- await registerPromise;
975
-
976
- // All unregister calls should complete
977
- await Promise.all([unregisterPromise1, unregisterPromise2, unregisterPromise3]);
978
-
979
- // Verify final state
980
- assert.isFalse(webex.meetings.registered);
981
- // Disconnect and unregister should be called, but not multiple times
982
- assert.calledOnce(webex.internal.mercury.disconnect);
983
- assert.calledOnce(webex.internal.device.unregister);
984
- });
985
-
986
- it('completes unregister correctly after waiting for registration', async () => {
987
- webex.canAuthorize = true;
988
- webex.meetings.registered = false;
989
-
990
- const stopListeningForEventsSpy = sinon.spy(webex.meetings, 'stopListeningForEvents');
991
-
992
- let resolveRegistration;
993
- const registrationDelay = new Promise((resolve) => {
994
- resolveRegistration = resolve;
995
- });
996
-
997
- webex.internal.device.register.returns(registrationDelay);
998
- webex.internal.mercury.connect.returns(Promise.resolve());
999
-
1000
- // Start registration
1001
- const registerPromise = webex.meetings.register();
1002
-
1003
- // Call unregister during registration
1004
- const unregisterPromise = webex.meetings.unregister();
1005
-
1006
- // stopListeningForEvents should not be called yet
1007
- assert.notCalled(stopListeningForEventsSpy);
1008
-
1009
- // Complete registration
1010
- resolveRegistration();
1011
- await registerPromise;
1012
-
1013
- // After registration completes, the meetings plugin should be registered
1014
- assert.isTrue(webex.meetings.registered);
1015
-
1016
- // Now unregister should proceed
1017
- await unregisterPromise;
1018
-
1019
- // Verify unregister completed properly
1020
- assert.calledOnce(stopListeningForEventsSpy);
1021
- assert.calledOnce(webex.internal.mercury.disconnect);
1022
- assert.calledOnce(webex.internal.device.unregister);
1023
- assert.isFalse(webex.meetings.registered);
1024
- assert.deepEqual(webex.meetings.registrationStatus, INITIAL_REGISTRATION_STATUS);
1025
- });
1026
-
1027
- it('logs appropriate message when unregister is called during registration', async () => {
1028
- webex.canAuthorize = true;
1029
- webex.meetings.registered = false;
1030
-
1031
- const loggerSpy = sinon.spy(LoggerProxy.logger, 'info');
1032
-
1033
- let resolveRegistration;
1034
- const registrationDelay = new Promise((resolve) => {
1035
- resolveRegistration = resolve;
1036
- });
1037
-
1038
- webex.internal.device.register.returns(registrationDelay);
1039
- webex.internal.mercury.connect.returns(Promise.resolve());
1040
-
1041
- // Start registration
1042
- const registerPromise = webex.meetings.register();
1043
-
1044
- // Call unregister during registration
1045
- const unregisterPromise = webex.meetings.unregister();
1046
-
1047
- // Should log that it's waiting
1048
- assert.calledWith(
1049
- loggerSpy,
1050
- 'Meetings:index#unregister --> INFO, Meetings plugin registration in progress, waiting to unregister'
1051
- );
1052
-
1053
- // Complete registration and unregistration
1054
- resolveRegistration();
1055
- await registerPromise;
1056
- await unregisterPromise;
1057
-
1058
- loggerSpy.restore();
1059
- });
1060
-
1061
- it('returns the same promise when unregister is called multiple times concurrently', async () => {
1062
- webex.meetings.registered = true;
1063
-
1064
- // Make unregistration take some time
1065
- let resolveUnregistration;
1066
- const unregistrationDelay = new Promise((resolve) => {
1067
- resolveUnregistration = resolve;
1068
- });
1069
-
1070
- webex.internal.mercury.disconnect.returns(unregistrationDelay);
1071
- webex.internal.device.unregister.returns(Promise.resolve());
1072
-
1073
- // Start first unregistration
1074
- const firstUnregisterPromise = webex.meetings.unregister();
1075
-
1076
- // Immediately start second unregistration while first is in progress
1077
- const secondUnregisterPromise = webex.meetings.unregister();
1078
-
1079
- // Start third unregistration
1080
- const thirdUnregisterPromise = webex.meetings.unregister();
1081
-
1082
- // All should return the same promise
1083
- assert.strictEqual(firstUnregisterPromise, secondUnregisterPromise);
1084
- assert.strictEqual(secondUnregisterPromise, thirdUnregisterPromise);
1085
-
1086
- // Complete the unregistration
1087
- resolveUnregistration();
1088
-
1089
- await firstUnregisterPromise;
1090
- await secondUnregisterPromise;
1091
- await thirdUnregisterPromise;
1092
-
1093
- // Mercury disconnect and device unregister should only be called once
1094
- assert.calledOnce(webex.internal.mercury.disconnect);
1095
- assert.calledOnce(webex.internal.device.unregister);
1096
- assert.isFalse(webex.meetings.registered);
1097
- });
1098
-
1099
- it('clears unregistrationPromise after successful unregistration', async () => {
1100
- webex.meetings.registered = true;
1101
-
1102
- await webex.meetings.unregister();
1103
-
1104
- assert.isFalse(webex.meetings.registered);
1105
- assert.isNull(webex.meetings.unregistrationPromise);
1106
- });
1107
-
1108
- it('clears unregistrationPromise after failed unregistration', async () => {
1109
- webex.meetings.registered = true;
1110
-
1111
- webex.internal.mercury.disconnect.rejects(new Error('disconnect failed'));
1112
-
1113
- await assert.isRejected(webex.meetings.unregister());
1114
-
1115
- assert.isTrue(webex.meetings.registered);
1116
- assert.isNull(webex.meetings.unregistrationPromise);
1117
- });
1118
-
1119
- it('allows new unregistration after previous unregistration completes', async () => {
1120
- webex.meetings.registered = true;
1121
-
1122
- // First unregistration
1123
- await webex.meetings.unregister();
1124
- assert.isFalse(webex.meetings.registered);
1125
-
1126
- // Register again
1127
- webex.canAuthorize = true;
1128
- await webex.meetings.register();
1129
- assert.isTrue(webex.meetings.registered);
1130
-
1131
- // Reset history
1132
- webex.internal.mercury.disconnect.resetHistory();
1133
- webex.internal.device.unregister.resetHistory();
1134
-
1135
- // Second unregistration should work normally
1136
- await webex.meetings.unregister();
1137
- assert.calledOnce(webex.internal.mercury.disconnect);
1138
- assert.calledOnce(webex.internal.device.unregister);
1139
- assert.isFalse(webex.meetings.registered);
1140
- });
1141
-
1142
- it('handles register called during unregistration that fails', async () => {
1143
- webex.canAuthorize = true;
1144
- webex.meetings.registered = true;
1145
-
1146
- const unregistrationError = new Error('unregistration failed');
1147
- let rejectUnregistration;
1148
- const unregistrationDelay = new Promise((resolve, reject) => {
1149
- rejectUnregistration = reject;
1150
- });
1151
-
1152
- webex.internal.mercury.disconnect.returns(unregistrationDelay);
1153
-
1154
- // Start unregistration (don't await)
1155
- const unregisterPromise = webex.meetings.unregister();
1156
-
1157
- // Call register while unregistration is in progress
1158
- const registerPromise = webex.meetings.register();
1159
-
1160
- // Fail the unregistration
1161
- rejectUnregistration(unregistrationError);
1162
-
1163
- // Unregistration should fail
1164
- await assert.isRejected(unregisterPromise, 'unregistration failed');
1165
-
1166
- // Register should still succeed (retry after unregister failure)
1167
- await registerPromise;
1168
-
1169
- // Verify final state - should be registered
1170
- assert.isTrue(webex.meetings.registered);
1171
- assert.isNull(webex.meetings.unregistrationPromise);
1172
- });
1173
-
1174
- it('logs appropriate message when register is called during unregistration', async () => {
1175
- webex.canAuthorize = true;
1176
- webex.meetings.registered = true;
1177
-
1178
- const loggerSpy = sinon.spy(LoggerProxy.logger, 'info');
1179
-
1180
- let resolveUnregistration;
1181
- const unregistrationDelay = new Promise((resolve) => {
1182
- resolveUnregistration = resolve;
1183
- });
1184
-
1185
- webex.internal.mercury.disconnect.returns(unregistrationDelay);
1186
- webex.internal.device.unregister.returns(Promise.resolve());
1187
-
1188
- // Start unregistration
1189
- const unregisterPromise = webex.meetings.unregister();
1190
-
1191
- // Call register during unregistration
1192
- const registerPromise = webex.meetings.register();
1193
-
1194
- // Should log that it's waiting
1195
- assert.calledWith(
1196
- loggerSpy,
1197
- 'Meetings:index#register --> INFO, Meetings plugin unregistration in progress, waiting to register'
1198
- );
1199
-
1200
- // Complete unregistration and registration
1201
- resolveUnregistration();
1202
- await unregisterPromise;
1203
- await registerPromise;
1204
-
1205
- loggerSpy.restore();
1206
- });
1207
673
  });
1208
674
 
1209
675
  describe('virtual background effect', () => {
@@ -1266,7 +732,7 @@ describe('plugin-meetings', () => {
1266
732
  };
1267
733
  });
1268
734
 
1269
- it('creates noise reduction effect with BNR model', async () => {
735
+ it('creates noise reduction effect', async () => {
1270
736
  const result = await webex.meetings.createNoiseReductionEffect({audioContext: {}});
1271
737
 
1272
738
  assert.exists(result);
@@ -1278,51 +744,30 @@ describe('plugin-meetings', () => {
1278
744
  authToken: 'fake_token',
1279
745
  mode: 'WORKLET',
1280
746
  avoidSimd: false,
1281
- model: 'bnr',
1282
747
  });
1283
748
  assert.exists(result.enable);
1284
749
  assert.exists(result.disable);
1285
750
  assert.exists(result.dispose);
1286
751
  });
1287
752
 
1288
- it('creates noise reduction effect with OFMV model', async () => {
1289
- const result = await webex.meetings.createNoiseReductionEffect({
753
+ it('creates noise reduction effect with custom options passed', async () => {
754
+ const effectOptions = {
1290
755
  audioContext: {},
1291
- model: 'ofmv',
1292
- });
756
+ mode: 'LEGACY',
757
+ env: 'int',
758
+ avoidSimd: true,
759
+ };
760
+
761
+ const result = await webex.meetings.createNoiseReductionEffect(effectOptions);
1293
762
 
1294
763
  assert.exists(result);
1295
764
  assert.instanceOf(result, NoiseReductionEffect);
1296
765
  assert.containsAllKeys(result, ['audioContext', 'isEnabled', 'isReady', 'options']);
1297
- assert.equal(result.options.authToken, 'fake_token');
1298
- assert.deepEqual(result.options, {
1299
- audioContext: {},
1300
- authToken: 'fake_token',
1301
- mode: 'WORKLET',
1302
- avoidSimd: false,
1303
- model: 'ofmv',
1304
- });
766
+ assert.deepEqual(result.options, {...effectOptions, authToken: 'fake_token'});
1305
767
  assert.exists(result.enable);
1306
768
  assert.exists(result.disable);
1307
769
  assert.exists(result.dispose);
1308
770
  });
1309
-
1310
- it('passes custom options to noise reduction effect', async () => {
1311
- const result = await webex.meetings.createNoiseReductionEffect({
1312
- audioContext: {},
1313
- mode: 'LEGACY',
1314
- env: 'int',
1315
- avoidSimd: true,
1316
- });
1317
-
1318
- assert.exists(result);
1319
- assert.instanceOf(result, NoiseReductionEffect);
1320
- assert.equal(result.options.mode, 'LEGACY');
1321
- assert.equal(result.options.env, 'int');
1322
- assert.equal(result.options.avoidSimd, true);
1323
- assert.equal(result.options.authToken, 'fake_token');
1324
- assert.equal(result.options.model, 'bnr');
1325
- });
1326
771
  });
1327
772
 
1328
773
  describe('gets', () => {
@@ -1473,7 +918,7 @@ describe('plugin-meetings', () => {
1473
918
  locus: {
1474
919
  url: url1,
1475
920
  },
1476
- hashTreeMessage: undefined,
921
+ hashTreeMessage: undefined
1477
922
  });
1478
923
  });
1479
924
  });
@@ -1758,30 +1203,8 @@ describe('plugin-meetings', () => {
1758
1203
 
1759
1204
  it('calls createMeeting with classificationId and returns its promise', async () => {
1760
1205
  await checkCallCreateMeeting(
1761
- [
1762
- test1,
1763
- test2,
1764
- FAKE_USE_RANDOM_DELAY,
1765
- {},
1766
- undefined,
1767
- true,
1768
- callStateForMetrics,
1769
- undefined,
1770
- undefined,
1771
- undefined,
1772
- classificationId,
1773
- ],
1774
- [
1775
- test1,
1776
- test2,
1777
- FAKE_USE_RANDOM_DELAY,
1778
- {},
1779
- callStateForMetrics,
1780
- true,
1781
- undefined,
1782
- undefined,
1783
- classificationId,
1784
- ]
1206
+ [test1, test2, FAKE_USE_RANDOM_DELAY, {}, undefined, true, callStateForMetrics, undefined, undefined, undefined, classificationId],
1207
+ [test1, test2, FAKE_USE_RANDOM_DELAY, {}, callStateForMetrics, true, undefined, undefined, classificationId],
1785
1208
  );
1786
1209
  });
1787
1210
 
@@ -2014,81 +1437,37 @@ describe('plugin-meetings', () => {
2014
1437
  webExMeetingId,
2015
1438
  },
2016
1439
  },
2017
- hashTreeMessage: undefined,
1440
+ hashTreeMessage: undefined
2018
1441
  });
2019
1442
  });
2020
1443
  it('should setup the meeting from a hash tree event', async () => {
2021
- const selfData = {};
2022
- const infoData = {webExMeetingId};
2023
- const hashTreeMessage = {
2024
- locusUrl: url1,
2025
- locusStateElements: [
2026
- {
2027
- htMeta: {elementId: {type: 'Self', id: 1, version: 1}},
2028
- data: selfData,
2029
- },
2030
- {
2031
- htMeta: {elementId: {type: 'Info', id: 2, version: 1}},
2032
- data: infoData,
2033
- },
2034
- ],
1444
+ const locus = {
1445
+ id: uuid1,
1446
+ self: {},
1447
+ info: {
1448
+ webExMeetingId,
1449
+ },
2035
1450
  };
1451
+ const hashTreeMessage = {something: 'hashTreeData'};
2036
1452
  await webex.meetings.handleLocusEvent({
1453
+ locus,
2037
1454
  eventType: 'locus.state_message',
2038
1455
  locusUrl: url1,
2039
1456
  stateElementsMessage: hashTreeMessage,
2040
1457
  });
2041
1458
  assert.calledWith(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
1459
+ assert.calledWith(
1460
+ webex.meetings.meetingCollection.getByKey,
1461
+ 'meetingNumber',
1462
+ webExMeetingId
1463
+ );
2042
1464
  assert.calledOnce(initialSetup);
2043
1465
  assert.calledWith(initialSetup, {
2044
1466
  trigger: 'locus-message',
2045
- locus: {
2046
- participants: [],
2047
- url: url1,
2048
- self: selfData,
2049
- info: infoData,
2050
- },
1467
+ locus,
2051
1468
  hashTreeMessage,
2052
1469
  });
2053
1470
  });
2054
-
2055
- it('should ignore hash tree event when created locus has INACTIVE fullState', async () => {
2056
- const hashTreeMessage = {
2057
- locusUrl: url1,
2058
- locusStateElements: [
2059
- {
2060
- htMeta: {elementId: {type: 'FullState', id: 1, version: 1}},
2061
- data: {state: 'INACTIVE'},
2062
- },
2063
- ],
2064
- };
2065
- await webex.meetings.handleLocusEvent({
2066
- eventType: 'locus.state_message',
2067
- locusUrl: url1,
2068
- stateElementsMessage: hashTreeMessage,
2069
- });
2070
- assert.notCalled(webex.meetings.create);
2071
- assert.notCalled(initialSetup);
2072
- });
2073
-
2074
- it('should ignore hash tree event when created locus has self LEFT and removed', async () => {
2075
- const hashTreeMessage = {
2076
- locusUrl: url1,
2077
- locusStateElements: [
2078
- {
2079
- htMeta: {elementId: {type: 'Self', id: 1, version: 1}},
2080
- data: {state: 'LEFT', removed: true},
2081
- },
2082
- ],
2083
- };
2084
- await webex.meetings.handleLocusEvent({
2085
- eventType: 'locus.state_message',
2086
- locusUrl: url1,
2087
- stateElementsMessage: hashTreeMessage,
2088
- });
2089
- assert.notCalled(webex.meetings.create);
2090
- assert.notCalled(initialSetup);
2091
- });
2092
1471
  it('should setup the meeting by difference event without replaces', async () => {
2093
1472
  await webex.meetings.handleLocusEvent({
2094
1473
  locus: {
@@ -2128,7 +1507,7 @@ describe('plugin-meetings', () => {
2128
1507
  webExMeetingId,
2129
1508
  },
2130
1509
  },
2131
- hashTreeMessage: undefined,
1510
+ hashTreeMessage: undefined
2132
1511
  });
2133
1512
  });
2134
1513
 
@@ -2204,7 +1583,7 @@ describe('plugin-meetings', () => {
2204
1583
  webExMeetingId,
2205
1584
  },
2206
1585
  },
2207
- hashTreeMessage: undefined,
1586
+ hashTreeMessage: undefined
2208
1587
  });
2209
1588
  });
2210
1589
 
@@ -3532,7 +2911,7 @@ describe('plugin-meetings', () => {
3532
2911
  conversationUrl: 'conversationUrl1',
3533
2912
  };
3534
2913
 
3535
- sinon.stub(MeetingsUtil, 'getCorrelationIdForDevice').returns('correlationId1');
2914
+ sinon.stub(MeetingsUtil, 'checkForCorrelationId').returns('correlationId1');
3536
2915
  });
3537
2916
  afterEach(() => {
3538
2917
  sinon.restore();
@@ -3638,197 +3017,6 @@ describe('plugin-meetings', () => {
3638
3017
  );
3639
3018
  assert.calledWith(webex.meetings.meetingCollection.getByKey, 'meetingNumber', '123456');
3640
3019
  });
3641
-
3642
- describe('when receiving hash tree events', () => {
3643
- let hashTreeEvent;
3644
-
3645
- beforeEach(() => {
3646
- MeetingsUtil.getCorrelationIdForDevice.restore();
3647
- sinon.spy(MeetingsUtil, 'getCorrelationIdForDevice');
3648
-
3649
- hashTreeEvent = {
3650
- eventType: 'locus.state_message',
3651
- stateElementsMessage: {
3652
- locusUrl: url1,
3653
- locusStateElements: [
3654
- {
3655
- htMeta: {
3656
- elementId: {
3657
- type: 'participant',
3658
- id: 2,
3659
- version: 1,
3660
- },
3661
- dataSetNames: ['main'],
3662
- },
3663
- data: {
3664
- id: 'participant1',
3665
- },
3666
- },
3667
- {
3668
- htMeta: {
3669
- elementId: {
3670
- type: 'Self',
3671
- id: 1,
3672
- version: 1,
3673
- },
3674
- dataSetNames: ['self'],
3675
- },
3676
- data: {
3677
- callbackInfo: {
3678
- callbackAddress: 'address1',
3679
- },
3680
- devices: [
3681
- {
3682
- url: 'deviceUrl',
3683
- correlationId: 'correlationId1',
3684
- },
3685
- ],
3686
- },
3687
- },
3688
- ],
3689
- },
3690
- };
3691
-
3692
- webex.internal.device.url = 'deviceUrl';
3693
- });
3694
-
3695
- it('should find meeting by locusUrl from stateElementsMessage', () => {
3696
- mockGetByKey('locusUrl');
3697
- const result = webex.meetings.getCorrespondingMeetingByLocus(hashTreeEvent);
3698
- assert.deepEqual(result, mockReturnMeeting);
3699
- assert.calledOnceWithExactly(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
3700
- });
3701
-
3702
- it('should extract self data from locusStateElements and try correlationId when locusUrl not found', () => {
3703
- mockGetByKey('correlationId');
3704
- const result = webex.meetings.getCorrespondingMeetingByLocus(hashTreeEvent);
3705
- assert.deepEqual(result, mockReturnMeeting);
3706
- assert.callCount(webex.meetings.meetingCollection.getByKey, 2);
3707
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
3708
- assert.calledWith(
3709
- webex.meetings.meetingCollection.getByKey,
3710
- 'correlationId',
3711
- 'correlationId1'
3712
- );
3713
- assert.calledOnceWithExactly(
3714
- MeetingsUtil.getCorrelationIdForDevice,
3715
- 'deviceUrl',
3716
- hashTreeEvent.stateElementsMessage.locusStateElements[1].data
3717
- );
3718
- });
3719
-
3720
- it('should extract self data from locusStateElements and try sipUri when locusUrl and correlationId not found', () => {
3721
- mockGetByKey('sipUri');
3722
- const result = webex.meetings.getCorrespondingMeetingByLocus(hashTreeEvent);
3723
- assert.deepEqual(result, mockReturnMeeting);
3724
- assert.callCount(webex.meetings.meetingCollection.getByKey, 3);
3725
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
3726
- assert.calledWith(
3727
- webex.meetings.meetingCollection.getByKey,
3728
- 'correlationId',
3729
- 'correlationId1'
3730
- );
3731
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'sipUri', 'address1');
3732
- });
3733
-
3734
- it('should try all keys when no meeting found', () => {
3735
- mockGetByKey();
3736
- const result = webex.meetings.getCorrespondingMeetingByLocus(hashTreeEvent);
3737
- assert.isNull(result);
3738
- assert.callCount(webex.meetings.meetingCollection.getByKey, 5);
3739
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
3740
- assert.calledWith(
3741
- webex.meetings.meetingCollection.getByKey,
3742
- 'correlationId',
3743
- 'correlationId1'
3744
- );
3745
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'sipUri', 'address1');
3746
- // these remaining 2 will never work for hash trees, but just checking that
3747
- // the calls are made and we don't crash
3748
- assert.calledWith(
3749
- webex.meetings.meetingCollection.getByKey,
3750
- 'conversationUrl',
3751
- undefined
3752
- );
3753
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'meetingNumber', undefined);
3754
- });
3755
-
3756
- it('should handle hash tree event with no self object', () => {
3757
- mockGetByKey();
3758
- hashTreeEvent.stateElementsMessage.locusStateElements = [
3759
- {
3760
- htMeta: {
3761
- elementId: {
3762
- type: 'participant',
3763
- id: 2,
3764
- version: 1,
3765
- },
3766
- dataSetNames: ['dataset1'],
3767
- },
3768
- data: {
3769
- id: 'participant1',
3770
- },
3771
- },
3772
- ];
3773
-
3774
- const result = webex.meetings.getCorrespondingMeetingByLocus(hashTreeEvent);
3775
- assert.isNull(result);
3776
- assert.callCount(webex.meetings.meetingCollection.getByKey, 5);
3777
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
3778
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'correlationId', false);
3779
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'sipUri', undefined);
3780
- // these remaining 2 will never work for hash trees, but just checking that
3781
- // the calls are made and we don't crash
3782
- assert.calledWith(
3783
- webex.meetings.meetingCollection.getByKey,
3784
- 'conversationUrl',
3785
- undefined
3786
- );
3787
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'meetingNumber', undefined);
3788
- });
3789
-
3790
- it('should handle hash tree event with empty locusStateElements', () => {
3791
- mockGetByKey();
3792
- hashTreeEvent.stateElementsMessage.locusStateElements = [];
3793
- const result = webex.meetings.getCorrespondingMeetingByLocus(hashTreeEvent);
3794
- assert.isNull(result);
3795
- assert.callCount(webex.meetings.meetingCollection.getByKey, 5);
3796
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
3797
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'correlationId', false);
3798
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'sipUri', undefined);
3799
- // these remaining 2 will never work for hash trees, but just checking that
3800
- // the calls are made and we don't crash
3801
- assert.calledWith(
3802
- webex.meetings.meetingCollection.getByKey,
3803
- 'conversationUrl',
3804
- undefined
3805
- );
3806
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'meetingNumber', undefined);
3807
- });
3808
-
3809
- it('should handle hash tree event with self object but no callbackAddress', () => {
3810
- mockGetByKey('meetingNumber');
3811
- delete hashTreeEvent.stateElementsMessage.locusStateElements[1].data.callbackInfo;
3812
- const result = webex.meetings.getCorrespondingMeetingByLocus(hashTreeEvent);
3813
- assert.deepEqual(result, mockReturnMeeting);
3814
- assert.callCount(webex.meetings.meetingCollection.getByKey, 5);
3815
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
3816
- assert.calledWith(
3817
- webex.meetings.meetingCollection.getByKey,
3818
- 'correlationId',
3819
- 'correlationId1'
3820
- );
3821
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'sipUri', undefined);
3822
- // these remaining 2 will never work for hash trees, but just checking that
3823
- // the calls are made and we don't crash
3824
- assert.calledWith(
3825
- webex.meetings.meetingCollection.getByKey,
3826
- 'conversationUrl',
3827
- undefined
3828
- );
3829
- assert.calledWith(webex.meetings.meetingCollection.getByKey, 'meetingNumber', undefined);
3830
- });
3831
- });
3832
3020
  });
3833
3021
 
3834
3022
  describe('#sortLocusArrayToUpdate', () => {
@@ -3943,7 +3131,7 @@ describe('plugin-meetings', () => {
3943
3131
  },
3944
3132
  });
3945
3133
  assert.calledWith(webex.meetings.handleLocusEvent, {
3946
- eventType: LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
3134
+ eventType: LOCUSEVENT.SDK_NO_EVENT,
3947
3135
  locus: breakoutLocus,
3948
3136
  locusUrl: breakoutLocus.url,
3949
3137
  });