-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TECH: added bluetooth's switcher #684
base: master
Are you sure you want to change the base?
Conversation
1a7310f
to
32eb9e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changeBluetoothStateUsingAdbServer method needs attention. Everything else either minor or LGTM
logger.i("Bluetooth is not supported") | ||
return | ||
} | ||
logger.i("${if (enable) "En" else "Dis"}able bluetooth") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, make two separate calls to the logger. Concatenating log strings make them almost imposible to find in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
throw AdbServerException("Failed to change Bluetooth state using ABD") | ||
} | ||
} catch (e: AdbServerException) { | ||
false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catching AdbServerException here may lead to the missing the fact that adb server is down or broken. Please, check that the test crashes when the adb server is disabled. I would throw an exception in the toggleBluetooth method if bluetooth state didn't change since we failed to set the test to the desired state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should the test fail if the adb server is disabled? In this case we can still try to switch bluetooth via quick access settings.
val height = targetContext.resources.displayMetrics.heightPixels | ||
val width = targetContext.resources.displayMetrics.widthPixels | ||
|
||
UiSystem { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plesae, leave a comment on what's going on here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
No description provided.