@webex/plugin-meetings 3.0.0-beta.197 → 3.0.0-beta.198
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/breakouts/index.js
CHANGED
|
@@ -1041,7 +1041,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
1041
1041
|
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1042
1042
|
}
|
|
1043
1043
|
},
|
|
1044
|
-
version: "3.0.0-beta.
|
|
1044
|
+
version: "3.0.0-beta.198"
|
|
1045
1045
|
});
|
|
1046
1046
|
var _default = Breakouts;
|
|
1047
1047
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.198",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"build": "yarn run -T tsc --declaration true --declarationDir ./dist/types"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@webex/plugin-meetings": "3.0.0-beta.
|
|
36
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
37
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
38
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
39
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
40
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
35
|
+
"@webex/plugin-meetings": "3.0.0-beta.198",
|
|
36
|
+
"@webex/test-helper-chai": "3.0.0-beta.198",
|
|
37
|
+
"@webex/test-helper-mocha": "3.0.0-beta.198",
|
|
38
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.198",
|
|
39
|
+
"@webex/test-helper-retry": "3.0.0-beta.198",
|
|
40
|
+
"@webex/test-helper-test-users": "3.0.0-beta.198",
|
|
41
41
|
"chai": "^4.3.4",
|
|
42
42
|
"chai-as-promised": "^7.1.1",
|
|
43
43
|
"jsdom-global": "3.0.2",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
"typescript": "^4.7.4"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@webex/common": "3.0.0-beta.
|
|
49
|
+
"@webex/common": "3.0.0-beta.198",
|
|
50
50
|
"@webex/internal-media-core": "1.39.1",
|
|
51
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
52
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
53
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
54
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
55
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
56
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
57
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
58
|
-
"@webex/media-helpers": "3.0.0-beta.
|
|
59
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
60
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
61
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
51
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.198",
|
|
52
|
+
"@webex/internal-plugin-device": "3.0.0-beta.198",
|
|
53
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.198",
|
|
54
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.198",
|
|
55
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.198",
|
|
56
|
+
"@webex/internal-plugin-support": "3.0.0-beta.198",
|
|
57
|
+
"@webex/internal-plugin-user": "3.0.0-beta.198",
|
|
58
|
+
"@webex/media-helpers": "3.0.0-beta.198",
|
|
59
|
+
"@webex/plugin-people": "3.0.0-beta.198",
|
|
60
|
+
"@webex/plugin-rooms": "3.0.0-beta.198",
|
|
61
|
+
"@webex/webex-core": "3.0.0-beta.198",
|
|
62
62
|
"ampersand-collection": "^2.0.2",
|
|
63
63
|
"bowser": "^2.11.0",
|
|
64
64
|
"btoa": "^1.2.1",
|
|
@@ -23,8 +23,8 @@ import {
|
|
|
23
23
|
_MEETING_,
|
|
24
24
|
} from '../../../../src/constants';
|
|
25
25
|
|
|
26
|
-
import {
|
|
27
|
-
import uuid from
|
|
26
|
+
import {self, selfWithInactivity} from './selfConstant';
|
|
27
|
+
import uuid from 'uuid';
|
|
28
28
|
|
|
29
29
|
describe('plugin-meetings', () => {
|
|
30
30
|
describe('LocusInfo index', () => {
|
|
@@ -116,7 +116,7 @@ describe('plugin-meetings', () => {
|
|
|
116
116
|
locusInfo.emitScoped,
|
|
117
117
|
{file: 'locus-info', function: 'updateControls'},
|
|
118
118
|
LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED,
|
|
119
|
-
{state: newControls.muteOnEntry}
|
|
119
|
+
{state: newControls.muteOnEntry}
|
|
120
120
|
);
|
|
121
121
|
});
|
|
122
122
|
|
|
@@ -129,7 +129,7 @@ describe('plugin-meetings', () => {
|
|
|
129
129
|
locusInfo.emitScoped,
|
|
130
130
|
{file: 'locus-info', function: 'updateControls'},
|
|
131
131
|
LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED,
|
|
132
|
-
{state: newControls.shareControl}
|
|
132
|
+
{state: newControls.shareControl}
|
|
133
133
|
);
|
|
134
134
|
});
|
|
135
135
|
|
|
@@ -142,7 +142,7 @@ describe('plugin-meetings', () => {
|
|
|
142
142
|
locusInfo.emitScoped,
|
|
143
143
|
{file: 'locus-info', function: 'updateControls'},
|
|
144
144
|
LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED,
|
|
145
|
-
{state: newControls.disallowUnmute}
|
|
145
|
+
{state: newControls.disallowUnmute}
|
|
146
146
|
);
|
|
147
147
|
});
|
|
148
148
|
|
|
@@ -155,7 +155,7 @@ describe('plugin-meetings', () => {
|
|
|
155
155
|
locusInfo.emitScoped,
|
|
156
156
|
{file: 'locus-info', function: 'updateControls'},
|
|
157
157
|
LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED,
|
|
158
|
-
{state: newControls.reactions}
|
|
158
|
+
{state: newControls.reactions}
|
|
159
159
|
);
|
|
160
160
|
});
|
|
161
161
|
|
|
@@ -168,7 +168,7 @@ describe('plugin-meetings', () => {
|
|
|
168
168
|
locusInfo.emitScoped,
|
|
169
169
|
{file: 'locus-info', function: 'updateControls'},
|
|
170
170
|
LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED,
|
|
171
|
-
{state: newControls.viewTheParticipantList}
|
|
171
|
+
{state: newControls.viewTheParticipantList}
|
|
172
172
|
);
|
|
173
173
|
});
|
|
174
174
|
|
|
@@ -181,7 +181,7 @@ describe('plugin-meetings', () => {
|
|
|
181
181
|
locusInfo.emitScoped,
|
|
182
182
|
{file: 'locus-info', function: 'updateControls'},
|
|
183
183
|
LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED,
|
|
184
|
-
{state: newControls.raiseHand}
|
|
184
|
+
{state: newControls.raiseHand}
|
|
185
185
|
);
|
|
186
186
|
});
|
|
187
187
|
|
|
@@ -194,7 +194,7 @@ describe('plugin-meetings', () => {
|
|
|
194
194
|
locusInfo.emitScoped,
|
|
195
195
|
{file: 'locus-info', function: 'updateControls'},
|
|
196
196
|
LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED,
|
|
197
|
-
{state: newControls.video}
|
|
197
|
+
{state: newControls.video}
|
|
198
198
|
);
|
|
199
199
|
});
|
|
200
200
|
|
|
@@ -383,7 +383,7 @@ describe('plugin-meetings', () => {
|
|
|
383
383
|
it('should update the breakout state', () => {
|
|
384
384
|
locusInfo.emitScoped = sinon.stub();
|
|
385
385
|
let tmpStub = sinon.stub(SelfUtils, 'getReplacedBreakoutMoveId').returns('breakoutMoveId');
|
|
386
|
-
newControls.breakout = {
|
|
386
|
+
newControls.breakout = {breakout: {}};
|
|
387
387
|
let selfInfo = {};
|
|
388
388
|
|
|
389
389
|
locusInfo.updateControls(newControls, selfInfo);
|
|
@@ -1067,7 +1067,8 @@ describe('plugin-meetings', () => {
|
|
|
1067
1067
|
const selfWithRequestedToUnmute = cloneDeep(self);
|
|
1068
1068
|
|
|
1069
1069
|
selfWithRequestedToUnmute.controls.audio.requestedToUnmute = true;
|
|
1070
|
-
selfWithRequestedToUnmute.controls.audio.lastModifiedRequestedToUnmute =
|
|
1070
|
+
selfWithRequestedToUnmute.controls.audio.lastModifiedRequestedToUnmute =
|
|
1071
|
+
'2023-06-16T19:25:04.369Z';
|
|
1071
1072
|
|
|
1072
1073
|
locusInfo.webex.internal.device.url = self.deviceUrl;
|
|
1073
1074
|
locusInfo.emitScoped = sinon.stub();
|
|
@@ -1377,7 +1378,7 @@ describe('plugin-meetings', () => {
|
|
|
1377
1378
|
function: 'updateMeetingInfo',
|
|
1378
1379
|
},
|
|
1379
1380
|
LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
|
|
1380
|
-
|
|
1381
|
+
{info: locusInfo.parsedLocus.info, self},
|
|
1381
1382
|
];
|
|
1382
1383
|
|
|
1383
1384
|
if (expected) {
|
|
@@ -1406,7 +1407,6 @@ describe('plugin-meetings', () => {
|
|
|
1406
1407
|
locusInfo.emitScoped.resetHistory();
|
|
1407
1408
|
};
|
|
1408
1409
|
|
|
1409
|
-
|
|
1410
1410
|
it('emits MEETING_INFO_UPDATED if the info changes', () => {
|
|
1411
1411
|
const initialInfo = cloneDeep(meetingInfo);
|
|
1412
1412
|
|
|
@@ -1678,7 +1678,7 @@ describe('plugin-meetings', () => {
|
|
|
1678
1678
|
|
|
1679
1679
|
spies.forEach((spy) => {
|
|
1680
1680
|
assert.notCalled(spy);
|
|
1681
|
-
})
|
|
1681
|
+
});
|
|
1682
1682
|
|
|
1683
1683
|
assert.equal(oldWorkingCopy, locusParser.workingCopy);
|
|
1684
1684
|
});
|
|
@@ -1733,7 +1733,7 @@ describe('plugin-meetings', () => {
|
|
|
1733
1733
|
locusInfo.locusParser.resume = sandbox.stub().callsFake(() => resolve());
|
|
1734
1734
|
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
|
1735
1735
|
}).then(() => {
|
|
1736
|
-
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {
|
|
1736
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'oldSyncUrl'});
|
|
1737
1737
|
|
|
1738
1738
|
assert.calledOnceWithExactly(meeting.locusInfo.handleLocusDelta, fakeDeltaLocus, meeting);
|
|
1739
1739
|
assert.calledOnce(locusInfo.locusParser.resume);
|
|
@@ -1763,7 +1763,7 @@ describe('plugin-meetings', () => {
|
|
|
1763
1763
|
locusInfo.locusParser.resume = sandbox.stub().callsFake(() => resolve());
|
|
1764
1764
|
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
|
1765
1765
|
}).then(() => {
|
|
1766
|
-
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {
|
|
1766
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'oldSyncUrl'});
|
|
1767
1767
|
|
|
1768
1768
|
assert.notCalled(meeting.locusInfo.handleLocusDelta);
|
|
1769
1769
|
assert.notCalled(meeting.locusInfo.onFullLocus);
|
|
@@ -1793,7 +1793,7 @@ describe('plugin-meetings', () => {
|
|
|
1793
1793
|
locusInfo.locusParser.resume = sandbox.stub().callsFake(() => resolve());
|
|
1794
1794
|
locusInfo.applyLocusDeltaData(DESYNC, fakeLocus, meeting);
|
|
1795
1795
|
}).then(() => {
|
|
1796
|
-
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {
|
|
1796
|
+
assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'oldLocusUrl'});
|
|
1797
1797
|
|
|
1798
1798
|
assert.calledOnceWithExactly(meeting.locusInfo.onFullLocus, fakeFullLocusDto);
|
|
1799
1799
|
assert.calledOnce(locusInfo.locusParser.resume);
|
|
@@ -1808,14 +1808,14 @@ describe('plugin-meetings', () => {
|
|
|
1808
1808
|
};
|
|
1809
1809
|
|
|
1810
1810
|
fakeLocus.controls = {
|
|
1811
|
-
breakout: fakeBreakout
|
|
1811
|
+
breakout: fakeBreakout,
|
|
1812
1812
|
};
|
|
1813
1813
|
locusInfo.controls = {
|
|
1814
1814
|
breakout: {
|
|
1815
1815
|
sessionId: 'sessionId',
|
|
1816
1816
|
groupId: 'groupId',
|
|
1817
|
-
}
|
|
1818
|
-
}
|
|
1817
|
+
},
|
|
1818
|
+
};
|
|
1819
1819
|
locusInfo.updateParticipants = sinon.stub();
|
|
1820
1820
|
locusInfo.onDeltaLocus(fakeLocus);
|
|
1821
1821
|
assert.calledWith(locusInfo.updateParticipants, {}, false);
|
|
@@ -1849,9 +1849,9 @@ describe('plugin-meetings', () => {
|
|
|
1849
1849
|
locusInfo.mainSessionLocusCache = {url: 'url'};
|
|
1850
1850
|
locusInfo.controls = {
|
|
1851
1851
|
breakout: {
|
|
1852
|
-
sessionType: 'BREAKOUT'
|
|
1853
|
-
}
|
|
1854
|
-
}
|
|
1852
|
+
sessionType: 'BREAKOUT',
|
|
1853
|
+
},
|
|
1854
|
+
};
|
|
1855
1855
|
const newLocus = {
|
|
1856
1856
|
controls: {
|
|
1857
1857
|
breakout: {
|
|
@@ -1867,9 +1867,9 @@ describe('plugin-meetings', () => {
|
|
|
1867
1867
|
locusInfo.mainSessionLocusCache = null;
|
|
1868
1868
|
locusInfo.controls = {
|
|
1869
1869
|
breakout: {
|
|
1870
|
-
sessionType: 'BREAKOUT'
|
|
1871
|
-
}
|
|
1872
|
-
}
|
|
1870
|
+
sessionType: 'BREAKOUT',
|
|
1871
|
+
},
|
|
1872
|
+
};
|
|
1873
1873
|
const newLocus = {
|
|
1874
1874
|
controls: {
|
|
1875
1875
|
breakout: {
|
|
@@ -1885,9 +1885,9 @@ describe('plugin-meetings', () => {
|
|
|
1885
1885
|
locusInfo.mainSessionLocusCache = {url: 'url'};
|
|
1886
1886
|
locusInfo.controls = {
|
|
1887
1887
|
breakout: {
|
|
1888
|
-
sessionType: 'MAIN'
|
|
1889
|
-
}
|
|
1890
|
-
}
|
|
1888
|
+
sessionType: 'MAIN',
|
|
1889
|
+
},
|
|
1890
|
+
};
|
|
1891
1891
|
const newLocus = {
|
|
1892
1892
|
controls: {
|
|
1893
1893
|
breakout: {
|
|
@@ -1944,8 +1944,16 @@ describe('plugin-meetings', () => {
|
|
|
1944
1944
|
let cachedLocus;
|
|
1945
1945
|
let newLocus;
|
|
1946
1946
|
beforeEach(() => {
|
|
1947
|
-
cachedLocus = {
|
|
1948
|
-
|
|
1947
|
+
cachedLocus = {
|
|
1948
|
+
controls: {},
|
|
1949
|
+
participants: [],
|
|
1950
|
+
info: {webExMeetingId: 'testId1', topic: 'test'},
|
|
1951
|
+
};
|
|
1952
|
+
newLocus = {
|
|
1953
|
+
self: {},
|
|
1954
|
+
participants: [{id: '111'}],
|
|
1955
|
+
info: {testId: 'testId2', webExMeetingName: 'hello'},
|
|
1956
|
+
};
|
|
1949
1957
|
});
|
|
1950
1958
|
it('shallow merge new locus into cache', () => {
|
|
1951
1959
|
locusInfo.mainSessionLocusCache = cachedLocus;
|
|
@@ -1979,7 +1987,7 @@ describe('plugin-meetings', () => {
|
|
|
1979
1987
|
locusInfo.mainSessionLocusCache = {controls: {}};
|
|
1980
1988
|
locusInfo.clearMainSessionLocusCache();
|
|
1981
1989
|
assert.isNull(locusInfo.mainSessionLocusCache);
|
|
1982
|
-
})
|
|
1990
|
+
});
|
|
1983
1991
|
});
|
|
1984
1992
|
|
|
1985
1993
|
describe('#handleOneonOneEvent', () => {
|
|
@@ -2046,13 +2054,13 @@ describe('plugin-meetings', () => {
|
|
|
2046
2054
|
});
|
|
2047
2055
|
|
|
2048
2056
|
it('sends client event correctly for state = PARTNER_LEFT', () => {
|
|
2049
|
-
locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT})
|
|
2057
|
+
locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT});
|
|
2050
2058
|
locusInfo.parsedLocus = {
|
|
2051
2059
|
fullState: {
|
|
2052
2060
|
type: _CALL_,
|
|
2053
2061
|
},
|
|
2054
2062
|
self: {
|
|
2055
|
-
state:
|
|
2063
|
+
state: MEETING_STATE.STATES.DECLINED,
|
|
2056
2064
|
},
|
|
2057
2065
|
};
|
|
2058
2066
|
locusInfo.isMeetingActive();
|
|
@@ -2066,13 +2074,13 @@ describe('plugin-meetings', () => {
|
|
|
2066
2074
|
});
|
|
2067
2075
|
|
|
2068
2076
|
it('sends client event correctly for state = SELF_LEFT', () => {
|
|
2069
|
-
locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT})
|
|
2077
|
+
locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT});
|
|
2070
2078
|
locusInfo.parsedLocus = {
|
|
2071
2079
|
fullState: {
|
|
2072
2080
|
type: _CALL_,
|
|
2073
2081
|
},
|
|
2074
2082
|
self: {
|
|
2075
|
-
state:
|
|
2083
|
+
state: MEETING_STATE.STATES.LEFT,
|
|
2076
2084
|
},
|
|
2077
2085
|
};
|
|
2078
2086
|
|
|
@@ -2087,7 +2095,7 @@ describe('plugin-meetings', () => {
|
|
|
2087
2095
|
});
|
|
2088
2096
|
|
|
2089
2097
|
it('sends client event correctly for state = MEETING_INACTIVE_TERMINATING', () => {
|
|
2090
|
-
locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT})
|
|
2098
|
+
locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT});
|
|
2091
2099
|
locusInfo.parsedLocus = {
|
|
2092
2100
|
fullState: {
|
|
2093
2101
|
type: _MEETING_,
|
|
@@ -2109,7 +2117,7 @@ describe('plugin-meetings', () => {
|
|
|
2109
2117
|
});
|
|
2110
2118
|
|
|
2111
2119
|
it('sends client event correctly for state = FULLSTATE_REMOVED', () => {
|
|
2112
|
-
locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT})
|
|
2120
|
+
locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT});
|
|
2113
2121
|
locusInfo.parsedLocus = {
|
|
2114
2122
|
fullState: {
|
|
2115
2123
|
type: _MEETING_,
|
|
@@ -2117,7 +2125,7 @@ describe('plugin-meetings', () => {
|
|
|
2117
2125
|
};
|
|
2118
2126
|
|
|
2119
2127
|
locusInfo.fullState = {
|
|
2120
|
-
removed: true
|
|
2128
|
+
removed: true,
|
|
2121
2129
|
};
|
|
2122
2130
|
|
|
2123
2131
|
locusInfo.isMeetingActive();
|
|
@@ -2132,7 +2140,7 @@ describe('plugin-meetings', () => {
|
|
|
2132
2140
|
});
|
|
2133
2141
|
|
|
2134
2142
|
// semi-integration tests that use real LocusInfo with real Parser
|
|
2135
|
-
// and test various scenarios related to handling out-of-order Locus delta events
|
|
2143
|
+
// and test various scenarios related to handling out-of-order Locus delta events
|
|
2136
2144
|
describe('handling of out-of-order Locus delta events', () => {
|
|
2137
2145
|
let clock;
|
|
2138
2146
|
|
|
@@ -2141,20 +2149,20 @@ describe('plugin-meetings', () => {
|
|
|
2141
2149
|
baseSequence: {
|
|
2142
2150
|
rangeStart: 0,
|
|
2143
2151
|
rangeEnd: 0,
|
|
2144
|
-
entries: [base]
|
|
2152
|
+
entries: [base],
|
|
2145
2153
|
},
|
|
2146
2154
|
sequence: {
|
|
2147
2155
|
rangeStart: 0,
|
|
2148
2156
|
rangeEnd: 0,
|
|
2149
|
-
entries: [sequence]
|
|
2157
|
+
entries: [sequence],
|
|
2150
2158
|
},
|
|
2151
2159
|
syncUrl: `fake sync url for sequence ${sequence}`,
|
|
2152
2160
|
self: {
|
|
2153
2161
|
person: {
|
|
2154
|
-
id: 'test person id'
|
|
2155
|
-
}
|
|
2162
|
+
id: 'test person id',
|
|
2163
|
+
},
|
|
2156
2164
|
},
|
|
2157
|
-
}
|
|
2165
|
+
};
|
|
2158
2166
|
};
|
|
2159
2167
|
|
|
2160
2168
|
// a list of example delta events, sorted by time and each event is based on the previous one
|
|
@@ -2179,9 +2187,8 @@ describe('plugin-meetings', () => {
|
|
|
2179
2187
|
sinon.stub(locusInfo, 'updateParticipantDeltas');
|
|
2180
2188
|
sinon.stub(locusInfo, 'updateParticipants');
|
|
2181
2189
|
sinon.stub(locusInfo, 'isMeetingActive'),
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
updateLocusInfoStub = sinon.stub(locusInfo, 'updateLocusInfo');
|
|
2190
|
+
sinon.stub(locusInfo, 'handleOneOnOneEvent'),
|
|
2191
|
+
(updateLocusInfoStub = sinon.stub(locusInfo, 'updateLocusInfo'));
|
|
2185
2192
|
syncRequestStub = sinon.stub().resolves({body: {}});
|
|
2186
2193
|
|
|
2187
2194
|
mockMeeting.locusInfo = locusInfo;
|
|
@@ -2194,12 +2201,12 @@ describe('plugin-meetings', () => {
|
|
|
2194
2201
|
sequence: {
|
|
2195
2202
|
rangeStart: 0,
|
|
2196
2203
|
rangeEnd: 0,
|
|
2197
|
-
entries: [10]
|
|
2204
|
+
entries: [10],
|
|
2198
2205
|
},
|
|
2199
2206
|
self: {
|
|
2200
2207
|
person: {
|
|
2201
|
-
id: 'test person id'
|
|
2202
|
-
}
|
|
2208
|
+
id: 'test person id',
|
|
2209
|
+
},
|
|
2203
2210
|
},
|
|
2204
2211
|
});
|
|
2205
2212
|
|
|
@@ -2216,7 +2223,7 @@ describe('plugin-meetings', () => {
|
|
|
2216
2223
|
locusInfo.handleLocusDelta(deltaEvents[4], mockMeeting);
|
|
2217
2224
|
|
|
2218
2225
|
// they should be queued and not processed
|
|
2219
|
-
assert.notCalled(updateLocusInfoStub);
|
|
2226
|
+
assert.notCalled(updateLocusInfoStub);
|
|
2220
2227
|
|
|
2221
2228
|
// now one of the missing ones, but not the one SDK is really waiting for
|
|
2222
2229
|
locusInfo.handleLocusDelta(deltaEvents[2], mockMeeting);
|
|
@@ -2228,13 +2235,13 @@ describe('plugin-meetings', () => {
|
|
|
2228
2235
|
locusInfo.handleLocusDelta(deltaEvents[0], mockMeeting);
|
|
2229
2236
|
|
|
2230
2237
|
// so deltaEvents with indexes 1,2,3 can be processed, but 5 still not, because 4 is missing
|
|
2231
|
-
assert.callCount(updateLocusInfoStub, 3);
|
|
2238
|
+
assert.callCount(updateLocusInfoStub, 3);
|
|
2232
2239
|
assert.calledWith(updateLocusInfoStub.getCall(0), deltaEvents[0]);
|
|
2233
2240
|
assert.calledWith(updateLocusInfoStub.getCall(1), deltaEvents[1]);
|
|
2234
2241
|
assert.calledWith(updateLocusInfoStub.getCall(2), deltaEvents[2]);
|
|
2235
2242
|
|
|
2236
2243
|
updateLocusInfoStub.resetHistory();
|
|
2237
|
-
|
|
2244
|
+
|
|
2238
2245
|
// now send deltaEvents[4]
|
|
2239
2246
|
locusInfo.handleLocusDelta(deltaEvents[3], mockMeeting);
|
|
2240
2247
|
|
|
@@ -2246,12 +2253,12 @@ describe('plugin-meetings', () => {
|
|
|
2246
2253
|
|
|
2247
2254
|
it('handles out-of-order deltas correctly even if all arrive in reverse order', () => {
|
|
2248
2255
|
// send a bunch deltas in reverse order
|
|
2249
|
-
for(let i = 4; i >= 0; i--) {
|
|
2256
|
+
for (let i = 4; i >= 0; i--) {
|
|
2250
2257
|
locusInfo.handleLocusDelta(deltaEvents[i], mockMeeting);
|
|
2251
2258
|
}
|
|
2252
2259
|
|
|
2253
2260
|
// they should be queued and then processed in correct order
|
|
2254
|
-
assert.callCount(updateLocusInfoStub, 5);
|
|
2261
|
+
assert.callCount(updateLocusInfoStub, 5);
|
|
2255
2262
|
assert.calledWith(updateLocusInfoStub.getCall(0), deltaEvents[0]);
|
|
2256
2263
|
assert.calledWith(updateLocusInfoStub.getCall(1), deltaEvents[1]);
|
|
2257
2264
|
assert.calledWith(updateLocusInfoStub.getCall(2), deltaEvents[2]);
|
|
@@ -2276,32 +2283,32 @@ describe('plugin-meetings', () => {
|
|
|
2276
2283
|
baseSequence: {
|
|
2277
2284
|
rangeStart: 0,
|
|
2278
2285
|
rangeEnd: 0,
|
|
2279
|
-
entries: [initialDelta.sequence.entries[0]]
|
|
2286
|
+
entries: [initialDelta.sequence.entries[0]],
|
|
2280
2287
|
},
|
|
2281
2288
|
sequence: {
|
|
2282
2289
|
rangeStart: 0,
|
|
2283
2290
|
rangeEnd: 0,
|
|
2284
|
-
entries: [lastOooDelta.sequence.entries[0]]
|
|
2291
|
+
entries: [lastOooDelta.sequence.entries[0]],
|
|
2285
2292
|
},
|
|
2286
2293
|
syncUrl: `fake sync url for sequence ${lastOooDelta.sequence.entries[0]}`,
|
|
2287
2294
|
self: {
|
|
2288
2295
|
person: {
|
|
2289
|
-
id: 'test person id'
|
|
2290
|
-
}
|
|
2296
|
+
id: 'test person id',
|
|
2297
|
+
},
|
|
2291
2298
|
},
|
|
2292
2299
|
};
|
|
2293
|
-
|
|
2300
|
+
|
|
2294
2301
|
syncRequestStub.resolves({
|
|
2295
|
-
body: deltaLocusFromSyncResponse
|
|
2302
|
+
body: deltaLocusFromSyncResponse,
|
|
2296
2303
|
});
|
|
2297
|
-
|
|
2304
|
+
|
|
2298
2305
|
// send one correct delta so that SDK has the syncUrl
|
|
2299
2306
|
locusInfo.handleLocusDelta(initialDelta, mockMeeting);
|
|
2300
2307
|
|
|
2301
2308
|
updateLocusInfoStub.resetHistory();
|
|
2302
|
-
|
|
2309
|
+
|
|
2303
2310
|
// send 6 out-of-order deltas to trigger a sync (we're skipping deltaEvents[1])
|
|
2304
|
-
for(let i = firstOooDeltaIdx; i <= lastOooDeltaIdx; i++) {
|
|
2311
|
+
for (let i = firstOooDeltaIdx; i <= lastOooDeltaIdx; i++) {
|
|
2305
2312
|
locusInfo.handleLocusDelta(deltaEvents[i], mockMeeting);
|
|
2306
2313
|
}
|
|
2307
2314
|
|
|
@@ -2324,13 +2331,13 @@ describe('plugin-meetings', () => {
|
|
|
2324
2331
|
sinon.stub(Math, 'random').returns(0.5);
|
|
2325
2332
|
|
|
2326
2333
|
const oooDelta = deltaEvents[3];
|
|
2327
|
-
|
|
2334
|
+
|
|
2328
2335
|
// setup the stubs so that the sync request receives a full DTO with the sequence equal to the out-of-order delta we simulate
|
|
2329
2336
|
const fullLocus = {
|
|
2330
|
-
sequence: oooDelta.sequence
|
|
2337
|
+
sequence: oooDelta.sequence,
|
|
2331
2338
|
};
|
|
2332
2339
|
syncRequestStub.resolves({
|
|
2333
|
-
body: fullLocus
|
|
2340
|
+
body: fullLocus,
|
|
2334
2341
|
});
|
|
2335
2342
|
|
|
2336
2343
|
// send an out-of-order delta
|
|
@@ -2348,17 +2355,17 @@ describe('plugin-meetings', () => {
|
|
|
2348
2355
|
assert.calledOnceWithExactly(updateLocusInfoStub, fullLocus);
|
|
2349
2356
|
});
|
|
2350
2357
|
|
|
2351
|
-
it('does a sync if out-of-order deltas queue becomes too big', async () => {
|
|
2358
|
+
it('does a sync if out-of-order deltas queue becomes too big', async () => {
|
|
2352
2359
|
// setup the stubs so that the sync request receives a full DTO with the sequence equal to the out-of-order delta we simulate
|
|
2353
2360
|
const fullLocus = {
|
|
2354
|
-
sequence: deltaEvents[6].sequence
|
|
2361
|
+
sequence: deltaEvents[6].sequence,
|
|
2355
2362
|
};
|
|
2356
2363
|
syncRequestStub.resolves({
|
|
2357
|
-
body: fullLocus
|
|
2364
|
+
body: fullLocus,
|
|
2358
2365
|
});
|
|
2359
2366
|
|
|
2360
2367
|
// send 5 deltas, starting from deltaEvents[1] so that SDK is blocked waiting for deltaEvents[0]
|
|
2361
|
-
for(let i = 0; i < 5; i++) {
|
|
2368
|
+
for (let i = 0; i < 5; i++) {
|
|
2362
2369
|
locusInfo.handleLocusDelta(deltaEvents[i + 1], mockMeeting);
|
|
2363
2370
|
}
|
|
2364
2371
|
|
|
@@ -2378,33 +2385,33 @@ describe('plugin-meetings', () => {
|
|
|
2378
2385
|
|
|
2379
2386
|
it('processes delta events that are not included in sync response', async () => {
|
|
2380
2387
|
// this test sends a bunch of out-of-order deltas, this triggers a sync
|
|
2381
|
-
// but the full locus response doesn't include the last 2 deltas received, so
|
|
2388
|
+
// but the full locus response doesn't include the last 2 deltas received, so
|
|
2382
2389
|
// we check that these 2 deltas are also processed after sync response
|
|
2383
2390
|
const fullLocusFromSyncResponse = {
|
|
2384
2391
|
baseSequence: {
|
|
2385
2392
|
rangeStart: 0,
|
|
2386
2393
|
rangeEnd: 0,
|
|
2387
|
-
entries: [deltaEvents[0].sequence.entries[0]]
|
|
2394
|
+
entries: [deltaEvents[0].sequence.entries[0]],
|
|
2388
2395
|
},
|
|
2389
2396
|
sequence: {
|
|
2390
2397
|
rangeStart: 0,
|
|
2391
2398
|
rangeEnd: 0,
|
|
2392
|
-
entries: [deltaEvents[5].sequence.entries[0]]
|
|
2399
|
+
entries: [deltaEvents[5].sequence.entries[0]],
|
|
2393
2400
|
},
|
|
2394
2401
|
syncUrl: `fake sync url for sequence ${deltaEvents[5].sequence.entries[0]}`,
|
|
2395
2402
|
self: {
|
|
2396
2403
|
person: {
|
|
2397
|
-
id: 'test person id'
|
|
2398
|
-
}
|
|
2404
|
+
id: 'test person id',
|
|
2405
|
+
},
|
|
2399
2406
|
},
|
|
2400
2407
|
};
|
|
2401
|
-
|
|
2408
|
+
|
|
2402
2409
|
syncRequestStub.resolves({
|
|
2403
|
-
body: fullLocusFromSyncResponse
|
|
2410
|
+
body: fullLocusFromSyncResponse,
|
|
2404
2411
|
});
|
|
2405
|
-
|
|
2412
|
+
|
|
2406
2413
|
// send at least 6 out-of-order deltas to trigger a sync (we're skipping deltaEvents[0])
|
|
2407
|
-
for(let i = 1; i <= 7; i++) {
|
|
2414
|
+
for (let i = 1; i <= 7; i++) {
|
|
2408
2415
|
locusInfo.handleLocusDelta(deltaEvents[i], mockMeeting);
|
|
2409
2416
|
}
|
|
2410
2417
|
|
|
@@ -2412,7 +2419,7 @@ describe('plugin-meetings', () => {
|
|
|
2412
2419
|
|
|
2413
2420
|
// check that sync was done
|
|
2414
2421
|
assert.calledOnceWithExactly(syncRequestStub, {url: mockMeeting.locusUrl});
|
|
2415
|
-
|
|
2422
|
+
|
|
2416
2423
|
// and that remaining deltas from the queue that were not included in full Locus were also processed
|
|
2417
2424
|
assert.callCount(updateLocusInfoStub, 3);
|
|
2418
2425
|
assert.calledWith(updateLocusInfoStub.getCall(0), fullLocusFromSyncResponse);
|