@webex/plugin-meetings 3.8.0-next.39 → 3.8.0-next.40
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 +2 -0
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/in-meeting-actions.js +2 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +20 -0
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +30 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.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 +9 -0
- package/dist/types/meeting/request.d.ts +12 -1
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/constants.ts +3 -0
- package/src/meeting/in-meeting-actions.ts +4 -0
- package/src/meeting/index.ts +20 -0
- package/src/meeting/request.ts +36 -1
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +3 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +5 -3
- package/test/unit/spec/meeting/index.js +39 -0
- package/test/unit/spec/meeting/request.js +32 -1
- package/test/unit/spec/meeting/utils.js +12 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
3
3
|
*/
|
4
|
+
import {v4 as uuidv4} from 'uuid';
|
4
5
|
import 'jsdom-global/register';
|
5
6
|
import {cloneDeep, forEach, isEqual, isUndefined} from 'lodash';
|
6
7
|
import sinon from 'sinon';
|
@@ -10722,6 +10723,7 @@ describe('plugin-meetings', () => {
|
|
10722
10723
|
let canUserLowerSomeoneElsesHandSpy;
|
10723
10724
|
let waitingForOthersToJoinSpy;
|
10724
10725
|
let canSendReactionsSpy;
|
10726
|
+
let requiresPostMeetingDataConsentPromptSpy;
|
10725
10727
|
let canUserRenameSelfAndObservedSpy;
|
10726
10728
|
let canUserRenameOthersSpy;
|
10727
10729
|
let canShareWhiteBoardSpy;
|
@@ -10749,6 +10751,10 @@ describe('plugin-meetings', () => {
|
|
10749
10751
|
waitingForOthersToJoinSpy = sinon.spy(MeetingUtil, 'waitingForOthersToJoin');
|
10750
10752
|
canSendReactionsSpy = sinon.spy(MeetingUtil, 'canSendReactions');
|
10751
10753
|
canUserRenameSelfAndObservedSpy = sinon.spy(MeetingUtil, 'canUserRenameSelfAndObserved');
|
10754
|
+
requiresPostMeetingDataConsentPromptSpy = sinon.spy(
|
10755
|
+
MeetingUtil,
|
10756
|
+
'requiresPostMeetingDataConsentPrompt'
|
10757
|
+
);
|
10752
10758
|
canUserRenameOthersSpy = sinon.spy(MeetingUtil, 'canUserRenameOthers');
|
10753
10759
|
canShareWhiteBoardSpy = sinon.spy(MeetingUtil, 'canShareWhiteBoard');
|
10754
10760
|
});
|
@@ -11289,6 +11295,7 @@ describe('plugin-meetings', () => {
|
|
11289
11295
|
assert.calledWith(waitingForOthersToJoinSpy, userDisplayHints);
|
11290
11296
|
assert.calledWith(canSendReactionsSpy, null, userDisplayHints);
|
11291
11297
|
assert.calledWith(canUserRenameSelfAndObservedSpy, userDisplayHints);
|
11298
|
+
assert.calledWith(requiresPostMeetingDataConsentPromptSpy, userDisplayHints);
|
11292
11299
|
assert.calledWith(canUserRenameOthersSpy, userDisplayHints);
|
11293
11300
|
assert.calledWith(canShareWhiteBoardSpy, userDisplayHints, selfUserPolicies);
|
11294
11301
|
|
@@ -13120,6 +13127,38 @@ describe('plugin-meetings', () => {
|
|
13120
13127
|
});
|
13121
13128
|
});
|
13122
13129
|
|
13130
|
+
describe('#setPostMeetingDataConsent', () => {
|
13131
|
+
it('should have #setPostMeetingDataConsent', () => {
|
13132
|
+
assert.exists(meeting.setPostMeetingDataConsent);
|
13133
|
+
});
|
13134
|
+
|
13135
|
+
beforeEach(() => {
|
13136
|
+
meeting.meetingRequest.setPostMeetingDataConsent = sinon
|
13137
|
+
.stub()
|
13138
|
+
.returns(Promise.resolve());
|
13139
|
+
});
|
13140
|
+
|
13141
|
+
[true, false].forEach((accept) => {
|
13142
|
+
it(`should send consent with ${accept}`, async () => {
|
13143
|
+
const id = uuidv4();
|
13144
|
+
meeting.locusUrl = `https://locus-test.wbx2.com/locus/api/v1/loci/${accept}`;
|
13145
|
+
meeting.deviceUrl = `https://wdm-test.wbx2.com/wdm/api/v1/devices/${accept}`;
|
13146
|
+
meeting.members.selfId = id;
|
13147
|
+
|
13148
|
+
const consentPromise = meeting.setPostMeetingDataConsent(accept);
|
13149
|
+
|
13150
|
+
assert.exists(consentPromise.then);
|
13151
|
+
await consentPromise;
|
13152
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.setPostMeetingDataConsent, {
|
13153
|
+
locusUrl: `https://locus-test.wbx2.com/locus/api/v1/loci/${accept}`,
|
13154
|
+
postMeetingDataConsent: accept,
|
13155
|
+
selfId: id,
|
13156
|
+
deviceUrl: `https://wdm-test.wbx2.com/wdm/api/v1/devices/${accept}`,
|
13157
|
+
});
|
13158
|
+
});
|
13159
|
+
});
|
13160
|
+
});
|
13161
|
+
|
13123
13162
|
describe('#sendReaction', () => {
|
13124
13163
|
it('should have #sendReaction', () => {
|
13125
13164
|
assert.exists(meeting.sendReaction);
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import 'jsdom-global/register';
|
2
|
+
import {v4 as uuidv4} from 'uuid';
|
2
3
|
import sinon from 'sinon';
|
3
4
|
import {assert} from '@webex/test-helper-chai';
|
4
5
|
import MockWebex from '@webex/test-helper-mock-webex';
|
@@ -205,7 +206,7 @@ describe('plugin-meetings', () => {
|
|
205
206
|
roapMessage,
|
206
207
|
reachability,
|
207
208
|
permissionToken,
|
208
|
-
clientMediaPreferences
|
209
|
+
clientMediaPreferences,
|
209
210
|
});
|
210
211
|
const requestParams = meetingsRequest.request.getCall(0).args[0];
|
211
212
|
|
@@ -630,6 +631,36 @@ describe('plugin-meetings', () => {
|
|
630
631
|
});
|
631
632
|
});
|
632
633
|
|
634
|
+
describe('#setPostMeetingDataConsent', () => {
|
635
|
+
[true, false].forEach((consent) => {
|
636
|
+
it(`sends request to set post meeting data consent with ${consent}`, async () => {
|
637
|
+
const locusUrl = `https://locus-test.wbx2.com/locus/api/v1/loci/${consent}`;
|
638
|
+
const selfId = uuidv4();
|
639
|
+
const deviceUrl = `https://wdm-test.wbx2.com/wdm/api/v1/devices/${consent}`;
|
640
|
+
|
641
|
+
const consentPromise = meetingsRequest.setPostMeetingDataConsent({
|
642
|
+
postMeetingDataConsent: consent,
|
643
|
+
locusUrl,
|
644
|
+
selfId,
|
645
|
+
deviceUrl,
|
646
|
+
});
|
647
|
+
assert.exists(consentPromise.then);
|
648
|
+
await consentPromise;
|
649
|
+
|
650
|
+
checkRequest({
|
651
|
+
method: 'PATCH',
|
652
|
+
uri: `${locusUrl}/participant/${selfId}/controls`,
|
653
|
+
body: {
|
654
|
+
consent: {
|
655
|
+
postMeetingDataConsent: consent,
|
656
|
+
deviceUrl,
|
657
|
+
},
|
658
|
+
},
|
659
|
+
});
|
660
|
+
});
|
661
|
+
});
|
662
|
+
});
|
663
|
+
|
633
664
|
describe('#prepareLeaveMeetingRequestOptions', () => {
|
634
665
|
it('returns expected result', async () => {
|
635
666
|
const result = meetingsRequest.prepareLeaveMeetingRequestOptions({
|
@@ -744,6 +744,18 @@ describe('plugin-meetings', () => {
|
|
744
744
|
});
|
745
745
|
});
|
746
746
|
|
747
|
+
describe('requiresPostMeetingDataConsentPrompt', () => {
|
748
|
+
it('works as expected', () => {
|
749
|
+
assert.deepEqual(
|
750
|
+
MeetingUtil.requiresPostMeetingDataConsentPrompt([
|
751
|
+
'SHOW_POST_MEETING_DATA_CONSENT_PROMPT',
|
752
|
+
]),
|
753
|
+
true
|
754
|
+
);
|
755
|
+
assert.deepEqual(MeetingUtil.requiresPostMeetingDataConsentPrompt([]), false);
|
756
|
+
});
|
757
|
+
});
|
758
|
+
|
747
759
|
describe('canUserRenameOthers', () => {
|
748
760
|
it('works as expected', () => {
|
749
761
|
assert.deepEqual(MeetingUtil.canUserRenameOthers(['CAN_RENAME_OTHERS']), true);
|