@webex/plugin-meetings 3.11.0-next.36 → 3.11.0-next.37
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/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/in-meeting-actions.js +3 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +4 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
- package/dist/types/meeting/util.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -0
- package/src/meeting/in-meeting-actions.ts +4 -0
- package/src/meeting/index.ts +2 -0
- package/src/meeting/util.ts +3 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
- package/test/unit/spec/meeting/index.js +34 -38
- package/test/unit/spec/meeting/utils.js +24 -0
|
@@ -265,7 +265,7 @@ describe('plugin-meetings', () => {
|
|
|
265
265
|
stopReachability: sinon.stub(),
|
|
266
266
|
isSubnetReachable: sinon.stub().returns(true),
|
|
267
267
|
};
|
|
268
|
-
webex.internal.llm.isDataChannelTokenEnabled = sinon.stub().resolves(false)
|
|
268
|
+
webex.internal.llm.isDataChannelTokenEnabled = sinon.stub().resolves(false);
|
|
269
269
|
webex.internal.llm.on = sinon.stub();
|
|
270
270
|
webex.internal.newMetrics.callDiagnosticLatencies = new CallDiagnosticLatencies(
|
|
271
271
|
{},
|
|
@@ -11899,6 +11899,7 @@ describe('plugin-meetings', () => {
|
|
|
11899
11899
|
let isSpokenLanguageAutoDetectionEnabledSpy;
|
|
11900
11900
|
let showAutoEndMeetingWarningSpy;
|
|
11901
11901
|
let canAttendeeRequestAiAssistantEnabledSpy;
|
|
11902
|
+
let attendeeRequestAiAssistantDeclinedAllSpy;
|
|
11902
11903
|
// Due to import tree issues, hasHints must be stubed within the scope of the `it`.
|
|
11903
11904
|
|
|
11904
11905
|
beforeEach(() => {
|
|
@@ -11939,6 +11940,10 @@ describe('plugin-meetings', () => {
|
|
|
11939
11940
|
MeetingUtil,
|
|
11940
11941
|
'canAttendeeRequestAiAssistantEnabled'
|
|
11941
11942
|
);
|
|
11943
|
+
attendeeRequestAiAssistantDeclinedAllSpy = sinon.spy(
|
|
11944
|
+
MeetingUtil,
|
|
11945
|
+
'attendeeRequestAiAssistantDeclinedAll'
|
|
11946
|
+
);
|
|
11942
11947
|
});
|
|
11943
11948
|
|
|
11944
11949
|
afterEach(() => {
|
|
@@ -11946,6 +11951,7 @@ describe('plugin-meetings', () => {
|
|
|
11946
11951
|
waitingForOthersToJoinSpy.restore();
|
|
11947
11952
|
showAutoEndMeetingWarningSpy.restore();
|
|
11948
11953
|
canAttendeeRequestAiAssistantEnabledSpy.restore();
|
|
11954
|
+
attendeeRequestAiAssistantDeclinedAllSpy.restore();
|
|
11949
11955
|
});
|
|
11950
11956
|
|
|
11951
11957
|
forEach(
|
|
@@ -12501,6 +12507,7 @@ describe('plugin-meetings', () => {
|
|
|
12501
12507
|
userDisplayHints,
|
|
12502
12508
|
meeting.roles
|
|
12503
12509
|
);
|
|
12510
|
+
assert.calledWith(attendeeRequestAiAssistantDeclinedAllSpy, userDisplayHints);
|
|
12504
12511
|
|
|
12505
12512
|
assert.calledWith(ControlsOptionsUtil.hasHints, {
|
|
12506
12513
|
requiredHints: [DISPLAY_HINTS.MUTE_ALL],
|
|
@@ -12709,7 +12716,7 @@ describe('plugin-meetings', () => {
|
|
|
12709
12716
|
meeting.joinedWith = {state: 'JOINED'};
|
|
12710
12717
|
meeting.locusInfo = {
|
|
12711
12718
|
url: 'a url',
|
|
12712
|
-
info: {datachannelUrl: 'a datachannel url'}
|
|
12719
|
+
info: {datachannelUrl: 'a datachannel url'},
|
|
12713
12720
|
};
|
|
12714
12721
|
|
|
12715
12722
|
const result = await meeting.updateLLMConnection();
|
|
@@ -12757,7 +12764,7 @@ describe('plugin-meetings', () => {
|
|
|
12757
12764
|
);
|
|
12758
12765
|
assert.equal(result, 'something');
|
|
12759
12766
|
});
|
|
12760
|
-
|
|
12767
|
+
it('disconnects if the locus url has changed', async () => {
|
|
12761
12768
|
meeting.joinedWith = {state: 'JOINED'};
|
|
12762
12769
|
|
|
12763
12770
|
webex.internal.llm.isConnected.returns(true);
|
|
@@ -12766,15 +12773,15 @@ describe('plugin-meetings', () => {
|
|
|
12766
12773
|
meeting.locusInfo = {
|
|
12767
12774
|
url: 'a different url',
|
|
12768
12775
|
info: {datachannelUrl: 'a datachannel url'},
|
|
12769
|
-
self: {}
|
|
12776
|
+
self: {},
|
|
12770
12777
|
};
|
|
12771
12778
|
|
|
12772
12779
|
const result = await meeting.updateLLMConnection();
|
|
12773
12780
|
|
|
12774
|
-
assert.calledWithExactly(
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
);
|
|
12781
|
+
assert.calledWithExactly(webex.internal.llm.disconnectLLM, {
|
|
12782
|
+
code: 3050,
|
|
12783
|
+
reason: 'done (permanent)',
|
|
12784
|
+
});
|
|
12778
12785
|
|
|
12779
12786
|
assert.calledWithExactly(
|
|
12780
12787
|
webex.internal.llm.registerAndConnect,
|
|
@@ -12816,15 +12823,15 @@ describe('plugin-meetings', () => {
|
|
|
12816
12823
|
meeting.locusInfo = {
|
|
12817
12824
|
url: 'a url',
|
|
12818
12825
|
info: {datachannelUrl: 'a different datachannel url'},
|
|
12819
|
-
self: {}
|
|
12826
|
+
self: {},
|
|
12820
12827
|
};
|
|
12821
12828
|
|
|
12822
12829
|
const result = await meeting.updateLLMConnection();
|
|
12823
12830
|
|
|
12824
|
-
assert.calledWithExactly(
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
);
|
|
12831
|
+
assert.calledWithExactly(webex.internal.llm.disconnectLLM, {
|
|
12832
|
+
code: 3050,
|
|
12833
|
+
reason: 'done (permanent)',
|
|
12834
|
+
});
|
|
12828
12835
|
|
|
12829
12836
|
assert.calledWithExactly(
|
|
12830
12837
|
webex.internal.llm.registerAndConnect,
|
|
@@ -12911,11 +12918,7 @@ describe('plugin-meetings', () => {
|
|
|
12911
12918
|
'a datachannel url',
|
|
12912
12919
|
'token-123'
|
|
12913
12920
|
);
|
|
12914
|
-
assert.calledWithExactly(
|
|
12915
|
-
webex.internal.llm.setDatachannelToken,
|
|
12916
|
-
'token-123',
|
|
12917
|
-
'default'
|
|
12918
|
-
);
|
|
12921
|
+
assert.calledWithExactly(webex.internal.llm.setDatachannelToken, 'token-123', 'default');
|
|
12919
12922
|
});
|
|
12920
12923
|
it('prefers refreshed token over locus self token', async () => {
|
|
12921
12924
|
meeting.joinedWith = {state: 'JOINED'};
|
|
@@ -12925,9 +12928,7 @@ describe('plugin-meetings', () => {
|
|
|
12925
12928
|
self: {datachannelToken: 'locus-token'},
|
|
12926
12929
|
};
|
|
12927
12930
|
|
|
12928
|
-
webex.internal.llm.getDatachannelToken
|
|
12929
|
-
.withArgs('default')
|
|
12930
|
-
.returns('refreshed-token');
|
|
12931
|
+
webex.internal.llm.getDatachannelToken.withArgs('default').returns('refreshed-token');
|
|
12931
12932
|
|
|
12932
12933
|
await meeting.updateLLMConnection();
|
|
12933
12934
|
|
|
@@ -12958,8 +12959,10 @@ describe('plugin-meetings', () => {
|
|
|
12958
12959
|
meeting.webinar.isJoinPracticeSessionDataChannel.returns(true);
|
|
12959
12960
|
|
|
12960
12961
|
webex.internal.llm.getDatachannelToken
|
|
12961
|
-
.withArgs(true)
|
|
12962
|
-
.
|
|
12962
|
+
.withArgs(true)
|
|
12963
|
+
.returns('refreshed-ps-token') // refreshed practice token
|
|
12964
|
+
.withArgs(false)
|
|
12965
|
+
.returns('refreshed-normal-token'); // refreshed normal token
|
|
12963
12966
|
|
|
12964
12967
|
await meeting.updateLLMConnection();
|
|
12965
12968
|
|
|
@@ -12981,7 +12984,7 @@ describe('plugin-meetings', () => {
|
|
|
12981
12984
|
meeting.locusInfo = {
|
|
12982
12985
|
url: 'a url',
|
|
12983
12986
|
info: {datachannelUrl: 'a datachannel url'},
|
|
12984
|
-
self: {datachannelToken: 'token-123'}
|
|
12987
|
+
self: {datachannelToken: 'token-123'},
|
|
12985
12988
|
};
|
|
12986
12989
|
|
|
12987
12990
|
webex.internal.llm.getDatachannelToken.returns(undefined);
|
|
@@ -12995,11 +12998,7 @@ describe('plugin-meetings', () => {
|
|
|
12995
12998
|
'a datachannel url',
|
|
12996
12999
|
'token-123'
|
|
12997
13000
|
);
|
|
12998
|
-
assert.calledWithExactly(
|
|
12999
|
-
webex.internal.llm.setDatachannelToken,
|
|
13000
|
-
'token-123',
|
|
13001
|
-
'default'
|
|
13002
|
-
);
|
|
13001
|
+
assert.calledWithExactly(webex.internal.llm.setDatachannelToken, 'token-123', 'default');
|
|
13003
13002
|
});
|
|
13004
13003
|
});
|
|
13005
13004
|
|
|
@@ -14577,7 +14576,7 @@ describe('plugin-meetings', () => {
|
|
|
14577
14576
|
meeting.locusUrl = 'https://locus.example.com';
|
|
14578
14577
|
meeting.meetingRequest = {
|
|
14579
14578
|
fetchDatachannelToken: sinon.stub().resolves({
|
|
14580
|
-
body: {
|
|
14579
|
+
body: {datachannelToken: 'mock-token'},
|
|
14581
14580
|
}),
|
|
14582
14581
|
};
|
|
14583
14582
|
meeting.members = {
|
|
@@ -14593,14 +14592,11 @@ describe('plugin-meetings', () => {
|
|
|
14593
14592
|
|
|
14594
14593
|
sinon.assert.calledOnce(meeting.meetingRequest.fetchDatachannelToken);
|
|
14595
14594
|
|
|
14596
|
-
sinon.assert.calledWith(
|
|
14597
|
-
|
|
14598
|
-
|
|
14599
|
-
|
|
14600
|
-
|
|
14601
|
-
isPracticeSession: true,
|
|
14602
|
-
}
|
|
14603
|
-
);
|
|
14595
|
+
sinon.assert.calledWith(meeting.meetingRequest.fetchDatachannelToken, {
|
|
14596
|
+
locusUrl: 'https://locus.example.com',
|
|
14597
|
+
requestingParticipantId: 'self-123',
|
|
14598
|
+
isPracticeSession: true,
|
|
14599
|
+
});
|
|
14604
14600
|
});
|
|
14605
14601
|
|
|
14606
14602
|
it('returns the correct structured result', async () => {
|
|
@@ -1011,6 +1011,30 @@ describe('plugin-meetings', () => {
|
|
|
1011
1011
|
});
|
|
1012
1012
|
});
|
|
1013
1013
|
|
|
1014
|
+
describe('attendeeRequestAiAssistantDeclinedAll', () => {
|
|
1015
|
+
it('returns true when display hint is present', () => {
|
|
1016
|
+
assert.isTrue(
|
|
1017
|
+
MeetingUtil.attendeeRequestAiAssistantDeclinedAll([
|
|
1018
|
+
'ATTENDEE_REQUEST_AI_ASSISTANT_DECLINED_ALL',
|
|
1019
|
+
])
|
|
1020
|
+
);
|
|
1021
|
+
});
|
|
1022
|
+
|
|
1023
|
+
it('returns false when display hint is not present', () => {
|
|
1024
|
+
assert.isFalse(MeetingUtil.attendeeRequestAiAssistantDeclinedAll([]));
|
|
1025
|
+
});
|
|
1026
|
+
|
|
1027
|
+
it('returns false when display hint is absent among other hints', () => {
|
|
1028
|
+
assert.isFalse(
|
|
1029
|
+
MeetingUtil.attendeeRequestAiAssistantDeclinedAll(['SOME_OTHER_HINT', 'ANOTHER_HINT'])
|
|
1030
|
+
);
|
|
1031
|
+
});
|
|
1032
|
+
|
|
1033
|
+
it('returns false when called with no arguments', () => {
|
|
1034
|
+
assert.isFalse(MeetingUtil.attendeeRequestAiAssistantDeclinedAll());
|
|
1035
|
+
});
|
|
1036
|
+
});
|
|
1037
|
+
|
|
1014
1038
|
describe('bothLeaveAndEndMeetingAvailable', () => {
|
|
1015
1039
|
it('works as expected', () => {
|
|
1016
1040
|
assert.deepEqual(
|