@webex/internal-plugin-device 2.59.3-next.1 → 2.59.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/.eslintrc.js +6 -6
- package/README.md +80 -80
- package/babel.config.js +3 -3
- package/dist/config.js +27 -27
- package/dist/config.js.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/device.js +226 -226
- package/dist/device.js.map +1 -1
- package/dist/features/feature-collection.js +14 -14
- package/dist/features/feature-collection.js.map +1 -1
- package/dist/features/feature-model.js +73 -73
- package/dist/features/feature-model.js.map +1 -1
- package/dist/features/features-model.js +28 -28
- package/dist/features/features-model.js.map +1 -1
- package/dist/features/index.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/interceptors/device-url.js +8 -8
- package/dist/interceptors/device-url.js.map +1 -1
- package/dist/metrics.js.map +1 -1
- package/jest.config.js +3 -3
- package/package.json +16 -17
- package/process +1 -1
- package/src/config.js +60 -60
- package/src/constants.js +23 -23
- package/src/device.js +835 -835
- package/src/features/feature-collection.js +30 -30
- package/src/features/feature-model.js +189 -189
- package/src/features/features-model.js +96 -96
- package/src/features/index.js +5 -5
- package/src/index.js +29 -29
- package/src/interceptors/device-url.js +61 -61
- package/src/metrics.js +5 -5
- package/test/integration/spec/device.js +904 -904
- package/test/integration/spec/webex.js +42 -42
- package/test/unit/spec/device.js +409 -409
- package/test/unit/spec/features/feature-collection.js +24 -24
- package/test/unit/spec/features/feature-model.js +255 -255
- package/test/unit/spec/features/features-model.js +97 -97
- package/test/unit/spec/interceptors/device-url.js +215 -215
- package/test/unit/spec/wdm-dto.json +104 -104
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import '@webex/internal-plugin-device';
|
|
2
|
-
|
|
3
|
-
import {assert} from '@webex/test-helper-chai';
|
|
4
|
-
import sinon from 'sinon';
|
|
5
|
-
import WebexCore from '@webex/webex-core';
|
|
6
|
-
import testUsers from '@webex/test-helper-test-users';
|
|
7
|
-
|
|
8
|
-
describe('plugin-device', () => {
|
|
9
|
-
describe('Webex', () => {
|
|
10
|
-
let device;
|
|
11
|
-
let user;
|
|
12
|
-
let webex;
|
|
13
|
-
|
|
14
|
-
before('create users', () =>
|
|
15
|
-
testUsers.create({count: 1}).then(([createdUser]) => {
|
|
16
|
-
user = createdUser;
|
|
17
|
-
})
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
beforeEach('create webex instance', () => {
|
|
21
|
-
webex = new WebexCore({
|
|
22
|
-
credentials: user.token,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
device = webex.internal.device;
|
|
26
|
-
|
|
27
|
-
return device.register();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
describe('#onBeforeLogout()', () => {
|
|
31
|
-
beforeEach('setup spy', () => {
|
|
32
|
-
sinon.spy(device, 'unregister');
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('unregisters the device', () =>
|
|
36
|
-
webex.logout({noRedirect: true}).then(() => {
|
|
37
|
-
assert.called(device.unregister);
|
|
38
|
-
assert.isFalse(device.registered);
|
|
39
|
-
}));
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
});
|
|
1
|
+
import '@webex/internal-plugin-device';
|
|
2
|
+
|
|
3
|
+
import {assert} from '@webex/test-helper-chai';
|
|
4
|
+
import sinon from 'sinon';
|
|
5
|
+
import WebexCore from '@webex/webex-core';
|
|
6
|
+
import testUsers from '@webex/test-helper-test-users';
|
|
7
|
+
|
|
8
|
+
describe('plugin-device', () => {
|
|
9
|
+
describe('Webex', () => {
|
|
10
|
+
let device;
|
|
11
|
+
let user;
|
|
12
|
+
let webex;
|
|
13
|
+
|
|
14
|
+
before('create users', () =>
|
|
15
|
+
testUsers.create({count: 1}).then(([createdUser]) => {
|
|
16
|
+
user = createdUser;
|
|
17
|
+
})
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
beforeEach('create webex instance', () => {
|
|
21
|
+
webex = new WebexCore({
|
|
22
|
+
credentials: user.token,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
device = webex.internal.device;
|
|
26
|
+
|
|
27
|
+
return device.register();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
describe('#onBeforeLogout()', () => {
|
|
31
|
+
beforeEach('setup spy', () => {
|
|
32
|
+
sinon.spy(device, 'unregister');
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('unregisters the device', () =>
|
|
36
|
+
webex.logout({noRedirect: true}).then(() => {
|
|
37
|
+
assert.called(device.unregister);
|
|
38
|
+
assert.isFalse(device.registered);
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|