@webex/plugin-meetings 3.0.0-beta.197 → 3.0.0-beta.199
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/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +10 -10
- package/dist/meeting/index.js.map +1 -1
- package/dist/meetings/index.js +24 -18
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/meeting/index.d.ts +0 -1
- package/dist/types/meetings/index.d.ts +3 -1
- package/package.json +19 -19
- package/src/meeting/index.ts +12 -13
- package/src/meetings/index.ts +9 -3
- package/test/unit/spec/locus-info/index.js +89 -82
- package/test/unit/spec/meeting/index.js +20 -0
- package/test/unit/spec/meetings/index.js +21 -4
|
@@ -185,6 +185,7 @@ describe('plugin-meetings', () => {
|
|
|
185
185
|
let testDestination;
|
|
186
186
|
let membersSpy;
|
|
187
187
|
let meetingRequestSpy;
|
|
188
|
+
let correlationId;
|
|
188
189
|
|
|
189
190
|
beforeEach(() => {
|
|
190
191
|
webex = new MockWebex({
|
|
@@ -243,6 +244,7 @@ describe('plugin-meetings', () => {
|
|
|
243
244
|
test3 = `test3-${uuid.v4()}`;
|
|
244
245
|
test4 = `test4-${uuid.v4()}`;
|
|
245
246
|
testDestination = `testDestination-${uuid.v4()}`;
|
|
247
|
+
correlationId = uuid.v4();
|
|
246
248
|
|
|
247
249
|
meeting = new Meeting(
|
|
248
250
|
{
|
|
@@ -252,6 +254,7 @@ describe('plugin-meetings', () => {
|
|
|
252
254
|
locus: {url: url1},
|
|
253
255
|
destination: testDestination,
|
|
254
256
|
destinationType: _MEETING_ID_,
|
|
257
|
+
correlationId,
|
|
255
258
|
},
|
|
256
259
|
{
|
|
257
260
|
parent: webex,
|
|
@@ -270,9 +273,11 @@ describe('plugin-meetings', () => {
|
|
|
270
273
|
assert.exists(meeting.options);
|
|
271
274
|
assert.exists(meeting.attrs);
|
|
272
275
|
assert.exists(meeting.id);
|
|
276
|
+
assert.exists(meeting.correlationId);
|
|
273
277
|
assert.equal(meeting.userId, uuid1);
|
|
274
278
|
assert.equal(meeting.resource, uuid2);
|
|
275
279
|
assert.equal(meeting.deviceUrl, uuid3);
|
|
280
|
+
assert.equal(meeting.correlationId, correlationId);
|
|
276
281
|
assert.deepEqual(meeting.meetingInfo, {});
|
|
277
282
|
assert.instanceOf(meeting.members, Members);
|
|
278
283
|
assert.calledOnceWithExactly(
|
|
@@ -324,6 +329,21 @@ describe('plugin-meetings', () => {
|
|
|
324
329
|
assert.instanceOf(meeting.mediaRequestManagers.screenShareVideo, MediaRequestManager);
|
|
325
330
|
});
|
|
326
331
|
|
|
332
|
+
it('uses meeting id as correlation id if not provided in constructor', () => {
|
|
333
|
+
const newMeeting = new Meeting({
|
|
334
|
+
userId: uuid1,
|
|
335
|
+
resource: uuid2,
|
|
336
|
+
deviceUrl: uuid3,
|
|
337
|
+
locus: {url: url1},
|
|
338
|
+
destination: testDestination,
|
|
339
|
+
destinationType: _MEETING_ID_,
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
parent: webex,
|
|
343
|
+
});
|
|
344
|
+
assert.equal(newMeeting.correlationId, newMeeting.id);
|
|
345
|
+
})
|
|
346
|
+
|
|
327
347
|
describe('creates ReceiveSlot manager instance', () => {
|
|
328
348
|
let mockReceiveSlotManagerCtor;
|
|
329
349
|
let providedCreateSlotCallback;
|
|
@@ -679,23 +679,26 @@ describe('plugin-meetings', () => {
|
|
|
679
679
|
|
|
680
680
|
it('calls createMeeting and returns its promise', async () => {
|
|
681
681
|
const FAKE_USE_RANDOM_DELAY = true;
|
|
682
|
-
const
|
|
682
|
+
const correlationId = 'my-correlationId';
|
|
683
|
+
const create = webex.meetings.create(test1, test2, FAKE_USE_RANDOM_DELAY, {}, correlationId);
|
|
683
684
|
|
|
684
685
|
assert.exists(create.then);
|
|
685
686
|
await create;
|
|
686
687
|
assert.calledOnce(webex.meetings.createMeeting);
|
|
687
|
-
assert.calledWith(webex.meetings.createMeeting, test1, test2, FAKE_USE_RANDOM_DELAY, {});
|
|
688
|
+
assert.calledWith(webex.meetings.createMeeting, test1, test2, FAKE_USE_RANDOM_DELAY, {}, correlationId);
|
|
688
689
|
});
|
|
689
690
|
|
|
690
691
|
it('calls createMeeting with extra info params and returns its promise', async () => {
|
|
691
692
|
const FAKE_USE_RANDOM_DELAY = false;
|
|
693
|
+
const correlationId = 'my-correlationId';
|
|
694
|
+
|
|
692
695
|
const FAKE_INFO_EXTRA_PARAMS = {mtid: 'm9fe0afd8c435e892afcce9ea25b97046', joinTXId: 'TSmrX61wNF'};
|
|
693
|
-
const create = webex.meetings.create(test1, test2, FAKE_USE_RANDOM_DELAY, FAKE_INFO_EXTRA_PARAMS);
|
|
696
|
+
const create = webex.meetings.create(test1, test2, FAKE_USE_RANDOM_DELAY, FAKE_INFO_EXTRA_PARAMS, correlationId);
|
|
694
697
|
|
|
695
698
|
assert.exists(create.then);
|
|
696
699
|
await create;
|
|
697
700
|
assert.calledOnce(webex.meetings.createMeeting);
|
|
698
|
-
assert.calledWith(webex.meetings.createMeeting, test1, test2, FAKE_USE_RANDOM_DELAY, FAKE_INFO_EXTRA_PARAMS);
|
|
701
|
+
assert.calledWith(webex.meetings.createMeeting, test1, test2, FAKE_USE_RANDOM_DELAY, FAKE_INFO_EXTRA_PARAMS, correlationId);
|
|
699
702
|
});
|
|
700
703
|
|
|
701
704
|
it('creates a new meeting when a scheduled meeting exists in the conversation', async () => {
|
|
@@ -1095,6 +1098,9 @@ describe('plugin-meetings', () => {
|
|
|
1095
1098
|
if (expectedMeetingData.meetingJoinUrl) {
|
|
1096
1099
|
assert.equal(meeting.meetingJoinUrl, expectedMeetingData.meetingJoinUrl);
|
|
1097
1100
|
}
|
|
1101
|
+
if(expectedMeetingData.correlationId) {
|
|
1102
|
+
assert.equal(meeting.correlationId, expectedMeetingData.correlationId);
|
|
1103
|
+
}
|
|
1098
1104
|
assert.equal(meeting.destination, destination);
|
|
1099
1105
|
assert.equal(meeting.destinationType, type);
|
|
1100
1106
|
assert.calledWith(
|
|
@@ -1124,6 +1130,7 @@ describe('plugin-meetings', () => {
|
|
|
1124
1130
|
const expectedMeetingData = {
|
|
1125
1131
|
permissionToken: 'PT',
|
|
1126
1132
|
meetingJoinUrl: 'meetingJoinUrl',
|
|
1133
|
+
correlationId: meeting.id,
|
|
1127
1134
|
};
|
|
1128
1135
|
|
|
1129
1136
|
checkCreateWithoutDelay(meeting, 'test destination', 'test type', {}, expectedMeetingData);
|
|
@@ -1334,6 +1341,16 @@ describe('plugin-meetings', () => {
|
|
|
1334
1341
|
);
|
|
1335
1342
|
checkCreateWithoutDelay(meeting, FAKE_LOCUS_MEETING, 'test type');
|
|
1336
1343
|
});
|
|
1344
|
+
|
|
1345
|
+
it('creates meeting with the correlationId provided', async () => {
|
|
1346
|
+
const meeting = await webex.meetings.createMeeting('test destination', 'test type', false, {}, 'my-correlationId');
|
|
1347
|
+
|
|
1348
|
+
const expectedMeetingData = {
|
|
1349
|
+
correlationId: 'my-correlationId',
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
checkCreateWithoutDelay(meeting, 'test destination', 'test type', {}, expectedMeetingData);
|
|
1353
|
+
})
|
|
1337
1354
|
});
|
|
1338
1355
|
|
|
1339
1356
|
describe('rejected MeetingInfo.#fetchMeetingInfo', () => {
|