@webex/plugin-meetings 1.157.0 → 1.159.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.
Files changed (40) hide show
  1. package/README.md +3 -3
  2. package/browsers.js +1 -1
  3. package/dist/config.js +2 -1
  4. package/dist/config.js.map +1 -1
  5. package/dist/index.js +1 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/meeting-info/meeting-info-v2.js +172 -36
  8. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  9. package/dist/meeting-info/utilv2.js +44 -0
  10. package/dist/meeting-info/utilv2.js.map +1 -1
  11. package/dist/meetings/index.js +67 -17
  12. package/dist/meetings/index.js.map +1 -1
  13. package/dist/meetings/request.js +16 -6
  14. package/dist/meetings/request.js.map +1 -1
  15. package/dist/meetings/util.js +17 -0
  16. package/dist/meetings/util.js.map +1 -1
  17. package/package.json +6 -5
  18. package/src/config.js +2 -1
  19. package/src/index.js +0 -1
  20. package/src/meeting-info/meeting-info-v2.js +90 -5
  21. package/src/meeting-info/utilv2.js +39 -0
  22. package/src/meetings/index.js +44 -2
  23. package/src/meetings/request.js +15 -6
  24. package/src/meetings/util.js +19 -0
  25. package/test/{unit/spec/transcription/index.js → integration/spec/transcription.js} +1 -1
  26. package/test/unit/spec/common/browser-detection.js +1 -0
  27. package/test/unit/spec/locus-info/index.js +1 -1
  28. package/test/unit/spec/meeting/index.js +43 -3
  29. package/test/unit/spec/meeting-info/meetinginfov2.js +99 -2
  30. package/test/unit/spec/meeting-info/utilv2.js +72 -0
  31. package/test/unit/spec/meetings/index.js +323 -86
  32. package/test/unit/spec/meetings/utils.js +18 -0
  33. package/test/unit/spec/members/index.js +1 -0
  34. package/test/unit/spec/metrics/index.js +7 -26
  35. package/test/unit/spec/networkQualityMonitor/index.js +1 -0
  36. package/test/unit/spec/peerconnection-manager/index.js +11 -1
  37. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +1 -0
  38. package/test/unit/spec/reconnection-manager/index.js +1 -0
  39. package/test/unit/spec/roap/util.js +1 -0
  40. package/test/unit/spec/stats-analyzer/index.js +1 -0
@@ -0,0 +1,18 @@
1
+ import {assert} from '@webex/test-helper-chai';
2
+ import MeetingsUtil from '@webex/plugin-meetings/src/meetings/util';
3
+
4
+ describe('plugin-meetings', () => {
5
+ describe('Meetings utils function', () => {
6
+ describe('#parseUserPreferences', () => {
7
+ it('parsed the prefered webesite from userPreferences', async () => {
8
+ const res = MeetingsUtil.parseUserPreferences([
9
+ 'SparkTOSAccept',
10
+ '"preferredWebExSite":"go.webex.com"'
11
+ ]);
12
+
13
+ assert.equal(res, 'go.webex.com');
14
+ });
15
+ });
16
+ });
17
+ });
18
+
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
4
 
5
+ import 'jsdom-global/register';
5
6
  import sinon from 'sinon';
6
7
  import uuid from 'uuid';
7
8
  import chai from 'chai';
@@ -1,21 +1,15 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
- /* globals window */
4
+ import 'jsdom-global/register';
5
5
  import sinon from 'sinon';
6
6
  import Metrics from '@webex/internal-plugin-metrics';
7
- import metrics from '@webex/plugin-meetings/src/metrics';
8
- import BrowserDetection from '@webex/plugin-meetings/src/common/browser-detection';
9
7
  import MockWebex from '@webex/test-helper-mock-webex';
10
8
  import {browserOnly} from '@webex/test-helper-mocha';
11
9
  import {assert} from '@webex/test-helper-chai';
12
10
 
13
- const {
14
- getBrowserName,
15
- getBrowserVersion,
16
- getOSName,
17
- getOSVersion
18
- } = BrowserDetection();
11
+ import metrics from '@webex/plugin-meetings/src/metrics';
12
+
19
13
 
20
14
  /**
21
15
  * Meeting can only run in a browser, so we can only send metrics for
@@ -48,6 +42,7 @@ browserOnly(describe)('Meeting metrics', () => {
48
42
  clientId: 'mock-client-id'
49
43
  }
50
44
  };
45
+ webex.config.metrics.type = ['behavioral'];
51
46
  webex.internal.metrics.submitClientMetrics = mockSubmitMetric;
52
47
  metrics.initialSetup({}, webex);
53
48
  });
@@ -98,10 +93,10 @@ browserOnly(describe)('Meeting metrics', () => {
98
93
  });
99
94
 
100
95
  it('adds environment information to metric', () => {
101
- const data = {value: 567};
102
- const metadata = {test: true};
96
+ const fields = {value: 567};
97
+ const metricTags = {test: true};
103
98
 
104
- metrics.sendBehavioralMetric('myMetric', data, metadata);
99
+ metrics.sendBehavioralMetric('myMetric', fields, metricTags);
105
100
 
106
101
  assert.calledWithMatch(
107
102
  mockSubmitMetric,
@@ -109,27 +104,13 @@ browserOnly(describe)('Meeting metrics', () => {
109
104
  {
110
105
  type: ['behavioral'],
111
106
  fields: {
112
- browser_version: getBrowserVersion(),
113
- os_version: getOSVersion(),
114
- sdk_version: '1.2.3',
115
107
  value: 567
116
108
  },
117
109
  tags: {
118
- org_id: '7890',
119
- os: getOSName(),
120
- browser: getBrowserName(),
121
- domain: window.location.hostname,
122
110
  test: true
123
111
  }
124
112
  }
125
113
  );
126
114
  });
127
-
128
- it('throws error if no metric name is given', () => {
129
- assert.throws(
130
- () => metrics.sendBehavioralMetric(),
131
- 'Missing behavioral metric name. Please provide one'
132
- );
133
- });
134
115
  });
135
116
  });
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import chai from 'chai';
2
3
  import chaiAsPromised from 'chai-as-promised';
3
4
  import sinon from 'sinon';
@@ -1,4 +1,4 @@
1
-
1
+ import 'jsdom-global/register';
2
2
  import {assert} from '@webex/test-helper-chai';
3
3
  import sinon from 'sinon';
4
4
  import PeerConnectionManager from '@webex/plugin-meetings/src/peer-connection-manager/index';
@@ -19,6 +19,16 @@ describe('Peerconnection Manager', () => {
19
19
  onicecandidateerror: null,
20
20
  localDescription: {sdp}
21
21
  };
22
+
23
+ Object.defineProperty(global.window, 'RTCSessionDescription', {
24
+ writable: true,
25
+ value: class {
26
+ constructor(options) {
27
+ this.type = options.type;
28
+ this.sdp = options.sdp;
29
+ }
30
+ }
31
+ });
22
32
  });
23
33
  describe('setRemoteSessionDetails', () => {
24
34
  it('change the start bitrate on remoteSDP and remove extmap', async () => {
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
4
 
5
+ import 'jsdom-global/register';
5
6
  import {assert} from '@webex/test-helper-chai';
6
7
  import sinon from 'sinon';
7
8
  import {
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import chai from 'chai';
2
3
  import chaiAsPromised from 'chai-as-promised';
3
4
  import sinon from 'sinon';
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import {assert} from '@webex/test-helper-chai';
2
3
  import RoapUtil from '@webex/plugin-meetings/src/roap/util';
3
4
  import PeerConnectionManager from '@webex/plugin-meetings/src/peer-connection-manager/index.js';
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import chai from 'chai';
2
3
  import chaiAsPromised from 'chai-as-promised';
3
4
  import sinon from 'sinon';