@webex/plugin-meetings 3.0.0-beta.202 → 3.0.0-beta.204
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 +1 -0
- 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 +4 -4
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +3 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +315 -301
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +3 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
- package/dist/types/meeting/index.d.ts +5 -0
- package/dist/types/meeting/util.d.ts +1 -0
- package/package.json +19 -19
- package/src/constants.ts +1 -0
- package/src/locus-info/index.ts +8 -8
- package/src/meeting/in-meeting-actions.ts +4 -0
- package/src/meeting/index.ts +41 -26
- package/src/meeting/util.ts +2 -0
- package/test/unit/spec/locus-info/index.js +33 -23
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
- package/test/unit/spec/meeting/index.js +33 -9
- package/test/unit/spec/meeting/utils.js +7 -0
- package/test/unit/spec/meetings/index.js +1 -1
|
@@ -1409,14 +1409,19 @@ describe('plugin-meetings', () => {
|
|
|
1409
1409
|
it('emits MEETING_INFO_UPDATED and updates the meeting if the info changes', () => {
|
|
1410
1410
|
const initialInfo = cloneDeep(meetingInfo);
|
|
1411
1411
|
|
|
1412
|
-
|
|
1412
|
+
let expectedMeeting;
|
|
1413
1413
|
|
|
1414
|
-
|
|
1415
|
-
|
|
1414
|
+
/*
|
|
1415
|
+
When the event is triggered, it is required that the meeting has already
|
|
1416
|
+
been updated. This is why the meeting is being checked within the stubbed event emitter
|
|
1417
|
+
*/
|
|
1418
|
+
sinon.stub(locusInfo, 'emitScoped').callsFake(() => {
|
|
1419
|
+
assert.deepEqual(mockMeeting, expectedMeeting);
|
|
1420
|
+
})
|
|
1416
1421
|
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1422
|
+
|
|
1423
|
+
// set the info initially as locusInfo.info starts as undefined
|
|
1424
|
+
expectedMeeting = {
|
|
1420
1425
|
coHost: {
|
|
1421
1426
|
LOWER_SOMEONE_ELSES_HAND: true,
|
|
1422
1427
|
},
|
|
@@ -1430,17 +1435,19 @@ describe('plugin-meetings', () => {
|
|
|
1430
1435
|
ROSTER_IN_MEETING: true,
|
|
1431
1436
|
},
|
|
1432
1437
|
userDisplayHints: ['ROSTER_IN_MEETING', 'LOCK_STATUS_UNLOCKED'],
|
|
1433
|
-
}
|
|
1438
|
+
};
|
|
1439
|
+
locusInfo.updateMeetingInfo(initialInfo, self);
|
|
1440
|
+
|
|
1441
|
+
// since it was initially undefined, this should trigger the event
|
|
1442
|
+
|
|
1443
|
+
checkMeetingInfoUpdatedCalled(true);
|
|
1434
1444
|
|
|
1435
1445
|
const newInfo = cloneDeep(meetingInfo);
|
|
1436
1446
|
|
|
1437
1447
|
newInfo.displayHints.coHost = [DISPLAY_HINTS.LOCK_CONTROL_LOCK];
|
|
1438
1448
|
|
|
1439
1449
|
// Updating with different info should trigger the event
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
checkMeetingInfoUpdatedCalled(true);
|
|
1443
|
-
assert.deepEqual(mockMeeting, {
|
|
1450
|
+
expectedMeeting = {
|
|
1444
1451
|
coHost: {
|
|
1445
1452
|
LOWER_SOMEONE_ELSES_HAND: true,
|
|
1446
1453
|
LOCK_CONTROL_LOCK: true,
|
|
@@ -1455,14 +1462,13 @@ describe('plugin-meetings', () => {
|
|
|
1455
1462
|
ROSTER_IN_MEETING: true,
|
|
1456
1463
|
},
|
|
1457
1464
|
userDisplayHints: ['ROSTER_IN_MEETING', 'LOCK_STATUS_UNLOCKED'],
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
// update it with the same info
|
|
1465
|
+
};
|
|
1461
1466
|
locusInfo.updateMeetingInfo(newInfo, self);
|
|
1462
1467
|
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1468
|
+
checkMeetingInfoUpdatedCalled(true);
|
|
1469
|
+
|
|
1470
|
+
// update it with the same info
|
|
1471
|
+
expectedMeeting = {
|
|
1466
1472
|
coHost: {
|
|
1467
1473
|
LOWER_SOMEONE_ELSES_HAND: true,
|
|
1468
1474
|
LOCK_CONTROL_LOCK: true,
|
|
@@ -1477,7 +1483,11 @@ describe('plugin-meetings', () => {
|
|
|
1477
1483
|
ROSTER_IN_MEETING: true,
|
|
1478
1484
|
},
|
|
1479
1485
|
userDisplayHints: ['ROSTER_IN_MEETING', 'LOCK_STATUS_UNLOCKED'],
|
|
1480
|
-
}
|
|
1486
|
+
};
|
|
1487
|
+
locusInfo.updateMeetingInfo(newInfo, self);
|
|
1488
|
+
|
|
1489
|
+
// since the info is the same it should not call trigger the event
|
|
1490
|
+
checkMeetingInfoUpdatedCalled(false);
|
|
1481
1491
|
|
|
1482
1492
|
// update it with the same info, but roles changed
|
|
1483
1493
|
const updateSelf = cloneDeep(self);
|
|
@@ -1485,10 +1495,7 @@ describe('plugin-meetings', () => {
|
|
|
1485
1495
|
type: 'COHOST',
|
|
1486
1496
|
hasRole: true,
|
|
1487
1497
|
});
|
|
1488
|
-
|
|
1489
|
-
// since the info is the same but roles changed, it should call trigger the event
|
|
1490
|
-
checkMeetingInfoUpdatedCalledForRoles(true);
|
|
1491
|
-
assert.deepEqual(mockMeeting, {
|
|
1498
|
+
expectedMeeting = {
|
|
1492
1499
|
coHost: {
|
|
1493
1500
|
LOWER_SOMEONE_ELSES_HAND: true,
|
|
1494
1501
|
LOCK_CONTROL_LOCK: true,
|
|
@@ -1508,7 +1515,10 @@ describe('plugin-meetings', () => {
|
|
|
1508
1515
|
'LOCK_CONTROL_LOCK',
|
|
1509
1516
|
'LOWER_SOMEONE_ELSES_HAND',
|
|
1510
1517
|
],
|
|
1511
|
-
}
|
|
1518
|
+
};
|
|
1519
|
+
locusInfo.updateMeetingInfo(newInfo, updateSelf);
|
|
1520
|
+
// since the info is the same but roles changed, it should call trigger the event
|
|
1521
|
+
checkMeetingInfoUpdatedCalledForRoles(true);
|
|
1512
1522
|
});
|
|
1513
1523
|
|
|
1514
1524
|
it('gets roles from self if available', () => {
|
|
@@ -69,6 +69,7 @@ describe('plugin-meetings', () => {
|
|
|
69
69
|
canTransferFile: null,
|
|
70
70
|
canAnnotate: null,
|
|
71
71
|
canUseVoip: null,
|
|
72
|
+
canShareWhiteBoard: null,
|
|
72
73
|
...expected,
|
|
73
74
|
};
|
|
74
75
|
|
|
@@ -143,6 +144,7 @@ describe('plugin-meetings', () => {
|
|
|
143
144
|
'canTransferFile',
|
|
144
145
|
'canAnnotate',
|
|
145
146
|
'canUseVoip',
|
|
147
|
+
'canShareWhiteBoard',
|
|
146
148
|
].forEach((key) => {
|
|
147
149
|
it(`get and set for ${key} work as expected`, () => {
|
|
148
150
|
const inMeetingActions = new InMeetingActions();
|
|
@@ -5868,6 +5868,7 @@ describe('plugin-meetings', () => {
|
|
|
5868
5868
|
let canSendReactionsSpy;
|
|
5869
5869
|
let canUserRenameSelfAndObservedSpy;
|
|
5870
5870
|
let canUserRenameOthersSpy;
|
|
5871
|
+
let canShareWhiteBoardSpy;
|
|
5871
5872
|
// Due to import tree issues, hasHints must be stubed within the scope of the `it`.
|
|
5872
5873
|
|
|
5873
5874
|
beforeEach(() => {
|
|
@@ -5893,6 +5894,7 @@ describe('plugin-meetings', () => {
|
|
|
5893
5894
|
canSendReactionsSpy = sinon.spy(MeetingUtil, 'canSendReactions');
|
|
5894
5895
|
canUserRenameSelfAndObservedSpy = sinon.spy(MeetingUtil, 'canUserRenameSelfAndObserved');
|
|
5895
5896
|
canUserRenameOthersSpy = sinon.spy(MeetingUtil, 'canUserRenameOthers');
|
|
5897
|
+
canShareWhiteBoardSpy = sinon.spy(MeetingUtil, 'canShareWhiteBoard');
|
|
5896
5898
|
});
|
|
5897
5899
|
|
|
5898
5900
|
afterEach(() => {
|
|
@@ -5947,6 +5949,7 @@ describe('plugin-meetings', () => {
|
|
|
5947
5949
|
it(`${actionName} is ${expectedEnabled} when the call type is ${callType}`, () => {
|
|
5948
5950
|
meeting.type = callType;
|
|
5949
5951
|
meeting.userDisplayHints = [];
|
|
5952
|
+
meeting.meetingInfo = {some: 'info'};
|
|
5950
5953
|
|
|
5951
5954
|
meeting.updateMeetingActions();
|
|
5952
5955
|
|
|
@@ -6005,7 +6008,7 @@ describe('plugin-meetings', () => {
|
|
|
6005
6008
|
requiredPolicies: [SELF_POLICY.SUPPORT_ANNOTATION],
|
|
6006
6009
|
},
|
|
6007
6010
|
],
|
|
6008
|
-
({actionName, requiredDisplayHints, requiredPolicies, enableUnifiedMeetings}) => {
|
|
6011
|
+
({actionName, requiredDisplayHints, requiredPolicies, enableUnifiedMeetings, meetingInfo}) => {
|
|
6009
6012
|
it(`${actionName} is enabled when the conditions are met`, () => {
|
|
6010
6013
|
meeting.userDisplayHints = requiredDisplayHints;
|
|
6011
6014
|
meeting.selfUserPolicies = {};
|
|
@@ -6014,6 +6017,8 @@ describe('plugin-meetings', () => {
|
|
|
6014
6017
|
? true
|
|
6015
6018
|
: enableUnifiedMeetings;
|
|
6016
6019
|
|
|
6020
|
+
meeting.meetingInfo = isUndefined(meetingInfo) ? {some: 'info'} : meetingInfo;
|
|
6021
|
+
|
|
6017
6022
|
forEach(requiredPolicies, (policy) => {
|
|
6018
6023
|
meeting.selfUserPolicies[policy] = true;
|
|
6019
6024
|
});
|
|
@@ -6028,6 +6033,8 @@ describe('plugin-meetings', () => {
|
|
|
6028
6033
|
meeting.userDisplayHints = [];
|
|
6029
6034
|
meeting.selfUserPolicies = {};
|
|
6030
6035
|
|
|
6036
|
+
meeting.meetingInfo = isUndefined(meetingInfo) ? {some: 'info'} : meetingInfo;
|
|
6037
|
+
|
|
6031
6038
|
forEach(requiredPolicies, (policy) => {
|
|
6032
6039
|
meeting.selfUserPolicies[policy] = true;
|
|
6033
6040
|
});
|
|
@@ -6042,6 +6049,8 @@ describe('plugin-meetings', () => {
|
|
|
6042
6049
|
meeting.userDisplayHints = requiredDisplayHints;
|
|
6043
6050
|
meeting.selfUserPolicies = {};
|
|
6044
6051
|
|
|
6052
|
+
meeting.meetingInfo = isUndefined(meetingInfo) ? {some: 'info'} : meetingInfo;
|
|
6053
|
+
|
|
6045
6054
|
meeting.updateMeetingActions();
|
|
6046
6055
|
|
|
6047
6056
|
assert.isFalse(meeting.inMeetingActions.get()[actionName]);
|
|
@@ -6093,6 +6102,24 @@ describe('plugin-meetings', () => {
|
|
|
6093
6102
|
assert.isTrue(meeting.inMeetingActions.get()['canUseVoip']);
|
|
6094
6103
|
});
|
|
6095
6104
|
|
|
6105
|
+
it('canUseVoip is enabled when there is no meeting info', () => {
|
|
6106
|
+
meeting.config.experimental.enableUnifiedMeetings = true;
|
|
6107
|
+
|
|
6108
|
+
meeting.updateMeetingActions();
|
|
6109
|
+
|
|
6110
|
+
assert.isTrue(meeting.inMeetingActions.get()['canUseVoip']);
|
|
6111
|
+
});
|
|
6112
|
+
|
|
6113
|
+
it('canUseVoip is enabled when it is a locus call', () => {
|
|
6114
|
+
meeting.config.experimental.enableUnifiedMeetings = true;
|
|
6115
|
+
meeting.meetingInfo = {some: 'info'};
|
|
6116
|
+
meeting.type = 'CALL';
|
|
6117
|
+
|
|
6118
|
+
meeting.updateMeetingActions();
|
|
6119
|
+
|
|
6120
|
+
assert.isTrue(meeting.inMeetingActions.get()['canUseVoip']);
|
|
6121
|
+
});
|
|
6122
|
+
|
|
6096
6123
|
it('canUseVoip is disabled based on api info when supportVoip is false', () => {
|
|
6097
6124
|
meeting.userDisplayHints = undefined;
|
|
6098
6125
|
meeting.selfUserPolicies = {[SELF_POLICY.SUPPORT_VOIP]: true};
|
|
@@ -6157,6 +6184,7 @@ describe('plugin-meetings', () => {
|
|
|
6157
6184
|
assert.calledWith(canSendReactionsSpy, null, userDisplayHints);
|
|
6158
6185
|
assert.calledWith(canUserRenameSelfAndObservedSpy, userDisplayHints);
|
|
6159
6186
|
assert.calledWith(canUserRenameOthersSpy, userDisplayHints);
|
|
6187
|
+
assert.calledWith(canShareWhiteBoardSpy, userDisplayHints);
|
|
6160
6188
|
|
|
6161
6189
|
assert.calledWith(ControlsOptionsUtil.hasHints, {
|
|
6162
6190
|
requiredHints: [DISPLAY_HINTS.MUTE_ALL],
|
|
@@ -6283,13 +6311,9 @@ describe('plugin-meetings', () => {
|
|
|
6283
6311
|
updateLLMConnectionSpy = sinon.spy(meeting, 'updateLLMConnection');
|
|
6284
6312
|
});
|
|
6285
6313
|
|
|
6286
|
-
const check =
|
|
6314
|
+
const check = (url, expectedCalled) => {
|
|
6287
6315
|
meeting.handleDataChannelUrlChange(url);
|
|
6288
6316
|
|
|
6289
|
-
assert.notCalled(updateLLMConnectionSpy);
|
|
6290
|
-
|
|
6291
|
-
await testUtils.waitUntil(0);
|
|
6292
|
-
|
|
6293
6317
|
if (expectedCalled) {
|
|
6294
6318
|
assert.calledWith(updateLLMConnectionSpy);
|
|
6295
6319
|
} else {
|
|
@@ -6297,17 +6321,17 @@ describe('plugin-meetings', () => {
|
|
|
6297
6321
|
}
|
|
6298
6322
|
};
|
|
6299
6323
|
|
|
6300
|
-
it('calls deferred updateLLMConnection if datachannelURL is set and the enableAutomaticLLM is true',
|
|
6324
|
+
it('calls deferred updateLLMConnection if datachannelURL is set and the enableAutomaticLLM is true', () => {
|
|
6301
6325
|
meeting.config.enableAutomaticLLM = true;
|
|
6302
6326
|
check('some url', true);
|
|
6303
6327
|
});
|
|
6304
6328
|
|
|
6305
|
-
it('does not call updateLLMConnection if datachannelURL is undefined',
|
|
6329
|
+
it('does not call updateLLMConnection if datachannelURL is undefined', () => {
|
|
6306
6330
|
meeting.config.enableAutomaticLLM = true;
|
|
6307
6331
|
check(undefined, false);
|
|
6308
6332
|
});
|
|
6309
6333
|
|
|
6310
|
-
it('does not call updateLLMConnection if enableAutomaticLLM is false',
|
|
6334
|
+
it('does not call updateLLMConnection if enableAutomaticLLM is false', () => {
|
|
6311
6335
|
check('some url', false);
|
|
6312
6336
|
});
|
|
6313
6337
|
});
|
|
@@ -633,6 +633,13 @@ describe('plugin-meetings', () => {
|
|
|
633
633
|
});
|
|
634
634
|
});
|
|
635
635
|
|
|
636
|
+
describe('canShareWhiteBoard', () => {
|
|
637
|
+
it('works as expected', () => {
|
|
638
|
+
assert.deepEqual(MeetingUtil.canShareWhiteBoard(['SHARE_WHITEBOARD']), true);
|
|
639
|
+
assert.deepEqual(MeetingUtil.canShareWhiteBoard([]), false);
|
|
640
|
+
});
|
|
641
|
+
});
|
|
642
|
+
|
|
636
643
|
describe('bothLeaveAndEndMeetingAvailable', () => {
|
|
637
644
|
it('works as expected', () => {
|
|
638
645
|
assert.deepEqual(
|
|
@@ -1371,7 +1371,7 @@ describe('plugin-meetings', () => {
|
|
|
1371
1371
|
);
|
|
1372
1372
|
assert.calledOnce(webex.meetings.meetingInfo.fetchMeetingInfo);
|
|
1373
1373
|
assert.calledOnce(MeetingsUtil.getMeetingAddedType);
|
|
1374
|
-
assert.
|
|
1374
|
+
assert.calledThrice(TriggerProxy.trigger);
|
|
1375
1375
|
assert.calledWith(
|
|
1376
1376
|
webex.meetings.meetingInfo.fetchMeetingInfo,
|
|
1377
1377
|
'test destination',
|