@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
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.
|
|
30
|
-
"@webex/test-helper-mocha": "2.60.1-next.
|
|
31
|
-
"@webex/test-helper-mock-webex": "2.60.1-next.
|
|
32
|
-
"@webex/test-helper-test-users": "2.60.1-next.
|
|
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.
|
|
39
|
-
"@webex/common-timers": "2.60.1-next.
|
|
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.
|
|
42
|
-
"@webex/internal-plugin-metrics": "2.60.1-next.
|
|
43
|
-
"@webex/test-helper-chai": "2.60.1-next.
|
|
44
|
-
"@webex/test-helper-mock-webex": "2.60.1-next.
|
|
45
|
-
"@webex/webex-core": "2.60.1-next.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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',
|
|
371
|
+
describe('setMetricTimings', () => {
|
|
373
372
|
let webex: any;
|
|
374
373
|
|
|
375
374
|
const check = (options: any, expectedOptions: any) => {
|