@webex/plugin-meetings 3.8.1-web-workers-keepalive.1 → 3.9.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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +24 -2
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +39 -85
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/brbState.js +14 -12
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +274 -140
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +19 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/type.js +7 -0
- package/dist/meeting/type.js.map +1 -0
- package/dist/meeting/util.js +68 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +35 -33
- package/dist/meetings/index.js.map +1 -1
- package/dist/member/index.js.map +1 -1
- package/dist/members/index.js +11 -9
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +3 -3
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +18 -6
- package/dist/members/util.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +34 -5
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +42 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +32 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/types/constants.d.ts +22 -0
- package/dist/types/locus-info/index.d.ts +0 -9
- package/dist/types/meeting/brbState.d.ts +0 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
- package/dist/types/meeting/index.d.ts +40 -19
- package/dist/types/meeting/request.d.ts +9 -1
- package/dist/types/meeting/request.type.d.ts +74 -0
- package/dist/types/meeting/type.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +3 -0
- package/dist/types/members/index.d.ts +10 -7
- package/dist/types/members/request.d.ts +1 -1
- package/dist/types/members/util.d.ts +7 -3
- package/dist/types/multistream/remoteMedia.d.ts +20 -1
- package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
- package/dist/types/multistream/sendSlotManager.d.ts +16 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -23
- package/src/constants.ts +23 -2
- package/src/locus-info/index.ts +48 -86
- package/src/meeting/brbState.ts +9 -7
- package/src/meeting/in-meeting-actions.ts +13 -0
- package/src/meeting/index.ts +165 -38
- package/src/meeting/request.ts +16 -0
- package/src/meeting/request.type.ts +64 -0
- package/src/meeting/type.ts +9 -0
- package/src/meeting/util.ts +73 -2
- package/src/meetings/index.ts +3 -2
- package/src/member/index.ts +1 -0
- package/src/members/index.ts +13 -10
- package/src/members/request.ts +2 -2
- package/src/members/util.ts +16 -4
- package/src/multistream/mediaRequestManager.ts +7 -7
- package/src/multistream/remoteMedia.ts +34 -4
- package/src/multistream/remoteMediaGroup.ts +37 -2
- package/src/multistream/sendSlotManager.ts +34 -2
- package/test/unit/spec/locus-info/index.js +199 -83
- package/test/unit/spec/meeting/brbState.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +729 -80
- package/test/unit/spec/meeting/request.js +71 -0
- package/test/unit/spec/meeting/utils.js +122 -1
- package/test/unit/spec/meetings/index.js +2 -0
- package/test/unit/spec/members/index.js +68 -9
- package/test/unit/spec/members/request.js +2 -2
- package/test/unit/spec/members/utils.js +27 -7
- package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
- package/test/unit/spec/multistream/remoteMedia.ts +66 -2
- package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
- package/test/unit/spec/reachability/index.ts +3 -1
@@ -305,7 +305,7 @@ describe('plugin-meetings', () => {
|
|
305
305
|
{state: newControls.rdcControl}
|
306
306
|
);
|
307
307
|
});
|
308
|
-
|
308
|
+
|
309
309
|
it('should trigger the CONTROLS_POLLING_QA_CHANGED event when necessary', () => {
|
310
310
|
locusInfo.controls = {};
|
311
311
|
locusInfo.emitScoped = sinon.stub();
|
@@ -834,39 +834,6 @@ describe('plugin-meetings', () => {
|
|
834
834
|
);
|
835
835
|
});
|
836
836
|
|
837
|
-
it('should update the deltaParticipants object', () => {
|
838
|
-
const prev = locusInfo.deltaParticipants;
|
839
|
-
|
840
|
-
locusInfo.updateParticipantDeltas(newParticipants);
|
841
|
-
|
842
|
-
assert.notEqual(locusInfo.deltaParticipants, prev);
|
843
|
-
});
|
844
|
-
|
845
|
-
it('should update the delta property on all changed states', () => {
|
846
|
-
locusInfo.updateParticipantDeltas(newParticipants);
|
847
|
-
|
848
|
-
const [exampleParticipant] = locusInfo.deltaParticipants;
|
849
|
-
|
850
|
-
assert.isTrue(exampleParticipant.delta.audioStatus);
|
851
|
-
assert.isTrue(exampleParticipant.delta.videoSlidesStatus);
|
852
|
-
assert.isTrue(exampleParticipant.delta.videoStatus);
|
853
|
-
});
|
854
|
-
|
855
|
-
it('should include the person details of the changed participant', () => {
|
856
|
-
locusInfo.updateParticipantDeltas(newParticipants);
|
857
|
-
|
858
|
-
const [exampleParticipant] = locusInfo.deltaParticipants;
|
859
|
-
|
860
|
-
assert.equal(exampleParticipant.person, newParticipants[0].person);
|
861
|
-
});
|
862
|
-
|
863
|
-
it('should clear deltaParticipants when no changes occured', () => {
|
864
|
-
locusInfo.participants = [...newParticipants];
|
865
|
-
|
866
|
-
locusInfo.updateParticipantDeltas(locusInfo.participants);
|
867
|
-
|
868
|
-
assert.isTrue(locusInfo.deltaParticipants.length === 0);
|
869
|
-
});
|
870
837
|
|
871
838
|
it('should call with participant display name', () => {
|
872
839
|
const failureParticipant = [
|
@@ -1674,6 +1641,28 @@ describe('plugin-meetings', () => {
|
|
1674
1641
|
);
|
1675
1642
|
});
|
1676
1643
|
|
1644
|
+
it('should trigger MEETING_INFO_UPDATED even if the roles array is empty', () => {
|
1645
|
+
const initialInfo = cloneDeep(meetingInfo);
|
1646
|
+
|
1647
|
+
const updateSelf = cloneDeep(self);
|
1648
|
+
updateSelf.controls.role.roles = [];
|
1649
|
+
|
1650
|
+
locusInfo.emitScoped = sinon.stub();
|
1651
|
+
locusInfo.updateMeetingInfo(initialInfo, updateSelf);
|
1652
|
+
|
1653
|
+
assert.calledWith(
|
1654
|
+
locusInfo.emitScoped,
|
1655
|
+
{
|
1656
|
+
file: 'locus-info',
|
1657
|
+
function: 'updateMeetingInfo',
|
1658
|
+
},
|
1659
|
+
LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
|
1660
|
+
{
|
1661
|
+
isInitializing: !self,
|
1662
|
+
}
|
1663
|
+
);
|
1664
|
+
});
|
1665
|
+
|
1677
1666
|
const checkMeetingInfoUpdatedCalled = (expected, payload) => {
|
1678
1667
|
const expectedArgs = [
|
1679
1668
|
locusInfo.emitScoped,
|
@@ -2108,6 +2097,38 @@ describe('plugin-meetings', () => {
|
|
2108
2097
|
assert.isFunction(locusParser.onDeltaAction);
|
2109
2098
|
});
|
2110
2099
|
|
2100
|
+
it("#updateLocusInfo invokes updateLocusUrl before updateMeetingInfo", () => {
|
2101
|
+
const callOrder = [];
|
2102
|
+
sinon.stub(locusInfo, "updateControls");
|
2103
|
+
sinon.stub(locusInfo, "updateConversationUrl");
|
2104
|
+
sinon.stub(locusInfo, "updateCreated");
|
2105
|
+
sinon.stub(locusInfo, "updateFullState");
|
2106
|
+
sinon.stub(locusInfo, "updateHostInfo");
|
2107
|
+
sinon.stub(locusInfo, "updateMeetingInfo").callsFake(() => {
|
2108
|
+
callOrder.push("updateMeetingInfo");
|
2109
|
+
});
|
2110
|
+
sinon.stub(locusInfo, "updateMediaShares");
|
2111
|
+
sinon.stub(locusInfo, "updateParticipantsUrl");
|
2112
|
+
sinon.stub(locusInfo, "updateReplace");
|
2113
|
+
sinon.stub(locusInfo, "updateSelf");
|
2114
|
+
sinon.stub(locusInfo, "updateLocusUrl").callsFake(() => {
|
2115
|
+
callOrder.push("updateLocusUrl");
|
2116
|
+
});
|
2117
|
+
sinon.stub(locusInfo, "updateAclUrl");
|
2118
|
+
sinon.stub(locusInfo, "updateBasequence");
|
2119
|
+
sinon.stub(locusInfo, "updateSequence");
|
2120
|
+
sinon.stub(locusInfo, "updateMemberShip");
|
2121
|
+
sinon.stub(locusInfo, "updateIdentifiers");
|
2122
|
+
sinon.stub(locusInfo, "updateEmbeddedApps");
|
2123
|
+
sinon.stub(locusInfo, "updateResources");
|
2124
|
+
sinon.stub(locusInfo, "compareAndUpdate");
|
2125
|
+
|
2126
|
+
locusInfo.updateLocusInfo(locus);
|
2127
|
+
|
2128
|
+
// Ensure updateLocusUrl is called before updateMeetingInfo if both are called
|
2129
|
+
assert.deepEqual(callOrder, ['updateLocusUrl', 'updateMeetingInfo']);
|
2130
|
+
});
|
2131
|
+
|
2111
2132
|
it('#updateLocusInfo ignores breakout LEFT message', () => {
|
2112
2133
|
const newLocus = {
|
2113
2134
|
self: {
|
@@ -2159,10 +2180,11 @@ describe('plugin-meetings', () => {
|
|
2159
2180
|
assert.notCalled(locusInfo.compareAndUpdate);
|
2160
2181
|
});
|
2161
2182
|
|
2183
|
+
|
2184
|
+
|
2162
2185
|
it('onFullLocus() updates the working-copy of locus parser', () => {
|
2163
2186
|
const eventType = 'fakeEvent';
|
2164
2187
|
|
2165
|
-
sandbox.stub(locusInfo, 'updateParticipantDeltas');
|
2166
2188
|
sandbox.stub(locusInfo, 'updateLocusInfo');
|
2167
2189
|
sandbox.stub(locusInfo, 'updateParticipants');
|
2168
2190
|
sandbox.stub(locusInfo, 'isMeetingActive');
|
@@ -2182,7 +2204,6 @@ describe('plugin-meetings', () => {
|
|
2182
2204
|
const oldWorkingCopy = locusParser.workingCopy;
|
2183
2205
|
|
2184
2206
|
const spies = [
|
2185
|
-
sandbox.stub(locusInfo, 'updateParticipantDeltas'),
|
2186
2207
|
sandbox.stub(locusInfo, 'updateLocusInfo'),
|
2187
2208
|
sandbox.stub(locusInfo, 'updateParticipants'),
|
2188
2209
|
sandbox.stub(locusInfo, 'isMeetingActive'),
|
@@ -2257,7 +2278,7 @@ describe('plugin-meetings', () => {
|
|
2257
2278
|
|
2258
2279
|
it('applyLocusDeltaData gets delta locus on DESYNC action if we have a syncUrl', () => {
|
2259
2280
|
const {DESYNC} = LocusDeltaParser.loci;
|
2260
|
-
const fakeDeltaLocus = {id: 'fake delta locus'};
|
2281
|
+
const fakeDeltaLocus = {baseSequence: {}, id: 'fake delta locus'};
|
2261
2282
|
const meeting = {
|
2262
2283
|
meetingRequest: {
|
2263
2284
|
getLocusDTO: sandbox.stub().resolves({body: fakeDeltaLocus}),
|
@@ -2392,25 +2413,22 @@ describe('plugin-meetings', () => {
|
|
2392
2413
|
};
|
2393
2414
|
});
|
2394
2415
|
|
2395
|
-
it('applyLocusDeltaData gets full locus on DESYNC action if we do not have a syncUrl and destroys the meeting if that fails', () => {
|
2416
|
+
it('applyLocusDeltaData gets full locus on DESYNC action if we do not have a syncUrl and destroys the meeting if that fails', async () => {
|
2396
2417
|
meeting.meetingRequest.getLocusDTO.rejects(new Error('fake error'));
|
2397
2418
|
|
2398
2419
|
locusInfo.locusParser.workingCopy = {}; // no syncUrl
|
2399
2420
|
|
2400
|
-
|
2401
|
-
// we will wait and stub it's last function to resolve this waiting promise.
|
2402
|
-
return new Promise((resolve) => {
|
2403
|
-
webex.meetings.destroy.callsFake(() => resolve());
|
2404
|
-
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
2405
|
-
}).then(() => {
|
2406
|
-
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'fullSyncUrl'});
|
2421
|
+
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
2407
2422
|
|
2408
|
-
|
2409
|
-
assert.notCalled(meeting.locusInfo.onFullLocus);
|
2410
|
-
assert.notCalled(locusInfo.locusParser.resume);
|
2423
|
+
await testUtils.flushPromises();
|
2411
2424
|
|
2412
|
-
|
2413
|
-
|
2425
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'fullSyncUrl'});
|
2426
|
+
|
2427
|
+
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
2428
|
+
assert.notCalled(meeting.locusInfo.onFullLocus);
|
2429
|
+
assert.notCalled(locusInfo.locusParser.resume);
|
2430
|
+
|
2431
|
+
assert.calledOnceWithExactly(webex.meetings.destroy, meeting, 'LOCUS_DTO_SYNC_FAILED');
|
2414
2432
|
});
|
2415
2433
|
|
2416
2434
|
it('applyLocusDeltaData first tries a delta sync on DESYNC action and if that fails, does a full locus sync', () => {
|
@@ -2447,39 +2465,62 @@ describe('plugin-meetings', () => {
|
|
2447
2465
|
});
|
2448
2466
|
});
|
2449
2467
|
|
2450
|
-
it('applyLocusDeltaData
|
2468
|
+
it('applyLocusDeltaData first tries a delta sync on DESYNC action and if that fails with 403, it does not do a full locus sync', async () => {
|
2469
|
+
const fake403Error = new Error('fake error');
|
2470
|
+
fake403Error.statusCode = 403;
|
2471
|
+
|
2472
|
+
meeting.meetingRequest.getLocusDTO.onCall(0).rejects(fake403Error);
|
2473
|
+
|
2474
|
+
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
2475
|
+
|
2476
|
+
await testUtils.flushPromises();
|
2477
|
+
|
2478
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'deltaSyncUrl'});
|
2479
|
+
|
2480
|
+
assert.calledWith(sendBehavioralMetricStub, 'js_sdk_locus_delta_sync_failed', {
|
2481
|
+
correlationId: meeting.correlationId,
|
2482
|
+
url: 'deltaSyncUrl',
|
2483
|
+
reason: 'fake error',
|
2484
|
+
errorName: 'Error',
|
2485
|
+
stack: sinon.match.any,
|
2486
|
+
code: sinon.match.any,
|
2487
|
+
});
|
2488
|
+
|
2489
|
+
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
2490
|
+
assert.notCalled(meeting.locusInfo.onFullLocus);
|
2491
|
+
assert.notCalled(locusInfo.locusParser.resume);
|
2492
|
+
});
|
2493
|
+
|
2494
|
+
it('applyLocusDeltaData destroys the meeting if both delta sync and full sync fail', async () => {
|
2451
2495
|
meeting.meetingRequest.getLocusDTO.rejects(new Error('fake error'));
|
2452
2496
|
|
2453
|
-
|
2454
|
-
// we will wait and stub it's last function to resolve this waiting promise.
|
2455
|
-
return new Promise((resolve) => {
|
2456
|
-
webex.meetings.destroy.callsFake(() => resolve());
|
2457
|
-
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
2458
|
-
}).then(() => {
|
2459
|
-
assert.calledTwice(meeting.meetingRequest.getLocusDTO);
|
2497
|
+
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
2460
2498
|
|
2461
|
-
|
2462
|
-
{url: 'deltaSyncUrl'},
|
2463
|
-
]);
|
2464
|
-
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [
|
2465
|
-
{url: 'fullSyncUrl'},
|
2466
|
-
]);
|
2499
|
+
await testUtils.flushPromises();
|
2467
2500
|
|
2468
|
-
|
2469
|
-
correlationId: meeting.correlationId,
|
2470
|
-
url: 'deltaSyncUrl',
|
2471
|
-
reason: 'fake error',
|
2472
|
-
errorName: 'Error',
|
2473
|
-
stack: sinon.match.any,
|
2474
|
-
code: sinon.match.any,
|
2475
|
-
});
|
2501
|
+
assert.calledTwice(meeting.meetingRequest.getLocusDTO);
|
2476
2502
|
|
2477
|
-
|
2478
|
-
|
2479
|
-
|
2503
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [
|
2504
|
+
{url: 'deltaSyncUrl'},
|
2505
|
+
]);
|
2506
|
+
assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [
|
2507
|
+
{url: 'fullSyncUrl'},
|
2508
|
+
]);
|
2480
2509
|
|
2481
|
-
|
2510
|
+
assert.calledWith(sendBehavioralMetricStub, 'js_sdk_locus_delta_sync_failed', {
|
2511
|
+
correlationId: meeting.correlationId,
|
2512
|
+
url: 'deltaSyncUrl',
|
2513
|
+
reason: 'fake error',
|
2514
|
+
errorName: 'Error',
|
2515
|
+
stack: sinon.match.any,
|
2516
|
+
code: sinon.match.any,
|
2482
2517
|
});
|
2518
|
+
|
2519
|
+
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
2520
|
+
assert.notCalled(meeting.locusInfo.onFullLocus);
|
2521
|
+
assert.notCalled(locusInfo.locusParser.resume);
|
2522
|
+
|
2523
|
+
assert.calledOnceWithExactly(webex.meetings.destroy, meeting, 'LOCUS_DTO_SYNC_FAILED');
|
2483
2524
|
});
|
2484
2525
|
});
|
2485
2526
|
|
@@ -2509,9 +2550,7 @@ describe('plugin-meetings', () => {
|
|
2509
2550
|
});
|
2510
2551
|
|
2511
2552
|
it('onDeltaLocus merges delta participants with existing participants', () => {
|
2512
|
-
const FAKE_DELTA_PARTICIPANTS = [
|
2513
|
-
{id: '1111'}, {id: '2222'}
|
2514
|
-
]
|
2553
|
+
const FAKE_DELTA_PARTICIPANTS = [{id: '1111'}, {id: '2222'}];
|
2515
2554
|
fakeLocus.participants = FAKE_DELTA_PARTICIPANTS;
|
2516
2555
|
|
2517
2556
|
sinon.spy(locusInfo, 'mergeParticipants');
|
@@ -2519,9 +2558,87 @@ describe('plugin-meetings', () => {
|
|
2519
2558
|
const existingParticipants = locusInfo.participants;
|
2520
2559
|
|
2521
2560
|
locusInfo.onDeltaLocus(fakeLocus);
|
2522
|
-
assert.calledOnceWithExactly(
|
2561
|
+
assert.calledOnceWithExactly(
|
2562
|
+
locusInfo.mergeParticipants,
|
2563
|
+
existingParticipants,
|
2564
|
+
FAKE_DELTA_PARTICIPANTS
|
2565
|
+
);
|
2523
2566
|
assert.calledWith(locusInfo.updateParticipants, FAKE_DELTA_PARTICIPANTS, false);
|
2524
2567
|
});
|
2568
|
+
|
2569
|
+
[true, false].forEach((isDelta) =>
|
2570
|
+
it(`applyLocusDeltaData - handles empty ${
|
2571
|
+
isDelta ? 'delta' : 'full'
|
2572
|
+
} DTO in response`, async () => {
|
2573
|
+
const {DESYNC} = LocusDeltaParser.loci;
|
2574
|
+
const fakeFullLocusDto = {};
|
2575
|
+
const meeting = {
|
2576
|
+
meetingRequest: {
|
2577
|
+
getLocusDTO: sandbox.stub().resolves({body: fakeFullLocusDto}),
|
2578
|
+
},
|
2579
|
+
locusInfo: {
|
2580
|
+
onFullLocus: sandbox.stub(),
|
2581
|
+
handleLocusDelta: sandbox.stub(),
|
2582
|
+
},
|
2583
|
+
locusUrl: 'fake locus FULL url',
|
2584
|
+
};
|
2585
|
+
|
2586
|
+
sinon.stub(locusInfo.locusParser, 'resume').resolves();
|
2587
|
+
|
2588
|
+
if (isDelta) {
|
2589
|
+
locusInfo.locusParser.workingCopy = {syncUrl: 'fake locus DELTA url'};
|
2590
|
+
} else {
|
2591
|
+
locusInfo.locusParser.workingCopy = {}; // no syncUrl (to trigger FULL DTO request)
|
2592
|
+
}
|
2593
|
+
|
2594
|
+
await locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
2595
|
+
|
2596
|
+
await testUtils.flushPromises();
|
2597
|
+
|
2598
|
+
if (isDelta) {
|
2599
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {
|
2600
|
+
url: 'fake locus DELTA url',
|
2601
|
+
});
|
2602
|
+
} else {
|
2603
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {
|
2604
|
+
url: 'fake locus FULL url',
|
2605
|
+
});
|
2606
|
+
}
|
2607
|
+
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
2608
|
+
assert.notCalled(meeting.locusInfo.onFullLocus);
|
2609
|
+
assert.calledOnce(locusInfo.locusParser.resume);
|
2610
|
+
})
|
2611
|
+
);
|
2612
|
+
|
2613
|
+
it(`applyLocusDeltaData - handles the case when we get FULL DTO when we asked for DELTA DTO`, async () => {
|
2614
|
+
const {DESYNC} = LocusDeltaParser.loci;
|
2615
|
+
const fakeFullLocusDto = {someStuff: 'data'}; // non-empty DTO, without baseSequence
|
2616
|
+
const meeting = {
|
2617
|
+
meetingRequest: {
|
2618
|
+
getLocusDTO: sandbox.stub().resolves({body: fakeFullLocusDto}),
|
2619
|
+
},
|
2620
|
+
locusInfo: {
|
2621
|
+
onFullLocus: sandbox.stub(),
|
2622
|
+
handleLocusDelta: sandbox.stub(),
|
2623
|
+
},
|
2624
|
+
locusUrl: 'fake locus FULL url',
|
2625
|
+
};
|
2626
|
+
|
2627
|
+
sinon.stub(locusInfo.locusParser, 'resume').resolves();
|
2628
|
+
|
2629
|
+
locusInfo.locusParser.workingCopy = {syncUrl: 'fake locus DELTA url'};
|
2630
|
+
|
2631
|
+
await locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
2632
|
+
|
2633
|
+
await testUtils.flushPromises();
|
2634
|
+
|
2635
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {
|
2636
|
+
url: 'fake locus DELTA url',
|
2637
|
+
});
|
2638
|
+
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
2639
|
+
assert.calledOnceWithExactly(meeting.locusInfo.onFullLocus, fakeFullLocusDto);
|
2640
|
+
assert.calledOnce(locusInfo.locusParser.resume);
|
2641
|
+
});
|
2525
2642
|
});
|
2526
2643
|
|
2527
2644
|
describe('#updateLocusCache', () => {
|
@@ -2934,10 +3051,9 @@ describe('plugin-meetings', () => {
|
|
2934
3051
|
beforeEach(() => {
|
2935
3052
|
clock = sinon.useFakeTimers();
|
2936
3053
|
|
2937
|
-
sinon.stub(locusInfo, 'updateParticipantDeltas');
|
2938
3054
|
sinon.stub(locusInfo, 'updateParticipants');
|
2939
|
-
sinon.stub(locusInfo, 'isMeetingActive')
|
2940
|
-
sinon.stub(locusInfo, 'handleOneOnOneEvent')
|
3055
|
+
sinon.stub(locusInfo, 'isMeetingActive');
|
3056
|
+
sinon.stub(locusInfo, 'handleOneOnOneEvent');
|
2941
3057
|
(updateLocusInfoStub = sinon.stub(locusInfo, 'updateLocusInfo'));
|
2942
3058
|
syncRequestStub = sinon.stub().resolves({body: {}});
|
2943
3059
|
|
@@ -3,12 +3,12 @@ import {assert, expect} from '@webex/test-helper-chai';
|
|
3
3
|
|
4
4
|
import testUtils from '../../../utils/testUtils';
|
5
5
|
import {BrbState, createBrbState} from '@webex/plugin-meetings/src/meeting/brbState';
|
6
|
-
import
|
6
|
+
import {MediaType} from '@webex/internal-media-core';
|
7
7
|
|
8
8
|
describe('plugin-meetings', () => {
|
9
9
|
let meeting: any;
|
10
10
|
let brbState: BrbState;
|
11
|
-
let setBrbStub: sinon.SinonStub;
|
11
|
+
let setBrbStub: sinon.SinonStub;
|
12
12
|
|
13
13
|
beforeEach(async () => {
|
14
14
|
meeting = {
|
@@ -23,7 +23,7 @@ describe('plugin-meetings', () => {
|
|
23
23
|
setSourceStateOverride: sinon.stub(),
|
24
24
|
},
|
25
25
|
meetingRequest: {
|
26
|
-
setBrb: () => {}
|
26
|
+
setBrb: () => {},
|
27
27
|
},
|
28
28
|
};
|
29
29
|
|
@@ -104,12 +104,12 @@ describe('plugin-meetings', () => {
|
|
104
104
|
assert.isTrue(meeting.meetingRequest.setBrb.calledOnce);
|
105
105
|
});
|
106
106
|
|
107
|
-
it('
|
107
|
+
it('updates source state override', async () => {
|
108
108
|
brbState.enable(true, meeting.sendSlotManager);
|
109
109
|
brbState.handleServerBrbUpdate(true);
|
110
110
|
await testUtils.flushPromises();
|
111
111
|
|
112
|
-
assert.isTrue(meeting.sendSlotManager.setSourceStateOverride.
|
112
|
+
assert.isTrue(meeting.sendSlotManager.setSourceStateOverride.called);
|
113
113
|
});
|
114
114
|
|
115
115
|
it('handles server update', async () => {
|
@@ -141,12 +141,12 @@ describe('plugin-meetings', () => {
|
|
141
141
|
it('should reject when sendLocalBrbStateToServer fails', async () => {
|
142
142
|
const error = new Error('send failed');
|
143
143
|
setBrbStub.rejects(error);
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
).to.be.rejectedWith(error);
|
144
|
+
|
145
|
+
const enablePromise = brbState.enable(true, meeting.sendSlotManager);
|
146
|
+
await expect(enablePromise).to.be.rejectedWith(error);
|
148
147
|
|
149
148
|
assert.isFalse(brbState.state.syncToServerInProgress);
|
149
|
+
expect(meeting.sendSlotManager.setSourceStateOverride.called).to.be.false;
|
150
150
|
});
|
151
151
|
});
|
152
152
|
});
|
@@ -32,6 +32,9 @@ describe('plugin-meetings', () => {
|
|
32
32
|
isClosedCaptionActive: null,
|
33
33
|
canStartManualCaption: null,
|
34
34
|
canStopManualCaption: null,
|
35
|
+
isLocalRecordingStarted: null,
|
36
|
+
isLocalRecordingStopped: null,
|
37
|
+
isLocalRecordingPaused: null,
|
35
38
|
isManualCaptionActive: null,
|
36
39
|
isPremiseRecordingEnabled: null,
|
37
40
|
isSaveTranscriptsEnabled: null,
|
@@ -129,6 +132,9 @@ describe('plugin-meetings', () => {
|
|
129
132
|
'canPauseRecording',
|
130
133
|
'canResumeRecording',
|
131
134
|
'canStopRecording',
|
135
|
+
'isLocalRecordingStarted',
|
136
|
+
'isLocalRecordingStopped',
|
137
|
+
'isLocalRecordingPaused',
|
132
138
|
'canSetMuteOnEntry',
|
133
139
|
'canUnsetMuteOnEntry',
|
134
140
|
'canSetDisallowUnmute',
|