@webex/internal-plugin-device 3.0.0-beta.414 → 3.0.0-beta.415
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/device.js +1 -1
- package/dist/ipNetworkDetector.js +1 -1
- package/package.json +10 -10
- package/test/unit/spec/device.js +11 -12
- package/test/unit/spec/features/feature-collection.js +1 -1
- package/test/unit/spec/features/feature-model.js +20 -20
- package/test/unit/spec/features/features-model.js +4 -4
package/dist/device.js
CHANGED
|
@@ -735,7 +735,7 @@ var Device = _webexCore.WebexPlugin.extend((_dec = (0, _webexCore.waitForValue)(
|
|
|
735
735
|
_this9.resetLogoutTimer();
|
|
736
736
|
});
|
|
737
737
|
} /* eslint-enable require-jsdoc */,
|
|
738
|
-
version: "3.0.0-beta.
|
|
738
|
+
version: "3.0.0-beta.415"
|
|
739
739
|
}, ((0, _applyDecoratedDescriptor2.default)(_obj, "refresh", [_common.oneFlight, _dec], (0, _getOwnPropertyDescriptor.default)(_obj, "refresh"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "register", [_common.oneFlight, _dec2], (0, _getOwnPropertyDescriptor.default)(_obj, "register"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "unregister", [_common.oneFlight, _dec3], (0, _getOwnPropertyDescriptor.default)(_obj, "unregister"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "markUrlFailedAndGetNew", [_dec4], (0, _getOwnPropertyDescriptor.default)(_obj, "markUrlFailedAndGetNew"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "initialize", [_dec5], (0, _getOwnPropertyDescriptor.default)(_obj, "initialize"), _obj)), _obj)));
|
|
740
740
|
var _default = Device;
|
|
741
741
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-plugin-device",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.415",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Timothy Scheuering <timsch@cisco.com>",
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
25
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
26
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
24
|
+
"@webex/test-helper-chai": "3.0.0-beta.415",
|
|
25
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.415",
|
|
26
|
+
"@webex/test-helper-test-users": "3.0.0-beta.415",
|
|
27
27
|
"chai": "^4.3.4",
|
|
28
28
|
"chai-as-promised": "^7.1.1",
|
|
29
29
|
"sinon": "^9.2.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@webex/common": "3.0.0-beta.
|
|
33
|
-
"@webex/common-timers": "3.0.0-beta.
|
|
34
|
-
"@webex/http-core": "3.0.0-beta.
|
|
35
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
36
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
37
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
32
|
+
"@webex/common": "3.0.0-beta.415",
|
|
33
|
+
"@webex/common-timers": "3.0.0-beta.415",
|
|
34
|
+
"@webex/http-core": "3.0.0-beta.415",
|
|
35
|
+
"@webex/internal-plugin-device": "3.0.0-beta.415",
|
|
36
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.415",
|
|
37
|
+
"@webex/webex-core": "3.0.0-beta.415",
|
|
38
38
|
"ampersand-collection": "^2.0.2",
|
|
39
39
|
"ampersand-state": "^5.0.3",
|
|
40
40
|
"lodash": "^4.17.21"
|
package/test/unit/spec/device.js
CHANGED
|
@@ -2,7 +2,6 @@ import {assert} from '@webex/test-helper-chai';
|
|
|
2
2
|
import {cloneDeep} from 'lodash';
|
|
3
3
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
4
4
|
import sinon from 'sinon';
|
|
5
|
-
|
|
6
5
|
import Device from '@webex/internal-plugin-device';
|
|
7
6
|
|
|
8
7
|
import dto from './wdm-dto';
|
|
@@ -12,7 +11,7 @@ describe('plugin-device', () => {
|
|
|
12
11
|
let webex;
|
|
13
12
|
let device;
|
|
14
13
|
|
|
15
|
-
beforeEach(
|
|
14
|
+
beforeEach(() => {
|
|
16
15
|
webex = new MockWebex({
|
|
17
16
|
children: {
|
|
18
17
|
device: Device,
|
|
@@ -31,7 +30,7 @@ describe('plugin-device', () => {
|
|
|
31
30
|
let spy;
|
|
32
31
|
let modifiedDTOFeatures;
|
|
33
32
|
|
|
34
|
-
beforeEach(
|
|
33
|
+
beforeEach(() => {
|
|
35
34
|
spy = sinon.spy();
|
|
36
35
|
modifiedDTOFeatures = {
|
|
37
36
|
...dto.features,
|
|
@@ -53,12 +52,12 @@ describe('plugin-device', () => {
|
|
|
53
52
|
});
|
|
54
53
|
|
|
55
54
|
describe('when an network inactivity property changes', () => {
|
|
56
|
-
beforeEach(
|
|
55
|
+
beforeEach(() => {
|
|
57
56
|
device.checkNetworkReachability = sinon.spy();
|
|
58
57
|
});
|
|
59
58
|
|
|
60
|
-
describe(
|
|
61
|
-
beforeEach(
|
|
59
|
+
describe('when the \'intranetInactivityCheckUrl\' changes', () => {
|
|
60
|
+
beforeEach(() => {
|
|
62
61
|
device.intranetInactivityCheckUrl = 'https://not-a-url.com';
|
|
63
62
|
});
|
|
64
63
|
|
|
@@ -71,8 +70,8 @@ describe('plugin-device', () => {
|
|
|
71
70
|
});
|
|
72
71
|
});
|
|
73
72
|
|
|
74
|
-
describe(
|
|
75
|
-
beforeEach(
|
|
73
|
+
describe('when the \'intranetInactivityDuration\' changes', () => {
|
|
74
|
+
beforeEach(() => {
|
|
76
75
|
device.intranetInactivityDuration = 1234;
|
|
77
76
|
});
|
|
78
77
|
|
|
@@ -85,8 +84,8 @@ describe('plugin-device', () => {
|
|
|
85
84
|
});
|
|
86
85
|
});
|
|
87
86
|
|
|
88
|
-
describe(
|
|
89
|
-
beforeEach(
|
|
87
|
+
describe('when the \'inNetworkInactivityDuration\' changes', () => {
|
|
88
|
+
beforeEach(() => {
|
|
90
89
|
device.inNetworkInactivityDuration = 1234;
|
|
91
90
|
});
|
|
92
91
|
|
|
@@ -101,7 +100,7 @@ describe('plugin-device', () => {
|
|
|
101
100
|
describe('derived properties', () => {
|
|
102
101
|
describe('#registered', () => {
|
|
103
102
|
describe('when the device does not have a url', () => {
|
|
104
|
-
beforeEach(
|
|
103
|
+
beforeEach(() => {
|
|
105
104
|
device.url = undefined;
|
|
106
105
|
});
|
|
107
106
|
|
|
@@ -111,7 +110,7 @@ describe('plugin-device', () => {
|
|
|
111
110
|
});
|
|
112
111
|
|
|
113
112
|
describe('when the device does have a url', () => {
|
|
114
|
-
beforeEach(
|
|
113
|
+
beforeEach(() => {
|
|
115
114
|
device.url = dto.url;
|
|
116
115
|
});
|
|
117
116
|
|
|
@@ -9,13 +9,13 @@ describe('plugin-device', () => {
|
|
|
9
9
|
let featureNLM;
|
|
10
10
|
let featureModel;
|
|
11
11
|
|
|
12
|
-
beforeEach(
|
|
12
|
+
beforeEach(() => {
|
|
13
13
|
[featureLM, featureNLM] = dto.features.developer;
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
describe('#constructor()', () => {
|
|
17
|
-
describe(
|
|
18
|
-
beforeEach(
|
|
17
|
+
describe('when the feature includes a \'lastModified\' property', () => {
|
|
18
|
+
beforeEach(() => {
|
|
19
19
|
featureModel = new FeatureModel(featureLM);
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -34,8 +34,8 @@ describe('plugin-device', () => {
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
describe(
|
|
38
|
-
beforeEach(
|
|
37
|
+
describe('when the feature excludes a \'lastModified\' property', () => {
|
|
38
|
+
beforeEach(() => {
|
|
39
39
|
featureModel = new FeatureModel(featureNLM);
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -57,7 +57,7 @@ describe('plugin-device', () => {
|
|
|
57
57
|
let fixture;
|
|
58
58
|
let model;
|
|
59
59
|
|
|
60
|
-
beforeEach(
|
|
60
|
+
beforeEach(() => {
|
|
61
61
|
featureModel = new FeatureModel();
|
|
62
62
|
});
|
|
63
63
|
|
|
@@ -67,12 +67,12 @@ describe('plugin-device', () => {
|
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
describe('when the model is defined', () => {
|
|
70
|
-
beforeEach(
|
|
70
|
+
beforeEach(() => {
|
|
71
71
|
fixture = {};
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
describe('when the value is a number', () => {
|
|
75
|
-
beforeEach(
|
|
75
|
+
beforeEach(() => {
|
|
76
76
|
fixture.val = '1234';
|
|
77
77
|
model = featureModel.parse(fixture);
|
|
78
78
|
});
|
|
@@ -87,7 +87,7 @@ describe('plugin-device', () => {
|
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
describe('when the value is a true boolean', () => {
|
|
90
|
-
beforeEach(
|
|
90
|
+
beforeEach(() => {
|
|
91
91
|
fixture.val = 'true';
|
|
92
92
|
model = featureModel.parse(fixture);
|
|
93
93
|
});
|
|
@@ -98,7 +98,7 @@ describe('plugin-device', () => {
|
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
describe('when the value is a True boolean', () => {
|
|
101
|
-
beforeEach(
|
|
101
|
+
beforeEach(() => {
|
|
102
102
|
fixture.val = 'True';
|
|
103
103
|
model = featureModel.parse(fixture);
|
|
104
104
|
});
|
|
@@ -109,7 +109,7 @@ describe('plugin-device', () => {
|
|
|
109
109
|
});
|
|
110
110
|
|
|
111
111
|
describe('when the value is a false string', () => {
|
|
112
|
-
beforeEach(
|
|
112
|
+
beforeEach(() => {
|
|
113
113
|
fixture.val = 'false';
|
|
114
114
|
model = featureModel.parse(fixture);
|
|
115
115
|
});
|
|
@@ -120,7 +120,7 @@ describe('plugin-device', () => {
|
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
describe('when the value is a False string', () => {
|
|
123
|
-
beforeEach(
|
|
123
|
+
beforeEach(() => {
|
|
124
124
|
fixture.val = 'False';
|
|
125
125
|
model = featureModel.parse(fixture);
|
|
126
126
|
});
|
|
@@ -131,7 +131,7 @@ describe('plugin-device', () => {
|
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
describe('when the value is a string', () => {
|
|
134
|
-
beforeEach(
|
|
134
|
+
beforeEach(() => {
|
|
135
135
|
fixture.val = 'hello world';
|
|
136
136
|
model = featureModel.parse(fixture);
|
|
137
137
|
});
|
|
@@ -158,7 +158,7 @@ describe('plugin-device', () => {
|
|
|
158
158
|
});
|
|
159
159
|
|
|
160
160
|
describe('when there is no value', () => {
|
|
161
|
-
beforeEach(
|
|
161
|
+
beforeEach(() => {
|
|
162
162
|
fixture.val = undefined;
|
|
163
163
|
model = featureModel.parse(fixture);
|
|
164
164
|
});
|
|
@@ -173,8 +173,8 @@ describe('plugin-device', () => {
|
|
|
173
173
|
describe('#serialize()', () => {
|
|
174
174
|
let serialized;
|
|
175
175
|
|
|
176
|
-
describe(
|
|
177
|
-
beforeEach(
|
|
176
|
+
describe('when the feature includes a \'lastModified\' property', () => {
|
|
177
|
+
beforeEach(() => {
|
|
178
178
|
featureModel = new FeatureModel(featureLM);
|
|
179
179
|
serialized = featureModel.serialize();
|
|
180
180
|
});
|
|
@@ -193,8 +193,8 @@ describe('plugin-device', () => {
|
|
|
193
193
|
});
|
|
194
194
|
});
|
|
195
195
|
|
|
196
|
-
describe(
|
|
197
|
-
beforeEach(
|
|
196
|
+
describe('when the feature excludes a \'lastModified\' property', () => {
|
|
197
|
+
beforeEach(() => {
|
|
198
198
|
featureModel = new FeatureModel(featureNLM);
|
|
199
199
|
serialized = featureModel.serialize();
|
|
200
200
|
});
|
|
@@ -218,7 +218,7 @@ describe('plugin-device', () => {
|
|
|
218
218
|
let key;
|
|
219
219
|
let value;
|
|
220
220
|
|
|
221
|
-
beforeEach(
|
|
221
|
+
beforeEach(() => {
|
|
222
222
|
key = 'val';
|
|
223
223
|
value = 'false';
|
|
224
224
|
featureModel = new FeatureModel(featureLM);
|
|
@@ -237,7 +237,7 @@ describe('plugin-device', () => {
|
|
|
237
237
|
});
|
|
238
238
|
|
|
239
239
|
describe('when setting all properties', () => {
|
|
240
|
-
beforeEach(
|
|
240
|
+
beforeEach(() => {
|
|
241
241
|
featureModel = new FeatureModel(featureLM);
|
|
242
242
|
featureModel.set(featureNLM);
|
|
243
243
|
});
|
|
@@ -8,7 +8,7 @@ describe('plugin-device', () => {
|
|
|
8
8
|
describe('features-model', () => {
|
|
9
9
|
let featuresModel;
|
|
10
10
|
|
|
11
|
-
beforeEach(
|
|
11
|
+
beforeEach(() => {
|
|
12
12
|
featuresModel = new FeaturesModel(dto.features);
|
|
13
13
|
});
|
|
14
14
|
|
|
@@ -25,7 +25,7 @@ describe('plugin-device', () => {
|
|
|
25
25
|
let spy;
|
|
26
26
|
let value;
|
|
27
27
|
|
|
28
|
-
beforeEach(
|
|
28
|
+
beforeEach(() => {
|
|
29
29
|
feature = featuresModel[collectionName].models[0];
|
|
30
30
|
spy = sinon.spy();
|
|
31
31
|
value = 'testValue';
|
|
@@ -45,7 +45,7 @@ describe('plugin-device', () => {
|
|
|
45
45
|
let model;
|
|
46
46
|
let spy;
|
|
47
47
|
|
|
48
|
-
beforeEach(
|
|
48
|
+
beforeEach(() => {
|
|
49
49
|
collection = featuresModel[collectionName];
|
|
50
50
|
key = 'testKey';
|
|
51
51
|
model = new FeatureModel({
|
|
@@ -68,7 +68,7 @@ describe('plugin-device', () => {
|
|
|
68
68
|
let model;
|
|
69
69
|
let spy;
|
|
70
70
|
|
|
71
|
-
beforeEach(
|
|
71
|
+
beforeEach(() => {
|
|
72
72
|
collection = featuresModel[collectionName];
|
|
73
73
|
model = new FeatureModel(dto.features[collectionName][0]);
|
|
74
74
|
spy = sinon.spy();
|