-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBluetoothControl_Pair_002.test.js
More file actions
36 lines (35 loc) · 1.08 KB
/
BluetoothControl_Pair_002.test.js
File metadata and controls
36 lines (35 loc) · 1.08 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
import { pluginDeactivate, pluginActivate, pairBTDevice } from '../../commonMethods/commonFunctions'
import constants from '../../commonMethods/constants'
export default {
title: 'Bluetooth Control - Pair 002',
description: 'Check the Pair Functionality of Bluetooth Control Module with Invalid MAC',
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: 'Pair with the device',
sleep: 5,
test() {
return pairBTDevice.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
}
},
},
],
}