summaryrefslogtreecommitdiff
path: root/app/src/androidTest
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-06-01 10:46:53 +0200
committerParménides GV <parmegv@sdf.org>2015-06-01 10:46:53 +0200
commit03973cf7f9b0f8635b6835c548b192eb53a2be35 (patch)
tree6af11a281ce9fd4c8e70863d10093d910751bf66 /app/src/androidTest
parentff679b7f20700cec2c08cb8026c585b47df3612f (diff)
parent4560bda1f5c6e5974973f0f3f815e7d6fcf9afb2 (diff)
Merge branch 'feature/simplify-user-session-layout-and-update-dependencies' into feature/Look-for-a-better-solution-to-the-VPN-slider-#6863
Diffstat (limited to 'app/src/androidTest')
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/BaseTestDashboard.java2
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/VpnTestController.java14
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java2
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java10
4 files changed, 11 insertions, 17 deletions
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
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<Co
private void waitForProviderDetails() {
String text = solo.getString(R.string.provider_details_fragment_title);
- assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 40*1000));
+ assertTrue("Provider details dialog did not appear", solo.waitForText(text, 1, 60*1000));
}
public void testAddNewProvider() {
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 2f3d2614..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,9 +1,5 @@
package se.leap.bitmaskclient.test;
-import java.util.Locale;
-
-import de.blinkt.openvpn.activities.LogWindow;
-
public class testVpnFragment extends BaseTestDashboard {
@Override
@@ -49,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(solo.waitForActivity(LogWindow.class));
+ assertTrue("Have you checked the trust vpn dialog?", solo.waitForActivity(LogWindow.class));
solo.goBack();
- vpn_controller.iconShowsDisconnected();
+ assertTrue(vpn_controller.iconShowsDisconnected());
+ */
}
public void testVpnEveryProvider() {