1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Fix all lib/ files with ESLint rules with 0 errors.

This commit is contained in:
Gunther Brunner 2016-01-19 20:52:38 +09:00
parent 994977ea94
commit 434f63b3a9
69 changed files with 793 additions and 764 deletions

View file

@ -18,7 +18,7 @@ module.exports = syrup.serial()
return service.getAccounts({type: type})
.timeout(30000)
.then(function(accounts) {
if(accounts.indexOf(account) >= 0) {
if (accounts.indexOf(account) >= 0) {
return true
}
throw new Error('The account is not added')
@ -28,7 +28,7 @@ module.exports = syrup.serial()
router.on(wire.AccountCheckMessage, function(channel, message) {
var reply = wireutil.reply(options.serial)
log.info('Checking if account "%s" is added',message.account)
log.info('Checking if account "%s" is added', message.account)
checkAccount(message.type, message.account)
.then(function() {
push.send([
@ -55,7 +55,7 @@ module.exports = syrup.serial()
.then(function(accounts) {
push.send([
channel
, reply.okay('success',accounts)
, reply.okay('success', accounts)
])
})
.catch(function(err) {
@ -113,12 +113,12 @@ module.exports = syrup.serial()
router.on(wire.AccountAddMessage, function(channel, message) {
var reply = wireutil.reply(options.serial)
var type = "com.google"
var account = message.user + "@gmail.com";
var type = 'com.google'
var account = message.user + '@gmail.com'
log.info('Adding Google Account automatedly')
var version = identity.version.substring(0,3)
var version = identity.version.substring(0, 3)
function automation() {
switch (version) {
@ -235,8 +235,8 @@ module.exports = syrup.serial()
.then(function() {
return service.pressKey('enter')
})
//case '4.3': // tested: 4.3
//case '4.4': // tested: 4.4.2
// case '4.3': // tested: 4.3
// case '4.4': // tested: 4.4.2
default:
return service.pressKey('tab').delay(1000)
.then(function() {
@ -293,17 +293,17 @@ module.exports = syrup.serial()
.delay(5000)
.then(function() {
// Just in case the add account menu has any button focused
return touch.tap({x:0, y:0.9})
return touch.tap({x: 0, y: 0.9})
})
.delay(500)
.then(function() {
return automation()
})
.delay(3000)
.then(function () {
.then(function() {
return service.pressKey('home')
})
.then(function () {
.then(function() {
return checkAccount(type, account)
})
.then(function() {