@webex/plugin-meetings 3.9.0-next.1 → 3.9.0-next.10

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.
@@ -1181,11 +1181,17 @@ export default class Members extends StatelessWebexPlugin {
1181
1181
  * @param {string} memberId - id of the participant who is receiving request
1182
1182
  * @param {string} requestingParticipantId - id of the participant who is sending request (optional)
1183
1183
  * @param {string} [alias] - alias name
1184
+ * @param {string} [suffix] - name suffix (optional)
1184
1185
  * @returns {Promise}
1185
1186
  * @public
1186
1187
  * @memberof Members
1187
1188
  */
1188
- public editDisplayName(memberId: string, requestingParticipantId: string, alias: string) {
1189
+ public editDisplayName(
1190
+ memberId: string,
1191
+ requestingParticipantId: string,
1192
+ alias: string,
1193
+ suffix?: string
1194
+ ) {
1189
1195
  if (!this.locusUrl) {
1190
1196
  return Promise.reject(
1191
1197
  new ParameterError(
@@ -1205,7 +1211,8 @@ export default class Members extends StatelessWebexPlugin {
1205
1211
  memberId,
1206
1212
  requestingParticipantId,
1207
1213
  alias,
1208
- locusUrl
1214
+ locusUrl,
1215
+ suffix
1209
1216
  );
1210
1217
 
1211
1218
  return this.membersRequest.editDisplayNameMember(options);
@@ -190,13 +190,21 @@ const MembersUtil = {
190
190
  * @param {String} requestingParticipantId id of the participant who is sending request (optional)
191
191
  * @param {String} alias alias name
192
192
  * @param {String} locusUrl url
193
+ * @param {String} suffix optional suffix
193
194
  * @returns {Object} consists of {memberID: string, requestingParticipantId: string, alias: string, locusUrl: string}
194
195
  */
195
- generateEditDisplayNameMemberOptions: (memberId, requestingParticipantId, alias, locusUrl) => ({
196
+ generateEditDisplayNameMemberOptions: (
196
197
  memberId,
197
198
  requestingParticipantId,
198
199
  alias,
199
200
  locusUrl,
201
+ suffix
202
+ ) => ({
203
+ memberId,
204
+ requestingParticipantId,
205
+ alias,
206
+ locusUrl,
207
+ suffix,
200
208
  }),
201
209
 
202
210
  getMuteMemberRequestParams: (options) => {
@@ -301,10 +309,18 @@ const MembersUtil = {
301
309
  * @returns {Object} request parameters (method, uri, body) needed to make a editDisplayName request
302
310
  */
303
311
  editDisplayNameMemberRequestParams: (options) => {
304
- const body = {
312
+ const body: {
313
+ aliasValue: string;
314
+ requestingParticipantId: string;
315
+ suffixValue?: string;
316
+ } = {
305
317
  aliasValue: options.alias,
306
318
  requestingParticipantId: options.requestingParticipantId,
307
319
  };
320
+
321
+ if (options.suffix !== undefined) {
322
+ body.suffixValue = options.suffix;
323
+ }
308
324
  const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${ALIAS}`;
309
325
 
310
326
  return {
@@ -923,10 +923,10 @@ export default class Reachability extends EventsScope {
923
923
 
924
924
  // update expected results counters to include this cluster
925
925
  this.expectedResultsCount[cluster.isVideoMesh ? 'videoMesh' : 'public'].udp +=
926
- cluster.udp.length;
926
+ cluster.udp.length > 0 ? 1 : 0;
927
927
  if (!cluster.isVideoMesh) {
928
- this.expectedResultsCount.public.tcp += cluster.tcp.length;
929
- this.expectedResultsCount.public.xtls += cluster.xtls.length;
928
+ this.expectedResultsCount.public.tcp += cluster.tcp.length > 0 ? 1 : 0;
929
+ this.expectedResultsCount.public.xtls += cluster.xtls.length > 0 ? 1 : 0;
930
930
  }
931
931
  });
932
932
 
@@ -2369,23 +2369,23 @@ describe('plugin-meetings', () => {
2369
2369
 
2370
2370
  it('applyLocusDeltaData handles LOCUS_URL_CHANGED action correctly', () => {
2371
2371
  const {LOCUS_URL_CHANGED} = LocusDeltaParser.loci;
2372
- const fakeDeltaLocus = {id: 'fake delta locus'};
2372
+ const fakeFullLocus = {
2373
+ url: 'new full loci url',
2374
+ };
2373
2375
  const meeting = {
2374
2376
  meetingRequest: {
2375
- getLocusDTO: sandbox.stub().resolves({body: fakeDeltaLocus}),
2377
+ getLocusDTO: sandbox.stub().resolves({body: fakeFullLocus}),
2376
2378
  },
2377
2379
  locusInfo: {
2378
2380
  handleLocusDelta: sandbox.stub(),
2379
2381
  },
2380
- locusUrl: 'current locus url',
2382
+ locusUrl: 'current BO session locus url',
2381
2383
  };
2382
2384
 
2383
- locusInfo.locusParser.workingCopy = {
2384
- syncUrl: 'current sync url',
2385
- };
2385
+ locusInfo.locusParser.workingCopy = null;
2386
2386
 
2387
2387
  locusInfo.applyLocusDeltaData(LOCUS_URL_CHANGED, fakeLocus, meeting);
2388
- assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'current sync url'});
2388
+ assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: fakeLocus.url});
2389
2389
  });
2390
2390
 
2391
2391
  describe('edge cases for sync failing', () => {
@@ -253,7 +253,8 @@ describe('locus-info/parser', () => {
253
253
  });
254
254
 
255
255
  it('replaces current loci when the locus URL changes and incoming sequence is later, even when baseSequence doesn\'t match', () => {
256
- const {USE_INCOMING} = LocusDeltaParser.loci;
256
+ const {LOCUS_URL_CHANGED} = LocusDeltaParser.loci;
257
+ sandbox.stub(LocusDeltaParser, 'compare').returns(LOCUS_URL_CHANGED);
257
258
 
258
259
  parser.queue.dequeue = sandbox.stub().returns(NEW_LOCI);
259
260
  parser.onDeltaAction = sandbox.stub();
@@ -262,7 +263,7 @@ describe('locus-info/parser', () => {
262
263
 
263
264
  parser.processDeltaEvent();
264
265
 
265
- assert.equal(parser.workingCopy, NEW_LOCI);
266
+ assert.equal(parser.workingCopy, null);
266
267
  });
267
268
 
268
269
  it('does not replace current loci when the locus URL changes but incoming sequence is not later', () => {
@@ -487,7 +487,7 @@ describe('plugin-meetings', () => {
487
487
 
488
488
  it('pstnCorrelationId getter/setter should work correctly', () => {
489
489
  const testPstnCorrelationId = uuid.v4();
490
-
490
+
491
491
  meeting.pstnCorrelationId = testPstnCorrelationId;
492
492
  assert.equal(meeting.pstnCorrelationId, testPstnCorrelationId);
493
493
  assert.equal(meeting.callStateForMetrics.pstnCorrelationId, testPstnCorrelationId);
@@ -1992,10 +1992,10 @@ describe('plugin-meetings', () => {
1992
1992
  it('should handle join failure', async () => {
1993
1993
  MeetingUtil.isPinOrGuest = sinon.stub().returns(false);
1994
1994
  webex.internal.newMetrics.submitClientEvent = sinon.stub();
1995
-
1995
+
1996
1996
  await meeting.join().catch(() => {
1997
1997
  assert.calledOnce(MeetingUtil.joinMeeting);
1998
-
1998
+
1999
1999
  // Assert that client.locus.join.response error event is not sent from this function, it is now emitted from MeetingUtil.joinMeeting
2000
2000
  assert.calledOnce(webex.internal.newMetrics.submitClientEvent);
2001
2001
  assert.calledWithMatch(
@@ -2216,6 +2216,7 @@ describe('plugin-meetings', () => {
2216
2216
  });
2217
2217
  meeting.audio = muteStateStub;
2218
2218
  meeting.video = muteStateStub;
2219
+ sinon.stub(MeetingUtil, 'getIpVersion').returns(IP_VERSION.ipv4_and_ipv6);
2219
2220
  sinon.stub(Media, 'createMediaConnection').returns(fakeMediaConnection);
2220
2221
  sinon.stub(meeting, 'setupMediaConnectionListeners');
2221
2222
  sinon.stub(meeting, 'setMercuryListener');
@@ -2337,6 +2338,7 @@ describe('plugin-meetings', () => {
2337
2338
  selected_subnet: null,
2338
2339
  numTransports: 1,
2339
2340
  iceCandidatesCount: 0,
2341
+ ipver: 1,
2340
2342
  }
2341
2343
  );
2342
2344
  });
@@ -2384,6 +2386,7 @@ describe('plugin-meetings', () => {
2384
2386
  subnet_reachable: null,
2385
2387
  selected_cluster: null,
2386
2388
  selected_subnet: null,
2389
+ ipver: 1,
2387
2390
  })
2388
2391
  );
2389
2392
 
@@ -2452,6 +2455,7 @@ describe('plugin-meetings', () => {
2452
2455
  subnet_reachable: null,
2453
2456
  selected_cluster: null,
2454
2457
  selected_subnet: null,
2458
+ ipver: 1,
2455
2459
  }
2456
2460
  );
2457
2461
  });
@@ -2512,6 +2516,7 @@ describe('plugin-meetings', () => {
2512
2516
  subnet_reachable: null,
2513
2517
  selected_cluster: null,
2514
2518
  selected_subnet: null,
2519
+ ipver: 1,
2515
2520
  })
2516
2521
  );
2517
2522
 
@@ -2572,6 +2577,7 @@ describe('plugin-meetings', () => {
2572
2577
  subnet_reachable: null,
2573
2578
  selected_cluster: null,
2574
2579
  selected_subnet: null,
2580
+ ipver: 1,
2575
2581
  })
2576
2582
  );
2577
2583
 
@@ -3096,6 +3102,7 @@ describe('plugin-meetings', () => {
3096
3102
  subnet_reachable: null,
3097
3103
  selected_cluster: null,
3098
3104
  selected_subnet: null,
3105
+ ipver: 1,
3099
3106
  },
3100
3107
  ]);
3101
3108
 
@@ -3297,6 +3304,7 @@ describe('plugin-meetings', () => {
3297
3304
  connectionType: 'udp',
3298
3305
  selectedCandidatePairChanges: 2,
3299
3306
  ipVersion: 'IPv6',
3307
+ ipver: 1,
3300
3308
  numTransports: 1,
3301
3309
  isMultistream: false,
3302
3310
  retriedWithTurnServer: true,
@@ -3443,6 +3451,7 @@ describe('plugin-meetings', () => {
3443
3451
  meeting.iceCandidatesCount = 3;
3444
3452
  meeting.iceCandidateErrors.set('701_error', 3);
3445
3453
  meeting.iceCandidateErrors.set('701_turn_host_lookup_received_error', 1);
3454
+ MeetingUtil.getIpVersion.returns(IP_VERSION.only_ipv6);
3446
3455
 
3447
3456
  await meeting.addMedia({
3448
3457
  mediaSettings: {},
@@ -3458,6 +3467,7 @@ describe('plugin-meetings', () => {
3458
3467
  connectionType: 'udp',
3459
3468
  selectedCandidatePairChanges: 2,
3460
3469
  ipVersion: 'IPv6',
3470
+ ipver: 6,
3461
3471
  numTransports: 1,
3462
3472
  isMultistream: false,
3463
3473
  retriedWithTurnServer: false,
@@ -3536,6 +3546,7 @@ describe('plugin-meetings', () => {
3536
3546
  selected_cluster: null,
3537
3547
  selected_subnet: null,
3538
3548
  iceCandidatesCount: 0,
3549
+ ipver: 1,
3539
3550
  }
3540
3551
  );
3541
3552
 
@@ -3600,6 +3611,7 @@ describe('plugin-meetings', () => {
3600
3611
  selected_cluster: null,
3601
3612
  selected_subnet: null,
3602
3613
  iceCandidatesCount: 0,
3614
+ ipver: 1,
3603
3615
  }
3604
3616
  );
3605
3617
 
@@ -3646,6 +3658,7 @@ describe('plugin-meetings', () => {
3646
3658
  locus_id: meeting.locusUrl.split('/').pop(),
3647
3659
  connectionType: 'udp',
3648
3660
  ipVersion: 'IPv6',
3661
+ ipver: 1,
3649
3662
  selectedCandidatePairChanges: 2,
3650
3663
  numTransports: 1,
3651
3664
  isMultistream: false,
@@ -3726,6 +3739,7 @@ describe('plugin-meetings', () => {
3726
3739
  selected_cluster: 'some.cluster',
3727
3740
  selected_subnet: '1.X.X.X',
3728
3741
  iceCandidatesCount: 0,
3742
+ ipver: 1,
3729
3743
  }
3730
3744
  );
3731
3745
 
@@ -4031,13 +4045,14 @@ describe('plugin-meetings', () => {
4031
4045
  });
4032
4046
  });
4033
4047
 
4034
- it('counts the number of members that are in the meeting for MEDIA_QUALITY event', async () => {
4048
+ it('counts the number of members that are in the meeting or lobby for MEDIA_QUALITY event', async () => {
4035
4049
  let fakeMembersCollection = {
4036
4050
  members: {
4037
- member1: {isInMeeting: true},
4038
- member2: {isInMeeting: true},
4039
- member3: {isInMeeting: false},
4040
- },
4051
+ member1: {isInMeeting: true, isInLobby: false},
4052
+ member2: {isInMeeting: false, isInLobby: true},
4053
+ member3: {isInMeeting: false, isInLobby: false},
4054
+ member4: {isInMeeting: true, isInLobby: false},
4055
+ }
4041
4056
  };
4042
4057
  sinon.stub(meeting, 'getMembers').returns({membersCollection: fakeMembersCollection});
4043
4058
  const fakeData = {intervalMetadata: {}};
@@ -4055,11 +4070,12 @@ describe('plugin-meetings', () => {
4055
4070
  },
4056
4071
  payload: {
4057
4072
  intervals: [
4058
- sinon.match.has('intervalMetadata', sinon.match.has('meetingUserCount', 2)),
4073
+ sinon.match.has('intervalMetadata', sinon.match.has('meetingUserCount', 3)),
4059
4074
  ],
4060
4075
  },
4061
4076
  });
4062
- fakeMembersCollection.members.member2.isInMeeting = false;
4077
+ // Move member2 from lobby to neither in meeting nor lobby
4078
+ fakeMembersCollection.members.member2.isInLobby = false;
4063
4079
 
4064
4080
  statsAnalyzerStub.emit(
4065
4081
  {file: 'test', function: 'test'},
@@ -4074,7 +4090,7 @@ describe('plugin-meetings', () => {
4074
4090
  },
4075
4091
  payload: {
4076
4092
  intervals: [
4077
- sinon.match.has('intervalMetadata', sinon.match.has('meetingUserCount', 1)),
4093
+ sinon.match.has('intervalMetadata', sinon.match.has('meetingUserCount', 2)),
4078
4094
  ],
4079
4095
  },
4080
4096
  });
@@ -6548,7 +6564,7 @@ describe('plugin-meetings', () => {
6548
6564
  clientUrl: meeting.deviceUrl,
6549
6565
  });
6550
6566
  assert.notCalled(meeting.meetingRequest.dialOut);
6551
-
6567
+
6552
6568
  // Verify pstnCorrelationId was set
6553
6569
  assert.exists(meeting.pstnCorrelationId);
6554
6570
  assert.notEqual(meeting.pstnCorrelationId, meeting.correlationId);
@@ -6625,7 +6641,7 @@ describe('plugin-meetings', () => {
6625
6641
  throw new Error('Promise resolved when it should have rejected');
6626
6642
  } catch (e) {
6627
6643
  assert.equal(e, error);
6628
-
6644
+
6629
6645
  // Verify behavioral metric was sent with dial_in_correlation_id
6630
6646
  assert.calledWith(Metrics.sendBehavioralMetric, BEHAVIORAL_METRICS.ADD_DIAL_IN_FAILURE, {
6631
6647
  correlation_id: meeting.correlationId,
@@ -6636,7 +6652,7 @@ describe('plugin-meetings', () => {
6636
6652
  reason: error.error.message,
6637
6653
  stack: error.stack,
6638
6654
  });
6639
-
6655
+
6640
6656
  // Verify pstnCorrelationId was cleared after error
6641
6657
  assert.equal(meeting.pstnCorrelationId, undefined);
6642
6658
  }
@@ -6652,7 +6668,7 @@ describe('plugin-meetings', () => {
6652
6668
  throw new Error('Promise resolved when it should have rejected');
6653
6669
  } catch (e) {
6654
6670
  assert.equal(e, error);
6655
-
6671
+
6656
6672
  // Verify behavioral metric was sent with dial_out_correlation_id
6657
6673
  assert.calledWith(Metrics.sendBehavioralMetric, BEHAVIORAL_METRICS.ADD_DIAL_OUT_FAILURE, {
6658
6674
  correlation_id: meeting.correlationId,
@@ -6663,7 +6679,7 @@ describe('plugin-meetings', () => {
6663
6679
  reason: error.error.message,
6664
6680
  stack: error.stack,
6665
6681
  });
6666
-
6682
+
6667
6683
  // Verify pstnCorrelationId was cleared after error
6668
6684
  assert.equal(meeting.pstnCorrelationId, undefined);
6669
6685
  }
@@ -6686,12 +6702,12 @@ describe('plugin-meetings', () => {
6686
6702
 
6687
6703
  it('should disconnect phone audio and clear pstnCorrelationId', async () => {
6688
6704
  meeting.pstnCorrelationId = 'test-pstn-correlation-id';
6689
-
6705
+
6690
6706
  await meeting.disconnectPhoneAudio();
6691
-
6707
+
6692
6708
  // Verify that pstnCorrelationId is cleared
6693
6709
  assert.equal(meeting.pstnCorrelationId, undefined);
6694
-
6710
+
6695
6711
  // Verify that MeetingUtil.disconnectPhoneAudio was called for both dial-in and dial-out
6696
6712
  assert.calledTwice(MeetingUtil.disconnectPhoneAudio);
6697
6713
  assert.calledWith(MeetingUtil.disconnectPhoneAudio, meeting, meeting.dialInUrl);
@@ -6702,9 +6718,9 @@ describe('plugin-meetings', () => {
6702
6718
  meeting.dialInDeviceStatus = 'IDLE';
6703
6719
  meeting.dialOutDeviceStatus = 'IDLE';
6704
6720
  meeting.pstnCorrelationId = 'test-pstn-correlation-id';
6705
-
6721
+
6706
6722
  await meeting.disconnectPhoneAudio();
6707
-
6723
+
6708
6724
  // Verify that pstnCorrelationId is still cleared even when no phone connection is active
6709
6725
  assert.equal(meeting.pstnCorrelationId, undefined);
6710
6726
  // And verify no disconnect was attempted
@@ -12262,6 +12278,7 @@ describe('plugin-meetings', () => {
12262
12278
  meeting.deviceUrl = 'deviceUrl.com';
12263
12279
  webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp = sinon.stub();
12264
12280
  webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration = sinon.stub().returns(1000);
12281
+ webex.internal.newMetrics.submitClientEvent = sinon.stub();
12265
12282
  });
12266
12283
  it('should stop the whiteboard share', async () => {
12267
12284
  const whiteboardShare = meeting.stopWhiteboardShare();
@@ -12363,6 +12380,9 @@ describe('plugin-meetings', () => {
12363
12380
  meeting.selfId = '9528d952-e4de-46cf-8157-fd4823b98377';
12364
12381
  meeting.deviceUrl = 'my-web-url';
12365
12382
  meeting.locusInfo.info = {isWebinar: false};
12383
+ webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp = sinon.stub();
12384
+ webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration = sinon.stub().returns(1500);
12385
+ webex.internal.newMetrics.submitClientEvent = sinon.stub();
12366
12386
  });
12367
12387
 
12368
12388
  const USER_IDS = {
@@ -13508,7 +13528,54 @@ describe('plugin-meetings', () => {
13508
13528
  payloadTestHelper([data1, data2, data3]);
13509
13529
  });
13510
13530
  });
13511
- });
13531
+
13532
+ it('should send share stopped metric when whiteboard sharing stops', () => {
13533
+ // Start whiteboard sharing (this won't trigger metrics)
13534
+ const data1 = generateData(
13535
+ blankPayload,
13536
+ true, // isGranting: true
13537
+ false, // isContent: false (whiteboard)
13538
+ USER_IDS.ME,
13539
+ RESOURCE_URLS.WHITEBOARD_A
13540
+ );
13541
+
13542
+ // Stop whiteboard sharing (this should trigger metrics)
13543
+ const data2 = generateData(
13544
+ data1.payload,
13545
+ false, // isGranting: false (stopping share)
13546
+ false, // isContent: false (whiteboard)
13547
+ USER_IDS.ME
13548
+ );
13549
+
13550
+ // Trigger the events
13551
+ meeting.locusInfo.emit(
13552
+ {function: 'test', file: 'test'},
13553
+ EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES,
13554
+ data1.payload
13555
+ );
13556
+
13557
+ meeting.locusInfo.emit(
13558
+ {function: 'test', file: 'test'},
13559
+ EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES,
13560
+ data2.payload
13561
+ );
13562
+
13563
+ // Verify metrics were called when whiteboard sharing stopped
13564
+ assert.calledWith(webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp, {
13565
+ key: 'internal.client.share.stopped',
13566
+ });
13567
+
13568
+ assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
13569
+ name: 'client.share.stopped',
13570
+ payload: {
13571
+ mediaType: 'whiteboard',
13572
+ shareDuration: 1500, // mocked return value
13573
+ },
13574
+ options: {
13575
+ meetingId: meeting.id,
13576
+ },
13577
+ });
13578
+ });
13512
13579
 
13513
13580
  describe('handleShareVideoStreamMuteStateChange', () => {
13514
13581
  it('should emit MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE event with correct fields', () => {
@@ -13535,6 +13602,7 @@ describe('plugin-meetings', () => {
13535
13602
  });
13536
13603
  });
13537
13604
  });
13605
+ });
13538
13606
 
13539
13607
  describe('#startKeepAlive', () => {
13540
13608
  let clock;
@@ -973,7 +973,8 @@ describe('plugin-meetings', () => {
973
973
  expectedMemberId,
974
974
  expectedRequestingParticipantId,
975
975
  expectedAlias,
976
- expectedLocusUrl
976
+ expectedLocusUrl,
977
+ expectedSuffix
977
978
  ) => {
978
979
  await assert.isFulfilled(resultPromise);
979
980
  assert.calledOnceWithExactly(
@@ -981,13 +982,15 @@ describe('plugin-meetings', () => {
981
982
  expectedMemberId,
982
983
  expectedRequestingParticipantId,
983
984
  expectedAlias,
984
- expectedLocusUrl
985
+ expectedLocusUrl,
986
+ expectedSuffix
985
987
  );
986
988
  assert.calledOnceWithExactly(spies.editDisplayNameMember, {
987
989
  memberId: expectedMemberId,
988
990
  requestingParticipantId: expectedRequestingParticipantId,
989
991
  alias: expectedAlias,
990
992
  locusUrl: expectedLocusUrl,
993
+ suffix: expectedSuffix,
991
994
  });
992
995
  assert.strictEqual(resultPromise, spies.editDisplayNameMember.getCall(0).returnValue);
993
996
  };
@@ -1017,6 +1020,31 @@ describe('plugin-meetings', () => {
1017
1020
  });
1018
1021
 
1019
1022
  it('should make the correct request when called with respective parameters', async () => {
1023
+ const requestingParticipantId = uuid.v4();
1024
+ const memberId = uuid.v4();
1025
+ const alias = 'aliasName';
1026
+ const suffix = 'suffixName';
1027
+ const {members, spies} = setup(url1);
1028
+
1029
+ const resultPromise = members.editDisplayName(
1030
+ memberId,
1031
+ requestingParticipantId,
1032
+ alias,
1033
+ suffix
1034
+ );
1035
+
1036
+ await checkValid(
1037
+ resultPromise,
1038
+ spies,
1039
+ memberId,
1040
+ requestingParticipantId,
1041
+ alias,
1042
+ url1,
1043
+ suffix
1044
+ );
1045
+ });
1046
+
1047
+ it('should make the correct request when called with respective parameters - no suffix', async () => {
1020
1048
  const requestingParticipantId = uuid.v4();
1021
1049
  const memberId = uuid.v4();
1022
1050
  const alias = 'aliasName';
@@ -429,6 +429,61 @@ describe('plugin-meetings', () => {
429
429
  },
430
430
  });
431
431
  });
432
+
433
+ it('sends a POST request to the locus endpoint with suffix empty string', async () => {
434
+ const locusUrl = url1;
435
+ const memberId = 'test1';
436
+ const requestingParticipantId = 'test2';
437
+ const aliasValue = 'alias';
438
+
439
+ const options = {
440
+ memberId,
441
+ requestingParticipantId,
442
+ alias: aliasValue,
443
+ locusUrl,
444
+ suffix: '',
445
+ };
446
+
447
+ await membersRequest.editDisplayNameMember(options);
448
+
449
+ checkRequest({
450
+ method: 'POST',
451
+ uri: `${locusUrl}/participant/${memberId}/alias`,
452
+ body: {
453
+ aliasValue,
454
+ requestingParticipantId,
455
+ suffixValue: '',
456
+ },
457
+ });
458
+ });
459
+
460
+ it('sends a POST request to the locus endpoint with suffixValue', async () => {
461
+ const locusUrl = url1;
462
+ const memberId = 'test1';
463
+ const requestingParticipantId = 'test2';
464
+ const aliasValue = 'alias';
465
+ const suffixValue = 'suffix';
466
+
467
+ const options = {
468
+ memberId,
469
+ requestingParticipantId,
470
+ alias: aliasValue,
471
+ locusUrl,
472
+ suffix: suffixValue,
473
+ };
474
+
475
+ await membersRequest.editDisplayNameMember(options);
476
+
477
+ checkRequest({
478
+ method: 'POST',
479
+ uri: `${locusUrl}/participant/${memberId}/alias`,
480
+ body: {
481
+ aliasValue,
482
+ requestingParticipantId,
483
+ suffixValue,
484
+ },
485
+ });
486
+ });
432
487
  });
433
488
 
434
489
  describe('#moveToLobby', () => {