@webex/internal-plugin-metrics 2.60.1-next.1 → 2.60.1-next.3

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.
package/dist/metrics.js CHANGED
@@ -163,7 +163,7 @@ var Metrics = _webexCore.WebexPlugin.extend({
163
163
  });
164
164
  });
165
165
  },
166
- version: "2.60.1-next.1"
166
+ version: "2.60.1-next.3"
167
167
  });
168
168
  var _default = exports.default = Metrics;
169
169
  //# sourceMappingURL=metrics.js.map
package/package.json CHANGED
@@ -26,23 +26,23 @@
26
26
  "@webex/eslint-config-legacy": "0.0.0",
27
27
  "@webex/jest-config-legacy": "0.0.0",
28
28
  "@webex/legacy-tools": "0.0.0",
29
- "@webex/test-helper-chai": "2.60.1-next.1",
30
- "@webex/test-helper-mocha": "2.60.1-next.1",
31
- "@webex/test-helper-mock-webex": "2.60.1-next.1",
32
- "@webex/test-helper-test-users": "2.60.1-next.1",
29
+ "@webex/test-helper-chai": "2.60.1-next.3",
30
+ "@webex/test-helper-mocha": "2.60.1-next.3",
31
+ "@webex/test-helper-mock-webex": "2.60.1-next.3",
32
+ "@webex/test-helper-test-users": "2.60.1-next.3",
33
33
  "eslint": "^8.24.0",
34
34
  "prettier": "^2.7.1",
35
35
  "sinon": "^9.2.4"
36
36
  },
37
37
  "dependencies": {
38
- "@webex/common": "2.60.1-next.1",
39
- "@webex/common-timers": "2.60.1-next.1",
38
+ "@webex/common": "2.60.1-next.3",
39
+ "@webex/common-timers": "2.60.1-next.3",
40
40
  "@webex/event-dictionary-ts": "^1.0.1329",
41
- "@webex/internal-plugin-device": "2.60.1-next.1",
42
- "@webex/internal-plugin-metrics": "2.60.1-next.1",
43
- "@webex/test-helper-chai": "2.60.1-next.1",
44
- "@webex/test-helper-mock-webex": "2.60.1-next.1",
45
- "@webex/webex-core": "2.60.1-next.1"
41
+ "@webex/internal-plugin-device": "2.60.1-next.3",
42
+ "@webex/internal-plugin-metrics": "2.60.1-next.3",
43
+ "@webex/test-helper-chai": "2.60.1-next.3",
44
+ "@webex/test-helper-mock-webex": "2.60.1-next.3",
45
+ "@webex/webex-core": "2.60.1-next.3"
46
46
  },
47
47
  "scripts": {
48
48
  "build": " yarn run -T tsc --declaration true --declarationDir ./dist/types",
@@ -54,5 +54,5 @@
54
54
  "test:style": "eslint ./src/**/*.*",
55
55
  "test:unit": "webex-legacy-tools test --unit --runner jest"
56
56
  },
57
- "version": "2.60.1-next.1"
57
+ "version": "2.60.1-next.3"
58
58
  }
@@ -13,6 +13,7 @@ import CONFIG from '../../../../src/config';
13
13
 
14
14
  //@ts-ignore
15
15
  global.window = {location: {hostname: 'whatever'}};
16
+ process.env.NODE_ENV = 'test';
16
17
 
17
18
  const {getOSName, getOSVersion, getBrowserName, getBrowserVersion} = BrowserDetection();
18
19
  const userAgent = `webex-js-sdk/test-webex-version client=Cantina; (os=${getOSName()}/${
@@ -78,6 +79,11 @@ describe('internal-plugin-metrics', () => {
78
79
  orgId: 'orgId',
79
80
  },
80
81
  },
82
+ config: {
83
+ metrics: {
84
+ ...CONFIG.metrics,
85
+ },
86
+ },
81
87
  meetings: {
82
88
  config: {
83
89
  metrics: {
@@ -539,7 +545,7 @@ describe('internal-plugin-metrics', () => {
539
545
  });
540
546
  });
541
547
 
542
- describe.skip('#submitClientEvent', () => {
548
+ describe('#submitClientEvent', () => {
543
549
  it('should submit client event successfully with meetingId', () => {
544
550
  const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
545
551
  const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
@@ -716,7 +722,7 @@ describe('internal-plugin-metrics', () => {
716
722
  ]);
717
723
  });
718
724
 
719
- it('should submit client event successfully with correlationId, webexConferenceIdStr and globalMeetingId', () => {
725
+ it('should submit client event successfully with correlationId, webexConferenceIdStr and globalMeetingId', async () => {
720
726
  const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
721
727
  const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
722
728
  const generateClientEventErrorPayloadSpy = sinon.spy(cd, 'generateClientEventErrorPayload');
@@ -1031,8 +1037,6 @@ describe('internal-plugin-metrics', () => {
1031
1037
  options,
1032
1038
  });
1033
1039
 
1034
- console.log(submitToCallDiagnosticsSpy.getCalls()[0].args[0].event.errors);
1035
-
1036
1040
  assert.calledWith(submitToCallDiagnosticsSpy, {
1037
1041
  event: {
1038
1042
  canProceed: true,
@@ -1357,7 +1361,7 @@ describe('internal-plugin-metrics', () => {
1357
1361
  });
1358
1362
 
1359
1363
  describe('#submitMQE', () => {
1360
- it.skip('submits the event correctly', () => {
1364
+ it('submits the event correctly', () => {
1361
1365
  const prepareDiagnosticEventSpy = sinon.spy(cd, 'prepareDiagnosticEvent');
1362
1366
  const submitToCallDiagnosticsSpy = sinon.spy(cd, 'submitToCallDiagnostics');
1363
1367
  const getErrorPayloadForClientErrorCodeSpy = sinon.spy(
@@ -1940,7 +1944,7 @@ describe('internal-plugin-metrics', () => {
1940
1944
  });
1941
1945
  });
1942
1946
 
1943
- describe.skip('#buildClientEventFetchRequestOptions', () => {
1947
+ describe('#buildClientEventFetchRequestOptions', () => {
1944
1948
  [undefined, 'myPreLoginId'].forEach((preLoginId) => {
1945
1949
  it('returns expected options without preLoginId', async () => {
1946
1950
  const options = {
@@ -39,7 +39,6 @@ describe('internal-plugin-metrics', () => {
39
39
  },
40
40
  };
41
41
  clearEmptyKeysRecursively(obj);
42
- console.log(obj);
43
42
  assert.deepEqual(obj, {nested: {arr: ['test']}});
44
43
  });
45
44
 
@@ -369,7 +368,7 @@ describe('internal-plugin-metrics', () => {
369
368
  })
370
369
  });
371
370
 
372
- describe('setMetricTimings', async () => {
371
+ describe('setMetricTimings', () => {
373
372
  let webex: any;
374
373
 
375
374
  const check = (options: any, expectedOptions: any) => {
@@ -12,6 +12,8 @@ import {BrowserDetection} from '@webex/common';
12
12
 
13
13
  const {getOSVersion} = BrowserDetection();
14
14
 
15
+ //@ts-ignore
16
+ global.window = {location: {hostname: 'whatever'}};
15
17
  function promiseTick(count) {
16
18
  let promise = Promise.resolve();
17
19