@webex/plugin-meetings 3.12.0 → 3.13.0-next.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.
- 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 +208 -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/assets/README.md +28 -0
- package/assets/e2ee-0.0.1.js +2 -0
- package/assets/e2ee-0.0.1.wasm +0 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/annotation/index.js +55 -19
- package/dist/annotation/index.js.map +1 -1
- package/dist/assets/e2ee-0.0.1.js +2 -0
- package/dist/assets/e2ee-0.0.1.wasm +0 -0
- 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 +128 -7
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +4 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +39 -11
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +67 -29
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +13 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1245 -404
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +42 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +58 -16
- 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 +914 -196
- 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 +229 -166
- 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 +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1931 -887
- 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 +42 -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 +12 -5
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +322 -129
- 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 +11 -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/multistream/sendSlotManager.js +127 -3
- package/dist/multistream/sendSlotManager.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/annotation/index.d.ts +19 -0
- package/dist/types/common/errors/webex-errors.d.ts +36 -2
- package/dist/types/config.d.ts +4 -2
- package/dist/types/constants.d.ts +15 -2
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +2 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +230 -18
- package/dist/types/hashTree/utils.d.ts +18 -0
- package/dist/types/index.d.ts +4 -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 +151 -15
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +28 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +66 -49
- package/dist/types/media/properties.d.ts +6 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/meeting/index.d.ts +247 -13
- 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 +12 -1
- 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 +10 -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/multistream/sendSlotManager.d.ts +28 -2
- 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 +539 -245
- package/dist/webinar/index.js.map +1 -1
- package/package.json +26 -24
- 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 +61 -29
- 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 +145 -3
- package/src/common/errors/webex-errors.ts +56 -3
- package/src/config.ts +8 -3
- package/src/constants.ts +23 -4
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/hashTree/constants.ts +16 -0
- package/src/hashTree/hashTreeParser.ts +1021 -214
- package/src/hashTree/utils.ts +36 -0
- package/src/index.ts +7 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interceptors/dataChannelAuthToken.ts +59 -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 +907 -184
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +33 -1
- package/src/media/MediaConnectionAwaiter.ts +229 -196
- 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 +404 -0
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +1237 -254
- 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 +53 -8
- 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 +11 -4
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +224 -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 +11 -0
- package/src/multistream/ai-docs/multistream-spec.md +295 -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/multistream/sendSlotManager.ts +112 -4
- 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 +333 -73
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/annotation/index.ts +214 -182
- 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 +336 -15
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +3126 -238
- package/test/unit/spec/hashTree/utils.ts +125 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +179 -1
- 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 +1880 -136
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +479 -17
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +26 -26
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +3697 -501
- 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 +206 -16
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
- package/test/unit/spec/meetings/index.js +586 -53
- 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/multistream/sendSlotManager.ts +165 -38
- 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 +982 -328
|
@@ -12,6 +12,7 @@ import * as BrowserDetectionModule from '@webex/plugin-meetings/src/common/brows
|
|
|
12
12
|
import PasswordError from '@webex/plugin-meetings/src/common/errors/password-error';
|
|
13
13
|
import CaptchaError from '@webex/plugin-meetings/src/common/errors/captcha-error';
|
|
14
14
|
import {ServerRoles} from '@webex/plugin-meetings/src/member/types';
|
|
15
|
+
import {WebexHttpError} from '@webex/webex-core';
|
|
15
16
|
|
|
16
17
|
describe('plugin-meetings', () => {
|
|
17
18
|
let webex;
|
|
@@ -60,6 +61,7 @@ describe('plugin-meetings', () => {
|
|
|
60
61
|
meeting.annotaion = {cleanUp: sinon.stub()};
|
|
61
62
|
meeting.getWebexObject = sinon.stub().returns(webex);
|
|
62
63
|
meeting.simultaneousInterpretation = {cleanUp: sinon.stub()};
|
|
64
|
+
meeting.locusInfo = {cleanUp: sinon.stub()};
|
|
63
65
|
meeting.trigger = sinon.stub();
|
|
64
66
|
meeting.webex = webex;
|
|
65
67
|
meeting.webex.internal.newMetrics.callDiagnosticMetrics =
|
|
@@ -74,7 +76,7 @@ describe('plugin-meetings', () => {
|
|
|
74
76
|
});
|
|
75
77
|
|
|
76
78
|
describe('#cleanup', () => {
|
|
77
|
-
it('
|
|
79
|
+
it('cleans up an LLM-enabled meeting while preserving Voicea by default', async () => {
|
|
78
80
|
meeting.config = {enableAutomaticLLM: true};
|
|
79
81
|
await MeetingUtil.cleanUp(meeting);
|
|
80
82
|
assert.calledOnce(meeting.cleanupLocalStreams);
|
|
@@ -86,9 +88,14 @@ describe('plugin-meetings', () => {
|
|
|
86
88
|
assert.calledOnce(meeting.unsetPeerConnections);
|
|
87
89
|
assert.calledOnce(meeting.reconnectionManager.cleanUp);
|
|
88
90
|
assert.calledOnce(meeting.stopKeepAlive);
|
|
89
|
-
assert.calledOnceWithExactly(meeting.cleanupLLMConneciton, {
|
|
91
|
+
assert.calledOnceWithExactly(meeting.cleanupLLMConneciton, {
|
|
92
|
+
throwOnError: false,
|
|
93
|
+
preserveVoiceaChannel: true,
|
|
94
|
+
});
|
|
90
95
|
assert.calledOnce(meeting.breakouts.cleanUp);
|
|
91
96
|
assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
|
|
97
|
+
// locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
|
|
98
|
+
assert.notCalled(meeting.locusInfo.cleanUp);
|
|
92
99
|
assert.calledOnce(webex.internal.device.meetingEnded);
|
|
93
100
|
assert.calledOnceWithExactly(
|
|
94
101
|
meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
|
|
@@ -96,6 +103,17 @@ describe('plugin-meetings', () => {
|
|
|
96
103
|
);
|
|
97
104
|
});
|
|
98
105
|
|
|
106
|
+
it('cleans up an LLM-enabled meeting without preserving Voicea when requested', async () => {
|
|
107
|
+
meeting.config = {enableAutomaticLLM: true};
|
|
108
|
+
|
|
109
|
+
await MeetingUtil.cleanUp(meeting, {preserveVoiceaChannel: false});
|
|
110
|
+
|
|
111
|
+
assert.calledOnceWithExactly(meeting.cleanupLLMConneciton, {
|
|
112
|
+
throwOnError: false,
|
|
113
|
+
preserveVoiceaChannel: false,
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
|
|
99
117
|
it('do clean up on meeting object with LLM disabled', async () => {
|
|
100
118
|
meeting.config = {enableAutomaticLLM: false};
|
|
101
119
|
await MeetingUtil.cleanUp(meeting);
|
|
@@ -110,6 +128,8 @@ describe('plugin-meetings', () => {
|
|
|
110
128
|
assert.notCalled(meeting.cleanupLLMConneciton);
|
|
111
129
|
assert.calledOnce(meeting.breakouts.cleanUp);
|
|
112
130
|
assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
|
|
131
|
+
// locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
|
|
132
|
+
assert.notCalled(meeting.locusInfo.cleanUp);
|
|
113
133
|
assert.calledOnce(webex.internal.device.meetingEnded);
|
|
114
134
|
assert.calledOnceWithExactly(
|
|
115
135
|
meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
|
|
@@ -130,6 +150,8 @@ describe('plugin-meetings', () => {
|
|
|
130
150
|
assert.notCalled(meeting.cleanupLLMConneciton);
|
|
131
151
|
assert.calledOnce(meeting.breakouts.cleanUp);
|
|
132
152
|
assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
|
|
153
|
+
// locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
|
|
154
|
+
assert.notCalled(meeting.locusInfo.cleanUp);
|
|
133
155
|
assert.calledOnce(webex.internal.device.meetingEnded);
|
|
134
156
|
assert.calledOnceWithExactly(
|
|
135
157
|
meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
|
|
@@ -272,6 +294,31 @@ describe('plugin-meetings', () => {
|
|
|
272
294
|
assert.notCalled(meeting.locusInfo.handleLocusAPIResponse);
|
|
273
295
|
});
|
|
274
296
|
|
|
297
|
+
it('should call handleLocusAPIResponse when response body is an unwrapped LocusDTO', () => {
|
|
298
|
+
const meeting = {
|
|
299
|
+
locusInfo: {
|
|
300
|
+
handleLocusAPIResponse: sinon.stub(),
|
|
301
|
+
},
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
const originalResponse = {
|
|
305
|
+
body: {
|
|
306
|
+
url: 'https://locus-a.wbx2.com/locus/api/v1/loci/some-id',
|
|
307
|
+
participants: [],
|
|
308
|
+
self: {},
|
|
309
|
+
},
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
const response = MeetingUtil.updateLocusFromApiResponse(meeting, originalResponse);
|
|
313
|
+
|
|
314
|
+
assert.deepEqual(response, originalResponse);
|
|
315
|
+
assert.calledOnceWithExactly(
|
|
316
|
+
meeting.locusInfo.handleLocusAPIResponse,
|
|
317
|
+
meeting,
|
|
318
|
+
originalResponse.body
|
|
319
|
+
);
|
|
320
|
+
});
|
|
321
|
+
|
|
275
322
|
it('should work with an undefined meeting', () => {
|
|
276
323
|
const originalResponse = {
|
|
277
324
|
body: {
|
|
@@ -290,6 +337,7 @@ describe('plugin-meetings', () => {
|
|
|
290
337
|
const addSequenceSpy = sinon.spy(MeetingUtil, 'addSequence');
|
|
291
338
|
|
|
292
339
|
const meeting = {
|
|
340
|
+
locusUrl: 'https://locus.example.com/loci/abc',
|
|
293
341
|
request: sinon.stub().returns(Promise.resolve('result')),
|
|
294
342
|
};
|
|
295
343
|
|
|
@@ -297,6 +345,7 @@ describe('plugin-meetings', () => {
|
|
|
297
345
|
|
|
298
346
|
const options = {
|
|
299
347
|
some: 'option',
|
|
348
|
+
uri: 'https://locus.example.com/loci/abc',
|
|
300
349
|
body: {},
|
|
301
350
|
};
|
|
302
351
|
|
|
@@ -310,7 +359,7 @@ describe('plugin-meetings', () => {
|
|
|
310
359
|
addSequenceSpy.resetHistory();
|
|
311
360
|
|
|
312
361
|
// body missing from options
|
|
313
|
-
result = await locusDeltaRequest({});
|
|
362
|
+
result = await locusDeltaRequest({uri: 'https://locus.example.com/loci/abc'});
|
|
314
363
|
assert.equal(result, 'result');
|
|
315
364
|
assert.calledOnceWithExactly(updateLocusFromApiResponseSpy, meeting, 'result');
|
|
316
365
|
assert.calledOnceWithExactly(addSequenceSpy, meeting, options.body);
|
|
@@ -324,6 +373,78 @@ describe('plugin-meetings', () => {
|
|
|
324
373
|
WeakRef.prototype.deref.restore();
|
|
325
374
|
});
|
|
326
375
|
|
|
376
|
+
it('calls updateLocusFromApiResponse when request uri starts with the meeting locusUrl', async () => {
|
|
377
|
+
const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
|
|
378
|
+
|
|
379
|
+
const meeting = {
|
|
380
|
+
locusUrl: 'https://locus.example.com/loci/abc',
|
|
381
|
+
request: sinon.stub().returns(Promise.resolve('result')),
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
385
|
+
|
|
386
|
+
const result = await locusDeltaRequest({
|
|
387
|
+
uri: 'https://locus.example.com/loci/abc/participant/123',
|
|
388
|
+
body: {},
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
assert.equal(result, 'result');
|
|
392
|
+
assert.calledOnceWithExactly(updateLocusFromApiResponseSpy, meeting, 'result');
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
it('does not call updateLocusFromApiResponse when request uri does not match the meeting locusUrl', async () => {
|
|
396
|
+
const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
|
|
397
|
+
|
|
398
|
+
const meeting = {
|
|
399
|
+
locusUrl: 'https://locus.example.com/loci/abc',
|
|
400
|
+
request: sinon.stub().returns(Promise.resolve('result')),
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
404
|
+
|
|
405
|
+
const result = await locusDeltaRequest({
|
|
406
|
+
uri: 'https://locus.example.com/loci/different',
|
|
407
|
+
body: {},
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
assert.equal(result, 'result');
|
|
411
|
+
assert.notCalled(updateLocusFromApiResponseSpy);
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
it('does not call updateLocusFromApiResponse when request uri is missing', async () => {
|
|
415
|
+
const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
|
|
416
|
+
|
|
417
|
+
const meeting = {
|
|
418
|
+
locusUrl: 'https://locus.example.com/loci/abc',
|
|
419
|
+
request: sinon.stub().returns(Promise.resolve('result')),
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
423
|
+
|
|
424
|
+
const result = await locusDeltaRequest({body: {}});
|
|
425
|
+
|
|
426
|
+
assert.equal(result, 'result');
|
|
427
|
+
assert.notCalled(updateLocusFromApiResponseSpy);
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
it('does not call updateLocusFromApiResponse when meeting locusUrl is missing', async () => {
|
|
431
|
+
const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
|
|
432
|
+
|
|
433
|
+
const meeting = {
|
|
434
|
+
request: sinon.stub().returns(Promise.resolve('result')),
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
438
|
+
|
|
439
|
+
const result = await locusDeltaRequest({
|
|
440
|
+
uri: 'https://locus.example.com/loci/abc',
|
|
441
|
+
body: {},
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
assert.equal(result, 'result');
|
|
445
|
+
assert.notCalled(updateLocusFromApiResponseSpy);
|
|
446
|
+
});
|
|
447
|
+
|
|
327
448
|
it('calls generateBuildLocusDeltaRequestOptions as expected', () => {
|
|
328
449
|
const generateBuildLocusDeltaRequestOptionsSpy = sinon.spy(
|
|
329
450
|
MeetingUtil,
|
|
@@ -659,7 +780,15 @@ describe('plugin-meetings', () => {
|
|
|
659
780
|
});
|
|
660
781
|
|
|
661
782
|
it('should post client event with error when join fails', async () => {
|
|
662
|
-
const joinError = new
|
|
783
|
+
const joinError = new WebexHttpError.TooManyRequests({
|
|
784
|
+
statusCode: 429,
|
|
785
|
+
body: {message: 'Locus rate limited'},
|
|
786
|
+
options: {
|
|
787
|
+
method: 'POST',
|
|
788
|
+
headers: {},
|
|
789
|
+
uri: 'https://locus.example.com/locus/api/v1/loci/call',
|
|
790
|
+
},
|
|
791
|
+
});
|
|
663
792
|
meeting.meetingRequest.joinMeeting.rejects(joinError);
|
|
664
793
|
meeting.meetingInfo = {meetingLookupUrl: 'test-lookup-url'};
|
|
665
794
|
|
|
@@ -938,6 +1067,55 @@ describe('plugin-meetings', () => {
|
|
|
938
1067
|
});
|
|
939
1068
|
});
|
|
940
1069
|
|
|
1070
|
+
describe('canViewTheParticipantList', () => {
|
|
1071
|
+
it('returns true when both VIEW_THE_PARTICIPANT_LIST and CAN_VIEW_THE_PARTICIPANT_LIST hints are present and canNotViewTheParticipantList is false', () => {
|
|
1072
|
+
assert.isTrue(
|
|
1073
|
+
MeetingUtil.canViewTheParticipantList(
|
|
1074
|
+
['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
|
|
1075
|
+
false
|
|
1076
|
+
)
|
|
1077
|
+
);
|
|
1078
|
+
});
|
|
1079
|
+
|
|
1080
|
+
it('returns false when VIEW_THE_PARTICIPANT_LIST hint is missing', () => {
|
|
1081
|
+
assert.isFalse(
|
|
1082
|
+
MeetingUtil.canViewTheParticipantList(['CAN_VIEW_THE_PARTICIPANT_LIST'], false)
|
|
1083
|
+
);
|
|
1084
|
+
});
|
|
1085
|
+
|
|
1086
|
+
it('returns false when CAN_VIEW_THE_PARTICIPANT_LIST hint is missing', () => {
|
|
1087
|
+
assert.isFalse(
|
|
1088
|
+
MeetingUtil.canViewTheParticipantList(['VIEW_THE_PARTICIPANT_LIST'], false)
|
|
1089
|
+
);
|
|
1090
|
+
});
|
|
1091
|
+
|
|
1092
|
+
it('returns false when canNotViewTheParticipantList is true', () => {
|
|
1093
|
+
assert.isFalse(
|
|
1094
|
+
MeetingUtil.canViewTheParticipantList(
|
|
1095
|
+
['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
|
|
1096
|
+
true
|
|
1097
|
+
)
|
|
1098
|
+
);
|
|
1099
|
+
});
|
|
1100
|
+
|
|
1101
|
+
it('returns false when display hints array is empty', () => {
|
|
1102
|
+
assert.isFalse(MeetingUtil.canViewTheParticipantList([], false));
|
|
1103
|
+
});
|
|
1104
|
+
|
|
1105
|
+
it('returns false when both conditions are violated', () => {
|
|
1106
|
+
assert.isFalse(MeetingUtil.canViewTheParticipantList([], true));
|
|
1107
|
+
});
|
|
1108
|
+
|
|
1109
|
+
it('returns true when canNotViewTheParticipantList is undefined (not yet set on meeting)', () => {
|
|
1110
|
+
assert.isTrue(
|
|
1111
|
+
MeetingUtil.canViewTheParticipantList(
|
|
1112
|
+
['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
|
|
1113
|
+
undefined
|
|
1114
|
+
)
|
|
1115
|
+
);
|
|
1116
|
+
});
|
|
1117
|
+
});
|
|
1118
|
+
|
|
941
1119
|
describe('canAttendeeRequestAiAssistantEnabled', () => {
|
|
942
1120
|
it('returns false when user is a cohost', () => {
|
|
943
1121
|
assert.deepEqual(
|
|
@@ -1146,6 +1324,10 @@ describe('plugin-meetings', () => {
|
|
|
1146
1324
|
{functionName: 'canSelectSpokenLanguages', displayHint: 'DISPLAY_NON_ENGLISH_ASR'},
|
|
1147
1325
|
{functionName: 'waitingForOthersToJoin', displayHint: 'WAITING_FOR_OTHERS'},
|
|
1148
1326
|
{functionName: 'showAutoEndMeetingWarning', displayHint: 'SHOW_AUTO_END_MEETING_WARNING'},
|
|
1327
|
+
{
|
|
1328
|
+
functionName: 'isAnonymizeDisplayNamesEnabled',
|
|
1329
|
+
displayHint: 'ANONYMOUS_DISPLAY_NAMES_ENABLED',
|
|
1330
|
+
},
|
|
1149
1331
|
].forEach(({functionName, displayHint}) => {
|
|
1150
1332
|
describe(functionName, () => {
|
|
1151
1333
|
it('works as expected', () => {
|
|
@@ -1256,12 +1438,16 @@ describe('plugin-meetings', () => {
|
|
|
1256
1438
|
MeetingUtil.parseInterpretationInfo(meeting, meetingInfo);
|
|
1257
1439
|
assert.calledWith(meeting.simultaneousInterpretation.updateMeetingSIEnabled, true, true);
|
|
1258
1440
|
assert.calledWith(meeting.simultaneousInterpretation.updateHostSIEnabled, true);
|
|
1259
|
-
assert.calledWith(
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1441
|
+
assert.calledWith(
|
|
1442
|
+
meeting.simultaneousInterpretation.updateInterpretation,
|
|
1443
|
+
{
|
|
1444
|
+
siLanguages: [
|
|
1445
|
+
{languageName: 'en', languageCode: 1},
|
|
1446
|
+
{languageName: 'es', languageCode: 2},
|
|
1447
|
+
],
|
|
1448
|
+
},
|
|
1449
|
+
{preserveSiEnabled: true}
|
|
1450
|
+
);
|
|
1265
1451
|
});
|
|
1266
1452
|
|
|
1267
1453
|
it('should update simultaneous interpretation settings with host SI disabled', () => {
|
|
@@ -1270,12 +1456,16 @@ describe('plugin-meetings', () => {
|
|
|
1270
1456
|
MeetingUtil.parseInterpretationInfo(meeting, meetingInfo);
|
|
1271
1457
|
assert.calledWith(meeting.simultaneousInterpretation.updateMeetingSIEnabled, true, false);
|
|
1272
1458
|
assert.calledWith(meeting.simultaneousInterpretation.updateHostSIEnabled, false);
|
|
1273
|
-
assert.calledWith(
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1459
|
+
assert.calledWith(
|
|
1460
|
+
meeting.simultaneousInterpretation.updateInterpretation,
|
|
1461
|
+
{
|
|
1462
|
+
siLanguages: [
|
|
1463
|
+
{languageName: 'en', languageCode: 1},
|
|
1464
|
+
{languageName: 'es', languageCode: 2},
|
|
1465
|
+
],
|
|
1466
|
+
},
|
|
1467
|
+
{preserveSiEnabled: true}
|
|
1468
|
+
);
|
|
1279
1469
|
});
|
|
1280
1470
|
it('should update simultaneous interpretation settings with SI disabled', () => {
|
|
1281
1471
|
meetingInfo.turnOnSimultaneousInterpretation = false;
|
|
@@ -150,6 +150,90 @@ describe('plugin-meetings', () => {
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
describe('processNewCaptions', () => {
|
|
153
|
+
const processCaptions = () => processNewCaptions({
|
|
154
|
+
data: fakeVoiceaPayload,
|
|
155
|
+
meeting: fakeMeeting
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it('should process a final-only caption without an existing interim caption', () => {
|
|
159
|
+
const transcriptData = fakeMeeting.transcription;
|
|
160
|
+
const transcriptId = fakeVoiceaPayload.transcriptId;
|
|
161
|
+
|
|
162
|
+
delete transcriptData.interimCaptions[transcriptId];
|
|
163
|
+
|
|
164
|
+
assert.doesNotThrow(processCaptions);
|
|
165
|
+
|
|
166
|
+
const finalCaption = transcriptData.captions.find(caption => caption.id === transcriptId);
|
|
167
|
+
|
|
168
|
+
assert.exists(finalCaption);
|
|
169
|
+
assert.deepEqual(transcriptData.interimCaptions[transcriptId], []);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it('should process an interim caption received after a final caption', () => {
|
|
173
|
+
const transcriptData = fakeMeeting.transcription;
|
|
174
|
+
const transcriptId = fakeVoiceaPayload.transcriptId;
|
|
175
|
+
|
|
176
|
+
delete transcriptData.interimCaptions[transcriptId];
|
|
177
|
+
|
|
178
|
+
assert.doesNotThrow(processCaptions);
|
|
179
|
+
|
|
180
|
+
fakeVoiceaPayload.isFinal = false;
|
|
181
|
+
|
|
182
|
+
assert.doesNotThrow(processCaptions);
|
|
183
|
+
|
|
184
|
+
const speakerId = fakeMeeting.members.membersCollection.members[fakeMemberId].participant.person.id;
|
|
185
|
+
const interimId = `${transcriptId}_${speakerId}`;
|
|
186
|
+
|
|
187
|
+
assert.exists(transcriptData.captions.find(caption => caption.id === transcriptId));
|
|
188
|
+
assert.exists(transcriptData.captions.find(caption => caption.id === interimId));
|
|
189
|
+
assert.deepEqual(transcriptData.interimCaptions[transcriptId], [interimId]);
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it('should process repeated final captions without throwing', () => {
|
|
193
|
+
const transcriptData = fakeMeeting.transcription;
|
|
194
|
+
const transcriptId = fakeVoiceaPayload.transcriptId;
|
|
195
|
+
|
|
196
|
+
delete transcriptData.interimCaptions[transcriptId];
|
|
197
|
+
|
|
198
|
+
assert.doesNotThrow(() => {
|
|
199
|
+
processCaptions();
|
|
200
|
+
processCaptions();
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
assert.exists(transcriptData.captions.find(caption => caption.id === transcriptId));
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
it('should process a final payload containing transcript entries for multiple CSIs without throwing', () => {
|
|
207
|
+
const transcriptData = fakeMeeting.transcription;
|
|
208
|
+
const transcriptId = fakeVoiceaPayload.transcriptId;
|
|
209
|
+
const firstCsi = 1234867712;
|
|
210
|
+
const secondCsi = 1234867713;
|
|
211
|
+
const secondCaptionText = 'Caption from a second CSI';
|
|
212
|
+
|
|
213
|
+
fakeVoiceaPayload.transcripts = [
|
|
214
|
+
{
|
|
215
|
+
...fakeVoiceaPayload.transcripts[0],
|
|
216
|
+
csis: [firstCsi]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
text: secondCaptionText,
|
|
220
|
+
csis: [secondCsi],
|
|
221
|
+
transcript_language_code: 'en'
|
|
222
|
+
}
|
|
223
|
+
];
|
|
224
|
+
|
|
225
|
+
assert.doesNotThrow(processCaptions);
|
|
226
|
+
|
|
227
|
+
const finalCaptionTexts = transcriptData.captions
|
|
228
|
+
.filter(caption => caption.id === transcriptId)
|
|
229
|
+
.map(caption => caption.text);
|
|
230
|
+
|
|
231
|
+
assert.deepEqual(finalCaptionTexts, [
|
|
232
|
+
fakeVoiceaPayload.transcripts[0].text,
|
|
233
|
+
secondCaptionText
|
|
234
|
+
]);
|
|
235
|
+
});
|
|
236
|
+
|
|
153
237
|
it('should process new final captions correctly', () => {
|
|
154
238
|
let transcriptData = fakeMeeting.transcription;
|
|
155
239
|
let transcriptId = fakeVoiceaPayload.transcriptId;
|
|
@@ -254,4 +338,4 @@ describe('plugin-meetings', () => {
|
|
|
254
338
|
});
|
|
255
339
|
});
|
|
256
340
|
});
|
|
257
|
-
});
|
|
341
|
+
});
|
|
@@ -654,7 +654,7 @@ describe('plugin-meetings', () => {
|
|
|
654
654
|
meetingInfo.createAdhocSpaceMeeting,
|
|
655
655
|
'conversationUrl',
|
|
656
656
|
installedOrgID,
|
|
657
|
-
null
|
|
657
|
+
null
|
|
658
658
|
);
|
|
659
659
|
assert.notCalled(webex.request);
|
|
660
660
|
meetingInfo.createAdhocSpaceMeeting.restore();
|
|
@@ -815,8 +815,14 @@ describe('plugin-meetings', () => {
|
|
|
815
815
|
{meetingId: '123', sendCAevents: false, shouldSendCAevents: false},
|
|
816
816
|
{shouldSendCAevents: false},
|
|
817
817
|
{meetingId: '123', sendCAevents: true, shouldSendCAevents: true, confIdStr: '999'},
|
|
818
|
+
{
|
|
819
|
+
meetingId: '123',
|
|
820
|
+
sendCAevents: true,
|
|
821
|
+
shouldSendCAevents: true,
|
|
822
|
+
locusClusterUrl: 'locus-k.wbx2.com',
|
|
823
|
+
},
|
|
818
824
|
],
|
|
819
|
-
({meetingId, sendCAevents, shouldSendCAevents, confIdStr}) => {
|
|
825
|
+
({meetingId, sendCAevents, shouldSendCAevents, confIdStr, locusClusterUrl}) => {
|
|
820
826
|
it('should send CA metric if meetingId is provided and send CA events is authorized', async () => {
|
|
821
827
|
const requestResponse = {
|
|
822
828
|
statusCode: 200,
|
|
@@ -825,6 +831,9 @@ describe('plugin-meetings', () => {
|
|
|
825
831
|
if (confIdStr) {
|
|
826
832
|
requestResponse.body.confIdStr = confIdStr;
|
|
827
833
|
}
|
|
834
|
+
if (locusClusterUrl) {
|
|
835
|
+
requestResponse.body.locusClusterUrl = locusClusterUrl;
|
|
836
|
+
}
|
|
828
837
|
const extraParams = {mtid: 'm9fe0afd8c435e892afcce9ea25b97046', joinTXId: 'TSmrX61wNF'};
|
|
829
838
|
|
|
830
839
|
webex.request.resolves(requestResponse);
|
|
@@ -890,6 +899,7 @@ describe('plugin-meetings', () => {
|
|
|
890
899
|
webexConferenceIdStr: confIdStr
|
|
891
900
|
? requestResponse.body?.confIdStr
|
|
892
901
|
: requestResponse.body?.confID,
|
|
902
|
+
locusCluster: locusClusterUrl,
|
|
893
903
|
},
|
|
894
904
|
});
|
|
895
905
|
} else {
|
|
@@ -900,6 +910,63 @@ describe('plugin-meetings', () => {
|
|
|
900
910
|
}
|
|
901
911
|
);
|
|
902
912
|
|
|
913
|
+
forEach(
|
|
914
|
+
[
|
|
915
|
+
{
|
|
916
|
+
meetingId: 'meeting-id',
|
|
917
|
+
sendCAevents: true,
|
|
918
|
+
correlationId: 'correlation-id',
|
|
919
|
+
shouldSendCorrelationId: true,
|
|
920
|
+
condition: 'when CA events are enabled for the meeting',
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
sendCAevents: true,
|
|
924
|
+
correlationId: 'correlation-id',
|
|
925
|
+
shouldSendCorrelationId: false,
|
|
926
|
+
condition: 'without a meetingId',
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
meetingId: 'meeting-id',
|
|
930
|
+
sendCAevents: false,
|
|
931
|
+
correlationId: 'correlation-id',
|
|
932
|
+
shouldSendCorrelationId: false,
|
|
933
|
+
condition: 'when CA events are disabled',
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
meetingId: 'meeting-id',
|
|
937
|
+
sendCAevents: true,
|
|
938
|
+
shouldSendCorrelationId: false,
|
|
939
|
+
condition: 'without a correlationId',
|
|
940
|
+
},
|
|
941
|
+
],
|
|
942
|
+
({meetingId, sendCAevents, correlationId, shouldSendCorrelationId, condition}) => {
|
|
943
|
+
it(`should ${
|
|
944
|
+
shouldSendCorrelationId ? '' : 'not '
|
|
945
|
+
}send the correlationId header ${condition}`, async () => {
|
|
946
|
+
webex.request.resolves({statusCode: 200, body: {meetingKey: '1234323'}});
|
|
947
|
+
|
|
948
|
+
await meetingInfo.fetchMeetingInfo(
|
|
949
|
+
'1234323',
|
|
950
|
+
DESTINATION_TYPE.MEETING_ID,
|
|
951
|
+
null,
|
|
952
|
+
null,
|
|
953
|
+
null,
|
|
954
|
+
null,
|
|
955
|
+
undefined,
|
|
956
|
+
{meetingId, sendCAevents, correlationId}
|
|
957
|
+
);
|
|
958
|
+
|
|
959
|
+
const requestOptions = webex.request.firstCall.args[0];
|
|
960
|
+
|
|
961
|
+
if (shouldSendCorrelationId) {
|
|
962
|
+
assert.deepEqual(requestOptions.headers, {correlationId});
|
|
963
|
+
} else {
|
|
964
|
+
assert.notProperty(requestOptions, 'headers');
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
);
|
|
969
|
+
|
|
903
970
|
it('should send CA metric if meetingId is provided and send CA events is authorized', async () => {
|
|
904
971
|
const requestResponse = {
|
|
905
972
|
statusCode: 200,
|
|
@@ -966,6 +1033,7 @@ describe('plugin-meetings', () => {
|
|
|
966
1033
|
meetingId: 'meetingId',
|
|
967
1034
|
globalMeetingId: requestResponse.body?.meetingId,
|
|
968
1035
|
webexConferenceIdStr: requestResponse.body?.confID,
|
|
1036
|
+
locusCluster: undefined,
|
|
969
1037
|
},
|
|
970
1038
|
});
|
|
971
1039
|
});
|
|
@@ -1068,13 +1136,16 @@ describe('plugin-meetings', () => {
|
|
|
1068
1136
|
await runTest(423006, true);
|
|
1069
1137
|
});
|
|
1070
1138
|
|
|
1139
|
+
it('should throw MeetingInfoV2CaptchaError for 423 response (wbxappapi code 423008)', async () => {
|
|
1140
|
+
await runTest(423008, true);
|
|
1141
|
+
});
|
|
1142
|
+
|
|
1071
1143
|
it('should throw MeetingInfoV2CaptchaError for 423 response (wbxappapi code 423001)', async () => {
|
|
1072
1144
|
await runTest(423001, false);
|
|
1073
1145
|
});
|
|
1074
1146
|
});
|
|
1075
1147
|
|
|
1076
1148
|
describe('should stop call fetchMeetingInfo if siteFullUrl is empty for 404 response', () => {
|
|
1077
|
-
|
|
1078
1149
|
const runTest = async (wbxAppApiCode, expectedIsPasswordRequired) => {
|
|
1079
1150
|
webex.request = sinon.stub().rejects({
|
|
1080
1151
|
statusCode: 404,
|
|
@@ -1082,12 +1153,11 @@ describe('plugin-meetings', () => {
|
|
|
1082
1153
|
code: wbxAppApiCode,
|
|
1083
1154
|
message: 'Alternate Meeting Server',
|
|
1084
1155
|
data: {
|
|
1085
|
-
|
|
1086
|
-
}
|
|
1156
|
+
siteFullUrl: '',
|
|
1157
|
+
},
|
|
1087
1158
|
},
|
|
1088
1159
|
});
|
|
1089
1160
|
|
|
1090
|
-
|
|
1091
1161
|
try {
|
|
1092
1162
|
await meetingInfo.fetchMeetingInfo('1234323', DESTINATION_TYPE.MEETING_ID, 'abc', {
|
|
1093
1163
|
id: '999',
|
|
@@ -1097,7 +1167,7 @@ describe('plugin-meetings', () => {
|
|
|
1097
1167
|
} catch (err) {
|
|
1098
1168
|
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
1099
1169
|
assert.deepEqual(err.body.data, {
|
|
1100
|
-
siteFullUrl: ''
|
|
1170
|
+
siteFullUrl: '',
|
|
1101
1171
|
});
|
|
1102
1172
|
}
|
|
1103
1173
|
};
|
|
@@ -1107,7 +1177,6 @@ describe('plugin-meetings', () => {
|
|
|
1107
1177
|
});
|
|
1108
1178
|
});
|
|
1109
1179
|
|
|
1110
|
-
|
|
1111
1180
|
it('should throw an error and not fetch with an "empty" body', async () => {
|
|
1112
1181
|
const body = {supportHostKey: 'foo', supportCountryList: 'bar'};
|
|
1113
1182
|
const requestResponse = {statusCode: 200, body};
|
|
@@ -1176,7 +1245,11 @@ describe('plugin-meetings', () => {
|
|
|
1176
1245
|
body: conversation,
|
|
1177
1246
|
});
|
|
1178
1247
|
|
|
1179
|
-
const result = await meetingInfo.createAdhocSpaceMeeting(
|
|
1248
|
+
const result = await meetingInfo.createAdhocSpaceMeeting(
|
|
1249
|
+
conversationUrl,
|
|
1250
|
+
installedOrgID,
|
|
1251
|
+
classificationId
|
|
1252
|
+
);
|
|
1180
1253
|
|
|
1181
1254
|
assert.calledWith(webex.request, {
|
|
1182
1255
|
uri: conversationUrl,
|
|
@@ -1210,7 +1283,11 @@ describe('plugin-meetings', () => {
|
|
|
1210
1283
|
webex.request = sinon.stub().resolves({
|
|
1211
1284
|
body: conversation,
|
|
1212
1285
|
});
|
|
1213
|
-
await meetingInfo.createAdhocSpaceMeeting(
|
|
1286
|
+
await meetingInfo.createAdhocSpaceMeeting(
|
|
1287
|
+
conversationUrl,
|
|
1288
|
+
installedOrgID,
|
|
1289
|
+
classificationId
|
|
1290
|
+
);
|
|
1214
1291
|
|
|
1215
1292
|
assert.calledWith(webex.request, {
|
|
1216
1293
|
uri: conversationUrl,
|
|
@@ -1282,7 +1359,7 @@ describe('plugin-meetings', () => {
|
|
|
1282
1359
|
{errorCode: 423007},
|
|
1283
1360
|
{errorCode: 403026},
|
|
1284
1361
|
{errorCode: 403037},
|
|
1285
|
-
{errorCode:
|
|
1362
|
+
{errorCode: 403106},
|
|
1286
1363
|
],
|
|
1287
1364
|
({errorCode}) => {
|
|
1288
1365
|
it(`should throw a MeetingInfoV2JoinWebinarError for error code ${errorCode}`, async () => {
|