-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFirmware_Upgrade_Upgrade_003.test.js
More file actions
42 lines (41 loc) · 1.17 KB
/
Firmware_Upgrade_Upgrade_003.test.js
File metadata and controls
42 lines (41 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
42
import { firmwareUpgrade } from '../../commonMethods/firmwarecontrol'
import { pluginActivate, pluginDeactivate } from '../../commonMethods/controller'
import constants from '../../commonMethods/constants'
export default {
title: 'Firmware Upgrade - 002',
description: 'Check the upgrade Functionality when upgrade is already in progress',
context: {
invalidURL: 'incorrectURL',
},
setup() {
return this.$sequence([
() => pluginDeactivate.call(this, constants.firmwareUpgradePlugin),
() => pluginActivate.call(this, constants.firmwareUpgradePlugin),
])
},
steps: [
{
description:
'Invoke Upgrade firmware when already firmware upgrade in progres and validate the result',
sleep: 5,
test() {
return firmwareUpgrade.call(
this,
'firmware_v.0',
this.$context.read('invalidURL'),
'CDL',
'10',
'hmac'
)
},
validate(res) {
if (res.code === 15 && res.message === 'ERROR_INCORRECT_URL') {
return true
} else {
this.$log('Proper error message is not shown')
return false
}
},
},
],
}