@webex/plugin-meetings 2.30.1 → 2.31.0

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.
@@ -3,11 +3,11 @@ import sinon from 'sinon';
3
3
  import {cloneDeep} from 'lodash';
4
4
  import {assert} from '@webex/test-helper-chai';
5
5
  import MockWebex from '@webex/test-helper-mock-webex';
6
-
7
6
  import Meetings from '@webex/plugin-meetings';
8
7
  import LocusInfo from '@webex/plugin-meetings/src/locus-info';
9
8
  import SelfUtils from '@webex/plugin-meetings/src/locus-info/selfUtils';
10
9
  import InfoUtils from '@webex/plugin-meetings/src/locus-info/infoUtils';
10
+ import EmbeddedAppsUtils from '@webex/plugin-meetings/src/locus-info/embeddedAppsUtils';
11
11
  import LocusDeltaParser from '@webex/plugin-meetings/src/locus-info/parser';
12
12
 
13
13
  import {
@@ -15,28 +15,34 @@ import {
15
15
  RECORDING_STATE,
16
16
  LOCUSEVENT,
17
17
  EVENTS,
18
- DISPLAY_HINTS
18
+ DISPLAY_HINTS,
19
19
  } from '../../../../src/constants';
20
20
 
21
21
  import {self, selfWithInactivity} from './selfConstant';
22
22
 
23
23
  describe('plugin-meetings', () => {
24
24
  describe('LocusInfo index', () => {
25
- const updateMeeting = () => {};
25
+ let mockMeeting;
26
+ const updateMeeting = (object) => {
27
+ if (mockMeeting && object && Object.keys(object).length) {
28
+ Object.keys(object).forEach((key) => {
29
+ mockMeeting[key] = object[key];
30
+ });
31
+ }
32
+ };
26
33
  const locus = {};
27
- const meetingId = 'meedingId';
34
+ const meetingId = 'meetingId';
28
35
  let locusInfo;
29
36
 
30
37
  const webex = new MockWebex({
31
38
  children: {
32
- meetings: Meetings
33
- }
39
+ meetings: Meetings,
40
+ },
34
41
  });
35
42
 
36
43
  beforeEach(() => {
37
- locusInfo = new LocusInfo(
38
- updateMeeting, webex, meetingId
39
- );
44
+ mockMeeting = {};
45
+ locusInfo = new LocusInfo(updateMeeting, webex, meetingId);
40
46
 
41
47
  locusInfo.init(locus);
42
48
 
@@ -49,9 +55,9 @@ describe('plugin-meetings', () => {
49
55
  isLocked: false,
50
56
  displayHints: {
51
57
  joined: ['ROSTER_IN_MEETING', 'LOCK_STATUS_UNLOCKED'],
52
- moderator: []
53
- }
54
- }
58
+ moderator: [],
59
+ },
60
+ },
55
61
  };
56
62
  });
57
63
 
@@ -67,14 +73,15 @@ describe('plugin-meetings', () => {
67
73
  paused: false,
68
74
  meta: {
69
75
  lastModified: 'TODAY',
70
- modifiedBy: 'George Kittle'
71
- }
76
+ modifiedBy: 'George Kittle',
77
+ },
72
78
  },
73
79
  shareControl: {},
74
80
  transcribe: {},
75
81
  meetingContainer: {
76
- meetingContainerUrl: 'http://new-url.com'
77
- }
82
+ meetingContainerUrl: 'http://new-url.com',
83
+ },
84
+ entryExitTone: {enabled: true, mode: 'foo'},
78
85
  };
79
86
  });
80
87
 
@@ -106,25 +113,28 @@ describe('plugin-meetings', () => {
106
113
  paused: false,
107
114
  meta: {
108
115
  lastModified: 'TODAY',
109
- modifiedBy: 'George Kittle'
110
- }
116
+ modifiedBy: 'George Kittle',
117
+ },
111
118
  },
112
119
  shareControl: {},
113
- transcribe: {}
120
+ transcribe: {},
114
121
  };
115
122
  locusInfo.emitScoped = sinon.stub();
116
123
  locusInfo.updateControls(newControls);
117
124
 
118
- assert.calledWith(locusInfo.emitScoped, {
119
- file: 'locus-info',
120
- function: 'updateControls'
121
- },
122
- LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
123
- {
124
- state: RECORDING_STATE.IDLE,
125
- modifiedBy: 'George Kittle',
126
- lastModified: 'TODAY'
127
- });
125
+ assert.calledWith(
126
+ locusInfo.emitScoped,
127
+ {
128
+ file: 'locus-info',
129
+ function: 'updateControls',
130
+ },
131
+ LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
132
+ {
133
+ state: RECORDING_STATE.IDLE,
134
+ modifiedBy: 'George Kittle',
135
+ lastModified: 'TODAY',
136
+ }
137
+ );
128
138
  });
129
139
 
130
140
  it('should update the recording state to `RECORDING`', () => {
@@ -136,26 +146,29 @@ describe('plugin-meetings', () => {
136
146
  paused: false,
137
147
  meta: {
138
148
  lastModified: 'TODAY',
139
- modifiedBy: 'George Kittle'
140
- }
149
+ modifiedBy: 'George Kittle',
150
+ },
141
151
  },
142
152
  shareControl: {},
143
- transcribe: {}
153
+ transcribe: {},
144
154
  };
145
155
  newControls.record.recording = true;
146
156
  locusInfo.emitScoped = sinon.stub();
147
157
  locusInfo.updateControls(newControls);
148
158
 
149
- assert.calledWith(locusInfo.emitScoped, {
150
- file: 'locus-info',
151
- function: 'updateControls'
152
- },
153
- LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
154
- {
155
- state: RECORDING_STATE.RECORDING,
156
- modifiedBy: 'George Kittle',
157
- lastModified: 'TODAY'
158
- });
159
+ assert.calledWith(
160
+ locusInfo.emitScoped,
161
+ {
162
+ file: 'locus-info',
163
+ function: 'updateControls',
164
+ },
165
+ LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
166
+ {
167
+ state: RECORDING_STATE.RECORDING,
168
+ modifiedBy: 'George Kittle',
169
+ lastModified: 'TODAY',
170
+ }
171
+ );
159
172
  });
160
173
 
161
174
  it('should update the recording state to `PAUSED`', () => {
@@ -168,26 +181,29 @@ describe('plugin-meetings', () => {
168
181
  paused: false,
169
182
  meta: {
170
183
  lastModified: 'TODAY',
171
- modifiedBy: 'George Kittle'
172
- }
184
+ modifiedBy: 'George Kittle',
185
+ },
173
186
  },
174
187
  shareControl: {},
175
- transcribe: {}
188
+ transcribe: {},
176
189
  };
177
190
  newControls.record.paused = true;
178
191
  newControls.record.recording = true;
179
192
  locusInfo.updateControls(newControls);
180
193
 
181
- assert.calledWith(locusInfo.emitScoped, {
182
- file: 'locus-info',
183
- function: 'updateControls'
184
- },
185
- LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
186
- {
187
- state: RECORDING_STATE.PAUSED,
188
- modifiedBy: 'George Kittle',
189
- lastModified: 'TODAY'
190
- });
194
+ assert.calledWith(
195
+ locusInfo.emitScoped,
196
+ {
197
+ file: 'locus-info',
198
+ function: 'updateControls',
199
+ },
200
+ LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
201
+ {
202
+ state: RECORDING_STATE.PAUSED,
203
+ modifiedBy: 'George Kittle',
204
+ lastModified: 'TODAY',
205
+ }
206
+ );
191
207
  });
192
208
 
193
209
  it('should update the recording state to `RESUMED`', () => {
@@ -200,27 +216,30 @@ describe('plugin-meetings', () => {
200
216
  paused: true,
201
217
  meta: {
202
218
  lastModified: 'TODAY',
203
- modifiedBy: 'George Kittle'
204
- }
219
+ modifiedBy: 'George Kittle',
220
+ },
205
221
  },
206
222
  shareControl: {},
207
- transcribe: {}
223
+ transcribe: {},
208
224
  };
209
225
  // there must be a recording to be paused/resumed
210
226
  newControls.record.recording = true;
211
227
  newControls.record.paused = false;
212
228
  locusInfo.updateControls(newControls);
213
229
 
214
- assert.calledWith(locusInfo.emitScoped, {
215
- file: 'locus-info',
216
- function: 'updateControls'
217
- },
218
- LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
219
- {
220
- state: RECORDING_STATE.RESUMED,
221
- modifiedBy: 'George Kittle',
222
- lastModified: 'TODAY'
223
- });
230
+ assert.calledWith(
231
+ locusInfo.emitScoped,
232
+ {
233
+ file: 'locus-info',
234
+ function: 'updateControls',
235
+ },
236
+ LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
237
+ {
238
+ state: RECORDING_STATE.RESUMED,
239
+ modifiedBy: 'George Kittle',
240
+ lastModified: 'TODAY',
241
+ }
242
+ );
224
243
  });
225
244
 
226
245
  it('should update the recording state to `IDLE` even if `pause`status changes', () => {
@@ -233,26 +252,29 @@ describe('plugin-meetings', () => {
233
252
  paused: true,
234
253
  meta: {
235
254
  lastModified: 'TODAY',
236
- modifiedBy: 'George Kittle'
237
- }
255
+ modifiedBy: 'George Kittle',
256
+ },
238
257
  },
239
258
  shareControl: {},
240
- transcribe: {}
259
+ transcribe: {},
241
260
  };
242
261
  newControls.record.recording = false;
243
262
  newControls.record.paused = false;
244
263
  locusInfo.updateControls(newControls);
245
264
 
246
- assert.calledWith(locusInfo.emitScoped, {
247
- file: 'locus-info',
248
- function: 'updateControls'
249
- },
250
- LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
251
- {
252
- state: RECORDING_STATE.IDLE,
253
- modifiedBy: 'George Kittle',
254
- lastModified: 'TODAY'
255
- });
265
+ assert.calledWith(
266
+ locusInfo.emitScoped,
267
+ {
268
+ file: 'locus-info',
269
+ function: 'updateControls',
270
+ },
271
+ LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
272
+ {
273
+ state: RECORDING_STATE.IDLE,
274
+ modifiedBy: 'George Kittle',
275
+ lastModified: 'TODAY',
276
+ }
277
+ );
256
278
  });
257
279
 
258
280
  it('should update the transcript state', () => {
@@ -265,28 +287,32 @@ describe('plugin-meetings', () => {
265
287
  paused: true,
266
288
  meta: {
267
289
  lastModified: 'TODAY',
268
- modifiedBy: 'George Kittle'
269
- }
290
+ modifiedBy: 'George Kittle',
291
+ },
270
292
  },
271
293
  shareControl: {},
272
294
  transcribe: {
273
295
  transcribing: false,
274
- caption: false
275
- }
296
+ caption: false,
297
+ },
276
298
  };
277
299
  newControls.transcribe.transcribing = true;
278
300
  newControls.transcribe.caption = true;
279
301
 
280
302
  locusInfo.updateControls(newControls);
281
303
 
282
- assert.calledWith(locusInfo.emitScoped, {
283
- file: 'locus-info',
284
- function: 'updateControls'
285
- },
286
- LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED,
287
- {
288
- transcribing: true, caption: true
289
- });
304
+ assert.calledWith(
305
+ locusInfo.emitScoped,
306
+ {
307
+ file: 'locus-info',
308
+ function: 'updateControls',
309
+ },
310
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED,
311
+ {
312
+ transcribing: true,
313
+ caption: true,
314
+ }
315
+ );
290
316
  });
291
317
 
292
318
  it('should update the meetingContainerURL from null', () => {
@@ -297,12 +323,15 @@ describe('plugin-meetings', () => {
297
323
  locusInfo.emitScoped = sinon.stub();
298
324
  locusInfo.updateControls(newControls);
299
325
 
300
- assert.calledWith(locusInfo.emitScoped, {
301
- file: 'locus-info',
302
- function: 'updateControls'
303
- },
304
- LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED,
305
- {meetingContainerUrl: 'http://new-url.com'});
326
+ assert.calledWith(
327
+ locusInfo.emitScoped,
328
+ {
329
+ file: 'locus-info',
330
+ function: 'updateControls',
331
+ },
332
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED,
333
+ {meetingContainerUrl: 'http://new-url.com'}
334
+ );
306
335
  });
307
336
 
308
337
  it('should update the meetingContainerURL from not null', () => {
@@ -313,12 +342,15 @@ describe('plugin-meetings', () => {
313
342
  locusInfo.emitScoped = sinon.stub();
314
343
  locusInfo.updateControls(newControls);
315
344
 
316
- assert.calledWith(locusInfo.emitScoped, {
317
- file: 'locus-info',
318
- function: 'updateControls'
319
- },
320
- LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED,
321
- {meetingContainerUrl: 'http://new-url.com'});
345
+ assert.calledWith(
346
+ locusInfo.emitScoped,
347
+ {
348
+ file: 'locus-info',
349
+ function: 'updateControls',
350
+ },
351
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED,
352
+ {meetingContainerUrl: 'http://new-url.com'}
353
+ );
322
354
  });
323
355
 
324
356
  it('should update the meetingContainerURL from missing', () => {
@@ -327,12 +359,44 @@ describe('plugin-meetings', () => {
327
359
  locusInfo.emitScoped = sinon.stub();
328
360
  locusInfo.updateControls(newControls);
329
361
 
330
- assert.calledWith(locusInfo.emitScoped, {
331
- file: 'locus-info',
332
- function: 'updateControls'
333
- },
334
- LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED,
335
- {meetingContainerUrl: 'http://new-url.com'});
362
+ assert.calledWith(
363
+ locusInfo.emitScoped,
364
+ {
365
+ file: 'locus-info',
366
+ function: 'updateControls',
367
+ },
368
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_CONTAINER_UPDATED,
369
+ {meetingContainerUrl: 'http://new-url.com'}
370
+ );
371
+ });
372
+
373
+ it('should update the entryExitTone when changed', () => {
374
+ locusInfo.controls = {};
375
+
376
+ locusInfo.emitScoped = sinon.stub();
377
+ locusInfo.updateControls(newControls);
378
+
379
+ assert.calledWith(
380
+ locusInfo.emitScoped,
381
+ {
382
+ file: 'locus-info',
383
+ function: 'updateControls',
384
+ },
385
+ LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED,
386
+ {entryExitTone: 'foo'}
387
+ );
388
+ });
389
+
390
+ it('should not update the entryExitTone when unchanged', () => {
391
+ locusInfo.controls = {entryExitTone: {enabled: true, mode: 'foo'}};
392
+
393
+ locusInfo.emitScoped = sinon.stub();
394
+ locusInfo.updateControls(newControls);
395
+
396
+ locusInfo.emitScoped.getCalls().forEach((x) => {
397
+ // check that no calls in emitScoped are for CONTROLS_ENTRY_EXIT_TONE_UPDATED
398
+ assert.notEqual(x.args[1], LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED);
399
+ });
336
400
  });
337
401
  });
338
402
 
@@ -343,14 +407,14 @@ describe('plugin-meetings', () => {
343
407
  newParticipants = [
344
408
  {
345
409
  person: {
346
- id: 1234
410
+ id: 1234,
347
411
  },
348
412
  status: {
349
413
  audioStatus: 'testValue',
350
414
  videoSlidesStatus: 'testValue',
351
- videoStatus: 'testValue'
352
- }
353
- }
415
+ videoStatus: 'testValue',
416
+ },
417
+ },
354
418
  ];
355
419
  });
356
420
 
@@ -358,26 +422,27 @@ describe('plugin-meetings', () => {
358
422
  locusInfo.parsedLocus = {
359
423
  controls: {
360
424
  record: {
361
- modifiedBy: '1'
362
- }
425
+ modifiedBy: '1',
426
+ },
363
427
  },
364
428
  self: {
365
429
  selfIdentity: '123',
366
- selfId: '2'
430
+ selfId: '2',
367
431
  },
368
432
  host: {
369
- hostId: '3'
370
- }
433
+ hostId: '3',
434
+ },
371
435
  };
372
436
  locusInfo.emitScoped = sinon.stub();
373
437
  locusInfo.updateParticipants({});
374
438
 
375
439
  // if this assertion fails, double-check the attributes used in
376
440
  // the updateParticipants function in locus-info/index.js
377
- assert.calledWith(locusInfo.emitScoped,
441
+ assert.calledWith(
442
+ locusInfo.emitScoped,
378
443
  {
379
444
  file: 'locus-info',
380
- function: 'updateParticipants'
445
+ function: 'updateParticipants',
381
446
  },
382
447
  EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS,
383
448
  {
@@ -385,8 +450,9 @@ describe('plugin-meetings', () => {
385
450
  recordingId: '1',
386
451
  selfIdentity: '123',
387
452
  selfId: '2',
388
- hostId: '3'
389
- });
453
+ hostId: '3',
454
+ }
455
+ );
390
456
  // note: in a real use case, recordingId, selfId, and hostId would all be the same
391
457
  // for this specific test, we are double-checking that each of the id's
392
458
  // are being correctly grabbed from locusInfo.parsedLocus within updateParticipants
@@ -434,19 +500,24 @@ describe('plugin-meetings', () => {
434
500
  locusInfo.self = undefined;
435
501
  const selfWithLayoutChanged = cloneDeep(self);
436
502
 
437
- selfWithLayoutChanged.controls.layouts = [{
438
- type: layoutType,
439
- }];
503
+ selfWithLayoutChanged.controls.layouts = [
504
+ {
505
+ type: layoutType,
506
+ },
507
+ ];
440
508
 
441
509
  locusInfo.emitScoped = sinon.stub();
442
510
  locusInfo.updateSelf(selfWithLayoutChanged, []);
443
511
 
444
- assert.calledWith(locusInfo.emitScoped, {
445
- file: 'locus-info',
446
- function: 'updateSelf'
447
- },
448
- LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED,
449
- {layout: layoutType});
512
+ assert.calledWith(
513
+ locusInfo.emitScoped,
514
+ {
515
+ file: 'locus-info',
516
+ function: 'updateSelf',
517
+ },
518
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED,
519
+ {layout: layoutType}
520
+ );
450
521
  });
451
522
 
452
523
  it('should not trigger CONTROLS_MEETING_LAYOUT_UPDATED when the meeting layout controls did not change', () => {
@@ -455,9 +526,11 @@ describe('plugin-meetings', () => {
455
526
  locusInfo.self = undefined;
456
527
  const selfWithLayoutChanged = cloneDeep(self);
457
528
 
458
- selfWithLayoutChanged.controls.layouts = [{
459
- type: layoutType,
460
- }];
529
+ selfWithLayoutChanged.controls.layouts = [
530
+ {
531
+ type: layoutType,
532
+ },
533
+ ];
461
534
 
462
535
  // Set the layout prior to stubbing to validate it does not change.
463
536
  locusInfo.updateSelf(selfWithLayoutChanged, []);
@@ -466,12 +539,15 @@ describe('plugin-meetings', () => {
466
539
 
467
540
  locusInfo.updateSelf(selfWithLayoutChanged, []);
468
541
 
469
- assert.neverCalledWith(locusInfo.emitScoped, {
470
- file: 'locus-info',
471
- function: 'updateSelf'
472
- },
473
- LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED,
474
- {layout: layoutType});
542
+ assert.neverCalledWith(
543
+ locusInfo.emitScoped,
544
+ {
545
+ file: 'locus-info',
546
+ function: 'updateSelf',
547
+ },
548
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED,
549
+ {layout: layoutType}
550
+ );
475
551
  });
476
552
 
477
553
  it('should trigger MEDIA_INACTIVITY on server media inactivity', () => {
@@ -481,12 +557,15 @@ describe('plugin-meetings', () => {
481
557
  locusInfo.emitScoped = sinon.stub();
482
558
  locusInfo.updateSelf(selfWithInactivity, []);
483
559
 
484
- assert.calledWith(locusInfo.emitScoped, {
485
- file: 'locus-info',
486
- function: 'updateSelf'
487
- },
488
- LOCUSINFO.EVENTS.MEDIA_INACTIVITY,
489
- SelfUtils.getMediaStatus(selfWithInactivity.mediaSessions));
560
+ assert.calledWith(
561
+ locusInfo.emitScoped,
562
+ {
563
+ file: 'locus-info',
564
+ function: 'updateSelf',
565
+ },
566
+ LOCUSINFO.EVENTS.MEDIA_INACTIVITY,
567
+ SelfUtils.getMediaStatus(selfWithInactivity.mediaSessions)
568
+ );
490
569
  });
491
570
 
492
571
  it('should trigger SELF_REMOTE_MUTE_STATUS_UPDATED when muted on entry', () => {
@@ -500,24 +579,30 @@ describe('plugin-meetings', () => {
500
579
  locusInfo.emitScoped = sinon.stub();
501
580
  locusInfo.updateSelf(selfWithMutedByOthers, []);
502
581
 
503
- assert.calledWith(locusInfo.emitScoped, {
504
- file: 'locus-info',
505
- function: 'updateSelf'
506
- },
507
- LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
508
- {muted: true, unmuteAllowed: true});
582
+ assert.calledWith(
583
+ locusInfo.emitScoped,
584
+ {
585
+ file: 'locus-info',
586
+ function: 'updateSelf',
587
+ },
588
+ LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
589
+ {muted: true, unmuteAllowed: true}
590
+ );
509
591
 
510
592
  // but sometimes "previous self" is defined, but without controls.audio.muted, so we test this here:
511
593
  locusInfo.self = cloneDeep(self);
512
594
  locusInfo.self.controls.audio = {};
513
595
 
514
596
  locusInfo.updateSelf(selfWithMutedByOthers, []);
515
- assert.calledWith(locusInfo.emitScoped, {
516
- file: 'locus-info',
517
- function: 'updateSelf'
518
- },
519
- LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
520
- {muted: true, unmuteAllowed: true});
597
+ assert.calledWith(
598
+ locusInfo.emitScoped,
599
+ {
600
+ file: 'locus-info',
601
+ function: 'updateSelf',
602
+ },
603
+ LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
604
+ {muted: true, unmuteAllowed: true}
605
+ );
521
606
  });
522
607
 
523
608
  it('should not trigger SELF_REMOTE_MUTE_STATUS_UPDATED when not muted on entry', () => {
@@ -568,12 +653,15 @@ describe('plugin-meetings', () => {
568
653
  locusInfo.emitScoped = sinon.stub();
569
654
  locusInfo.updateSelf(selfWithMutedByOthers, []);
570
655
 
571
- assert.calledWith(locusInfo.emitScoped, {
572
- file: 'locus-info',
573
- function: 'updateSelf'
574
- },
575
- LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
576
- {muted: true, unmuteAllowed: true});
656
+ assert.calledWith(
657
+ locusInfo.emitScoped,
658
+ {
659
+ file: 'locus-info',
660
+ function: 'updateSelf',
661
+ },
662
+ LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
663
+ {muted: true, unmuteAllowed: true}
664
+ );
577
665
  });
578
666
 
579
667
  it('should trigger SELF_REMOTE_MUTE_STATUS_UPDATED if muted and disallowUnmute changed', () => {
@@ -588,12 +676,15 @@ describe('plugin-meetings', () => {
588
676
  locusInfo.emitScoped = sinon.stub();
589
677
  locusInfo.updateSelf(selfWithMutedByOthersAndDissalowUnmute, []);
590
678
 
591
- assert.calledWith(locusInfo.emitScoped, {
592
- file: 'locus-info',
593
- function: 'updateSelf'
594
- },
595
- LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
596
- {muted: true, unmuteAllowed: false});
679
+ assert.calledWith(
680
+ locusInfo.emitScoped,
681
+ {
682
+ file: 'locus-info',
683
+ function: 'updateSelf',
684
+ },
685
+ LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
686
+ {muted: true, unmuteAllowed: false}
687
+ );
597
688
 
598
689
  // now change only disallowUnmute
599
690
  const selfWithMutedByOthers = cloneDeep(self);
@@ -603,12 +694,15 @@ describe('plugin-meetings', () => {
603
694
 
604
695
  locusInfo.updateSelf(selfWithMutedByOthers, []);
605
696
 
606
- assert.calledWith(locusInfo.emitScoped, {
607
- file: 'locus-info',
608
- function: 'updateSelf'
609
- },
610
- LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
611
- {muted: true, unmuteAllowed: true});
697
+ assert.calledWith(
698
+ locusInfo.emitScoped,
699
+ {
700
+ file: 'locus-info',
701
+ function: 'updateSelf',
702
+ },
703
+ LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED,
704
+ {muted: true, unmuteAllowed: true}
705
+ );
612
706
  });
613
707
 
614
708
  it('should trigger LOCAL_UNMUTE_REQUIRED on localAudioUnmuteRequired', () => {
@@ -622,15 +716,18 @@ describe('plugin-meetings', () => {
622
716
  locusInfo.emitScoped = sinon.stub();
623
717
  locusInfo.updateSelf(selfWithLocalUnmuteRequired, []);
624
718
 
625
- assert.calledWith(locusInfo.emitScoped, {
626
- file: 'locus-info',
627
- function: 'updateSelf'
628
- },
629
- LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED,
630
- {
631
- muted: false,
632
- unmuteAllowed: true
633
- });
719
+ assert.calledWith(
720
+ locusInfo.emitScoped,
721
+ {
722
+ file: 'locus-info',
723
+ function: 'updateSelf',
724
+ },
725
+ LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED,
726
+ {
727
+ muted: false,
728
+ unmuteAllowed: true,
729
+ }
730
+ );
634
731
  });
635
732
 
636
733
  it('should trigger LOCAL_UNMUTE_REQUESTED when receiving requestedToUnmute=true', () => {
@@ -643,12 +740,15 @@ describe('plugin-meetings', () => {
643
740
  locusInfo.emitScoped = sinon.stub();
644
741
  locusInfo.updateSelf(selfWithRequestedToUnmute, []);
645
742
 
646
- assert.calledWith(locusInfo.emitScoped, {
647
- file: 'locus-info',
648
- function: 'updateSelf'
649
- },
650
- LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED,
651
- {});
743
+ assert.calledWith(
744
+ locusInfo.emitScoped,
745
+ {
746
+ file: 'locus-info',
747
+ function: 'updateSelf',
748
+ },
749
+ LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED,
750
+ {}
751
+ );
652
752
 
653
753
  // now change requestedToUnmute back to false -> it should NOT trigger LOCAL_UNMUTE_REQUESTED
654
754
  const selfWithoutRequestedToUnmute = cloneDeep(selfWithRequestedToUnmute);
@@ -658,15 +758,17 @@ describe('plugin-meetings', () => {
658
758
  locusInfo.emitScoped.resetHistory();
659
759
  locusInfo.updateSelf(selfWithoutRequestedToUnmute, []);
660
760
 
661
- assert.neverCalledWith(locusInfo.emitScoped, {
662
- file: 'locus-info',
663
- function: 'updateSelf'
664
- },
665
- LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED,
666
- {});
761
+ assert.neverCalledWith(
762
+ locusInfo.emitScoped,
763
+ {
764
+ file: 'locus-info',
765
+ function: 'updateSelf',
766
+ },
767
+ LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED,
768
+ {}
769
+ );
667
770
  });
668
771
 
669
-
670
772
  it('should trigger SELF_OBSERVING when moving meeting to DX', () => {
671
773
  locusInfo.self = self;
672
774
  const selfInitiatedMove = cloneDeep(self);
@@ -686,11 +788,106 @@ describe('plugin-meetings', () => {
686
788
 
687
789
  locusInfo.updateSelf(selfAfterDxJoins, []);
688
790
 
689
- assert.calledWith(locusInfo.emitScoped, {
690
- file: 'locus-info',
691
- function: 'updateSelf'
692
- },
693
- LOCUSINFO.EVENTS.SELF_OBSERVING);
791
+ assert.calledWith(
792
+ locusInfo.emitScoped,
793
+ {
794
+ file: 'locus-info',
795
+ function: 'updateSelf',
796
+ },
797
+ LOCUSINFO.EVENTS.SELF_OBSERVING
798
+ );
799
+ });
800
+
801
+ it('should not trigger SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE when not updated', () => {
802
+ const selfClone = cloneDeep(self);
803
+
804
+ selfClone.canNotViewTheParticipantList = false; // same
805
+
806
+ // Set the layout prior to stubbing to validate it does not change.
807
+ locusInfo.updateSelf(self, []);
808
+
809
+ locusInfo.emitScoped = sinon.stub();
810
+
811
+ locusInfo.updateSelf(selfClone, []);
812
+
813
+ assert.neverCalledWith(
814
+ locusInfo.emitScoped,
815
+ {
816
+ file: 'locus-info',
817
+ function: 'updateSelf',
818
+ },
819
+ LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE,
820
+ {canNotViewTheParticipantList: false}
821
+ );
822
+ });
823
+
824
+ it('should trigger SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE when updated', () => {
825
+ const selfClone = cloneDeep(self);
826
+
827
+ selfClone.canNotViewTheParticipantList = true; // different
828
+
829
+ // Set the layout prior to stubbing to validate it does not change.
830
+ locusInfo.updateSelf(self, []);
831
+
832
+ locusInfo.emitScoped = sinon.stub();
833
+
834
+ locusInfo.updateSelf(selfClone, []);
835
+
836
+ assert.calledWith(
837
+ locusInfo.emitScoped,
838
+ {
839
+ file: 'locus-info',
840
+ function: 'updateSelf',
841
+ },
842
+ LOCUSINFO.EVENTS.SELF_CANNOT_VIEW_PARTICIPANT_LIST_CHANGE,
843
+ {canNotViewTheParticipantList: true}
844
+ );
845
+ });
846
+
847
+ it('should not trigger SELF_IS_SHARING_BLOCKED_CHANGE when not updated', () => {
848
+ const selfClone = cloneDeep(self);
849
+
850
+ selfClone.isSharingBlocked = false; // same
851
+
852
+ // Set the layout prior to stubbing to validate it does not change.
853
+ locusInfo.updateSelf(self, []);
854
+
855
+ locusInfo.emitScoped = sinon.stub();
856
+
857
+ locusInfo.updateSelf(selfClone, []);
858
+
859
+ assert.neverCalledWith(
860
+ locusInfo.emitScoped,
861
+ {
862
+ file: 'locus-info',
863
+ function: 'updateSelf',
864
+ },
865
+ LOCUSINFO.EVENTS.SELF_IS_SHARING_BLOCKED_CHANGE,
866
+ {isSharingBlocked: false}
867
+ );
868
+ });
869
+
870
+ it('should trigger SELF_IS_SHARING_BLOCKED_CHANGE when updated', () => {
871
+ const selfClone = cloneDeep(self);
872
+
873
+ selfClone.isSharingBlocked = true; // different
874
+
875
+ // Set the layout prior to stubbing to validate it does not change.
876
+ locusInfo.updateSelf(self, []);
877
+
878
+ locusInfo.emitScoped = sinon.stub();
879
+
880
+ locusInfo.updateSelf(selfClone, []);
881
+
882
+ assert.calledWith(
883
+ locusInfo.emitScoped,
884
+ {
885
+ file: 'locus-info',
886
+ function: 'updateSelf',
887
+ },
888
+ LOCUSINFO.EVENTS.SELF_IS_SHARING_BLOCKED_CHANGE,
889
+ {isSharingBlocked: true}
890
+ );
694
891
  });
695
892
  });
696
893
 
@@ -704,8 +901,8 @@ describe('plugin-meetings', () => {
704
901
  meetingInfo = {
705
902
  displayHints: {
706
903
  joined: ['ROSTER_IN_MEETING', 'LOCK_STATUS_UNLOCKED'],
707
- moderator: []
708
- }
904
+ moderator: [],
905
+ },
709
906
  };
710
907
  getInfosSpy = sinon.spy(InfoUtils, 'getInfos');
711
908
  getRolesSpy = sinon.spy(SelfUtils, 'getRoles');
@@ -731,33 +928,42 @@ describe('plugin-meetings', () => {
731
928
  locusInfo.emitScoped = sinon.stub();
732
929
  locusInfo.updateMeetingInfo(meetingInfoLocked, self);
733
930
 
734
- assert.calledWith(locusInfo.emitScoped, {
735
- file: 'locus-info',
736
- function: 'updateMeetingInfo'
737
- },
738
- LOCUSINFO.EVENTS.MEETING_LOCKED,
739
- meetingInfoLocked);
931
+ assert.calledWith(
932
+ locusInfo.emitScoped,
933
+ {
934
+ file: 'locus-info',
935
+ function: 'updateMeetingInfo',
936
+ },
937
+ LOCUSINFO.EVENTS.MEETING_LOCKED,
938
+ meetingInfoLocked
939
+ );
740
940
 
741
941
  // now unlock the meeting and verify that we get the right event
742
942
  const meetingInfoUnlocked = cloneDeep(meetingInfo); // meetingInfo already is "unlocked"
743
943
 
744
944
  locusInfo.updateMeetingInfo(meetingInfoUnlocked, self);
745
945
 
746
- assert.calledWith(locusInfo.emitScoped, {
747
- file: 'locus-info',
748
- function: 'updateMeetingInfo'
749
- },
750
- LOCUSINFO.EVENTS.MEETING_UNLOCKED,
751
- meetingInfoUnlocked);
946
+ assert.calledWith(
947
+ locusInfo.emitScoped,
948
+ {
949
+ file: 'locus-info',
950
+ function: 'updateMeetingInfo',
951
+ },
952
+ LOCUSINFO.EVENTS.MEETING_UNLOCKED,
953
+ meetingInfoUnlocked
954
+ );
752
955
  });
753
956
 
754
957
  const checkMeetingInfoUpdatedCalled = (expected) => {
755
- const expectedArgs = [locusInfo.emitScoped, {
756
- file: 'locus-info',
757
- function: 'updateMeetingInfo'
758
- },
759
- LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
760
- {info: locusInfo.parsedLocus.info, self}];
958
+ const expectedArgs = [
959
+ locusInfo.emitScoped,
960
+ {
961
+ file: 'locus-info',
962
+ function: 'updateMeetingInfo',
963
+ },
964
+ LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
965
+ {info: locusInfo.parsedLocus.info, self},
966
+ ];
761
967
 
762
968
  if (expected) {
763
969
  assert.calledWith(...expectedArgs);
@@ -803,17 +1009,14 @@ describe('plugin-meetings', () => {
803
1009
  locusInfo.updateMeetingInfo(initialInfo, self);
804
1010
 
805
1011
  assert.calledWith(getRolesSpy, self);
806
- assert.calledWith(
807
- getInfosSpy,
808
- parsedLocusInfo, initialInfo, ['PRESENTER']
809
- );
1012
+ assert.calledWith(getInfosSpy, parsedLocusInfo, initialInfo, ['PRESENTER']);
810
1013
  });
811
1014
 
812
1015
  it('gets roles from parsedLocus if self not passed in', () => {
813
1016
  const initialInfo = cloneDeep(meetingInfo);
814
1017
 
815
1018
  locusInfo.parsedLocus.self = {
816
- roles: ['MODERATOR', 'COHOST']
1019
+ roles: ['MODERATOR', 'COHOST'],
817
1020
  };
818
1021
 
819
1022
  const parsedLocusInfo = cloneDeep(locusInfo.parsedLocus.info);
@@ -821,36 +1024,38 @@ describe('plugin-meetings', () => {
821
1024
  locusInfo.updateMeetingInfo(initialInfo);
822
1025
  assert.calledWith(isJoinedSpy, locusInfo.parsedLocus.self);
823
1026
  assert.neverCalledWith(getRolesSpy, self);
824
- assert.calledWith(
825
- getInfosSpy,
826
- parsedLocusInfo, initialInfo, ['MODERATOR', 'COHOST']
827
- );
1027
+ assert.calledWith(getInfosSpy, parsedLocusInfo, initialInfo, ['MODERATOR', 'COHOST']);
828
1028
  });
829
1029
  });
830
1030
 
831
1031
  describe('#updateEmbeddedApps()', () => {
832
- const newEmbeddedApps = [{
833
- url: 'https://hecate-b.wbx2.com/apps/api/v1/locus/7a4994a7',
834
- sequence: 138849877016800000,
835
- appId: 'Y2lzY29zcGFyazovL3VzL0FQUExJQ0FUSU9OLzQxODc1MGQ0LTM3ZDctNGY2MC1hOWE3LWEwZTE1NDFhNjRkNg',
836
- instanceInfo: {
837
- appInstanceUrl: 'https://webex.sli.do/participant/event/mFKKjcYxzx9h31eyWgngFS?clusterId=eu1',
838
- externalAppInstanceUrl: '',
839
- title: 'Active session'
1032
+ const newEmbeddedApps = [
1033
+ {
1034
+ url: 'https://hecate-b.wbx2.com/apps/api/v1/locus/7a4994a7',
1035
+ sequence: 138849877016800000,
1036
+ appId:
1037
+ 'Y2lzY29zcGFyazovL3VzL0FQUExJQ0FUSU9OLzQxODc1MGQ0LTM3ZDctNGY2MC1hOWE3LWEwZTE1NDFhNjRkNg',
1038
+ instanceInfo: {
1039
+ appInstanceUrl:
1040
+ 'https://webex.sli.do/participant/event/mFKKjcYxzx9h31eyWgngFS?clusterId=eu1',
1041
+ externalAppInstanceUrl: '',
1042
+ title: 'Active session',
1043
+ },
1044
+ state: 'STARTED',
1045
+ lastModified: '2022-10-13T21:01:41.680Z',
840
1046
  },
841
- state: 'STARTED',
842
- lastModified: '2022-10-13T21:01:41.680Z'
843
- }];
1047
+ ];
844
1048
 
845
- it('updates the embeddedApps object', () => {
846
- const prev = locusInfo.embeddedApps;
1049
+ it('properly updates the meeting embeddedApps', () => {
1050
+ const prev = mockMeeting.embeddedApps;
847
1051
 
848
1052
  locusInfo.updateEmbeddedApps(newEmbeddedApps);
849
1053
 
850
- assert.notEqual(locusInfo.embeddedApps, prev);
1054
+ assert.notEqual(mockMeeting.embeddedApps, prev);
1055
+ assert.isNotNull(mockMeeting.embeddedApps?.[0].type);
851
1056
  });
852
1057
 
853
- it('does not emit EMBEDDED_APPS_UPDATED when apps didn\'t change', () => {
1058
+ it("does not emit EMBEDDED_APPS_UPDATED when apps didn't change", () => {
854
1059
  locusInfo.updateEmbeddedApps(newEmbeddedApps);
855
1060
 
856
1061
  locusInfo.emitScoped = sinon.stub();
@@ -870,15 +1075,19 @@ describe('plugin-meetings', () => {
870
1075
  const clonedApps = cloneDeep(newEmbeddedApps);
871
1076
 
872
1077
  clonedApps[0].state = 'STOPPED';
1078
+ const expectedApps = EmbeddedAppsUtils.parse(clonedApps);
873
1079
 
874
1080
  locusInfo.updateEmbeddedApps(clonedApps);
875
1081
 
876
- assert.calledWith(locusInfo.emitScoped, {
877
- file: 'locus-info',
878
- function: 'updateEmbeddedApps'
879
- },
880
- LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED,
881
- clonedApps);
1082
+ assert.calledWith(
1083
+ locusInfo.emitScoped,
1084
+ {
1085
+ file: 'locus-info',
1086
+ function: 'updateEmbeddedApps',
1087
+ },
1088
+ LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED,
1089
+ expectedApps
1090
+ );
882
1091
  });
883
1092
  });
884
1093
 
@@ -894,7 +1103,7 @@ describe('plugin-meetings', () => {
894
1103
 
895
1104
  fakeLocus = {
896
1105
  meeting: true,
897
- participants: true
1106
+ participants: true,
898
1107
  };
899
1108
  });
900
1109
 
@@ -903,13 +1112,12 @@ describe('plugin-meetings', () => {
903
1112
  sandbox = null;
904
1113
  });
905
1114
 
906
-
907
1115
  it('handles locus delta events', () => {
908
1116
  sandbox.stub(locusInfo, 'handleLocusDelta');
909
1117
 
910
1118
  const data = {
911
1119
  eventType: LOCUSEVENT.DIFFERENCE,
912
- locus: fakeLocus
1120
+ locus: fakeLocus,
913
1121
  };
914
1122
 
915
1123
  locusInfo.parse(fakeMeeting, data);
@@ -917,13 +1125,12 @@ describe('plugin-meetings', () => {
917
1125
  assert.calledWith(locusInfo.handleLocusDelta, fakeLocus, fakeMeeting);
918
1126
  });
919
1127
 
920
-
921
1128
  it('should queue delta event with internal locus parser', () => {
922
1129
  sandbox.stub(locusParser, 'onDeltaEvent');
923
1130
 
924
1131
  const data = {
925
1132
  eventType: LOCUSEVENT.DIFFERENCE,
926
- locus: fakeLocus
1133
+ locus: fakeLocus,
927
1134
  };
928
1135
 
929
1136
  locusInfo.parse(fakeMeeting, data);
@@ -932,7 +1139,6 @@ describe('plugin-meetings', () => {
932
1139
  assert.calledWith(locusParser.onDeltaEvent, fakeLocus);
933
1140
  });
934
1141
 
935
-
936
1142
  it('should assign a function to onDeltaAction', () => {
937
1143
  sandbox.stub(locusParser, 'onDeltaEvent');
938
1144
  assert.isNull(locusParser.onDeltaAction);
@@ -942,7 +1148,6 @@ describe('plugin-meetings', () => {
942
1148
  assert.isFunction(locusParser.onDeltaAction);
943
1149
  });
944
1150
 
945
-
946
1151
  it('onFullLocus() updates the working-copy of locus parser', () => {
947
1152
  const eventType = 'fakeEvent';
948
1153
 
@@ -957,7 +1162,6 @@ describe('plugin-meetings', () => {
957
1162
  assert.equal(fakeLocus, locusParser.workingCopy);
958
1163
  });
959
1164
 
960
-
961
1165
  it('onDeltaAction applies locus delta data to meeting', () => {
962
1166
  const action = 'fake action';
963
1167
  const parsedLoci = 'fake loci';
@@ -971,13 +1175,12 @@ describe('plugin-meetings', () => {
971
1175
  assert.calledWith(locusInfo.applyLocusDeltaData, action, parsedLoci, fakeMeeting);
972
1176
  });
973
1177
 
974
-
975
1178
  it('applyLocusDeltaData handles USE_INCOMING action correctly', () => {
976
1179
  const {USE_INCOMING} = LocusDeltaParser.loci;
977
1180
  const meeting = {
978
1181
  locusInfo: {
979
- onDeltaLocus: sandbox.stub()
980
- }
1182
+ onDeltaLocus: sandbox.stub(),
1183
+ },
981
1184
  };
982
1185
 
983
1186
  locusInfo.applyLocusDeltaData(USE_INCOMING, fakeLocus, meeting);
@@ -985,16 +1188,15 @@ describe('plugin-meetings', () => {
985
1188
  assert.calledWith(meeting.locusInfo.onDeltaLocus, fakeLocus);
986
1189
  });
987
1190
 
988
-
989
1191
  it('applyLocusDeltaData gets full locus on DESYNC action', () => {
990
1192
  const {DESYNC} = LocusDeltaParser.loci;
991
1193
  const meeting = {
992
1194
  meetingRequest: {
993
- getFullLocus: sandbox.stub().resolves(true)
1195
+ getFullLocus: sandbox.stub().resolves(true),
994
1196
  },
995
1197
  locusInfo: {
996
- onFullLocus: sandbox.stub()
997
- }
1198
+ onFullLocus: sandbox.stub(),
1199
+ },
998
1200
  };
999
1201
 
1000
1202
  locusInfo.locusParser.resume = sandbox.stub();
@@ -1007,9 +1209,9 @@ describe('plugin-meetings', () => {
1007
1209
  const {DESYNC} = LocusDeltaParser.loci;
1008
1210
  const meeting = {
1009
1211
  meetingRequest: {
1010
- getFullLocus: sandbox.stub().resolves({body: true})
1212
+ getFullLocus: sandbox.stub().resolves({body: true}),
1011
1213
  },
1012
- locusInfo
1214
+ locusInfo,
1013
1215
  };
1014
1216
 
1015
1217
  locusInfo.onFullLocus = sandbox.stub();
@@ -1037,29 +1239,34 @@ describe('plugin-meetings', () => {
1037
1239
  locusInfo.parsedLocus.fullState.type = 'SIP_BRIDGE';
1038
1240
  locusInfo.handleOneOnOneEvent('locus.participant_declined');
1039
1241
 
1040
- assert.calledWith(locusInfo.emitScoped, {
1041
- file: 'locus-info',
1042
- function: 'handleOneonOneEvent'
1043
- },
1044
- 'REMOTE_RESPONSE',
1045
- {
1046
- remoteDeclined: true,
1047
- remoteAnswered: false
1048
- });
1049
-
1242
+ assert.calledWith(
1243
+ locusInfo.emitScoped,
1244
+ {
1245
+ file: 'locus-info',
1246
+ function: 'handleOneonOneEvent',
1247
+ },
1248
+ 'REMOTE_RESPONSE',
1249
+ {
1250
+ remoteDeclined: true,
1251
+ remoteAnswered: false,
1252
+ }
1253
+ );
1050
1254
 
1051
1255
  locusInfo.parsedLocus.fullState.type = 'SIP_BRIDGE';
1052
1256
  locusInfo.handleOneOnOneEvent('locus.participant_joined');
1053
1257
 
1054
- assert.calledWith(locusInfo.emitScoped, {
1055
- file: 'locus-info',
1056
- function: 'handleOneonOneEvent'
1057
- },
1058
- 'REMOTE_RESPONSE',
1059
- {
1060
- remoteDeclined: false,
1061
- remoteAnswered: true
1062
- });
1258
+ assert.calledWith(
1259
+ locusInfo.emitScoped,
1260
+ {
1261
+ file: 'locus-info',
1262
+ function: 'handleOneonOneEvent',
1263
+ },
1264
+ 'REMOTE_RESPONSE',
1265
+ {
1266
+ remoteDeclined: false,
1267
+ remoteAnswered: true,
1268
+ }
1269
+ );
1063
1270
  });
1064
1271
  });
1065
1272
  });