-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBluetoothControl_Adapter_001.test.js
More file actions
62 lines (59 loc) · 1.62 KB
/
BluetoothControl_Adapter_001.test.js
File metadata and controls
62 lines (59 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import {
pluginDeactivate,
pluginActivate,
getBluetoothAdapters,
getBluetoothAdapterInfo,
} from '../../commonMethods/commonFunctions'
import constants from '../../commonMethods/constants'
let adapterList
export default {
title: 'Bluetooth Control Adapter 001',
description: 'Check Bluetooth Control Adapter Info',
steps: [
{
description: 'Check if Bluetooth Control Plugin is stopped correctly',
test: pluginDeactivate,
params: constants.bluetoothControlPlugin,
assert: 'deactivated',
},
{
description: 'Check if Bluetooth Control Plugin is started correctly',
test: pluginActivate,
params: constants.bluetoothControlPlugin,
assert: 'activated',
},
{
description: 'Get Bluetooth Adapter list',
sleep: 10,
test() {
return getBluetoothAdapters.call(this)
},
validate(result) {
this.$data.write('adapterList', result)
adapterList = this.$data.read('adapterList')
this.$log('adapter list is ===========>', adapterList)
if (result === undefined || result === null) {
this.$log('Result does not have adapter list')
return false
} else {
return true
}
},
},
{
description: 'Get Bluetooth Adapter info',
sleep: 10,
test() {
return getBluetoothAdapterInfo.call(this, adapterList[0])
},
validate(result) {
if (result === undefined || result === null) {
this.$log('Adapter Info is not available')
return false
} else {
return true
}
},
},
],
}