@webex/plugin-meetings 3.12.0-next.17 → 3.12.0-next.170
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 +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1684 -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 +12 -5
- 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 +4 -0
- package/dist/types/meeting/index.d.ts +178 -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 +8 -0
- package/src/meeting/index.ts +944 -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 +11 -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 +4 -0
- package/test/unit/spec/meeting/index.js +2834 -110
- 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 +88 -11
- 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
|
@@ -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;
|
|
@@ -90,7 +91,8 @@ describe('plugin-meetings', () => {
|
|
|
90
91
|
assert.calledOnceWithExactly(meeting.cleanupLLMConneciton, {throwOnError: false});
|
|
91
92
|
assert.calledOnce(meeting.breakouts.cleanUp);
|
|
92
93
|
assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
|
|
93
|
-
|
|
94
|
+
// locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
|
|
95
|
+
assert.notCalled(meeting.locusInfo.cleanUp);
|
|
94
96
|
assert.calledOnce(webex.internal.device.meetingEnded);
|
|
95
97
|
assert.calledOnceWithExactly(
|
|
96
98
|
meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
|
|
@@ -112,7 +114,8 @@ describe('plugin-meetings', () => {
|
|
|
112
114
|
assert.notCalled(meeting.cleanupLLMConneciton);
|
|
113
115
|
assert.calledOnce(meeting.breakouts.cleanUp);
|
|
114
116
|
assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
|
|
115
|
-
|
|
117
|
+
// locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
|
|
118
|
+
assert.notCalled(meeting.locusInfo.cleanUp);
|
|
116
119
|
assert.calledOnce(webex.internal.device.meetingEnded);
|
|
117
120
|
assert.calledOnceWithExactly(
|
|
118
121
|
meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
|
|
@@ -133,7 +136,8 @@ describe('plugin-meetings', () => {
|
|
|
133
136
|
assert.notCalled(meeting.cleanupLLMConneciton);
|
|
134
137
|
assert.calledOnce(meeting.breakouts.cleanUp);
|
|
135
138
|
assert.calledOnce(meeting.simultaneousInterpretation.cleanUp);
|
|
136
|
-
|
|
139
|
+
// locusInfo.cleanUp (hash tree parser teardown) is deferred to Meetings#destroy
|
|
140
|
+
assert.notCalled(meeting.locusInfo.cleanUp);
|
|
137
141
|
assert.calledOnce(webex.internal.device.meetingEnded);
|
|
138
142
|
assert.calledOnceWithExactly(
|
|
139
143
|
meeting.webex.internal.newMetrics.callDiagnosticMetrics.clearEventLimitsForCorrelationId,
|
|
@@ -276,6 +280,31 @@ describe('plugin-meetings', () => {
|
|
|
276
280
|
assert.notCalled(meeting.locusInfo.handleLocusAPIResponse);
|
|
277
281
|
});
|
|
278
282
|
|
|
283
|
+
it('should call handleLocusAPIResponse when response body is an unwrapped LocusDTO', () => {
|
|
284
|
+
const meeting = {
|
|
285
|
+
locusInfo: {
|
|
286
|
+
handleLocusAPIResponse: sinon.stub(),
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
const originalResponse = {
|
|
291
|
+
body: {
|
|
292
|
+
url: 'https://locus-a.wbx2.com/locus/api/v1/loci/some-id',
|
|
293
|
+
participants: [],
|
|
294
|
+
self: {},
|
|
295
|
+
},
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
const response = MeetingUtil.updateLocusFromApiResponse(meeting, originalResponse);
|
|
299
|
+
|
|
300
|
+
assert.deepEqual(response, originalResponse);
|
|
301
|
+
assert.calledOnceWithExactly(
|
|
302
|
+
meeting.locusInfo.handleLocusAPIResponse,
|
|
303
|
+
meeting,
|
|
304
|
+
originalResponse.body
|
|
305
|
+
);
|
|
306
|
+
});
|
|
307
|
+
|
|
279
308
|
it('should work with an undefined meeting', () => {
|
|
280
309
|
const originalResponse = {
|
|
281
310
|
body: {
|
|
@@ -294,6 +323,7 @@ describe('plugin-meetings', () => {
|
|
|
294
323
|
const addSequenceSpy = sinon.spy(MeetingUtil, 'addSequence');
|
|
295
324
|
|
|
296
325
|
const meeting = {
|
|
326
|
+
locusUrl: 'https://locus.example.com/loci/abc',
|
|
297
327
|
request: sinon.stub().returns(Promise.resolve('result')),
|
|
298
328
|
};
|
|
299
329
|
|
|
@@ -301,6 +331,7 @@ describe('plugin-meetings', () => {
|
|
|
301
331
|
|
|
302
332
|
const options = {
|
|
303
333
|
some: 'option',
|
|
334
|
+
uri: 'https://locus.example.com/loci/abc',
|
|
304
335
|
body: {},
|
|
305
336
|
};
|
|
306
337
|
|
|
@@ -314,7 +345,7 @@ describe('plugin-meetings', () => {
|
|
|
314
345
|
addSequenceSpy.resetHistory();
|
|
315
346
|
|
|
316
347
|
// body missing from options
|
|
317
|
-
result = await locusDeltaRequest({});
|
|
348
|
+
result = await locusDeltaRequest({uri: 'https://locus.example.com/loci/abc'});
|
|
318
349
|
assert.equal(result, 'result');
|
|
319
350
|
assert.calledOnceWithExactly(updateLocusFromApiResponseSpy, meeting, 'result');
|
|
320
351
|
assert.calledOnceWithExactly(addSequenceSpy, meeting, options.body);
|
|
@@ -328,6 +359,78 @@ describe('plugin-meetings', () => {
|
|
|
328
359
|
WeakRef.prototype.deref.restore();
|
|
329
360
|
});
|
|
330
361
|
|
|
362
|
+
it('calls updateLocusFromApiResponse when request uri starts with the meeting locusUrl', async () => {
|
|
363
|
+
const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
|
|
364
|
+
|
|
365
|
+
const meeting = {
|
|
366
|
+
locusUrl: 'https://locus.example.com/loci/abc',
|
|
367
|
+
request: sinon.stub().returns(Promise.resolve('result')),
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
371
|
+
|
|
372
|
+
const result = await locusDeltaRequest({
|
|
373
|
+
uri: 'https://locus.example.com/loci/abc/participant/123',
|
|
374
|
+
body: {},
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
assert.equal(result, 'result');
|
|
378
|
+
assert.calledOnceWithExactly(updateLocusFromApiResponseSpy, meeting, 'result');
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
it('does not call updateLocusFromApiResponse when request uri does not match the meeting locusUrl', async () => {
|
|
382
|
+
const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
|
|
383
|
+
|
|
384
|
+
const meeting = {
|
|
385
|
+
locusUrl: 'https://locus.example.com/loci/abc',
|
|
386
|
+
request: sinon.stub().returns(Promise.resolve('result')),
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
390
|
+
|
|
391
|
+
const result = await locusDeltaRequest({
|
|
392
|
+
uri: 'https://locus.example.com/loci/different',
|
|
393
|
+
body: {},
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
assert.equal(result, 'result');
|
|
397
|
+
assert.notCalled(updateLocusFromApiResponseSpy);
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
it('does not call updateLocusFromApiResponse when request uri is missing', async () => {
|
|
401
|
+
const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
|
|
402
|
+
|
|
403
|
+
const meeting = {
|
|
404
|
+
locusUrl: 'https://locus.example.com/loci/abc',
|
|
405
|
+
request: sinon.stub().returns(Promise.resolve('result')),
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
409
|
+
|
|
410
|
+
const result = await locusDeltaRequest({body: {}});
|
|
411
|
+
|
|
412
|
+
assert.equal(result, 'result');
|
|
413
|
+
assert.notCalled(updateLocusFromApiResponseSpy);
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
it('does not call updateLocusFromApiResponse when meeting locusUrl is missing', async () => {
|
|
417
|
+
const updateLocusFromApiResponseSpy = sinon.spy(MeetingUtil, 'updateLocusFromApiResponse');
|
|
418
|
+
|
|
419
|
+
const meeting = {
|
|
420
|
+
request: sinon.stub().returns(Promise.resolve('result')),
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
const locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
424
|
+
|
|
425
|
+
const result = await locusDeltaRequest({
|
|
426
|
+
uri: 'https://locus.example.com/loci/abc',
|
|
427
|
+
body: {},
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
assert.equal(result, 'result');
|
|
431
|
+
assert.notCalled(updateLocusFromApiResponseSpy);
|
|
432
|
+
});
|
|
433
|
+
|
|
331
434
|
it('calls generateBuildLocusDeltaRequestOptions as expected', () => {
|
|
332
435
|
const generateBuildLocusDeltaRequestOptionsSpy = sinon.spy(
|
|
333
436
|
MeetingUtil,
|
|
@@ -663,7 +766,15 @@ describe('plugin-meetings', () => {
|
|
|
663
766
|
});
|
|
664
767
|
|
|
665
768
|
it('should post client event with error when join fails', async () => {
|
|
666
|
-
const joinError = new
|
|
769
|
+
const joinError = new WebexHttpError.TooManyRequests({
|
|
770
|
+
statusCode: 429,
|
|
771
|
+
body: {message: 'Locus rate limited'},
|
|
772
|
+
options: {
|
|
773
|
+
method: 'POST',
|
|
774
|
+
headers: {},
|
|
775
|
+
uri: 'https://locus.example.com/locus/api/v1/loci/call',
|
|
776
|
+
},
|
|
777
|
+
});
|
|
667
778
|
meeting.meetingRequest.joinMeeting.rejects(joinError);
|
|
668
779
|
meeting.meetingInfo = {meetingLookupUrl: 'test-lookup-url'};
|
|
669
780
|
|
|
@@ -942,6 +1053,55 @@ describe('plugin-meetings', () => {
|
|
|
942
1053
|
});
|
|
943
1054
|
});
|
|
944
1055
|
|
|
1056
|
+
describe('canViewTheParticipantList', () => {
|
|
1057
|
+
it('returns true when both VIEW_THE_PARTICIPANT_LIST and CAN_VIEW_THE_PARTICIPANT_LIST hints are present and canNotViewTheParticipantList is false', () => {
|
|
1058
|
+
assert.isTrue(
|
|
1059
|
+
MeetingUtil.canViewTheParticipantList(
|
|
1060
|
+
['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
|
|
1061
|
+
false
|
|
1062
|
+
)
|
|
1063
|
+
);
|
|
1064
|
+
});
|
|
1065
|
+
|
|
1066
|
+
it('returns false when VIEW_THE_PARTICIPANT_LIST hint is missing', () => {
|
|
1067
|
+
assert.isFalse(
|
|
1068
|
+
MeetingUtil.canViewTheParticipantList(['CAN_VIEW_THE_PARTICIPANT_LIST'], false)
|
|
1069
|
+
);
|
|
1070
|
+
});
|
|
1071
|
+
|
|
1072
|
+
it('returns false when CAN_VIEW_THE_PARTICIPANT_LIST hint is missing', () => {
|
|
1073
|
+
assert.isFalse(
|
|
1074
|
+
MeetingUtil.canViewTheParticipantList(['VIEW_THE_PARTICIPANT_LIST'], false)
|
|
1075
|
+
);
|
|
1076
|
+
});
|
|
1077
|
+
|
|
1078
|
+
it('returns false when canNotViewTheParticipantList is true', () => {
|
|
1079
|
+
assert.isFalse(
|
|
1080
|
+
MeetingUtil.canViewTheParticipantList(
|
|
1081
|
+
['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
|
|
1082
|
+
true
|
|
1083
|
+
)
|
|
1084
|
+
);
|
|
1085
|
+
});
|
|
1086
|
+
|
|
1087
|
+
it('returns false when display hints array is empty', () => {
|
|
1088
|
+
assert.isFalse(MeetingUtil.canViewTheParticipantList([], false));
|
|
1089
|
+
});
|
|
1090
|
+
|
|
1091
|
+
it('returns false when both conditions are violated', () => {
|
|
1092
|
+
assert.isFalse(MeetingUtil.canViewTheParticipantList([], true));
|
|
1093
|
+
});
|
|
1094
|
+
|
|
1095
|
+
it('returns true when canNotViewTheParticipantList is undefined (not yet set on meeting)', () => {
|
|
1096
|
+
assert.isTrue(
|
|
1097
|
+
MeetingUtil.canViewTheParticipantList(
|
|
1098
|
+
['VIEW_THE_PARTICIPANT_LIST', 'CAN_VIEW_THE_PARTICIPANT_LIST'],
|
|
1099
|
+
undefined
|
|
1100
|
+
)
|
|
1101
|
+
);
|
|
1102
|
+
});
|
|
1103
|
+
});
|
|
1104
|
+
|
|
945
1105
|
describe('canAttendeeRequestAiAssistantEnabled', () => {
|
|
946
1106
|
it('returns false when user is a cohost', () => {
|
|
947
1107
|
assert.deepEqual(
|
|
@@ -1150,6 +1310,10 @@ describe('plugin-meetings', () => {
|
|
|
1150
1310
|
{functionName: 'canSelectSpokenLanguages', displayHint: 'DISPLAY_NON_ENGLISH_ASR'},
|
|
1151
1311
|
{functionName: 'waitingForOthersToJoin', displayHint: 'WAITING_FOR_OTHERS'},
|
|
1152
1312
|
{functionName: 'showAutoEndMeetingWarning', displayHint: 'SHOW_AUTO_END_MEETING_WARNING'},
|
|
1313
|
+
{
|
|
1314
|
+
functionName: 'isAnonymizeDisplayNamesEnabled',
|
|
1315
|
+
displayHint: 'ANONYMOUS_DISPLAY_NAMES_ENABLED',
|
|
1316
|
+
},
|
|
1153
1317
|
].forEach(({functionName, displayHint}) => {
|
|
1154
1318
|
describe(functionName, () => {
|
|
1155
1319
|
it('works as expected', () => {
|
|
@@ -1260,12 +1424,16 @@ describe('plugin-meetings', () => {
|
|
|
1260
1424
|
MeetingUtil.parseInterpretationInfo(meeting, meetingInfo);
|
|
1261
1425
|
assert.calledWith(meeting.simultaneousInterpretation.updateMeetingSIEnabled, true, true);
|
|
1262
1426
|
assert.calledWith(meeting.simultaneousInterpretation.updateHostSIEnabled, true);
|
|
1263
|
-
assert.calledWith(
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1427
|
+
assert.calledWith(
|
|
1428
|
+
meeting.simultaneousInterpretation.updateInterpretation,
|
|
1429
|
+
{
|
|
1430
|
+
siLanguages: [
|
|
1431
|
+
{languageName: 'en', languageCode: 1},
|
|
1432
|
+
{languageName: 'es', languageCode: 2},
|
|
1433
|
+
],
|
|
1434
|
+
},
|
|
1435
|
+
{preserveSiEnabled: true}
|
|
1436
|
+
);
|
|
1269
1437
|
});
|
|
1270
1438
|
|
|
1271
1439
|
it('should update simultaneous interpretation settings with host SI disabled', () => {
|
|
@@ -1274,12 +1442,16 @@ describe('plugin-meetings', () => {
|
|
|
1274
1442
|
MeetingUtil.parseInterpretationInfo(meeting, meetingInfo);
|
|
1275
1443
|
assert.calledWith(meeting.simultaneousInterpretation.updateMeetingSIEnabled, true, false);
|
|
1276
1444
|
assert.calledWith(meeting.simultaneousInterpretation.updateHostSIEnabled, false);
|
|
1277
|
-
assert.calledWith(
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1445
|
+
assert.calledWith(
|
|
1446
|
+
meeting.simultaneousInterpretation.updateInterpretation,
|
|
1447
|
+
{
|
|
1448
|
+
siLanguages: [
|
|
1449
|
+
{languageName: 'en', languageCode: 1},
|
|
1450
|
+
{languageName: 'es', languageCode: 2},
|
|
1451
|
+
],
|
|
1452
|
+
},
|
|
1453
|
+
{preserveSiEnabled: true}
|
|
1454
|
+
);
|
|
1283
1455
|
});
|
|
1284
1456
|
it('should update simultaneous interpretation settings with SI disabled', () => {
|
|
1285
1457
|
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 () => {
|