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

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.
Files changed (45) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/interpretation/index.js +1 -1
  4. package/dist/interpretation/siLanguage.js +1 -1
  5. package/dist/locus-info/index.js +15 -6
  6. package/dist/locus-info/index.js.map +1 -1
  7. package/dist/locus-info/parser.js +4 -1
  8. package/dist/locus-info/parser.js.map +1 -1
  9. package/dist/meeting/index.js +101 -79
  10. package/dist/meeting/index.js.map +1 -1
  11. package/dist/meeting-info/meeting-info-v2.js +29 -21
  12. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  13. package/dist/meetings/index.js +31 -25
  14. package/dist/meetings/index.js.map +1 -1
  15. package/dist/members/index.js +3 -2
  16. package/dist/members/index.js.map +1 -1
  17. package/dist/members/util.js +7 -2
  18. package/dist/members/util.js.map +1 -1
  19. package/dist/reachability/index.js +3 -3
  20. package/dist/reachability/index.js.map +1 -1
  21. package/dist/types/locus-info/index.d.ts +2 -0
  22. package/dist/types/meeting/index.d.ts +1 -0
  23. package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
  24. package/dist/types/meetings/index.d.ts +3 -1
  25. package/dist/types/members/index.d.ts +2 -1
  26. package/dist/types/members/util.d.ts +6 -3
  27. package/dist/webinar/index.js +1 -1
  28. package/package.json +13 -13
  29. package/src/locus-info/index.ts +13 -5
  30. package/src/locus-info/parser.ts +5 -1
  31. package/src/meeting/index.ts +29 -3
  32. package/src/meeting-info/meeting-info-v2.ts +24 -5
  33. package/src/meetings/index.ts +9 -3
  34. package/src/members/index.ts +9 -2
  35. package/src/members/util.ts +18 -2
  36. package/src/reachability/index.ts +3 -3
  37. package/test/unit/spec/locus-info/index.js +7 -7
  38. package/test/unit/spec/locus-info/parser.js +3 -2
  39. package/test/unit/spec/meeting/index.js +96 -22
  40. package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
  41. package/test/unit/spec/meetings/index.js +10 -1
  42. package/test/unit/spec/members/index.js +30 -2
  43. package/test/unit/spec/members/request.js +55 -0
  44. package/test/unit/spec/members/utils.js +116 -14
  45. package/test/unit/spec/reachability/index.ts +158 -3
@@ -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
@@ -7462,6 +7478,8 @@ describe('plugin-meetings', () => {
7462
7478
  'locus-id',
7463
7479
  {extraParam1: 'value1', permissionToken: FAKE_PERMISSION_TOKEN},
7464
7480
  {meetingId: meeting.id, sendCAevents: true},
7481
+ null,
7482
+ null,
7465
7483
  null
7466
7484
  );
7467
7485
  assert.deepEqual(meeting.meetingInfo, {
@@ -7508,6 +7526,8 @@ describe('plugin-meetings', () => {
7508
7526
  'locus-id',
7509
7527
  {extraParam1: 'value1', permissionToken: FAKE_PERMISSION_TOKEN},
7510
7528
  {meetingId: meeting.id, sendCAevents: true},
7529
+ null,
7530
+ null,
7511
7531
  null
7512
7532
  );
7513
7533
  assert.deepEqual(meeting.meetingInfo, {
@@ -7563,6 +7583,8 @@ describe('plugin-meetings', () => {
7563
7583
  permissionToken: FAKE_PERMISSION_TOKEN,
7564
7584
  },
7565
7585
  {meetingId: meeting.id, sendCAevents: true},
7586
+ null,
7587
+ null,
7566
7588
  null
7567
7589
  );
7568
7590
  assert.deepEqual(meeting.meetingInfo, {
@@ -12262,6 +12284,7 @@ describe('plugin-meetings', () => {
12262
12284
  meeting.deviceUrl = 'deviceUrl.com';
12263
12285
  webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp = sinon.stub();
12264
12286
  webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration = sinon.stub().returns(1000);
12287
+ webex.internal.newMetrics.submitClientEvent = sinon.stub();
12265
12288
  });
12266
12289
  it('should stop the whiteboard share', async () => {
12267
12290
  const whiteboardShare = meeting.stopWhiteboardShare();
@@ -12363,6 +12386,9 @@ describe('plugin-meetings', () => {
12363
12386
  meeting.selfId = '9528d952-e4de-46cf-8157-fd4823b98377';
12364
12387
  meeting.deviceUrl = 'my-web-url';
12365
12388
  meeting.locusInfo.info = {isWebinar: false};
12389
+ webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp = sinon.stub();
12390
+ webex.internal.newMetrics.callDiagnosticLatencies.getShareDuration = sinon.stub().returns(1500);
12391
+ webex.internal.newMetrics.submitClientEvent = sinon.stub();
12366
12392
  });
12367
12393
 
12368
12394
  const USER_IDS = {
@@ -13508,7 +13534,54 @@ describe('plugin-meetings', () => {
13508
13534
  payloadTestHelper([data1, data2, data3]);
13509
13535
  });
13510
13536
  });
13511
- });
13537
+
13538
+ it('should send share stopped metric when whiteboard sharing stops', () => {
13539
+ // Start whiteboard sharing (this won't trigger metrics)
13540
+ const data1 = generateData(
13541
+ blankPayload,
13542
+ true, // isGranting: true
13543
+ false, // isContent: false (whiteboard)
13544
+ USER_IDS.ME,
13545
+ RESOURCE_URLS.WHITEBOARD_A
13546
+ );
13547
+
13548
+ // Stop whiteboard sharing (this should trigger metrics)
13549
+ const data2 = generateData(
13550
+ data1.payload,
13551
+ false, // isGranting: false (stopping share)
13552
+ false, // isContent: false (whiteboard)
13553
+ USER_IDS.ME
13554
+ );
13555
+
13556
+ // Trigger the events
13557
+ meeting.locusInfo.emit(
13558
+ {function: 'test', file: 'test'},
13559
+ EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES,
13560
+ data1.payload
13561
+ );
13562
+
13563
+ meeting.locusInfo.emit(
13564
+ {function: 'test', file: 'test'},
13565
+ EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES,
13566
+ data2.payload
13567
+ );
13568
+
13569
+ // Verify metrics were called when whiteboard sharing stopped
13570
+ assert.calledWith(webex.internal.newMetrics.callDiagnosticLatencies.saveTimestamp, {
13571
+ key: 'internal.client.share.stopped',
13572
+ });
13573
+
13574
+ assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
13575
+ name: 'client.share.stopped',
13576
+ payload: {
13577
+ mediaType: 'whiteboard',
13578
+ shareDuration: 1500, // mocked return value
13579
+ },
13580
+ options: {
13581
+ meetingId: meeting.id,
13582
+ },
13583
+ });
13584
+ });
13512
13585
 
13513
13586
  describe('handleShareVideoStreamMuteStateChange', () => {
13514
13587
  it('should emit MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE event with correct fields', () => {
@@ -13535,6 +13608,7 @@ describe('plugin-meetings', () => {
13535
13608
  });
13536
13609
  });
13537
13610
  });
13611
+ });
13538
13612
 
13539
13613
  describe('#startKeepAlive', () => {
13540
13614
  let clock;
@@ -218,6 +218,7 @@ describe('plugin-meetings', () => {
218
218
  invitees: invitee,
219
219
  installedOrgID: undefined,
220
220
  schedule: true,
221
+ classificationId: undefined,
221
222
  },
222
223
  });
223
224
 
@@ -652,7 +653,8 @@ describe('plugin-meetings', () => {
652
653
  assert.calledOnceWithExactly(
653
654
  meetingInfo.createAdhocSpaceMeeting,
654
655
  'conversationUrl',
655
- installedOrgID
656
+ installedOrgID,
657
+ null,
656
658
  );
657
659
  assert.notCalled(webex.request);
658
660
  meetingInfo.createAdhocSpaceMeeting.restore();
@@ -1148,6 +1150,7 @@ describe('plugin-meetings', () => {
1148
1150
  describe('createAdhocSpaceMeeting', () => {
1149
1151
  const conversationUrl = 'https://conversationUrl/xxx';
1150
1152
  const installedOrgID = '12345';
1153
+ const classificationId = '123456';
1151
1154
 
1152
1155
  const setup = () => {
1153
1156
  const invitee = [];
@@ -1173,7 +1176,7 @@ describe('plugin-meetings', () => {
1173
1176
  body: conversation,
1174
1177
  });
1175
1178
 
1176
- const result = await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID);
1179
+ const result = await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID, classificationId);
1177
1180
 
1178
1181
  assert.calledWith(webex.request, {
1179
1182
  uri: conversationUrl,
@@ -1192,6 +1195,7 @@ describe('plugin-meetings', () => {
1192
1195
  invitees: invitee,
1193
1196
  installedOrgID: installedOrgID,
1194
1197
  schedule: false,
1198
+ classificationId,
1195
1199
  },
1196
1200
  });
1197
1201
  assert.calledOnce(Metrics.sendBehavioralMetric);
@@ -1206,7 +1210,7 @@ describe('plugin-meetings', () => {
1206
1210
  webex.request = sinon.stub().resolves({
1207
1211
  body: conversation,
1208
1212
  });
1209
- await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID);
1213
+ await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID, classificationId);
1210
1214
 
1211
1215
  assert.calledWith(webex.request, {
1212
1216
  uri: conversationUrl,
@@ -1224,6 +1228,7 @@ describe('plugin-meetings', () => {
1224
1228
  invitees: invitee,
1225
1229
  installedOrgID,
1226
1230
  schedule: false,
1231
+ classificationId,
1227
1232
  },
1228
1233
  });
1229
1234
  assert(Metrics.sendBehavioralMetric.calledOnce);
@@ -1099,6 +1099,7 @@ describe('plugin-meetings', () => {
1099
1099
  const FAKE_USE_RANDOM_DELAY = true;
1100
1100
  const correlationId = 'my-correlationId';
1101
1101
  const sessionCorrelationId = 'my-session-correlationId';
1102
+ const classificationId = 'my-classificationId';
1102
1103
  const callStateForMetrics = {
1103
1104
  sessionCorrelationId: 'my-session-correlationId2',
1104
1105
  correlationId: 'my-correlationId2',
@@ -1119,7 +1120,8 @@ describe('plugin-meetings', () => {
1119
1120
  callStateForMetrics,
1120
1121
  undefined,
1121
1122
  undefined,
1122
- sessionCorrelationId
1123
+ sessionCorrelationId,
1124
+ classificationId
1123
1125
  );
1124
1126
  assert.calledOnceWithExactly(fakeMeeting.updateCallStateForMetrics, {
1125
1127
  ...callStateForMetrics,
@@ -1201,6 +1203,13 @@ describe('plugin-meetings', () => {
1201
1203
  );
1202
1204
  });
1203
1205
 
1206
+ it('calls createMeeting with classificationId and returns its promise', async () => {
1207
+ await checkCallCreateMeeting(
1208
+ [test1, test2, FAKE_USE_RANDOM_DELAY, {}, undefined, true, callStateForMetrics, undefined, undefined, undefined, classificationId],
1209
+ [test1, test2, FAKE_USE_RANDOM_DELAY, {}, callStateForMetrics, true, undefined, undefined, classificationId],
1210
+ );
1211
+ });
1212
+
1204
1213
  it('calls createMeeting with callStateForMetrics overwritten with correlationId and returns its promise', async () => {
1205
1214
  await checkCallCreateMeeting(
1206
1215
  [test1, test2, FAKE_USE_RANDOM_DELAY, {}, correlationId, true, callStateForMetrics],
@@ -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', () => {