@webex/plugin-meetings 3.12.0-next.16 → 3.12.0-next.160
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/.sdd/manifest.json +1312 -0
- package/.sdd/templates/.source.json +30 -0
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
- package/.sdd/templates/component-repo/template-map.json +112 -0
- package/AGENTS.md +135 -0
- package/ai-docs/ARCHITECTURE.md +207 -0
- package/ai-docs/CONTRACTS.md +267 -0
- package/ai-docs/DATA_MODEL.md +64 -0
- package/ai-docs/GETTING_STARTED.md +73 -0
- package/ai-docs/GLOSSARY.md +56 -0
- package/ai-docs/REVIEW_CHECKLIST.md +45 -0
- package/ai-docs/RULES.md +79 -0
- package/ai-docs/SECURITY.md +74 -0
- package/ai-docs/SERVICE_STATE.md +59 -0
- package/ai-docs/SPEC_INDEX.md +85 -0
- package/ai-docs/TEST_INDEX.md +45 -0
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
- package/ai-docs/patterns/defensive-error-propagation.md +55 -0
- package/ai-docs/patterns/event-scope-emission.md +46 -0
- package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
- package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
- package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/annotation/index.js +2 -2
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +99 -4
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +37 -10
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +46 -10
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/hashTree/constants.js +4 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1096 -391
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +20 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +75 -15
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +24 -9
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +55 -12
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +615 -176
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/types.js +20 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +15 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +4 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +7 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1688 -835
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +5 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +37 -3
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +2 -1
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +9 -3
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +300 -128
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +30 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +7 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +62 -15
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +32 -4
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +121 -83
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +2 -2
- package/dist/types/constants.d.ts +13 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
- package/dist/types/hashTree/utils.d.ts +7 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +106 -8
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +22 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +6 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
- package/dist/types/meeting/index.d.ts +176 -11
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +1 -0
- package/dist/types/meeting/util.d.ts +9 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/index.d.ts +40 -19
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +9 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +6 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
- package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +307 -161
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -23
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/annotation/ai-docs/annotation-spec.md +236 -0
- package/src/annotation/index.ts +6 -4
- package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +122 -2
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +2 -2
- package/src/constants.ts +21 -3
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
- package/src/controls-options-manager/index.ts +62 -10
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/hashTree/constants.ts +7 -0
- package/src/hashTree/hashTreeParser.ts +861 -193
- package/src/hashTree/utils.ts +19 -0
- package/src/index.ts +6 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interceptors/dataChannelAuthToken.ts +88 -12
- package/src/interceptors/locusRetry.ts +26 -5
- package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
- package/src/interpretation/index.ts +65 -10
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +566 -164
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +26 -1
- package/src/media/MediaConnectionAwaiter.ts +21 -4
- package/src/media/ai-docs/media-spec.md +267 -0
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +8 -3
- package/src/meeting/ai-docs/meeting-spec.md +401 -0
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +946 -120
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +11 -0
- package/src/meeting/util.ts +51 -7
- package/src/meeting/voicea-meeting.ts +1 -1
- package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
- package/src/meeting-info/meeting-info-v2.ts +10 -4
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +200 -80
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/ai-docs/member-spec.md +196 -0
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +29 -0
- package/src/members/ai-docs/members-spec.md +256 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/ai-docs/metrics-spec.md +185 -0
- package/src/metrics/constants.ts +6 -0
- package/src/multistream/ai-docs/multistream-spec.md +292 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +119 -28
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/multistream/remoteMediaManager.ts +23 -1
- package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
- package/src/reachability/ai-docs/reachability-spec.md +261 -0
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +47 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/ai-docs/reactions-spec.md +198 -0
- package/src/reactions/reactions.type.ts +3 -0
- package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
- package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/ai-docs/roap-spec.md +241 -0
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/ai-docs/webinar-spec.md +243 -0
- package/src/webinar/index.ts +216 -38
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/annotation/index.ts +3 -3
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +223 -3
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +139 -32
- package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
- package/test/unit/spec/hashTree/utils.ts +37 -0
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
- package/test/unit/spec/interceptors/locusRetry.ts +234 -5
- package/test/unit/spec/interpretation/index.ts +119 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +1014 -58
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +23 -23
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +2838 -109
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +12 -0
- package/test/unit/spec/meeting/utils.js +189 -17
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
- package/test/unit/spec/meetings/index.js +544 -49
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +89 -0
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
- package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
- package/test/unit/spec/reachability/index.ts +128 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +332 -31
|
@@ -55,6 +55,27 @@ describe('plugin-meetings', () => {
|
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
+
describe('#locusUrlUpdate', () => {
|
|
59
|
+
it('should update the locusUrl property', () => {
|
|
60
|
+
const testLocusUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id';
|
|
61
|
+
|
|
62
|
+
aiEnableRequest.locusUrlUpdate(testLocusUrl);
|
|
63
|
+
|
|
64
|
+
assert.equal(aiEnableRequest.locusUrl, testLocusUrl);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('should handle updating locusUrl multiple times', () => {
|
|
68
|
+
const firstUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id-1';
|
|
69
|
+
const secondUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id-2';
|
|
70
|
+
|
|
71
|
+
aiEnableRequest.locusUrlUpdate(firstUrl);
|
|
72
|
+
assert.equal(aiEnableRequest.locusUrl, firstUrl);
|
|
73
|
+
|
|
74
|
+
aiEnableRequest.locusUrlUpdate(secondUrl);
|
|
75
|
+
assert.equal(aiEnableRequest.locusUrl, secondUrl);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
58
79
|
describe('#selfParticipantIdUpdate', () => {
|
|
59
80
|
it('should update the selfParticipantId property', () => {
|
|
60
81
|
const testSelfParticipantId = 'participant-123';
|
|
@@ -254,6 +275,71 @@ describe('plugin-meetings', () => {
|
|
|
254
275
|
sinon.assert.notCalled(triggerSpy);
|
|
255
276
|
});
|
|
256
277
|
|
|
278
|
+
it('should not trigger event when locusUrl does not match', () => {
|
|
279
|
+
const testLocusUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id';
|
|
280
|
+
const differentLocusUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/different-id';
|
|
281
|
+
|
|
282
|
+
aiEnableRequest.locusUrl = testLocusUrl;
|
|
283
|
+
|
|
284
|
+
// Reset the spy after setting locusUrl to avoid counting property change events
|
|
285
|
+
triggerSpy.resetHistory();
|
|
286
|
+
|
|
287
|
+
aiEnableRequest.listenToApprovalRequests();
|
|
288
|
+
|
|
289
|
+
const event = {
|
|
290
|
+
data: {
|
|
291
|
+
locusUrl: differentLocusUrl,
|
|
292
|
+
approval: {
|
|
293
|
+
resourceType: AI_ENABLE_REQUEST.RESOURCE_TYPE,
|
|
294
|
+
receivers: [{participantId: testSelfParticipantId}],
|
|
295
|
+
initiator: {participantId: testInitiatorId},
|
|
296
|
+
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.REQUESTED,
|
|
297
|
+
url: testUrl,
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
webex.internal.mercury.emit(`event:${LOCUSEVENT.APPROVAL_REQUEST}`, event);
|
|
303
|
+
|
|
304
|
+
sinon.assert.notCalled(triggerSpy);
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
it('should trigger event when locusUrl matches', () => {
|
|
308
|
+
const testLocusUrl = 'https://locus-a.wbx2.com/locus/api/v1/loci/test-id';
|
|
309
|
+
|
|
310
|
+
aiEnableRequest.locusUrl = testLocusUrl;
|
|
311
|
+
|
|
312
|
+
// Reset the spy after setting locusUrl to avoid counting property change events
|
|
313
|
+
triggerSpy.resetHistory();
|
|
314
|
+
|
|
315
|
+
aiEnableRequest.listenToApprovalRequests();
|
|
316
|
+
|
|
317
|
+
const event = {
|
|
318
|
+
data: {
|
|
319
|
+
locusUrl: testLocusUrl,
|
|
320
|
+
approval: {
|
|
321
|
+
resourceType: AI_ENABLE_REQUEST.RESOURCE_TYPE,
|
|
322
|
+
receivers: [{participantId: testSelfParticipantId}],
|
|
323
|
+
initiator: {participantId: testInitiatorId},
|
|
324
|
+
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.REQUESTED,
|
|
325
|
+
url: testUrl,
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
webex.internal.mercury.emit(`event:${LOCUSEVENT.APPROVAL_REQUEST}`, event);
|
|
331
|
+
|
|
332
|
+
sinon.assert.calledOnce(triggerSpy);
|
|
333
|
+
sinon.assert.calledWith(triggerSpy, AI_ENABLE_REQUEST.EVENTS.APPROVAL_REQUEST_ARRIVED, {
|
|
334
|
+
actionType: AI_ENABLE_REQUEST.ACTION_TYPE.REQUESTED,
|
|
335
|
+
isApprover: true,
|
|
336
|
+
isInitiator: false,
|
|
337
|
+
initiatorId: testInitiatorId,
|
|
338
|
+
approverId: testSelfParticipantId,
|
|
339
|
+
url: testUrl,
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
|
|
257
343
|
it('should handle events with different action types', () => {
|
|
258
344
|
aiEnableRequest.listenToApprovalRequests();
|
|
259
345
|
|
|
@@ -264,7 +264,7 @@ describe('live-annotation', () => {
|
|
|
264
264
|
const sendObject = {
|
|
265
265
|
id: sinon.match.string,
|
|
266
266
|
type: 'publishRequest',
|
|
267
|
-
recipients: {route: undefined},
|
|
267
|
+
recipients: [{route: undefined}],
|
|
268
268
|
headers: {to: '987ead98-6c93-4fcb-899d-517305c47503'},
|
|
269
269
|
data: {
|
|
270
270
|
eventType: 'relay.event',
|
|
@@ -310,7 +310,7 @@ describe('live-annotation', () => {
|
|
|
310
310
|
assert.notCalled(annotationService.webex.internal.llm.socket.send);
|
|
311
311
|
|
|
312
312
|
const sent = practiceSocket.send.getCall(0).args[0];
|
|
313
|
-
assert.equal(sent.recipients.route, 'practice-binding');
|
|
313
|
+
assert.equal(sent.recipients[0].route, 'practice-binding');
|
|
314
314
|
});
|
|
315
315
|
|
|
316
316
|
it('falls back to the default socket and binding when the practice-session socket exists but is not connected', () => {
|
|
@@ -331,7 +331,7 @@ describe('live-annotation', () => {
|
|
|
331
331
|
assert.calledOnce(annotationService.webex.internal.llm.socket.send);
|
|
332
332
|
|
|
333
333
|
const sent = annotationService.webex.internal.llm.socket.send.getCall(0).args[0];
|
|
334
|
-
assert.equal(sent.recipients.route, 'default-binding');
|
|
334
|
+
assert.equal(sent.recipients[0].route, 'default-binding');
|
|
335
335
|
});
|
|
336
336
|
|
|
337
337
|
});
|
|
@@ -26,6 +26,7 @@ describe('plugin-meetings', () => {
|
|
|
26
26
|
breakout.sessionId = 'sessionId';
|
|
27
27
|
breakout.sessionType = 'BREAKOUT';
|
|
28
28
|
breakout.url = 'url';
|
|
29
|
+
breakout.resourceLink = 'resource-link';
|
|
29
30
|
breakout.collection = {
|
|
30
31
|
parent: {
|
|
31
32
|
meetingId: 'activeMeetingId',
|
|
@@ -45,6 +46,7 @@ describe('plugin-meetings', () => {
|
|
|
45
46
|
describe('initialize', () => {
|
|
46
47
|
it('creates the object correctly', () => {
|
|
47
48
|
assert.instanceOf(breakout.breakoutRequest, BreakoutRequest);
|
|
49
|
+
assert.equal(breakout.resourceLink, 'resource-link');
|
|
48
50
|
});
|
|
49
51
|
});
|
|
50
52
|
|
|
@@ -217,10 +219,14 @@ describe('plugin-meetings', () => {
|
|
|
217
219
|
locusParticipantsUpdate: sinon.stub(),
|
|
218
220
|
};
|
|
219
221
|
|
|
220
|
-
const locusData = {
|
|
222
|
+
const locusData = {participants: [{id: 'participant-1'}], sequence: {entries: [123]}};
|
|
221
223
|
const result = breakout.parseRoster(locusData);
|
|
222
224
|
|
|
223
|
-
assert.calledOnceWithExactly(breakout.members.locusParticipantsUpdate,
|
|
225
|
+
assert.calledOnceWithExactly(breakout.members.locusParticipantsUpdate, {
|
|
226
|
+
participants: [{id: 'participant-1'}],
|
|
227
|
+
isReplace: true,
|
|
228
|
+
});
|
|
229
|
+
assert.equal(breakout.breakoutRosterLocus, locusData);
|
|
224
230
|
assert.equal(result, undefined);
|
|
225
231
|
});
|
|
226
232
|
it('not call locusParticipantsUpdate if sequence is expired', () => {
|
|
@@ -228,7 +234,7 @@ describe('plugin-meetings', () => {
|
|
|
228
234
|
locusParticipantsUpdate: sinon.stub(),
|
|
229
235
|
};
|
|
230
236
|
breakout.isNeedHandleRoster = sinon.stub().returns(false);
|
|
231
|
-
const locusData = {
|
|
237
|
+
const locusData = {participants: [{id: 'participant-1'}], sequence: {entries: [123]}};
|
|
232
238
|
breakout.parseRoster(locusData);
|
|
233
239
|
|
|
234
240
|
assert.notCalled(breakout.members.locusParticipantsUpdate);
|
|
@@ -5,6 +5,7 @@ import breakoutEvent from "../../../../src/breakouts/events";
|
|
|
5
5
|
|
|
6
6
|
describe('plugin-meetings', () => {
|
|
7
7
|
describe('breakoutEvent', () => {
|
|
8
|
+
const originalPostMoveCallAnalyzer = breakoutEvent.postMoveCallAnalyzer;
|
|
8
9
|
let webex;
|
|
9
10
|
let mockMeeting = {};
|
|
10
11
|
let breakoutMoveId;
|
|
@@ -24,20 +25,35 @@ describe('plugin-meetings', () => {
|
|
|
24
25
|
groupId: "groupId",
|
|
25
26
|
};
|
|
26
27
|
breakoutMoveId = 'breakoutMoveId';
|
|
28
|
+
breakoutEvent.postMoveCallAnalyzer = originalPostMoveCallAnalyzer;
|
|
27
29
|
|
|
28
30
|
});
|
|
29
31
|
describe('postMoveCallAnalyzer', () => {
|
|
30
32
|
it('send metric as expected', () => {
|
|
31
33
|
const submitClientEvent = sinon.stub();
|
|
32
|
-
const eventInfo = {
|
|
34
|
+
const eventInfo = {
|
|
35
|
+
currentSession: newSession,
|
|
36
|
+
meeting: mockMeeting,
|
|
37
|
+
breakoutMoveId,
|
|
38
|
+
llmLatency: {
|
|
39
|
+
clientLLMDatachannelResponseTime: 10,
|
|
40
|
+
clientLLMWebSocketConnectTime: 20,
|
|
41
|
+
},
|
|
42
|
+
llmWebsocketUrl: 'wss://example.com/ws',
|
|
43
|
+
};
|
|
33
44
|
breakoutEvent.postMoveCallAnalyzer('client.breakout-session.join.response', eventInfo, submitClientEvent);
|
|
34
45
|
assert.calledWithMatch(submitClientEvent, {
|
|
35
46
|
name: 'client.breakout-session.join.response',
|
|
36
47
|
payload: {
|
|
48
|
+
llmLatency: {
|
|
49
|
+
clientLLMDatachannelResponseTime: 10,
|
|
50
|
+
clientLLMWebSocketConnectTime: 20,
|
|
51
|
+
},
|
|
37
52
|
identifiers: {
|
|
38
53
|
breakoutMoveId: 'breakoutMoveId',
|
|
39
54
|
breakoutSessionId: 'sessionId',
|
|
40
55
|
breakoutGroupId: 'groupId',
|
|
56
|
+
llmWebsocketUrl: 'wss://example.com/ws',
|
|
41
57
|
},
|
|
42
58
|
},
|
|
43
59
|
options: {meetingId: 'activeMeetingId'},
|
|
@@ -79,10 +95,112 @@ describe('plugin-meetings', () => {
|
|
|
79
95
|
sinon.stub(submitClientEvent, 'bind').returns(webex.internal.newMetrics.submitClientEvent);
|
|
80
96
|
|
|
81
97
|
breakoutEvent.postMoveCallAnalyzer = sinon.stub();
|
|
82
|
-
const eventInfo = {
|
|
98
|
+
const eventInfo = {
|
|
99
|
+
newSession,
|
|
100
|
+
mockMeeting,
|
|
101
|
+
breakoutMoveId,
|
|
102
|
+
llmLatency: {clientLLMDatachannelResponseTime: 10, clientLLMWebSocketConnectTime: 20},
|
|
103
|
+
};
|
|
83
104
|
breakoutEvent.onBreakoutJoinResponse(eventInfo, submitClientEvent);
|
|
84
105
|
assert.calledWith(breakoutEvent.postMoveCallAnalyzer, 'client.breakout-session.join.response', eventInfo, submitClientEvent);
|
|
85
106
|
});
|
|
107
|
+
|
|
108
|
+
it('emits join response metric without llmLatency', () => {
|
|
109
|
+
const submitClientEvent = sinon.stub();
|
|
110
|
+
|
|
111
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
112
|
+
'client.breakout-session.join.response',
|
|
113
|
+
{currentSession: newSession, meeting: mockMeeting, breakoutMoveId},
|
|
114
|
+
submitClientEvent
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
assert.calledOnceWithExactly(submitClientEvent, {
|
|
118
|
+
name: 'client.breakout-session.join.response',
|
|
119
|
+
payload: {
|
|
120
|
+
llmLatency: undefined,
|
|
121
|
+
identifiers: {
|
|
122
|
+
breakoutMoveId: 'breakoutMoveId',
|
|
123
|
+
breakoutSessionId: 'sessionId',
|
|
124
|
+
breakoutGroupId: 'groupId',
|
|
125
|
+
llmWebsocketUrl: undefined,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
options: {meetingId: 'activeMeetingId', rawError: undefined},
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it('does not emit duplicate join response metric with llmLatency for the same breakoutMoveId', () => {
|
|
133
|
+
const submitClientEvent = sinon.stub();
|
|
134
|
+
const shouldEmitBreakoutJoinResponseMetric = sinon.stub();
|
|
135
|
+
|
|
136
|
+
shouldEmitBreakoutJoinResponseMetric.onFirstCall().returns(true);
|
|
137
|
+
shouldEmitBreakoutJoinResponseMetric.onSecondCall().returns(false);
|
|
138
|
+
|
|
139
|
+
const eventInfo = {
|
|
140
|
+
currentSession: newSession,
|
|
141
|
+
meeting: {
|
|
142
|
+
...mockMeeting,
|
|
143
|
+
shouldEmitBreakoutJoinResponseMetric,
|
|
144
|
+
},
|
|
145
|
+
breakoutMoveId,
|
|
146
|
+
llmLatency: {clientLLMDatachannelResponseTime: 10, clientLLMWebSocketConnectTime: 20},
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
150
|
+
'client.breakout-session.join.response',
|
|
151
|
+
eventInfo,
|
|
152
|
+
submitClientEvent
|
|
153
|
+
);
|
|
154
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
155
|
+
'client.breakout-session.join.response',
|
|
156
|
+
eventInfo,
|
|
157
|
+
submitClientEvent
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
assert.calledTwice(shouldEmitBreakoutJoinResponseMetric);
|
|
161
|
+
assert.calledWithExactly(shouldEmitBreakoutJoinResponseMetric, breakoutMoveId, true);
|
|
162
|
+
assert.calledOnce(submitClientEvent);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it('allows llmLatency join response after join response without llmLatency', () => {
|
|
166
|
+
const submitClientEvent = sinon.stub();
|
|
167
|
+
const shouldEmitBreakoutJoinResponseMetric = sinon.stub();
|
|
168
|
+
|
|
169
|
+
shouldEmitBreakoutJoinResponseMetric.onFirstCall().returns(true);
|
|
170
|
+
shouldEmitBreakoutJoinResponseMetric.onSecondCall().returns(true);
|
|
171
|
+
|
|
172
|
+
const baseEventInfo = {
|
|
173
|
+
currentSession: newSession,
|
|
174
|
+
meeting: {
|
|
175
|
+
...mockMeeting,
|
|
176
|
+
shouldEmitBreakoutJoinResponseMetric,
|
|
177
|
+
},
|
|
178
|
+
breakoutMoveId,
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
182
|
+
'client.breakout-session.join.response',
|
|
183
|
+
baseEventInfo,
|
|
184
|
+
submitClientEvent
|
|
185
|
+
);
|
|
186
|
+
breakoutEvent.postMoveCallAnalyzer(
|
|
187
|
+
'client.breakout-session.join.response',
|
|
188
|
+
{
|
|
189
|
+
...baseEventInfo,
|
|
190
|
+
llmLatency: {clientLLMDatachannelResponseTime: 10, clientLLMWebSocketConnectTime: 20},
|
|
191
|
+
},
|
|
192
|
+
submitClientEvent
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
assert.calledTwice(shouldEmitBreakoutJoinResponseMetric);
|
|
196
|
+
assert.calledWithExactly(shouldEmitBreakoutJoinResponseMetric.firstCall, breakoutMoveId, false);
|
|
197
|
+
assert.calledWithExactly(shouldEmitBreakoutJoinResponseMetric.secondCall, breakoutMoveId, true);
|
|
198
|
+
assert.calledTwice(submitClientEvent);
|
|
199
|
+
assert.deepEqual(submitClientEvent.secondCall.args[0].payload.llmLatency, {
|
|
200
|
+
clientLLMDatachannelResponseTime: 10,
|
|
201
|
+
clientLLMWebSocketConnectTime: 20,
|
|
202
|
+
});
|
|
203
|
+
});
|
|
86
204
|
});
|
|
87
205
|
|
|
88
206
|
});
|
|
@@ -7,8 +7,7 @@ import sinon from 'sinon';
|
|
|
7
7
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
8
8
|
import testUtils from '../../../utils/testUtils';
|
|
9
9
|
import BreakoutEditLockedError from '@webex/plugin-meetings/src/breakouts/edit-lock-error';
|
|
10
|
-
import breakoutEvent from '../../../../src/breakouts/events'
|
|
11
|
-
|
|
10
|
+
import breakoutEvent from '../../../../src/breakouts/events'
|
|
12
11
|
const getBOResponse = (status: string) => {
|
|
13
12
|
return {
|
|
14
13
|
url: 'url',
|
|
@@ -89,6 +88,7 @@ describe('plugin-meetings', () => {
|
|
|
89
88
|
webex = new MockWebex({});
|
|
90
89
|
webex.internal.llm.on = sinon.stub();
|
|
91
90
|
webex.internal.llm.isConnected = sinon.stub();
|
|
91
|
+
webex.internal.llm.getLocusUrl = sinon.stub().returns('newUrl');
|
|
92
92
|
webex.internal.mercury.on = sinon.stub();
|
|
93
93
|
breakouts = new Breakouts({}, {parent: webex});
|
|
94
94
|
breakouts.groupId = 'groupId';
|
|
@@ -217,6 +217,21 @@ describe('plugin-meetings', () => {
|
|
|
217
217
|
});
|
|
218
218
|
assert.calledThrice(breakouts.queryPreAssignments);
|
|
219
219
|
});
|
|
220
|
+
|
|
221
|
+
it('wires LLM_CONNECT_RESPONSE to handleLLMBreakoutJoinResponseMetric', () => {
|
|
222
|
+
const handleStub = sinon.stub(Breakouts.prototype, 'handleLLMBreakoutJoinResponseMetric');
|
|
223
|
+
const bo = new Breakouts({}, {parent: webex});
|
|
224
|
+
|
|
225
|
+
const eventInfo = {
|
|
226
|
+
meeting: {id: 'meeting-id'},
|
|
227
|
+
llmLatency: {clientLLMWebSocketConnectTime: 1},
|
|
228
|
+
};
|
|
229
|
+
bo.trigger(BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE, eventInfo);
|
|
230
|
+
|
|
231
|
+
assert.calledOnceWithExactly(handleStub, eventInfo);
|
|
232
|
+
|
|
233
|
+
handleStub.restore();
|
|
234
|
+
});
|
|
220
235
|
});
|
|
221
236
|
|
|
222
237
|
describe('#listenToCurrentSessionTypeChange', () => {
|
|
@@ -313,6 +328,7 @@ describe('plugin-meetings', () => {
|
|
|
313
328
|
groupId: 'groupId',
|
|
314
329
|
sessionType: 'sessionType',
|
|
315
330
|
url: 'url',
|
|
331
|
+
resourceLink: 'resource-link',
|
|
316
332
|
name: 'name',
|
|
317
333
|
allowBackToMain: true,
|
|
318
334
|
delayCloseTime: 10,
|
|
@@ -339,6 +355,7 @@ describe('plugin-meetings', () => {
|
|
|
339
355
|
assert.equal(breakouts.currentBreakoutSession.current, true);
|
|
340
356
|
assert.equal(breakouts.currentBreakoutSession.sessionType, 'sessionType');
|
|
341
357
|
assert.equal(breakouts.currentBreakoutSession.url, 'url');
|
|
358
|
+
assert.equal(breakouts.currentBreakoutSession.resourceLink, 'resource-link');
|
|
342
359
|
assert.equal(breakouts.currentBreakoutSession.active, false);
|
|
343
360
|
assert.equal(breakouts.currentBreakoutSession.allowed, false);
|
|
344
361
|
assert.equal(breakouts.currentBreakoutSession.assigned, false);
|
|
@@ -372,6 +389,27 @@ describe('plugin-meetings', () => {
|
|
|
372
389
|
assert.calledOnce(breakouts.clearBreakouts);
|
|
373
390
|
});
|
|
374
391
|
|
|
392
|
+
it('preserves the last non-empty breakoutMoveId when a later update omits it', () => {
|
|
393
|
+
breakouts.updateBreakout({
|
|
394
|
+
sessionId: 'sessionId',
|
|
395
|
+
groupId: 'groupId',
|
|
396
|
+
sessionType: 'BREAKOUT',
|
|
397
|
+
status: 'active',
|
|
398
|
+
breakoutMoveId: 'move-id-1',
|
|
399
|
+
});
|
|
400
|
+
assert.equal(breakouts.breakoutMoveId, 'move-id-1');
|
|
401
|
+
|
|
402
|
+
// a later controls update arrives without a replaces entry -> null move id
|
|
403
|
+
breakouts.updateBreakout({
|
|
404
|
+
sessionId: 'sessionId',
|
|
405
|
+
groupId: 'groupId',
|
|
406
|
+
sessionType: 'BREAKOUT',
|
|
407
|
+
status: 'active',
|
|
408
|
+
breakoutMoveId: null,
|
|
409
|
+
});
|
|
410
|
+
assert.equal(breakouts.breakoutMoveId, 'move-id-1');
|
|
411
|
+
});
|
|
412
|
+
|
|
375
413
|
it('updates the current breakout session, call onBreakoutJoinResponse when session changed', () => {
|
|
376
414
|
breakouts.webex.meetings = {
|
|
377
415
|
getMeetingByType: sinon.stub().returns({
|
|
@@ -429,6 +467,111 @@ describe('plugin-meetings', () => {
|
|
|
429
467
|
});
|
|
430
468
|
});
|
|
431
469
|
|
|
470
|
+
describe('#submitLLMBreakoutJoinResponseMetric', () => {
|
|
471
|
+
let onBreakoutJoinResponseSpy;
|
|
472
|
+
|
|
473
|
+
const setupReadyToEmit = () => {
|
|
474
|
+
breakouts.webex.meetings = {
|
|
475
|
+
getMeetingByType: sinon.stub().returns({id: 'meeting-id'}),
|
|
476
|
+
};
|
|
477
|
+
breakouts.webex.internal.newMetrics = {submitClientEvent: sinon.stub()};
|
|
478
|
+
breakouts.webex.internal.llm.getWebSocketUrl = sinon.stub().returns('wss://llm');
|
|
479
|
+
breakouts.breakoutMoveId = 'moveId';
|
|
480
|
+
breakouts.currentBreakoutSession.set({sessionId: 'sessionId', groupId: 'groupId'});
|
|
481
|
+
breakouts.llmBreakoutJoinResponseInfo = {
|
|
482
|
+
breakoutMoveId: 'moveId',
|
|
483
|
+
meeting: {id: 'meeting-id'},
|
|
484
|
+
llmLatency: {clientLLMWebSocketConnectTime: 1},
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
beforeEach(() => {
|
|
489
|
+
onBreakoutJoinResponseSpy = sinon.stub(breakoutEvent, 'onBreakoutJoinResponse');
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
afterEach(() => {
|
|
493
|
+
onBreakoutJoinResponseSpy.restore();
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
it('emits the join response while an active breakout is in progress', () => {
|
|
497
|
+
setupReadyToEmit();
|
|
498
|
+
breakouts.set('sessionType', BREAKOUTS.SESSION_TYPES.BREAKOUT);
|
|
499
|
+
breakouts.set('status', BREAKOUTS.STATUS.OPEN);
|
|
500
|
+
|
|
501
|
+
breakouts.submitLLMBreakoutJoinResponseMetric();
|
|
502
|
+
|
|
503
|
+
assert.calledOnce(onBreakoutJoinResponseSpy);
|
|
504
|
+
const eventInfoArg = onBreakoutJoinResponseSpy.getCall(0).args[0];
|
|
505
|
+
assert.equal(eventInfoArg.breakoutMoveId, 'moveId');
|
|
506
|
+
assert.deepEqual(eventInfoArg.llmLatency, {clientLLMWebSocketConnectTime: 1});
|
|
507
|
+
assert.equal(eventInfoArg.llmWebsocketUrl, 'wss://llm');
|
|
508
|
+
assert.equal(eventInfoArg.meeting.id, 'meeting-id');
|
|
509
|
+
assert.equal(eventInfoArg.currentSession.sessionId, 'sessionId');
|
|
510
|
+
assert.equal(eventInfoArg.currentSession.groupId, 'groupId');
|
|
511
|
+
assert.isUndefined(eventInfoArg.error);
|
|
512
|
+
assert.isUndefined(breakouts.llmBreakoutJoinResponseInfo);
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
it('emits the join response after returning to the main session', () => {
|
|
516
|
+
setupReadyToEmit();
|
|
517
|
+
breakouts.set('sessionType', BREAKOUTS.SESSION_TYPES.MAIN);
|
|
518
|
+
breakouts.currentBreakoutSession.set({sessionType: BREAKOUTS.SESSION_TYPES.MAIN});
|
|
519
|
+
|
|
520
|
+
breakouts.submitLLMBreakoutJoinResponseMetric();
|
|
521
|
+
|
|
522
|
+
assert.calledOnce(onBreakoutJoinResponseSpy);
|
|
523
|
+
const eventInfoArg = onBreakoutJoinResponseSpy.getCall(0).args[0];
|
|
524
|
+
assert.equal(eventInfoArg.breakoutMoveId, 'moveId');
|
|
525
|
+
assert.deepEqual(eventInfoArg.llmLatency, {clientLLMWebSocketConnectTime: 1});
|
|
526
|
+
assert.equal(eventInfoArg.llmWebsocketUrl, 'wss://llm');
|
|
527
|
+
assert.equal(eventInfoArg.meeting.id, 'meeting-id');
|
|
528
|
+
assert.equal(eventInfoArg.currentSession.sessionId, 'sessionId');
|
|
529
|
+
assert.equal(eventInfoArg.currentSession.groupId, 'groupId');
|
|
530
|
+
assert.isUndefined(eventInfoArg.error);
|
|
531
|
+
assert.isUndefined(breakouts.llmBreakoutJoinResponseInfo);
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
it('does not emit without a breakoutMoveId (non-breakout meeting)', () => {
|
|
535
|
+
setupReadyToEmit();
|
|
536
|
+
breakouts.breakoutMoveId = undefined;
|
|
537
|
+
breakouts.set('sessionType', BREAKOUTS.SESSION_TYPES.MAIN);
|
|
538
|
+
|
|
539
|
+
breakouts.submitLLMBreakoutJoinResponseMetric();
|
|
540
|
+
|
|
541
|
+
assert.notCalled(onBreakoutJoinResponseSpy);
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
it('does not emit when the LLM latency belongs to a different move id', () => {
|
|
545
|
+
setupReadyToEmit();
|
|
546
|
+
breakouts.set('sessionType', BREAKOUTS.SESSION_TYPES.MAIN);
|
|
547
|
+
breakouts.llmBreakoutJoinResponseInfo.breakoutMoveId = 'staleMoveId';
|
|
548
|
+
|
|
549
|
+
breakouts.submitLLMBreakoutJoinResponseMetric();
|
|
550
|
+
|
|
551
|
+
assert.notCalled(onBreakoutJoinResponseSpy);
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
|
|
555
|
+
describe('#handleLLMBreakoutJoinResponseMetric', () => {
|
|
556
|
+
it('stores the LLM connect response with the current breakoutMoveId and tries to emit', () => {
|
|
557
|
+
breakouts.breakoutMoveId = 'moveId';
|
|
558
|
+
breakouts.submitLLMBreakoutJoinResponseMetric = sinon.stub();
|
|
559
|
+
|
|
560
|
+
const eventInfo = {
|
|
561
|
+
meeting: {id: 'meeting-id'},
|
|
562
|
+
llmLatency: {clientLLMWebSocketConnectTime: 1},
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
breakouts.handleLLMBreakoutJoinResponseMetric(eventInfo);
|
|
566
|
+
|
|
567
|
+
assert.deepEqual(breakouts.llmBreakoutJoinResponseInfo, {
|
|
568
|
+
...eventInfo,
|
|
569
|
+
breakoutMoveId: 'moveId',
|
|
570
|
+
});
|
|
571
|
+
assert.calledOnce(breakouts.submitLLMBreakoutJoinResponseMetric);
|
|
572
|
+
});
|
|
573
|
+
});
|
|
574
|
+
|
|
432
575
|
describe('#updateBreakoutSessions', () => {
|
|
433
576
|
const checkBreakout = (breakout, sessionId, state) => {
|
|
434
577
|
assert.deepEqual(breakout.attributes, {
|
|
@@ -507,6 +650,15 @@ describe('plugin-meetings', () => {
|
|
|
507
650
|
assert.notCalled(breakouts.listenTo);
|
|
508
651
|
});
|
|
509
652
|
|
|
653
|
+
it('do not subscribe message if the connected llm does not belong to this meeting', () => {
|
|
654
|
+
webex.internal.llm.isConnected = sinon.stub().returns(true);
|
|
655
|
+
webex.internal.llm.getLocusUrl = sinon.stub().returns('anotherMeetingLocusUrl');
|
|
656
|
+
breakouts.listenTo = sinon.stub();
|
|
657
|
+
breakouts.locusUrlUpdate('newUrl');
|
|
658
|
+
assert.equal(breakouts.locusUrl, 'newUrl');
|
|
659
|
+
assert.notCalled(breakouts.listenTo);
|
|
660
|
+
});
|
|
661
|
+
|
|
510
662
|
it('do not subscribe message if already done', () => {
|
|
511
663
|
webex.internal.llm.isConnected = sinon.stub().returns(true);
|
|
512
664
|
breakouts.hasSubscribedToMessage = true;
|
|
@@ -519,7 +671,9 @@ describe('plugin-meetings', () => {
|
|
|
519
671
|
it('triggers message event when a message received', () => {
|
|
520
672
|
webex.internal.llm.isConnected = sinon.stub().returns(true);
|
|
521
673
|
breakouts.locusUrlUpdate('newUrl');
|
|
522
|
-
const call = webex.internal.llm.on
|
|
674
|
+
const call = webex.internal.llm.on
|
|
675
|
+
.getCalls()
|
|
676
|
+
.find((c) => c.args[0] === 'event:breakout.message');
|
|
523
677
|
const callback = call.args[1];
|
|
524
678
|
|
|
525
679
|
assert.equal(call.args[0], 'event:breakout.message');
|
|
@@ -547,6 +701,25 @@ describe('plugin-meetings', () => {
|
|
|
547
701
|
sessionId: 'sessionId',
|
|
548
702
|
});
|
|
549
703
|
});
|
|
704
|
+
|
|
705
|
+
it('re-checks the subscription when the llm emits online', () => {
|
|
706
|
+
const onlineCall = webex.internal.llm.on
|
|
707
|
+
.getCalls()
|
|
708
|
+
.find((c) => c.args[0] === 'online');
|
|
709
|
+
assert.exists(onlineCall, 'expected an online listener to be registered');
|
|
710
|
+
const onlineHandler = onlineCall.args[1];
|
|
711
|
+
|
|
712
|
+
webex.internal.llm.isConnected = sinon.stub().returns(true);
|
|
713
|
+
webex.internal.llm.getLocusUrl = sinon.stub().returns(breakouts.locusUrl);
|
|
714
|
+
|
|
715
|
+
onlineHandler.call(breakouts);
|
|
716
|
+
|
|
717
|
+
const call = webex.internal.llm.on
|
|
718
|
+
.getCalls()
|
|
719
|
+
.find((c) => c.args[0] === 'event:breakout.message');
|
|
720
|
+
assert.exists(call, 'expected broadcast message subscription after online');
|
|
721
|
+
assert.isTrue(breakouts.hasSubscribedToMessage);
|
|
722
|
+
});
|
|
550
723
|
});
|
|
551
724
|
|
|
552
725
|
describe('#updateCanManageBreakouts', () => {
|
|
@@ -1847,6 +2020,53 @@ describe('plugin-meetings', () => {
|
|
|
1847
2020
|
});
|
|
1848
2021
|
});
|
|
1849
2022
|
|
|
2023
|
+
describe('#removeFromBreakout', () => {
|
|
2024
|
+
it('should make a POST request with correct body and return the result', async () => {
|
|
2025
|
+
breakouts.request = sinon.stub().returns(Promise.resolve('REQUEST_RETURN_VALUE'));
|
|
2026
|
+
breakouts.set('url', 'url');
|
|
2027
|
+
breakouts.set('mainGroupId', 'mainGroupId');
|
|
2028
|
+
breakouts.set('mainSessionId', 'mainSessionId');
|
|
2029
|
+
|
|
2030
|
+
const participants = ['participant1', 'participant2'];
|
|
2031
|
+
const result = await breakouts.removeFromBreakout(participants);
|
|
2032
|
+
|
|
2033
|
+
assert.calledOnceWithExactly(breakouts.request, {
|
|
2034
|
+
method: 'POST',
|
|
2035
|
+
uri: 'url/move',
|
|
2036
|
+
body: {
|
|
2037
|
+
groups: [
|
|
2038
|
+
{
|
|
2039
|
+
id: 'mainGroupId',
|
|
2040
|
+
sessions: [
|
|
2041
|
+
{
|
|
2042
|
+
id: 'mainSessionId',
|
|
2043
|
+
participants,
|
|
2044
|
+
},
|
|
2045
|
+
],
|
|
2046
|
+
},
|
|
2047
|
+
],
|
|
2048
|
+
},
|
|
2049
|
+
});
|
|
2050
|
+
assert.equal(result, 'REQUEST_RETURN_VALUE');
|
|
2051
|
+
});
|
|
2052
|
+
|
|
2053
|
+
it('should throw an error if mainGroupId is missing', () => {
|
|
2054
|
+
breakouts.set('mainSessionId', 'mainSessionId');
|
|
2055
|
+
assert.throws(
|
|
2056
|
+
() => breakouts.removeFromBreakout(['participant1']),
|
|
2057
|
+
'Main group ID and session ID must be available to remove participants from breakout'
|
|
2058
|
+
);
|
|
2059
|
+
});
|
|
2060
|
+
|
|
2061
|
+
it('should throw an error if mainSessionId is missing', () => {
|
|
2062
|
+
breakouts.set('mainGroupId', 'mainGroupId');
|
|
2063
|
+
assert.throws(
|
|
2064
|
+
() => breakouts.removeFromBreakout(['participant1']),
|
|
2065
|
+
'Main group ID and session ID must be available to remove participants from breakout'
|
|
2066
|
+
);
|
|
2067
|
+
});
|
|
2068
|
+
});
|
|
2069
|
+
|
|
1850
2070
|
describe('#triggerReturnToMainEvent', () => {
|
|
1851
2071
|
const checkTrigger = ({breakout, shouldTrigger}) => {
|
|
1852
2072
|
breakouts.trigger = sinon.stub();
|