-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBluetoothControl_Adapter_002.test.js
More file actions
41 lines (39 loc) · 1.17 KB
/
BluetoothControl_Adapter_002.test.js
File metadata and controls
41 lines (39 loc) · 1.17 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
import {
pluginDeactivate,
pluginActivate,
getBluetoothAdapterInfo,
} from '../../commonMethods/commonFunctions'
import constants from '../../commonMethods/constants'
export default {
title: 'Bluetooth Control Adapter 002',
description: 'Check Bluetooth Control Adapter Info with invalid adapter and validate the error',
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 info with invalid adapter and validate the error',
sleep: 10,
test() {
return getBluetoothAdapterInfo.call(this, constants.invalidAddress)
},
validate(res) {
if (res.code === 22 && res.message === 'ERROR_UNKNOWN_KEY') {
return true
} else {
this.$log('Proper error message is not shown')
return false
}
},
},
],
}