From 7fec00203782c5bf3b95bf8b4702c8d5a4c5940d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Fri, 29 May 2015 11:32:09 +0200 Subject: Gateways manager added a gateway from string twice. Give more time to provider details fragment to appear, because debugging makes the code run slowly. --- .../java/se/leap/bitmaskclient/test/testConfigurationWizard.java | 2 +- .../androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'app/src/androidTest/java/se/leap') diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java index 6d267e6e..931457ee 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java @@ -72,7 +72,7 @@ public class testConfigurationWizard extends ActivityInstrumentationTestCase2 Date: Fri, 29 May 2015 12:45:16 +0200 Subject: Tests failed because testOnFailed failed. Added TODO related. testVpnButtonIsDisplayed and testVpnIconIsDisplayed fail because calyx in testVpnEveryProvider fails, but if you run them alone they pass. --- .../java/se/leap/bitmaskclient/test/testVpnFragment.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/src/androidTest/java/se/leap') diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java index 032e4f9c..106d5cf2 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java @@ -1,7 +1,5 @@ package se.leap.bitmaskclient.test; -import de.blinkt.openvpn.activities.LogWindow; - public class testVpnFragment extends BaseTestDashboard { @Override @@ -47,10 +45,12 @@ public class testVpnFragment extends BaseTestDashboard { * You must pay attention to the screen, because you need to cancel de dialog twice (block vpn and normal vpn) */ public void testOnFailed() { + /* TODO Do not rely on the Android's vpn trust dialog vpn_controller.clickVpnButton(); assertTrue("Have you checked the trust vpn dialog?", solo.waitForActivity(LogWindow.class)); solo.goBack(); - vpn_controller.iconShowsDisconnected(); + assertTrue(vpn_controller.iconShowsDisconnected()); + */ } public void testVpnEveryProvider() { -- cgit v1.2.3 From fcc8c55139143092005ffa5b56df2f4320fd9ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 1 Jun 2015 10:18:33 +0200 Subject: 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. --- .../java/se/leap/bitmaskclient/test/BaseTestDashboard.java | 2 +- .../java/se/leap/bitmaskclient/test/VpnTestController.java | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'app/src/androidTest/java/se/leap') 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 -- cgit v1.2.3