@webex/plugin-meetings 3.12.0-next.32 → 3.12.0-next.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +6 -2
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +0 -4
- package/dist/locus-info/index.js.map +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/breakouts/breakout.ts +2 -1
- package/src/locus-info/index.ts +0 -7
- package/test/unit/spec/breakouts/breakout.ts +7 -3
- package/test/unit/spec/locus-info/index.js +60 -10
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
|
@@ -165,7 +165,8 @@ const Breakout = WebexPlugin.extend({
|
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
this.breakoutRosterLocus = locus;
|
|
168
|
-
|
|
168
|
+
// The roster via breakout roster event is full roster, use replace strategy to update the members
|
|
169
|
+
this.members.locusParticipantsUpdate({participants: locus.participants, isReplace: true});
|
|
169
170
|
},
|
|
170
171
|
|
|
171
172
|
/**
|
package/src/locus-info/index.ts
CHANGED
|
@@ -710,13 +710,6 @@ export default class LocusInfo extends EventsScope {
|
|
|
710
710
|
|
|
711
711
|
// Active parser found - pass the API response to it
|
|
712
712
|
if (isWrapped) {
|
|
713
|
-
if (!responseBody.dataSets) {
|
|
714
|
-
this.sendClassicVsHashTreeMismatchMetric(
|
|
715
|
-
meeting,
|
|
716
|
-
`expected hash tree dataSets in API response but they are missing`
|
|
717
|
-
);
|
|
718
|
-
// continuing as we can still manage without responseBody.dataSets, but this is very suspicious
|
|
719
|
-
}
|
|
720
713
|
LoggerProxy.logger.info(
|
|
721
714
|
'Locus-info:index#handleLocusAPIResponse --> passing Locus API response to HashTreeParser: ',
|
|
722
715
|
responseBody
|
|
@@ -217,10 +217,14 @@ describe('plugin-meetings', () => {
|
|
|
217
217
|
locusParticipantsUpdate: sinon.stub(),
|
|
218
218
|
};
|
|
219
219
|
|
|
220
|
-
const locusData = {
|
|
220
|
+
const locusData = {participants: [{id: 'participant-1'}], sequence: {entries: [123]}};
|
|
221
221
|
const result = breakout.parseRoster(locusData);
|
|
222
222
|
|
|
223
|
-
assert.calledOnceWithExactly(breakout.members.locusParticipantsUpdate,
|
|
223
|
+
assert.calledOnceWithExactly(breakout.members.locusParticipantsUpdate, {
|
|
224
|
+
participants: [{id: 'participant-1'}],
|
|
225
|
+
isReplace: true,
|
|
226
|
+
});
|
|
227
|
+
assert.equal(breakout.breakoutRosterLocus, locusData);
|
|
224
228
|
assert.equal(result, undefined);
|
|
225
229
|
});
|
|
226
230
|
it('not call locusParticipantsUpdate if sequence is expired', () => {
|
|
@@ -228,7 +232,7 @@ describe('plugin-meetings', () => {
|
|
|
228
232
|
locusParticipantsUpdate: sinon.stub(),
|
|
229
233
|
};
|
|
230
234
|
breakout.isNeedHandleRoster = sinon.stub().returns(false);
|
|
231
|
-
const locusData = {
|
|
235
|
+
const locusData = {participants: [{id: 'participant-1'}], sequence: {entries: [123]}};
|
|
232
236
|
breakout.parseRoster(locusData);
|
|
233
237
|
|
|
234
238
|
assert.notCalled(breakout.members.locusParticipantsUpdate);
|
|
@@ -3385,6 +3385,51 @@ describe('plugin-meetings', () => {
|
|
|
3385
3385
|
|
|
3386
3386
|
assert.calledOnceWithExactly(parserA.handleMessage, message);
|
|
3387
3387
|
});
|
|
3388
|
+
|
|
3389
|
+
it('should send mismatch metric when eventType is not HASH_TREE_DATA_UPDATED', () => {
|
|
3390
|
+
const locusUrlA = 'http://locus-url-A.com';
|
|
3391
|
+
const parserA = {state: 'active', handleMessage: sinon.stub()};
|
|
3392
|
+
locusInfo.hashTreeParsers.set(locusUrlA, {parser: parserA, initializedFromHashTree: true});
|
|
3393
|
+
|
|
3394
|
+
locusInfo.parse(mockMeeting, {
|
|
3395
|
+
eventType: LOCUSEVENT.SELF_CHANGED,
|
|
3396
|
+
stateElementsMessage: {locusUrl: locusUrlA, locusStateElements: [], dataSets: []},
|
|
3397
|
+
});
|
|
3398
|
+
|
|
3399
|
+
assert.calledOnceWithExactly(
|
|
3400
|
+
sendBehavioralMetricStub,
|
|
3401
|
+
'js_sdk_locus_classic_vs_hash_tree_mismatch',
|
|
3402
|
+
{
|
|
3403
|
+
correlationId: mockMeeting.correlationId,
|
|
3404
|
+
message: `got ${LOCUSEVENT.SELF_CHANGED}, expected ${LOCUSEVENT.HASH_TREE_DATA_UPDATED}`,
|
|
3405
|
+
}
|
|
3406
|
+
);
|
|
3407
|
+
assert.notCalled(parserA.handleMessage);
|
|
3408
|
+
});
|
|
3409
|
+
});
|
|
3410
|
+
|
|
3411
|
+
describe('#sendClassicVsHashTreeMismatchMetric', () => {
|
|
3412
|
+
it('should send the metric when called for the first time', () => {
|
|
3413
|
+
locusInfo.sendClassicVsHashTreeMismatchMetric(mockMeeting, 'some mismatch');
|
|
3414
|
+
|
|
3415
|
+
assert.calledOnceWithExactly(
|
|
3416
|
+
sendBehavioralMetricStub,
|
|
3417
|
+
'js_sdk_locus_classic_vs_hash_tree_mismatch',
|
|
3418
|
+
{
|
|
3419
|
+
correlationId: mockMeeting.correlationId,
|
|
3420
|
+
message: 'some mismatch',
|
|
3421
|
+
}
|
|
3422
|
+
);
|
|
3423
|
+
});
|
|
3424
|
+
|
|
3425
|
+
it('should send the metric up to 5 times and stop after that', () => {
|
|
3426
|
+
for (let i = 0; i < 7; i += 1) {
|
|
3427
|
+
locusInfo.sendClassicVsHashTreeMismatchMetric(mockMeeting, `mismatch ${i}`);
|
|
3428
|
+
}
|
|
3429
|
+
|
|
3430
|
+
assert.callCount(sendBehavioralMetricStub, 5);
|
|
3431
|
+
assert.equal(locusInfo.classicVsHashTreeMismatchMetricCounter, 5);
|
|
3432
|
+
});
|
|
3388
3433
|
});
|
|
3389
3434
|
|
|
3390
3435
|
describe('#handleLocusAPIResponse', () => {
|
|
@@ -3440,19 +3485,24 @@ describe('plugin-meetings', () => {
|
|
|
3440
3485
|
assert.calledOnceWithExactly(locusInfo.handleLocusDelta, fakeLocus, mockMeeting);
|
|
3441
3486
|
});
|
|
3442
3487
|
|
|
3443
|
-
it('should send mismatch metric
|
|
3488
|
+
it('should send mismatch metric in classic mode when wrapped response has dataSets', () => {
|
|
3444
3489
|
const fakeLocus = {url: 'http://locus-url.com'};
|
|
3445
|
-
|
|
3446
|
-
locusInfo.hashTreeParsers.set(fakeLocus.url, {
|
|
3447
|
-
parser: mockHashTreeParser,
|
|
3448
|
-
initializedFromHashTree: true,
|
|
3449
|
-
});
|
|
3450
|
-
sinon.stub(locusInfo, 'sendClassicVsHashTreeMismatchMetric');
|
|
3490
|
+
sinon.stub(locusInfo, 'handleLocusDelta');
|
|
3451
3491
|
|
|
3452
|
-
locusInfo.handleLocusAPIResponse(mockMeeting, {
|
|
3492
|
+
locusInfo.handleLocusAPIResponse(mockMeeting, {
|
|
3493
|
+
locus: fakeLocus,
|
|
3494
|
+
dataSets: [{name: 'dataset1', url: 'test-url'}],
|
|
3495
|
+
});
|
|
3453
3496
|
|
|
3454
|
-
assert.
|
|
3455
|
-
|
|
3497
|
+
assert.calledOnceWithExactly(
|
|
3498
|
+
sendBehavioralMetricStub,
|
|
3499
|
+
'js_sdk_locus_classic_vs_hash_tree_mismatch',
|
|
3500
|
+
{
|
|
3501
|
+
correlationId: mockMeeting.correlationId,
|
|
3502
|
+
message: 'unexpected hash tree dataSets in API response',
|
|
3503
|
+
}
|
|
3504
|
+
);
|
|
3505
|
+
assert.calledOnce(locusInfo.handleLocusDelta);
|
|
3456
3506
|
});
|
|
3457
3507
|
|
|
3458
3508
|
describe('parser switch via API response', () => {
|