@webex/plugin-meetings 3.12.0-next.55 → 3.12.0-next.57

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.
@@ -12038,6 +12038,22 @@ describe('plugin-meetings', () => {
12038
12038
  assert.notCalled(fetchMeetingInfoStub);
12039
12039
  });
12040
12040
 
12041
+ ['CALL', 'SIP_BRIDGE', 'SPACE_SHARE'].forEach((fullStateType) => {
12042
+ it(`does not fetch meeting info when destination is a 1:1 call (fullState.type ${fullStateType})`, () => {
12043
+ const fetchMeetingInfoStub = sinon.stub(meeting, 'fetchMeetingInfo').resolves();
12044
+
12045
+ meeting.meetingInfo = {};
12046
+ meeting.destination = {
12047
+ url: 'https://locus.example.com/locus/123',
12048
+ info: {topic: 'x'},
12049
+ };
12050
+
12051
+ meeting.finalizeMeetingAfterInitialLocusSetup({fullState: {type: fullStateType}});
12052
+
12053
+ assert.notCalled(fetchMeetingInfoStub);
12054
+ });
12055
+ });
12056
+
12041
12057
  it('swallows async fetchMeetingInfo errors and logs info', async () => {
12042
12058
  const error = new Error('fetch failed');
12043
12059
 
@@ -3119,6 +3119,30 @@ describe('plugin-meetings', () => {
3119
3119
 
3120
3120
  assert.notCalled(webex.meetings.meetingInfo.fetchMeetingInfo);
3121
3121
  });
3122
+
3123
+ [
3124
+ {fullStateType: 'CALL'},
3125
+ {fullStateType: 'SIP_BRIDGE'},
3126
+ {fullStateType: 'SPACE_SHARE'},
3127
+ ].forEach(({fullStateType}) => {
3128
+ it(`skips meeting info fetch when LOCUS_ID destination is a 1:1 call (fullState.type ${fullStateType})`, async () => {
3129
+ const locusDestination = {
3130
+ fullState: {type: fullStateType},
3131
+ };
3132
+
3133
+ const meeting = await webex.meetings.createMeeting(
3134
+ locusDestination,
3135
+ DESTINATION_TYPE.LOCUS_ID
3136
+ );
3137
+
3138
+ assert.instanceOf(
3139
+ meeting,
3140
+ Meeting,
3141
+ 'createMeeting should eventually resolve to a Meeting Object'
3142
+ );
3143
+ assert.notCalled(webex.meetings.meetingInfo.fetchMeetingInfo);
3144
+ });
3145
+ });
3122
3146
  });
3123
3147
 
3124
3148
  describe('rejected MeetingInfo.#fetchMeetingInfo - does not log for known Error types', () => {
@@ -291,6 +291,34 @@ describe('plugin-meetings', () => {
291
291
  });
292
292
  });
293
293
 
294
+ describe('#isOneOnOneCall', () => {
295
+ [
296
+ {description: 'locus is undefined', locus: undefined, expected: false},
297
+ {description: 'fullState is missing', locus: {}, expected: false},
298
+ {description: 'fullState.type is missing', locus: {fullState: {}}, expected: false},
299
+ {description: 'fullState.type is CALL', locus: {fullState: {type: 'CALL'}}, expected: true},
300
+ {
301
+ description: 'fullState.type is SIP_BRIDGE',
302
+ locus: {fullState: {type: 'SIP_BRIDGE'}},
303
+ expected: true,
304
+ },
305
+ {
306
+ description: 'fullState.type is SPACE_SHARE',
307
+ locus: {fullState: {type: 'SPACE_SHARE'}},
308
+ expected: true,
309
+ },
310
+ {
311
+ description: 'fullState.type is MEETING',
312
+ locus: {fullState: {type: 'MEETING'}},
313
+ expected: false,
314
+ },
315
+ ].forEach(({description, locus, expected}) => {
316
+ it(`returns ${expected} when ${description}`, () => {
317
+ assert.equal(MeetingsUtil.isOneOnOneCall(locus), expected);
318
+ });
319
+ });
320
+ });
321
+
294
322
  describe('#joinedOnThisDevice', () => {
295
323
  it('return false if no devices in self', () => {
296
324
  const newLocus = {};