@webex/plugin-meetings 3.12.0-next.22 → 3.12.0-next.24

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.
@@ -238,6 +238,22 @@ describe('plugin-meetings', () => {
238
238
  });
239
239
  });
240
240
 
241
+ describe('#isSelfMovedOrBreakoutEnded', () => {
242
+ [
243
+ {description: 'locus is undefined', locus: undefined, expected: false},
244
+ {description: 'self state is JOINED', locus: {self: {state: 'JOINED', reason: 'OTHER'}}, expected: false},
245
+ {description: 'self state is LEFT with reason MOVED', locus: {self: {state: 'LEFT', reason: 'MOVED'}}, expected: true},
246
+ {description: 'fullState is INACTIVE with BREAKOUT_ENDED', locus: {self: {state: 'LEFT', reason: 'OTHER'}, fullState: {state: 'INACTIVE', endMeetingReason: 'BREAKOUT_ENDED'}}, expected: true},
247
+ {description: 'fullState is INACTIVE with different endMeetingReason', locus: {self: {state: 'LEFT', reason: 'OTHER'}, fullState: {state: 'INACTIVE', endMeetingReason: 'SOME_OTHER_REASON'}}, expected: false},
248
+ {description: 'fullState is missing', locus: {self: {state: 'LEFT', reason: 'OTHER'}}, expected: false},
249
+ {description: 'endMeetingReason is missing', locus: {self: {state: 'LEFT', reason: 'OTHER'}, fullState: {state: 'INACTIVE'}}, expected: false},
250
+ ].forEach(({description, locus, expected}) => {
251
+ it(`returns ${expected} when ${description}`, () => {
252
+ assert.equal(MeetingsUtil.isSelfMovedOrBreakoutEnded(locus), expected);
253
+ });
254
+ });
255
+ });
256
+
241
257
  describe('#joinedOnThisDevice', () => {
242
258
  it('return false if no devices in self', () => {
243
259
  const newLocus = {};