diff options
author | Parménides GV <parmegv@sdf.org> | 2015-06-01 10:18:33 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2015-06-01 10:18:33 +0200 |
commit | fcc8c55139143092005ffa5b56df2f4320fd9ec4 (patch) | |
tree | 987aa93ba9561a6c374da5d768c945917d52674d | |
parent | 37d3488bb2103245eb8ac6a3fe3abbc6dd1c12b5 (diff) |
Update robotium + increase wait times
Sometimes, the emulator is so slow (I wish genymotion was open
source...) that even though everything's going OK tests fail because
they don't wait enough.
3 files changed, 7 insertions, 11 deletions
diff --git a/app/build.gradle b/app/build.gradle index c4686dae..bc2b7d4b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -39,7 +39,7 @@ android { } dependencies { - androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.3.1' + androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.4.1' compile 'com.jakewharton:butterknife:6.1.0' provided 'com.squareup.dagger:dagger-compiler:1.2.2' compile 'com.github.pedrovgs:renderers:1.5' diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboard.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboard.java index fae44d1c..9a9131fd 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboard.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboard.java @@ -50,7 +50,7 @@ public abstract class BaseTestDashboard extends ActivityInstrumentationTestCase2 private void clickAndWaitForDashboard(String click_text) { solo.clickOnText(click_text); - assertTrue(solo.waitForActivity(Dashboard.class, 5000)); + assertTrue(solo.waitForActivity(Dashboard.class, 80 * 1000)); } static boolean isShownWithinConfinesOfVisibleScreen(View view) { diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java index 40a9f656..25d81da1 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java @@ -52,20 +52,16 @@ public class VpnTestController { } protected FabButton getVpnWholeIcon() { - try { - View view = solo.getView(R.id.vpn_Status_Image); - if (view != null) - return (FabButton) view; - else - return null; - } catch (AssertionFailedError e) { + View view = solo.getView(R.id.vpn_Status_Image); + if (view != null) + return (FabButton) view; + else return null; - } } protected void turningEipOn() { assertInProgress(); - int max_seconds_until_connected = 30; + int max_seconds_until_connected = 120; Condition condition = new Condition() { @Override |