@webex/plugin-meetings 3.0.0-beta.13 → 3.0.0-beta.15

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 (252) hide show
  1. package/UPGRADING.md +9 -9
  2. package/browsers.js +19 -24
  3. package/dist/common/browser-detection.js +1 -0
  4. package/dist/common/browser-detection.js.map +1 -1
  5. package/dist/common/collection.js.map +1 -1
  6. package/dist/common/errors/captcha-error.js +5 -5
  7. package/dist/common/errors/captcha-error.js.map +1 -1
  8. package/dist/common/errors/intent-to-join.js +5 -5
  9. package/dist/common/errors/intent-to-join.js.map +1 -1
  10. package/dist/common/errors/join-meeting.js +6 -6
  11. package/dist/common/errors/join-meeting.js.map +1 -1
  12. package/dist/common/errors/media.js +5 -5
  13. package/dist/common/errors/media.js.map +1 -1
  14. package/dist/common/errors/parameter.js +5 -5
  15. package/dist/common/errors/parameter.js.map +1 -1
  16. package/dist/common/errors/password-error.js +5 -5
  17. package/dist/common/errors/password-error.js.map +1 -1
  18. package/dist/common/errors/permission.js +4 -4
  19. package/dist/common/errors/permission.js.map +1 -1
  20. package/dist/common/errors/reconnection.js +5 -5
  21. package/dist/common/errors/reconnection.js.map +1 -1
  22. package/dist/common/errors/stats.js +5 -5
  23. package/dist/common/errors/stats.js.map +1 -1
  24. package/dist/common/errors/webex-errors.js.map +1 -1
  25. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  26. package/dist/common/events/events-scope.js.map +1 -1
  27. package/dist/common/events/events.js.map +1 -1
  28. package/dist/common/events/trigger-proxy.js.map +1 -1
  29. package/dist/common/events/util.js.map +1 -1
  30. package/dist/common/logs/logger-proxy.js.map +1 -1
  31. package/dist/common/logs/request.js.map +1 -1
  32. package/dist/config.js.map +1 -1
  33. package/dist/constants.js.map +1 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/locus-info/controlsUtils.js.map +1 -1
  36. package/dist/locus-info/fullState.js.map +1 -1
  37. package/dist/locus-info/hostUtils.js.map +1 -1
  38. package/dist/locus-info/index.js +11 -8
  39. package/dist/locus-info/index.js.map +1 -1
  40. package/dist/locus-info/infoUtils.js.map +1 -1
  41. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  42. package/dist/locus-info/parser.js +2 -1
  43. package/dist/locus-info/parser.js.map +1 -1
  44. package/dist/locus-info/selfUtils.js +2 -1
  45. package/dist/locus-info/selfUtils.js.map +1 -1
  46. package/dist/media/index.js.map +1 -1
  47. package/dist/media/internal-media-core-wrapper.js.map +1 -1
  48. package/dist/media/properties.js.map +1 -1
  49. package/dist/media/util.js +1 -1
  50. package/dist/media/util.js.map +1 -1
  51. package/dist/mediaQualityMetrics/config.js.map +1 -1
  52. package/dist/meeting/effectsState.js +1 -1
  53. package/dist/meeting/effectsState.js.map +1 -1
  54. package/dist/meeting/in-meeting-actions.js.map +1 -1
  55. package/dist/meeting/index.js +118 -89
  56. package/dist/meeting/index.js.map +1 -1
  57. package/dist/meeting/muteState.js +1 -1
  58. package/dist/meeting/muteState.js.map +1 -1
  59. package/dist/meeting/request.js +25 -0
  60. package/dist/meeting/request.js.map +1 -1
  61. package/dist/meeting/request.type.js +8 -0
  62. package/dist/meeting/request.type.js.map +1 -0
  63. package/dist/meeting/state.js +5 -5
  64. package/dist/meeting/state.js.map +1 -1
  65. package/dist/meeting/util.js.map +1 -1
  66. package/dist/meeting-info/collection.js.map +1 -1
  67. package/dist/meeting-info/index.js +2 -2
  68. package/dist/meeting-info/index.js.map +1 -1
  69. package/dist/meeting-info/meeting-info-v2.js +48 -48
  70. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  71. package/dist/meeting-info/request.js.map +1 -1
  72. package/dist/meeting-info/util.js.map +1 -1
  73. package/dist/meeting-info/utilv2.js +1 -1
  74. package/dist/meeting-info/utilv2.js.map +1 -1
  75. package/dist/meetings/collection.js.map +1 -1
  76. package/dist/meetings/index.js +251 -250
  77. package/dist/meetings/index.js.map +1 -1
  78. package/dist/meetings/request.js +2 -2
  79. package/dist/meetings/request.js.map +1 -1
  80. package/dist/meetings/util.js +14 -14
  81. package/dist/meetings/util.js.map +1 -1
  82. package/dist/member/index.js +31 -31
  83. package/dist/member/index.js.map +1 -1
  84. package/dist/member/util.js.map +1 -1
  85. package/dist/members/collection.js.map +1 -1
  86. package/dist/members/index.js +43 -43
  87. package/dist/members/index.js.map +1 -1
  88. package/dist/members/request.js.map +1 -1
  89. package/dist/members/util.js.map +1 -1
  90. package/dist/metrics/config.js.map +1 -1
  91. package/dist/metrics/constants.js.map +1 -1
  92. package/dist/metrics/index.js +23 -20
  93. package/dist/metrics/index.js.map +1 -1
  94. package/dist/multistream/multistreamMedia.js +2 -1
  95. package/dist/multistream/multistreamMedia.js.map +1 -1
  96. package/dist/multistream/receiveSlot.js.map +1 -1
  97. package/dist/multistream/receiveSlotManager.js +2 -0
  98. package/dist/multistream/receiveSlotManager.js.map +1 -1
  99. package/dist/multistream/remoteMedia.js.map +1 -1
  100. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  101. package/dist/multistream/remoteMediaManager.js.map +1 -1
  102. package/dist/networkQualityMonitor/index.js +8 -8
  103. package/dist/networkQualityMonitor/index.js.map +1 -1
  104. package/dist/personal-meeting-room/index.js +7 -7
  105. package/dist/personal-meeting-room/index.js.map +1 -1
  106. package/dist/personal-meeting-room/request.js.map +1 -1
  107. package/dist/personal-meeting-room/util.js.map +1 -1
  108. package/dist/reachability/index.js.map +1 -1
  109. package/dist/reachability/request.js.map +1 -1
  110. package/dist/reactions/reactions.js.map +1 -1
  111. package/dist/reactions/reactions.type.js +3 -1
  112. package/dist/reactions/reactions.type.js.map +1 -1
  113. package/dist/reconnection-manager/index.js +4 -4
  114. package/dist/reconnection-manager/index.js.map +1 -1
  115. package/dist/roap/index.js +5 -5
  116. package/dist/roap/index.js.map +1 -1
  117. package/dist/roap/request.js.map +1 -1
  118. package/dist/roap/turnDiscovery.js.map +1 -1
  119. package/dist/statsAnalyzer/global.js.map +1 -1
  120. package/dist/statsAnalyzer/index.js.map +1 -1
  121. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  122. package/dist/transcription/index.js +4 -1
  123. package/dist/transcription/index.js.map +1 -1
  124. package/internal-README.md +7 -6
  125. package/package.json +18 -18
  126. package/src/common/browser-detection.ts +9 -6
  127. package/src/common/collection.ts +3 -1
  128. package/src/common/errors/captcha-error.ts +6 -6
  129. package/src/common/errors/intent-to-join.ts +6 -6
  130. package/src/common/errors/join-meeting.ts +12 -8
  131. package/src/common/errors/media.ts +6 -6
  132. package/src/common/errors/parameter.ts +9 -6
  133. package/src/common/errors/password-error.ts +6 -6
  134. package/src/common/errors/permission.ts +5 -5
  135. package/src/common/errors/reconnection.ts +6 -6
  136. package/src/common/errors/stats.ts +6 -6
  137. package/src/common/errors/webex-errors.ts +7 -5
  138. package/src/common/errors/webex-meetings-error.ts +1 -1
  139. package/src/common/events/events-scope.ts +5 -1
  140. package/src/common/events/events.ts +5 -1
  141. package/src/common/events/trigger-proxy.ts +8 -3
  142. package/src/common/events/util.ts +1 -2
  143. package/src/common/logs/logger-proxy.ts +21 -10
  144. package/src/common/logs/request.ts +11 -8
  145. package/src/config.ts +11 -11
  146. package/src/constants.ts +1 -1
  147. package/src/index.js +1 -1
  148. package/src/locus-info/controlsUtils.ts +34 -24
  149. package/src/locus-info/fullState.ts +15 -11
  150. package/src/locus-info/hostUtils.ts +4 -3
  151. package/src/locus-info/index.ts +25 -34
  152. package/src/locus-info/infoUtils.ts +12 -4
  153. package/src/locus-info/mediaSharesUtils.ts +4 -4
  154. package/src/locus-info/parser.ts +45 -68
  155. package/src/locus-info/selfUtils.ts +106 -57
  156. package/src/media/index.ts +123 -135
  157. package/src/media/internal-media-core-wrapper.ts +2 -2
  158. package/src/media/properties.ts +30 -20
  159. package/src/media/util.ts +1 -1
  160. package/src/mediaQualityMetrics/config.ts +46 -46
  161. package/src/meeting/effectsState.ts +35 -35
  162. package/src/meeting/in-meeting-actions.ts +7 -3
  163. package/src/meeting/index.ts +1576 -1291
  164. package/src/meeting/muteState.ts +62 -31
  165. package/src/meeting/request.ts +174 -113
  166. package/src/meeting/request.type.ts +11 -0
  167. package/src/meeting/state.ts +45 -30
  168. package/src/meeting/util.ts +101 -70
  169. package/src/meeting-info/collection.ts +2 -1
  170. package/src/meeting-info/index.ts +32 -30
  171. package/src/meeting-info/meeting-info-v2.ts +106 -108
  172. package/src/meeting-info/request.ts +9 -3
  173. package/src/meeting-info/util.ts +54 -46
  174. package/src/meeting-info/utilv2.ts +59 -53
  175. package/src/meetings/collection.ts +1 -1
  176. package/src/meetings/index.ts +512 -440
  177. package/src/meetings/request.ts +26 -24
  178. package/src/meetings/util.ts +29 -29
  179. package/src/member/index.ts +55 -49
  180. package/src/member/util.ts +26 -13
  181. package/src/members/collection.ts +0 -1
  182. package/src/members/index.ts +182 -126
  183. package/src/members/request.ts +46 -14
  184. package/src/members/util.ts +44 -42
  185. package/src/metrics/config.ts +254 -81
  186. package/src/metrics/constants.ts +0 -2
  187. package/src/metrics/index.ts +84 -71
  188. package/src/multistream/multistreamMedia.ts +1 -0
  189. package/src/multistream/receiveSlot.ts +1 -0
  190. package/src/multistream/receiveSlotManager.ts +1 -0
  191. package/src/multistream/remoteMedia.ts +1 -1
  192. package/src/multistream/remoteMediaGroup.ts +2 -1
  193. package/src/multistream/remoteMediaManager.ts +3 -0
  194. package/src/networkQualityMonitor/index.ts +20 -23
  195. package/src/personal-meeting-room/index.ts +12 -16
  196. package/src/personal-meeting-room/request.ts +10 -3
  197. package/src/personal-meeting-room/util.ts +3 -3
  198. package/src/reachability/index.ts +61 -59
  199. package/src/reachability/request.ts +36 -32
  200. package/src/reactions/reactions.ts +4 -4
  201. package/src/reactions/reactions.type.ts +4 -3
  202. package/src/reconnection-manager/index.ts +139 -84
  203. package/src/roap/index.ts +46 -38
  204. package/src/roap/request.ts +44 -31
  205. package/src/roap/turnDiscovery.ts +59 -30
  206. package/src/statsAnalyzer/global.ts +30 -33
  207. package/src/statsAnalyzer/index.ts +432 -175
  208. package/src/statsAnalyzer/mqaUtil.ts +178 -72
  209. package/src/transcription/index.ts +34 -32
  210. package/test/integration/spec/journey.js +663 -462
  211. package/test/integration/spec/space-meeting.js +318 -203
  212. package/test/integration/spec/transcription.js +6 -7
  213. package/test/unit/spec/common/browser-detection.js +9 -28
  214. package/test/unit/spec/fixture/locus.js +92 -90
  215. package/test/unit/spec/locus-info/controlsUtils.js +5 -5
  216. package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
  217. package/test/unit/spec/locus-info/index.js +1 -2
  218. package/test/unit/spec/locus-info/infoUtils.js +26 -33
  219. package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
  220. package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
  221. package/test/unit/spec/locus-info/parser.js +3 -9
  222. package/test/unit/spec/locus-info/selfConstant.js +72 -103
  223. package/test/unit/spec/locus-info/selfUtils.js +21 -12
  224. package/test/unit/spec/meeting/effectsState.js +36 -46
  225. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
  226. package/test/unit/spec/meeting/index.js +1342 -684
  227. package/test/unit/spec/meeting/muteState.js +42 -33
  228. package/test/unit/spec/meeting/request.js +75 -45
  229. package/test/unit/spec/meeting/utils.js +78 -53
  230. package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
  231. package/test/unit/spec/meeting-info/request.js +7 -9
  232. package/test/unit/spec/meeting-info/util.js +11 -12
  233. package/test/unit/spec/meeting-info/utilv2.js +110 -74
  234. package/test/unit/spec/meetings/collection.js +1 -1
  235. package/test/unit/spec/meetings/index.js +438 -257
  236. package/test/unit/spec/meetings/utils.js +14 -12
  237. package/test/unit/spec/member/index.js +0 -1
  238. package/test/unit/spec/member/util.js +5 -6
  239. package/test/unit/spec/members/index.js +104 -54
  240. package/test/unit/spec/members/request.js +29 -20
  241. package/test/unit/spec/members/utils.js +8 -5
  242. package/test/unit/spec/metrics/index.js +16 -21
  243. package/test/unit/spec/networkQualityMonitor/index.js +21 -15
  244. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
  245. package/test/unit/spec/reachability/index.ts +9 -11
  246. package/test/unit/spec/reconnection-manager/index.js +16 -18
  247. package/test/unit/spec/roap/turnDiscovery.ts +22 -19
  248. package/test/unit/spec/stats-analyzer/index.js +25 -20
  249. package/test/utils/cmr.js +44 -42
  250. package/test/utils/testUtils.js +83 -74
  251. package/test/utils/webex-config.js +18 -18
  252. package/test/utils/webex-test-users.js +53 -50
@@ -17,29 +17,34 @@ skipInNode(describe)('plugin-meetings', () => {
17
17
  describe('space-meeting', () => {
18
18
  let space = null;
19
19
 
20
- before(() => webexTestUsers.generateTestUsers({
21
- count: 4,
22
- whistler: process.env.WHISTLER || process.env.JENKINS
23
- })
24
- .then((users) => {
25
- userSet = users;
26
- alice = userSet[0];
27
- bob = userSet[1];
28
- chris = userSet[2];
29
- guest = userSet[3];
30
- alice.name = 'alice';
31
- bob.name = 'bob';
32
- chris.name = 'chris';
33
- guest.name = 'guest';
34
- })
35
- .then(() => Promise.all([testUtils.syncAndEndMeeting(alice),
36
- testUtils.syncAndEndMeeting(bob)]))
37
- .catch((error) => {
38
- console.log(error);
39
- }));
20
+ before(() =>
21
+ webexTestUsers
22
+ .generateTestUsers({
23
+ count: 4,
24
+ whistler: process.env.WHISTLER || process.env.JENKINS,
25
+ })
26
+ .then((users) => {
27
+ userSet = users;
28
+ alice = userSet[0];
29
+ bob = userSet[1];
30
+ chris = userSet[2];
31
+ guest = userSet[3];
32
+ alice.name = 'alice';
33
+ bob.name = 'bob';
34
+ chris.name = 'chris';
35
+ guest.name = 'guest';
36
+ })
37
+ .then(() =>
38
+ Promise.all([testUtils.syncAndEndMeeting(alice), testUtils.syncAndEndMeeting(bob)])
39
+ )
40
+ .catch((error) => {
41
+ console.log(error);
42
+ })
43
+ );
40
44
 
41
45
  it('Alice starts a space meeting', () =>
42
- alice.webex.internal.conversation.create({participants: [bob, chris]})
46
+ alice.webex.internal.conversation
47
+ .create({participants: [bob, chris]})
43
48
  .then((conversation) => {
44
49
  assert.lengthOf(conversation.participants.items, 3);
45
50
  assert.lengthOf(conversation.activities.items, 1);
@@ -47,8 +52,13 @@ skipInNode(describe)('plugin-meetings', () => {
47
52
  space = conversation;
48
53
  })
49
54
  .then(async () => {
50
- const destinationWithType = await alice.webex.meetings.meetingInfo.fetchMeetingInfo(space.url, 'CONVERSATION_URL');
51
- const destinationNoType = await alice.webex.meetings.meetingInfo.fetchMeetingInfo(space.url);
55
+ const destinationWithType = await alice.webex.meetings.meetingInfo.fetchMeetingInfo(
56
+ space.url,
57
+ 'CONVERSATION_URL'
58
+ );
59
+ const destinationNoType = await alice.webex.meetings.meetingInfo.fetchMeetingInfo(
60
+ space.url
61
+ );
52
62
 
53
63
  assert.exists(destinationNoType);
54
64
  assert.exists(destinationWithType);
@@ -58,37 +68,47 @@ skipInNode(describe)('plugin-meetings', () => {
58
68
  .then(function aliceStartsMeeting() {
59
69
  return Promise.all([
60
70
  testUtils.delayedPromise(alice.webex.meetings.create(space.url)),
61
- testUtils.waitForEvents([{scope: alice.webex.meetings, event: 'meeting:added', user: alice}])
71
+ testUtils.waitForEvents([
72
+ {scope: alice.webex.meetings, event: 'meeting:added', user: alice},
73
+ ]),
62
74
  ]);
63
75
  })
64
- .then(() => Promise.all([
65
- testUtils.delayedPromise(alice.meeting.join()),
66
- testUtils.waitForEvents([
67
- {scope: bob.webex.meetings, event: 'meeting:added', user: bob},
68
- {scope: chris.webex.meetings, event: 'meeting:added', user: chris}
69
- ])
70
- ]).then(() => {
71
- // TODO Renenable after unified flag is enabled
72
- // const {meetingNumber} = bob.meeting.meetingInfo;
73
-
74
- // assert(meetingNumber === alice.meeting.meetingNumber, 'meetingNumber matches alice meeting number');
75
- })));
76
-
77
- xit('Should fetch user info using user hydra id with the new api', () => alice.webex.rooms.create({title: 'sample'})
78
- .then((room) => MeetingInfoUtil.getDestinationType({
79
- destination: room.creatorId,
80
- webex: alice.webex
81
- }))
82
- .then((destinationType) => MeetingInfoUtil.getRequestBody(destinationType))
83
- .then((res) => {
84
- assert.exists(res.sipUrl, 'sipURL didnt exist');
85
- assert.match(res.sipUrl, patterns.email); // assert sipURL is email
86
- }));
76
+ .then(() =>
77
+ Promise.all([
78
+ testUtils.delayedPromise(alice.meeting.join()),
79
+ testUtils.waitForEvents([
80
+ {scope: bob.webex.meetings, event: 'meeting:added', user: bob},
81
+ {scope: chris.webex.meetings, event: 'meeting:added', user: chris},
82
+ ]),
83
+ ]).then(() => {
84
+ // TODO Renenable after unified flag is enabled
85
+ // const {meetingNumber} = bob.meeting.meetingInfo;
86
+ // assert(meetingNumber === alice.meeting.meetingNumber, 'meetingNumber matches alice meeting number');
87
+ })
88
+ ));
89
+
90
+ xit('Should fetch user info using user hydra id with the new api', () =>
91
+ alice.webex.rooms
92
+ .create({title: 'sample'})
93
+ .then((room) =>
94
+ MeetingInfoUtil.getDestinationType({
95
+ destination: room.creatorId,
96
+ webex: alice.webex,
97
+ })
98
+ )
99
+ .then((destinationType) => MeetingInfoUtil.getRequestBody(destinationType))
100
+ .then((res) => {
101
+ assert.exists(res.sipUrl, 'sipURL didnt exist');
102
+ assert.match(res.sipUrl, patterns.email); // assert sipURL is email
103
+ }));
87
104
 
88
105
  // Enable this test when we are going to enable the unified space meeeting .
89
106
  // We cannot change the config on load as the meetingInfo function loads dynamically
90
107
  xit('Should fetch meeting info using space url with the new api', async () => {
91
- const res = await alice.webex.meetings.meetingInfo.fetchMeetingInfo(space.url, 'CONVERSATION_URL');
108
+ const res = await alice.webex.meetings.meetingInfo.fetchMeetingInfo(
109
+ space.url,
110
+ 'CONVERSATION_URL'
111
+ );
92
112
 
93
113
  assert.exists(res.body.meetingNumber);
94
114
  });
@@ -98,104 +118,150 @@ skipInNode(describe)('plugin-meetings', () => {
98
118
  const res = await bob.webex.meetings.meetingInfo.fetchMeetingInfo(sipUri, 'SIP_URI');
99
119
  const {meetingNumber} = res.body;
100
120
 
101
- assert(meetingNumber === alice.meeting.meetingNumber, 'meetingNumber matches alice meeting number');
121
+ assert(
122
+ meetingNumber === alice.meeting.meetingNumber,
123
+ 'meetingNumber matches alice meeting number'
124
+ );
102
125
  });
103
126
 
104
- it('Bob and chris joins space meeting', () => testUtils.waitForStateChange(alice.meeting, 'JOINED')
105
- .then(() => testUtils.waitForStateChange(bob.meeting, 'IDLE'))
106
- .then(() => testUtils.waitForStateChange(chris.meeting, 'IDLE'))
107
- .then(() => bob.meeting.join())
108
- .then(() => chris.meeting.join())
109
- // add .then checks for alice response, should see bob and chris member status to isInMeeting = true
110
- .then(() => testUtils.waitForStateChange(bob.meeting, 'JOINED'))
111
- .then(() => testUtils.waitForStateChange(chris.meeting, 'JOINED')));
127
+ it('Bob and chris joins space meeting', () =>
128
+ testUtils
129
+ .waitForStateChange(alice.meeting, 'JOINED')
130
+ .then(() => testUtils.waitForStateChange(bob.meeting, 'IDLE'))
131
+ .then(() => testUtils.waitForStateChange(chris.meeting, 'IDLE'))
132
+ .then(() => bob.meeting.join())
133
+ .then(() => chris.meeting.join())
134
+ // add .then checks for alice response, should see bob and chris member status to isInMeeting = true
135
+ .then(() => testUtils.waitForStateChange(bob.meeting, 'JOINED'))
136
+ .then(() => testUtils.waitForStateChange(chris.meeting, 'JOINED')));
112
137
 
113
- it('Bob and Alice addsMedia', () => testUtils.addMedia(bob)
114
- .then(() => testUtils.addMedia(alice)));
138
+ it('Bob and Alice addsMedia', () =>
139
+ testUtils.addMedia(bob).then(() => testUtils.addMedia(alice)));
115
140
 
116
141
  it('Bob has flowing streams on reconnect', () => {
117
142
  const retrieveStats = () => {
118
- assert.isAbove(bob.meeting.statsAnalyzer.statsResults.audio.recv.totalPacketsReceived, 0, 'total packets received greater than 0');
143
+ assert.isAbove(
144
+ bob.meeting.statsAnalyzer.statsResults.audio.recv.totalPacketsReceived,
145
+ 0,
146
+ 'total packets received greater than 0'
147
+ );
119
148
  };
120
149
 
121
150
  return Promise.all([
122
151
  testUtils.delayedPromise(bob.meeting.reconnect()),
123
152
  testUtils.waitForEvents([{scope: bob.meeting, event: 'media:ready'}]),
124
- testUtils.delayedTest(retrieveStats, 9000)
153
+ testUtils.delayedTest(retrieveStats, 9000),
125
154
  ]).catch((error) => {
126
155
  // eslint-disable-next-line no-console
127
156
  console.warn('errror', error);
128
157
  });
129
158
  });
130
159
 
131
-
132
- it('alice adds x user as guest to space meeting', () => Promise.all([
133
- testUtils.delayedPromise(guest.webex.meetings.create(alice.meeting.sipUri)),
134
- testUtils.waitForEvents([{scope: guest.webex.meetings, event: 'meeting:added', user: guest}])
135
- ]).then(() =>
160
+ it('alice adds x user as guest to space meeting', () =>
136
161
  Promise.all([
137
- testUtils.delayedPromise(guest.meeting.join()),
138
- testUtils.waitForEvents([{scope: guest.meeting, event: 'meeting:self:lobbyWaiting'}]),
139
- testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
140
- .then((response) => {
141
- const guestParticipant = response[0].result.delta.added.find((member) => member.participant.identity === guest.id);
142
-
143
- assert.equal(guestParticipant.status, 'IN_LOBBY');
144
-
145
- return Promise.all([
146
- testUtils.delayedPromise(alice.meeting.admit(guestParticipant.id)),
147
- testUtils.waitForEvents([{scope: guest.meeting, event: 'meeting:self:guestAdmitted'}])
148
- ]);
149
- })
150
- ]))
151
- .then(() => testUtils.waitForStateChange(guest.meeting, 'JOINED'))
152
- .then(() => testUtils.addMedia(guest))
153
- .catch((e) => { console.error('Error chris joining the meeting ', e); throw e; }));
162
+ testUtils.delayedPromise(guest.webex.meetings.create(alice.meeting.sipUri)),
163
+ testUtils.waitForEvents([
164
+ {scope: guest.webex.meetings, event: 'meeting:added', user: guest},
165
+ ]),
166
+ ])
167
+ .then(() =>
168
+ Promise.all([
169
+ testUtils.delayedPromise(guest.meeting.join()),
170
+ testUtils.waitForEvents([{scope: guest.meeting, event: 'meeting:self:lobbyWaiting'}]),
171
+ testUtils
172
+ .waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
173
+ .then((response) => {
174
+ const guestParticipant = response[0].result.delta.added.find(
175
+ (member) => member.participant.identity === guest.id
176
+ );
177
+
178
+ assert.equal(guestParticipant.status, 'IN_LOBBY');
179
+
180
+ return Promise.all([
181
+ testUtils.delayedPromise(alice.meeting.admit(guestParticipant.id)),
182
+ testUtils.waitForEvents([
183
+ {scope: guest.meeting, event: 'meeting:self:guestAdmitted'},
184
+ ]),
185
+ ]);
186
+ }),
187
+ ])
188
+ )
189
+ .then(() => testUtils.waitForStateChange(guest.meeting, 'JOINED'))
190
+ .then(() => testUtils.addMedia(guest))
191
+ .catch((e) => {
192
+ console.error('Error chris joining the meeting ', e);
193
+ throw e;
194
+ }));
154
195
 
155
- it('alice Leaves the meeting', () => Promise.all([
156
- testUtils.delayedPromise(alice.meeting.leave()),
157
- testUtils.waitForEvents([{scope: chris.meeting.members, event: 'members:update', match: testUtils.checkParticipantUpdatedStatus(alice, 'NOT_IN_MEETING')}])
158
- ]).then(() => testUtils.waitForStateChange(alice.meeting, 'LEFT')));
196
+ it('alice Leaves the meeting', () =>
197
+ Promise.all([
198
+ testUtils.delayedPromise(alice.meeting.leave()),
199
+ testUtils.waitForEvents([
200
+ {
201
+ scope: chris.meeting.members,
202
+ event: 'members:update',
203
+ match: testUtils.checkParticipantUpdatedStatus(alice, 'NOT_IN_MEETING'),
204
+ },
205
+ ]),
206
+ ]).then(() => testUtils.waitForStateChange(alice.meeting, 'LEFT')));
159
207
 
160
208
  it('bob and chris leave meeting', () =>
161
209
  Promise.all([
162
210
  testUtils.delayedPromise(bob.meeting.leave()),
163
- testUtils.waitForEvents([{scope: chris.meeting.members, event: 'members:update', match: testUtils.checkParticipantUpdatedStatus(bob, 'NOT_IN_MEETING')}])
164
- ]).then(() => testUtils.waitForStateChange(bob.meeting, 'LEFT'))
211
+ testUtils.waitForEvents([
212
+ {
213
+ scope: chris.meeting.members,
214
+ event: 'members:update',
215
+ match: testUtils.checkParticipantUpdatedStatus(bob, 'NOT_IN_MEETING'),
216
+ },
217
+ ]),
218
+ ])
219
+ .then(() => testUtils.waitForStateChange(bob.meeting, 'LEFT'))
165
220
  .then(() => chris.meeting.leave())
166
221
  .then(() => testUtils.waitUntil(4000)));
167
222
 
168
-
169
223
  it('check for meeting cleanup', () => {
170
224
  console.log('Alice ', alice.webex.meetings.getAllMeetings());
171
225
  console.log('Bob ', bob.webex.meetings.getAllMeetings());
172
226
  console.log('Chris ', chris.webex.meetings.getAllMeetings());
173
- assert.notExists(alice.webex.meetings.getMeetingByType('correlationId', alice.meeting.correlationId), 'alice meeting exists');
174
- assert.notExists(bob.webex.meetings.getMeetingByType('correlationId', bob.meeting.correlationId), 'bob meeting exists');
175
- assert.notExists(chris.webex.meetings.getMeetingByType('correlationId', chris.meeting.correlationId), 'chris meeting exists');
227
+ assert.notExists(
228
+ alice.webex.meetings.getMeetingByType('correlationId', alice.meeting.correlationId),
229
+ 'alice meeting exists'
230
+ );
231
+ assert.notExists(
232
+ bob.webex.meetings.getMeetingByType('correlationId', bob.meeting.correlationId),
233
+ 'bob meeting exists'
234
+ );
235
+ assert.notExists(
236
+ chris.webex.meetings.getMeetingByType('correlationId', chris.meeting.correlationId),
237
+ 'chris meeting exists'
238
+ );
176
239
  });
177
240
  });
178
241
 
179
242
  jenkinsOnly(describe.skip)('Unclaimed PMR', () => {
180
- before(() => webexTestUsers.generateTestUsers({
181
- count: 3,
182
- whistler: true
183
- })
184
- .then((users) => {
185
- userSet = users;
186
- alice = userSet[0];
187
- bob = userSet[1];
188
- chris = userSet[2];
189
- })
190
- .then(() => testUtils.syncAndEndMeeting(alice))
191
- .then(() => CMR.reserve(alice.webex, false))
192
- .then((cmr) => {
193
- console.log('CMRR ', cmr);
194
- alice.cmr = cmr;
195
- })
196
- .catch((error) => {
197
- console.log('WEBEX MEETING error ', error);
198
- }));
243
+ before(() =>
244
+ webexTestUsers
245
+ .generateTestUsers({
246
+ count: 3,
247
+ whistler: true,
248
+ })
249
+ .then((users) => {
250
+ userSet = users;
251
+ alice = userSet[0];
252
+ bob = userSet[1];
253
+ chris = userSet[2];
254
+ })
255
+ .then(() => testUtils.syncAndEndMeeting(alice))
256
+ .then(() => CMR.reserve(alice.webex, false))
257
+ .then((cmr) => {
258
+ console.log('CMRR ', cmr);
259
+ alice.cmr = cmr;
260
+ })
261
+ .catch((error) => {
262
+ console.log('WEBEX MEETING error ', error);
263
+ })
264
+ );
199
265
 
200
266
  after(() => CMR.release(alice.webex, alice.cmr.reservationUrl));
201
267
 
@@ -203,12 +269,15 @@ skipInNode(describe)('plugin-meetings', () => {
203
269
  it('alice joins the unclaimed PMR as attende', () => {
204
270
  Promise.all([
205
271
  testUtils.delayedPromise(alice.webex.meetings.create(alice.cmr.sipAddress)),
206
- testUtils.waitForEvents([{scope: alice.webex.meetings, event: 'meeting:added', user: alice}])
272
+ testUtils.waitForEvents([
273
+ {scope: alice.webex.meetings, event: 'meeting:added', user: alice},
274
+ ]),
207
275
  ])
208
276
  .then(() => alice.meeting.join({moderator: false}))
209
277
  .then(() => testUtils.waitForStateChange(alice.meeting, 'IDLE'))
210
278
  .then(function bobChrisJoiningMeeting() {
211
- return bob.webex.meetings.create(alice.cmr.sipAddress)
279
+ return bob.webex.meetings
280
+ .create(alice.cmr.sipAddress)
212
281
  .then((m) => {
213
282
  bob.meeting = m;
214
283
 
@@ -229,10 +298,13 @@ skipInNode(describe)('plugin-meetings', () => {
229
298
  .then(() => testUtils.waitForStateChange(bob.meeting, 'LEFT'))
230
299
  .then(() => chris.meeting.leave())
231
300
  .then(() => testUtils.waitForStateChange(chris.meeting, 'LEFT'))
232
- .then(() => Promise.all([
233
- testUtils.waitForCallEnded(alice, alice.sipAddress),
234
- testUtils.waitForCallEnded(bob, alice.sipAddress),
235
- testUtils.waitForCallEnded(chris, alice.sipAddress)]));
301
+ .then(() =>
302
+ Promise.all([
303
+ testUtils.waitForCallEnded(alice, alice.sipAddress),
304
+ testUtils.waitForCallEnded(bob, alice.sipAddress),
305
+ testUtils.waitForCallEnded(chris, alice.sipAddress),
306
+ ])
307
+ );
236
308
  });
237
309
 
238
310
  // it('bob joins with out host pin or moderator', () => {
@@ -243,100 +315,143 @@ skipInNode(describe)('plugin-meetings', () => {
243
315
 
244
316
  // TODO: fix this . getting 408 conflict for leave
245
317
  jenkinsOnly(describe.skip)('Claimed PMR', () => {
246
- before(() => webexTestUsers.generateTestUsers({
247
- count: 3,
248
- whistler: true
249
- })
250
- .then((users) => {
251
- userSet = users;
252
- alice = userSet[0];
253
- bob = userSet[1];
254
- chris = userSet[2];
255
- alice.name = 'alice';
256
- bob.name = 'bob';
257
- })
258
- .then(() => testUtils.syncAndEndMeeting(alice))
259
- .then(() => CMR.reserve(alice.webex, true))
260
- .then((cmr) => {
261
- console.log('CMRR ', cmr);
262
- alice.cmr = cmr;
263
- })
264
- .catch((error) => {
265
- console.log('WEBEX MEETING error ', error);
266
- }));
318
+ before(() =>
319
+ webexTestUsers
320
+ .generateTestUsers({
321
+ count: 3,
322
+ whistler: true,
323
+ })
324
+ .then((users) => {
325
+ userSet = users;
326
+ alice = userSet[0];
327
+ bob = userSet[1];
328
+ chris = userSet[2];
329
+ alice.name = 'alice';
330
+ bob.name = 'bob';
331
+ })
332
+ .then(() => testUtils.syncAndEndMeeting(alice))
333
+ .then(() => CMR.reserve(alice.webex, true))
334
+ .then((cmr) => {
335
+ console.log('CMRR ', cmr);
336
+ alice.cmr = cmr;
337
+ })
338
+ .catch((error) => {
339
+ console.log('WEBEX MEETING error ', error);
340
+ })
341
+ );
267
342
 
268
343
  after(() => CMR.release(alice.webex, alice.cmr.reservationUrl));
269
344
 
270
345
  describe('Successful meeting', () => {
271
- it('alice starts a space meeting', () => Promise.all([
272
- testUtils.delayedPromise(alice.webex.meetings.create(alice.cmr.sipAddress)),
273
- testUtils.waitForEvents([{scope: alice.webex.meetings, event: 'meeting:added', user: alice}])
274
- ])
275
- .then(() => alice.meeting.join({moderator: false}))
276
- .then(() => testUtils.waitForStateChange(alice.meeting, 'JOINED'))
277
- .then(() => bob.webex.meetings.create(alice.cmr.sipAddress))
278
- .then((m) => {
279
- bob.meeting = m;
280
-
281
- return m.join();
282
- })
283
- .then(() => testUtils.waitForStateChange(bob.meeting, 'JOINED'))
284
- .then(function bobChrisJoinMeeting() {
285
- return chris.webex.meetings.create(alice.cmr.sipAddress)
286
- .then((m) => {
287
- chris.meeting = m;
288
-
289
- return m.join({moderator: false});
290
- })
291
- .then(() => testUtils.waitForStateChange(chris.meeting, 'JOINED'));
292
- }));
346
+ it('alice starts a space meeting', () =>
347
+ Promise.all([
348
+ testUtils.delayedPromise(alice.webex.meetings.create(alice.cmr.sipAddress)),
349
+ testUtils.waitForEvents([
350
+ {scope: alice.webex.meetings, event: 'meeting:added', user: alice},
351
+ ]),
352
+ ])
353
+ .then(() => alice.meeting.join({moderator: false}))
354
+ .then(() => testUtils.waitForStateChange(alice.meeting, 'JOINED'))
355
+ .then(() => bob.webex.meetings.create(alice.cmr.sipAddress))
356
+ .then((m) => {
357
+ bob.meeting = m;
293
358
 
359
+ return m.join();
360
+ })
361
+ .then(() => testUtils.waitForStateChange(bob.meeting, 'JOINED'))
362
+ .then(function bobChrisJoinMeeting() {
363
+ return chris.webex.meetings
364
+ .create(alice.cmr.sipAddress)
365
+ .then((m) => {
366
+ chris.meeting = m;
294
367
 
295
- it('alice adds chris as guest to space meeting', () => Promise.all([
296
- testUtils.delayedPromise(alice.meeting.invite({emailAddress: guest.emailAddress})),
297
- testUtils.waitForEvents([{scope: guest.webex.meetings, event: 'meeting:added', user: guest}]),
298
- testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
299
- .then((response) => {
300
- const guestParticipant = response[0].result.delta.added.find((member) => guest.emailAddress === member.email);
368
+ return m.join({moderator: false});
369
+ })
370
+ .then(() => testUtils.waitForStateChange(chris.meeting, 'JOINED'));
371
+ }));
301
372
 
302
- assert.equal(guestParticipant.status, 'NOT_IN_MEETING');
373
+ it('alice adds chris as guest to space meeting', () =>
374
+ Promise.all([
375
+ testUtils.delayedPromise(alice.meeting.invite({emailAddress: guest.emailAddress})),
376
+ testUtils.waitForEvents([
377
+ {scope: guest.webex.meetings, event: 'meeting:added', user: guest},
378
+ ]),
379
+ testUtils
380
+ .waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
381
+ .then((response) => {
382
+ const guestParticipant = response[0].result.delta.added.find(
383
+ (member) => guest.emailAddress === member.email
384
+ );
385
+
386
+ assert.equal(guestParticipant.status, 'NOT_IN_MEETING');
387
+ }),
388
+ ])
389
+ .catch((e) => {
390
+ console.error('Error adding chris as guest ', e);
391
+ throw e;
303
392
  })
304
- ])
305
- .catch((e) => { console.error('Error adding chris as guest ', e); throw e; })
306
- .then(function memberUpdated() {
307
- assert.exists(guest.meeting);
393
+ .then(function memberUpdated() {
394
+ assert.exists(guest.meeting);
308
395
 
309
- return Promise.all([
310
- testUtils.delayedPromise(guest.meeting.join()),
311
- testUtils.waitForEvents([{scope: guest.meeting, event: 'meeting:self:lobbyWaiting'}]),
312
- testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update', match: testUtils.checkParticipantUpdatedStatus(guest, 'IN_LOBBY')}])
313
- .then(() => {
314
- Promise.all([
315
- testUtils.delayedPromise(alice.meeting.admit(guest.meeting.members.selfId)),
316
- testUtils.waitForEvents([{scope: guest.meeting, event: 'meeting:self:guestAdmitted'}])
317
- ]);
318
- })
319
- ])
320
- .then(() => testUtils.waitForStateChange(guest.meeting, 'JOINED'))
321
- .then(() => testUtils.addMedia(guest));
322
- })
323
- .catch((e) => { console.error('Error guest joining the meeting ', e); throw e; })
324
- .then(() => Promise.all([
325
- testUtils.delayedPromise(chris.meeting.leave()),
326
- testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update', match: testUtils.checkParticipantUpdatedStatus(chris, 'NOT_IN_MEETING')}])
327
- ]))
328
- .catch((e) => { console.error('Error chris leaving the meeting ', e); throw e; }));
329
-
330
- it('leave claimed PMR', () => alice.meeting.leave()
331
- .then(() => bob.meeting.leave())
332
- .then(() => testUtils.waitForStateChange(alice.meeting, 'LEFT'))
333
- .then(() => testUtils.waitForStateChange(bob.meeting, 'LEFT'))
334
- .then(() => chris.meeting.leave())
335
- .then(() => testUtils.waitForStateChange(chris.meeting, 'LEFT'))
336
- .then(() => Promise.all([
337
- testUtils.waitForCallEnded(alice, alice.sipAddress),
338
- testUtils.waitForCallEnded(bob, alice.sipAddress),
339
- testUtils.waitForCallEnded(chris, alice.sipAddress)])));
396
+ return Promise.all([
397
+ testUtils.delayedPromise(guest.meeting.join()),
398
+ testUtils.waitForEvents([{scope: guest.meeting, event: 'meeting:self:lobbyWaiting'}]),
399
+ testUtils
400
+ .waitForEvents([
401
+ {
402
+ scope: alice.meeting.members,
403
+ event: 'members:update',
404
+ match: testUtils.checkParticipantUpdatedStatus(guest, 'IN_LOBBY'),
405
+ },
406
+ ])
407
+ .then(() => {
408
+ Promise.all([
409
+ testUtils.delayedPromise(alice.meeting.admit(guest.meeting.members.selfId)),
410
+ testUtils.waitForEvents([
411
+ {scope: guest.meeting, event: 'meeting:self:guestAdmitted'},
412
+ ]),
413
+ ]);
414
+ }),
415
+ ])
416
+ .then(() => testUtils.waitForStateChange(guest.meeting, 'JOINED'))
417
+ .then(() => testUtils.addMedia(guest));
418
+ })
419
+ .catch((e) => {
420
+ console.error('Error guest joining the meeting ', e);
421
+ throw e;
422
+ })
423
+ .then(() =>
424
+ Promise.all([
425
+ testUtils.delayedPromise(chris.meeting.leave()),
426
+ testUtils.waitForEvents([
427
+ {
428
+ scope: alice.meeting.members,
429
+ event: 'members:update',
430
+ match: testUtils.checkParticipantUpdatedStatus(chris, 'NOT_IN_MEETING'),
431
+ },
432
+ ]),
433
+ ])
434
+ )
435
+ .catch((e) => {
436
+ console.error('Error chris leaving the meeting ', e);
437
+ throw e;
438
+ }));
439
+
440
+ it('leave claimed PMR', () =>
441
+ alice.meeting
442
+ .leave()
443
+ .then(() => bob.meeting.leave())
444
+ .then(() => testUtils.waitForStateChange(alice.meeting, 'LEFT'))
445
+ .then(() => testUtils.waitForStateChange(bob.meeting, 'LEFT'))
446
+ .then(() => chris.meeting.leave())
447
+ .then(() => testUtils.waitForStateChange(chris.meeting, 'LEFT'))
448
+ .then(() =>
449
+ Promise.all([
450
+ testUtils.waitForCallEnded(alice, alice.sipAddress),
451
+ testUtils.waitForCallEnded(bob, alice.sipAddress),
452
+ testUtils.waitForCallEnded(chris, alice.sipAddress),
453
+ ])
454
+ ));
340
455
  });
341
456
  });
342
457
  });
@@ -14,19 +14,18 @@ describe('transcription index', () => {
14
14
  id: 'member',
15
15
  participant: {
16
16
  status: {
17
- csis: [1, 2, 3]
18
- }
19
- }
20
- }
21
- }
22
- }
17
+ csis: [1, 2, 3],
18
+ },
19
+ },
20
+ },
21
+ },
22
+ },
23
23
  };
24
24
  sessionId = 'sessionId';
25
25
  token = 'token';
26
26
  transcription = new Transcription(webSocketUrl, sessionId, members);
27
27
  });
28
28
 
29
-
30
29
  it('open websocket connection', async () => {
31
30
  await transcription.connect(token);
32
31
  transcription.webSocket.onopen = sinon.stub();