@webex/plugin-meetings 3.12.0-llmrefactor.2 → 3.12.0-llmrefactor.4
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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +2 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +7 -1
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +41 -18
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/webinar/index.js +2 -2
- package/dist/webinar/index.js.map +1 -1
- package/package.json +21 -21
- package/src/meeting/index.ts +1 -1
- package/src/meeting-info/meeting-info-v2.ts +6 -2
- package/src/meetings/index.ts +22 -7
- package/src/webinar/index.ts +1 -1
- package/test/unit/spec/meeting/index.js +60 -12
- package/test/unit/spec/meeting-info/meetinginfov2.js +57 -0
- package/test/unit/spec/meetings/index.js +58 -19
|
@@ -900,6 +900,63 @@ describe('plugin-meetings', () => {
|
|
|
900
900
|
}
|
|
901
901
|
);
|
|
902
902
|
|
|
903
|
+
forEach(
|
|
904
|
+
[
|
|
905
|
+
{
|
|
906
|
+
meetingId: 'meeting-id',
|
|
907
|
+
sendCAevents: true,
|
|
908
|
+
correlationId: 'correlation-id',
|
|
909
|
+
shouldSendCorrelationId: true,
|
|
910
|
+
condition: 'when CA events are enabled for the meeting',
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
sendCAevents: true,
|
|
914
|
+
correlationId: 'correlation-id',
|
|
915
|
+
shouldSendCorrelationId: false,
|
|
916
|
+
condition: 'without a meetingId',
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
meetingId: 'meeting-id',
|
|
920
|
+
sendCAevents: false,
|
|
921
|
+
correlationId: 'correlation-id',
|
|
922
|
+
shouldSendCorrelationId: false,
|
|
923
|
+
condition: 'when CA events are disabled',
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
meetingId: 'meeting-id',
|
|
927
|
+
sendCAevents: true,
|
|
928
|
+
shouldSendCorrelationId: false,
|
|
929
|
+
condition: 'without a correlationId',
|
|
930
|
+
},
|
|
931
|
+
],
|
|
932
|
+
({meetingId, sendCAevents, correlationId, shouldSendCorrelationId, condition}) => {
|
|
933
|
+
it(`should ${
|
|
934
|
+
shouldSendCorrelationId ? '' : 'not '
|
|
935
|
+
}send the correlationId header ${condition}`, async () => {
|
|
936
|
+
webex.request.resolves({statusCode: 200, body: {meetingKey: '1234323'}});
|
|
937
|
+
|
|
938
|
+
await meetingInfo.fetchMeetingInfo(
|
|
939
|
+
'1234323',
|
|
940
|
+
DESTINATION_TYPE.MEETING_ID,
|
|
941
|
+
null,
|
|
942
|
+
null,
|
|
943
|
+
null,
|
|
944
|
+
null,
|
|
945
|
+
undefined,
|
|
946
|
+
{meetingId, sendCAevents, correlationId}
|
|
947
|
+
);
|
|
948
|
+
|
|
949
|
+
const requestOptions = webex.request.firstCall.args[0];
|
|
950
|
+
|
|
951
|
+
if (shouldSendCorrelationId) {
|
|
952
|
+
assert.deepEqual(requestOptions.headers, {correlationId});
|
|
953
|
+
} else {
|
|
954
|
+
assert.notProperty(requestOptions, 'headers');
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
);
|
|
959
|
+
|
|
903
960
|
it('should send CA metric if meetingId is provided and send CA events is authorized', async () => {
|
|
904
961
|
const requestResponse = {
|
|
905
962
|
statusCode: 200,
|
|
@@ -1879,12 +1879,27 @@ describe('plugin-meetings', () => {
|
|
|
1879
1879
|
});
|
|
1880
1880
|
|
|
1881
1881
|
describe('wasm runtime performance telemetry', () => {
|
|
1882
|
+
const correlationId = 'wasm-corr-id';
|
|
1883
|
+
const benchmarkMeasurements = {
|
|
1884
|
+
divRatio: 1.888,
|
|
1885
|
+
sqrtRatio: 3.474,
|
|
1886
|
+
addNsPerOp: 2.006,
|
|
1887
|
+
addMedianMs: 32.1,
|
|
1888
|
+
divMedianMs: 60.6,
|
|
1889
|
+
sqrtMedianMs: 111.5,
|
|
1890
|
+
};
|
|
1882
1891
|
const probeResult = {
|
|
1883
1892
|
status: 'slow',
|
|
1884
1893
|
capability: 'not capable',
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1894
|
+
reason: null,
|
|
1895
|
+
measurements: benchmarkMeasurements,
|
|
1896
|
+
};
|
|
1897
|
+
const expectedMetricFields = {
|
|
1898
|
+
status: probeResult.status,
|
|
1899
|
+
capability: probeResult.capability,
|
|
1900
|
+
reason: probeResult.reason,
|
|
1901
|
+
...benchmarkMeasurements,
|
|
1902
|
+
correlation_id: correlationId,
|
|
1888
1903
|
};
|
|
1889
1904
|
let metricsSpy;
|
|
1890
1905
|
let probeCheckStub;
|
|
@@ -1893,7 +1908,7 @@ describe('plugin-meetings', () => {
|
|
|
1893
1908
|
webex.meetings.meetingInfo.fetchInfoOptions = sinon.stub().resolves({});
|
|
1894
1909
|
webex.meetings.createMeeting = sinon
|
|
1895
1910
|
.stub()
|
|
1896
|
-
.returns(Promise.resolve({on: () => true, correlationId
|
|
1911
|
+
.returns(Promise.resolve({on: () => true, correlationId}));
|
|
1897
1912
|
probeCheckStub = sinon.stub(WasmRuntimeProbe, 'check').resolves(probeResult);
|
|
1898
1913
|
metricsSpy = sinon.stub(Metrics, 'sendBehavioralMetric');
|
|
1899
1914
|
});
|
|
@@ -1908,13 +1923,11 @@ describe('plugin-meetings', () => {
|
|
|
1908
1923
|
await testUtils.flushPromises();
|
|
1909
1924
|
|
|
1910
1925
|
assert.calledOnceWithExactly(probeCheckStub);
|
|
1911
|
-
assert.calledOnceWithExactly(
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
correlation_id: 'wasm-corr-id',
|
|
1917
|
-
});
|
|
1926
|
+
assert.calledOnceWithExactly(
|
|
1927
|
+
metricsSpy,
|
|
1928
|
+
'js_sdk_wasm_runtime_performance',
|
|
1929
|
+
expectedMetricFields
|
|
1930
|
+
);
|
|
1918
1931
|
});
|
|
1919
1932
|
|
|
1920
1933
|
it('logs the WASM runtime status after a meeting is created', async () => {
|
|
@@ -1939,12 +1952,35 @@ describe('plugin-meetings', () => {
|
|
|
1939
1952
|
await testUtils.flushPromises();
|
|
1940
1953
|
|
|
1941
1954
|
assert.calledOnceWithExactly(probeCheckStub);
|
|
1955
|
+
assert.calledOnceWithExactly(
|
|
1956
|
+
metricsSpy,
|
|
1957
|
+
'js_sdk_wasm_runtime_performance',
|
|
1958
|
+
expectedMetricFields
|
|
1959
|
+
);
|
|
1960
|
+
});
|
|
1961
|
+
|
|
1962
|
+
it('emits the reason with null measurement fields when no measurements are available', async () => {
|
|
1963
|
+
probeCheckStub.resolves({
|
|
1964
|
+
status: 'unknown',
|
|
1965
|
+
capability: 'unknown',
|
|
1966
|
+
reason: 'worker_timeout',
|
|
1967
|
+
measurements: null,
|
|
1968
|
+
});
|
|
1969
|
+
|
|
1970
|
+
await webex.meetings.create(test1, test2);
|
|
1971
|
+
await testUtils.flushPromises();
|
|
1972
|
+
|
|
1942
1973
|
assert.calledOnceWithExactly(metricsSpy, 'js_sdk_wasm_runtime_performance', {
|
|
1943
|
-
status: '
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1974
|
+
status: 'unknown',
|
|
1975
|
+
capability: 'unknown',
|
|
1976
|
+
reason: 'worker_timeout',
|
|
1977
|
+
divRatio: null,
|
|
1978
|
+
sqrtRatio: null,
|
|
1979
|
+
addNsPerOp: null,
|
|
1980
|
+
addMedianMs: null,
|
|
1981
|
+
divMedianMs: null,
|
|
1982
|
+
sqrtMedianMs: null,
|
|
1983
|
+
correlation_id: correlationId,
|
|
1948
1984
|
});
|
|
1949
1985
|
});
|
|
1950
1986
|
|
|
@@ -1955,8 +1991,7 @@ describe('plugin-meetings', () => {
|
|
|
1955
1991
|
const created = await webex.meetings.create(test1, test2);
|
|
1956
1992
|
await testUtils.flushPromises();
|
|
1957
1993
|
|
|
1958
|
-
|
|
1959
|
-
assert.equal(created.correlationId, 'wasm-corr-id');
|
|
1994
|
+
assert.equal(created.correlationId, correlationId);
|
|
1960
1995
|
assert.notCalled(metricsSpy);
|
|
1961
1996
|
assert.calledOnceWithExactly(
|
|
1962
1997
|
loggerErrorStub,
|
|
@@ -2680,7 +2715,11 @@ describe('plugin-meetings', () => {
|
|
|
2680
2715
|
undefined,
|
|
2681
2716
|
undefined,
|
|
2682
2717
|
extraParams,
|
|
2683
|
-
{
|
|
2718
|
+
{
|
|
2719
|
+
meetingId: meeting.id,
|
|
2720
|
+
sendCAevents,
|
|
2721
|
+
correlationId: meeting.correlationId,
|
|
2722
|
+
}
|
|
2684
2723
|
);
|
|
2685
2724
|
}
|
|
2686
2725
|
|