-
-
Save halemmerich/3d0f1d41d8eebe76eedc8553530e5dd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app" : "android", | |
"tests" : [ { | |
"steps" : [ | |
{"t":"wrap", "fn": "Bangle.setGPSPower", "id": "gpspower"}, | |
{"t":"cmd", "js": "NRF.getSecurityStatus = () => {}"}, | |
{"t":"cmd", "js": "eval(require('Storage').read('android.boot.js'))"}, | |
{"t":"assert", "js": "!NRF.getSecurityStatus().connected", "is":"true", "text": "Not connected"}, | |
{"t":"assertArray", "js": "Bangle._PWR.GPS", "is":"undefinedOrEmpty", "text": "No GPS clients"}, | |
{"t":"assert", "js": "Bangle.isGPSOn()", "is":"false", "text": "isGPSOn is correct"}, | |
{"t":"assert", "js": "Bangle.setGPSPower(1, 'test')", "is":"true", "text": "setGPSPower returns true when switching on"}, | |
{"t":"assertArray", "js": "Bangle._PWR.GPS", "is":"notEmpty", "text": "GPS clients"}, | |
{"t":"assert", "js": "Bangle.isGPSOn()", "is":"true", "text": "isGPSOn is correct"}, | |
{"t":"assertCall", "id": "gpspower", "argAsserts": [ { "t": "assert", "arg": "0", "is": "equal", "to": 1 } ] , "text": "internal GPS switched on"} | |
{"t":"assert", "js": "Bangle.setGPSPower(0, 'test')", "is":"false", "text": "setGPSPower returns false when switching off"}, | |
{"t":"assertArray", "js": "Bangle._PWR.GPS", "is":"undefinedOrEmpty", "text": "No GPS clients"}, | |
{"t":"assert", "js": "Bangle.isGPSOn()", "is":"false", "text": "isGPSOn is correct"}, | |
{"t":"assertCall", "id": "gpspower", "argAsserts": [ { "t": "assert", "arg": "0", "is": "equal", "to": 0 } ] , "text": "internal GPS switched off"} | |
] | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment