@webex/plugin-meetings 3.0.0-beta.209 → 3.0.0-beta.210

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "3.0.0-beta.209",
3
+ "version": "3.0.0-beta.210",
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.209",
36
- "@webex/test-helper-chai": "3.0.0-beta.209",
37
- "@webex/test-helper-mocha": "3.0.0-beta.209",
38
- "@webex/test-helper-mock-webex": "3.0.0-beta.209",
39
- "@webex/test-helper-retry": "3.0.0-beta.209",
40
- "@webex/test-helper-test-users": "3.0.0-beta.209",
35
+ "@webex/plugin-meetings": "3.0.0-beta.210",
36
+ "@webex/test-helper-chai": "3.0.0-beta.210",
37
+ "@webex/test-helper-mocha": "3.0.0-beta.210",
38
+ "@webex/test-helper-mock-webex": "3.0.0-beta.210",
39
+ "@webex/test-helper-retry": "3.0.0-beta.210",
40
+ "@webex/test-helper-test-users": "3.0.0-beta.210",
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.209",
49
+ "@webex/common": "3.0.0-beta.210",
50
50
  "@webex/internal-media-core": "1.39.1",
51
- "@webex/internal-plugin-conversation": "3.0.0-beta.209",
52
- "@webex/internal-plugin-device": "3.0.0-beta.209",
53
- "@webex/internal-plugin-llm": "3.0.0-beta.209",
54
- "@webex/internal-plugin-mercury": "3.0.0-beta.209",
55
- "@webex/internal-plugin-metrics": "3.0.0-beta.209",
56
- "@webex/internal-plugin-support": "3.0.0-beta.209",
57
- "@webex/internal-plugin-user": "3.0.0-beta.209",
58
- "@webex/media-helpers": "3.0.0-beta.209",
59
- "@webex/plugin-people": "3.0.0-beta.209",
60
- "@webex/plugin-rooms": "3.0.0-beta.209",
61
- "@webex/webex-core": "3.0.0-beta.209",
51
+ "@webex/internal-plugin-conversation": "3.0.0-beta.210",
52
+ "@webex/internal-plugin-device": "3.0.0-beta.210",
53
+ "@webex/internal-plugin-llm": "3.0.0-beta.210",
54
+ "@webex/internal-plugin-mercury": "3.0.0-beta.210",
55
+ "@webex/internal-plugin-metrics": "3.0.0-beta.210",
56
+ "@webex/internal-plugin-support": "3.0.0-beta.210",
57
+ "@webex/internal-plugin-user": "3.0.0-beta.210",
58
+ "@webex/media-helpers": "3.0.0-beta.210",
59
+ "@webex/plugin-people": "3.0.0-beta.210",
60
+ "@webex/plugin-rooms": "3.0.0-beta.210",
61
+ "@webex/webex-core": "3.0.0-beta.210",
62
62
  "ampersand-collection": "^2.0.2",
63
63
  "bowser": "^2.11.0",
64
64
  "btoa": "^1.2.1",
@@ -3029,8 +3029,8 @@ export default class Meeting extends StatelessWebexPlugin {
3029
3029
  * @returns {boolean}
3030
3030
  */
3031
3031
  private arePolicyRestrictionsSupported() {
3032
- // Locus calls do not return the correct display hints
3033
- if (this.isLocusCall()) {
3032
+ // If we don't have policies we can't support policies
3033
+ if (!this.selfUserPolicies) {
3034
3034
  return false;
3035
3035
  }
3036
3036
 
@@ -3040,12 +3040,6 @@ export default class Meeting extends StatelessWebexPlugin {
3040
3040
  return false;
3041
3041
  }
3042
3042
 
3043
- // Old locus info api does not return policy information
3044
- // @ts-ignore
3045
- if (!this.config.experimental.enableUnifiedMeetings) {
3046
- return false;
3047
- }
3048
-
3049
3043
  return true;
3050
3044
  }
3051
3045
 
@@ -5899,50 +5899,52 @@ describe('plugin-meetings', () => {
5899
5899
  [
5900
5900
  {
5901
5901
  actionName: 'canShareApplication',
5902
- callType: 'CALL',
5903
5902
  expectedEnabled: true,
5903
+ arePolicyRestrictionsSupported: false,
5904
5904
  },
5905
5905
  {
5906
5906
  actionName: 'canShareApplication',
5907
- callType: 'MEETING',
5908
5907
  expectedEnabled: false,
5908
+ arePolicyRestrictionsSupported: true,
5909
5909
  },
5910
5910
  {
5911
5911
  actionName: 'canShareDesktop',
5912
- callType: 'CALL',
5912
+ arePolicyRestrictionsSupported: false,
5913
5913
  expectedEnabled: true,
5914
5914
  },
5915
5915
  {
5916
5916
  actionName: 'canShareDesktop',
5917
- callType: 'MEETING',
5917
+ arePolicyRestrictionsSupported: true,
5918
5918
  expectedEnabled: false,
5919
5919
  },
5920
5920
  {
5921
5921
  actionName: 'canShareContent',
5922
- callType: 'CALL',
5922
+ arePolicyRestrictionsSupported: false,
5923
5923
  expectedEnabled: true,
5924
5924
  },
5925
5925
  {
5926
5926
  actionName: 'canShareContent',
5927
- callType: 'MEETING',
5927
+ arePolicyRestrictionsSupported: true,
5928
5928
  expectedEnabled: false,
5929
5929
  },
5930
5930
  {
5931
5931
  actionName: 'canUseVoip',
5932
- callType: 'CALL',
5933
5932
  expectedEnabled: true,
5933
+ arePolicyRestrictionsSupported: false,
5934
5934
  },
5935
5935
  {
5936
5936
  actionName: 'canUseVoip',
5937
- callType: 'MEETING',
5938
5937
  expectedEnabled: false,
5938
+ arePolicyRestrictionsSupported: true,
5939
5939
  },
5940
5940
  ],
5941
- ({actionName, callType, expectedEnabled}) => {
5942
- it(`${actionName} is ${expectedEnabled} when the call type is ${callType}`, () => {
5943
- meeting.type = callType;
5941
+ ({actionName, arePolicyRestrictionsSupported, expectedEnabled}) => {
5942
+ it(`${actionName} is ${expectedEnabled} when the call type is ${arePolicyRestrictionsSupported}`, () => {
5944
5943
  meeting.userDisplayHints = [];
5945
5944
  meeting.meetingInfo = {some: 'info'};
5945
+ sinon
5946
+ .stub(meeting, 'arePolicyRestrictionsSupported')
5947
+ .returns(arePolicyRestrictionsSupported);
5946
5948
 
5947
5949
  meeting.updateMeetingActions();
5948
5950
 
@@ -5988,12 +5990,14 @@ describe('plugin-meetings', () => {
5988
5990
  requiredDisplayHints: [DISPLAY_HINTS.SHARE_DESKTOP],
5989
5991
  requiredPolicies: [],
5990
5992
  enableUnifiedMeetings: false,
5993
+ arePolicyRestrictionsSupported: false,
5991
5994
  },
5992
5995
  {
5993
5996
  actionName: 'canShareApplication',
5994
5997
  requiredDisplayHints: [DISPLAY_HINTS.SHARE_APPLICATION],
5995
5998
  requiredPolicies: [],
5996
5999
  enableUnifiedMeetings: false,
6000
+ arePolicyRestrictionsSupported: false,
5997
6001
  },
5998
6002
  {
5999
6003
  actionName: 'canAnnotate',
@@ -6001,10 +6005,20 @@ describe('plugin-meetings', () => {
6001
6005
  requiredPolicies: [SELF_POLICY.SUPPORT_ANNOTATION],
6002
6006
  },
6003
6007
  ],
6004
- ({actionName, requiredDisplayHints, requiredPolicies, enableUnifiedMeetings, meetingInfo}) => {
6008
+ ({
6009
+ actionName,
6010
+ requiredDisplayHints,
6011
+ requiredPolicies,
6012
+ enableUnifiedMeetings,
6013
+ meetingInfo,
6014
+ arePolicyRestrictionsSupported,
6015
+ }) => {
6005
6016
  it(`${actionName} is enabled when the conditions are met`, () => {
6006
6017
  meeting.userDisplayHints = requiredDisplayHints;
6007
- meeting.selfUserPolicies = {};
6018
+ meeting.selfUserPolicies = undefined;
6019
+ sinon
6020
+ .stub(meeting, 'arePolicyRestrictionsSupported')
6021
+ .returns(arePolicyRestrictionsSupported);
6008
6022
 
6009
6023
  meeting.config.experimental.enableUnifiedMeetings = isUndefined(enableUnifiedMeetings)
6010
6024
  ? true
@@ -6012,6 +6026,9 @@ describe('plugin-meetings', () => {
6012
6026
 
6013
6027
  meeting.meetingInfo = isUndefined(meetingInfo) ? {some: 'info'} : meetingInfo;
6014
6028
 
6029
+ if (requiredPolicies) {
6030
+ meeting.selfUserPolicies = {};
6031
+ }
6015
6032
  forEach(requiredPolicies, (policy) => {
6016
6033
  meeting.selfUserPolicies[policy] = true;
6017
6034
  });
@@ -6024,10 +6041,13 @@ describe('plugin-meetings', () => {
6024
6041
  if (requiredDisplayHints.length !== 0) {
6025
6042
  it(`${actionName} is disabled when the required display hints are missing`, () => {
6026
6043
  meeting.userDisplayHints = [];
6027
- meeting.selfUserPolicies = {};
6044
+ meeting.selfUserPolicies = undefined;
6028
6045
 
6029
6046
  meeting.meetingInfo = isUndefined(meetingInfo) ? {some: 'info'} : meetingInfo;
6030
6047
 
6048
+ if (requiredPolicies) {
6049
+ meeting.selfUserPolicies = {};
6050
+ }
6031
6051
  forEach(requiredPolicies, (policy) => {
6032
6052
  meeting.selfUserPolicies[policy] = true;
6033
6053
  });
@@ -6040,8 +6060,11 @@ describe('plugin-meetings', () => {
6040
6060
 
6041
6061
  it(`${actionName} is disabled when the required policies are missing`, () => {
6042
6062
  meeting.userDisplayHints = requiredDisplayHints;
6043
- meeting.selfUserPolicies = {};
6063
+ meeting.selfUserPolicies = undefined;
6044
6064
 
6065
+ if (requiredPolicies) {
6066
+ meeting.selfUserPolicies = {};
6067
+ }
6045
6068
  meeting.meetingInfo = isUndefined(meetingInfo) ? {some: 'info'} : meetingInfo;
6046
6069
 
6047
6070
  meeting.updateMeetingActions();
@@ -6104,8 +6127,15 @@ describe('plugin-meetings', () => {
6104
6127
  },
6105
6128
  {
6106
6129
  meetingInfo: undefined,
6107
- selfUserPolicies: {
6130
+ selfUserPolicies: {},
6131
+ expectedActions: {
6132
+ supportHQV: true,
6133
+ supportHDV: true,
6108
6134
  },
6135
+ },
6136
+ {
6137
+ meetingInfo: {some: 'data'},
6138
+ selfUserPolicies: undefined,
6109
6139
  expectedActions: {
6110
6140
  supportHQV: true,
6111
6141
  supportHDV: true,
@@ -6120,7 +6150,6 @@ describe('plugin-meetings', () => {
6120
6150
  )} and meetingInfo is ${JSON.stringify(meetingInfo)}`, () => {
6121
6151
  meeting.meetingInfo = meetingInfo;
6122
6152
  meeting.selfUserPolicies = selfUserPolicies;
6123
- meeting.config.experimental.enableUnifiedMeetings = true;
6124
6153
 
6125
6154
  meeting.updateMeetingActions();
6126
6155
 
@@ -6139,7 +6168,6 @@ describe('plugin-meetings', () => {
6139
6168
  meeting.userDisplayHints = [DISPLAY_HINTS.VOIP_IS_ENABLED];
6140
6169
  meeting.selfUserPolicies = {[SELF_POLICY.SUPPORT_VOIP]: true};
6141
6170
  meeting.meetingInfo.supportVoIP = false;
6142
- meeting.config.experimental.enableUnifiedMeetings = true;
6143
6171
 
6144
6172
  meeting.updateMeetingActions();
6145
6173
 
@@ -6150,7 +6178,6 @@ describe('plugin-meetings', () => {
6150
6178
  meeting.userDisplayHints = [];
6151
6179
  meeting.selfUserPolicies = {[SELF_POLICY.SUPPORT_VOIP]: true};
6152
6180
  meeting.meetingInfo.supportVoIP = true;
6153
- meeting.config.experimental.enableUnifiedMeetings = true;
6154
6181
 
6155
6182
  meeting.updateMeetingActions();
6156
6183
 
@@ -6161,7 +6188,6 @@ describe('plugin-meetings', () => {
6161
6188
  meeting.userDisplayHints = [DISPLAY_HINTS.VOIP_IS_ENABLED];
6162
6189
  meeting.selfUserPolicies = {};
6163
6190
  meeting.meetingInfo.supportVoIP = true;
6164
- meeting.config.experimental.enableUnifiedMeetings = true;
6165
6191
 
6166
6192
  meeting.updateMeetingActions();
6167
6193
 
@@ -6172,7 +6198,6 @@ describe('plugin-meetings', () => {
6172
6198
  meeting.userDisplayHints = undefined;
6173
6199
  meeting.selfUserPolicies = {[SELF_POLICY.SUPPORT_VOIP]: true};
6174
6200
  meeting.meetingInfo.supportVoIP = true;
6175
- meeting.config.experimental.enableUnifiedMeetings = true;
6176
6201
 
6177
6202
  meeting.updateMeetingActions();
6178
6203
 
@@ -6180,15 +6205,12 @@ describe('plugin-meetings', () => {
6180
6205
  });
6181
6206
 
6182
6207
  it('canUseVoip is enabled when there is no meeting info', () => {
6183
- meeting.config.experimental.enableUnifiedMeetings = true;
6184
-
6185
6208
  meeting.updateMeetingActions();
6186
6209
 
6187
6210
  assert.isTrue(meeting.inMeetingActions.get()['canUseVoip']);
6188
6211
  });
6189
6212
 
6190
6213
  it('canUseVoip is enabled when it is a locus call', () => {
6191
- meeting.config.experimental.enableUnifiedMeetings = true;
6192
6214
  meeting.meetingInfo = {some: 'info'};
6193
6215
  meeting.type = 'CALL';
6194
6216
 
@@ -6201,7 +6223,6 @@ describe('plugin-meetings', () => {
6201
6223
  meeting.userDisplayHints = undefined;
6202
6224
  meeting.selfUserPolicies = {[SELF_POLICY.SUPPORT_VOIP]: true};
6203
6225
  meeting.meetingInfo.supportVoIP = false;
6204
- meeting.config.experimental.enableUnifiedMeetings = true;
6205
6226
 
6206
6227
  meeting.updateMeetingActions();
6207
6228
 
@@ -6212,18 +6233,16 @@ describe('plugin-meetings', () => {
6212
6233
  meeting.userDisplayHints = undefined;
6213
6234
  meeting.selfUserPolicies = {};
6214
6235
  meeting.meetingInfo.supportVoIP = true;
6215
- meeting.config.experimental.enableUnifiedMeetings = true;
6216
6236
 
6217
6237
  meeting.updateMeetingActions();
6218
6238
 
6219
6239
  assert.isFalse(meeting.inMeetingActions.get()['canUseVoip']);
6220
6240
  });
6221
6241
 
6222
- it('canUseVoip is enabled when enableUnifiedMeetings is false', () => {
6223
- meeting.userDisplayHints = [];
6224
- meeting.selfUserPolicies = {};
6242
+ it('canUseVoip is enabled when there are no policies', () => {
6243
+ meeting.userDisplayHints = [DISPLAY_HINTS.VOIP_IS_ENABLED];
6244
+ meeting.selfUserPolicies = undefined;
6225
6245
  meeting.meetingInfo.supportVoIP = false;
6226
- meeting.config.experimental.enableUnifiedMeetings = false;
6227
6246
 
6228
6247
  meeting.updateMeetingActions();
6229
6248
 
@@ -6259,6 +6278,13 @@ describe('plugin-meetings', () => {
6259
6278
  canDoVideo: false,
6260
6279
  },
6261
6280
  },
6281
+ {
6282
+ meetingInfo: {some: 'data'},
6283
+ selfUserPolicies: undefined,
6284
+ expectedActions: {
6285
+ canDoVideo: true,
6286
+ },
6287
+ },
6262
6288
  {
6263
6289
  meetingInfo: {
6264
6290
  video: {},