summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/androidTest/java')
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/TestConfigurationWizard.java (renamed from app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java)8
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/TestDashboardIntegration.java (renamed from app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboardIntegration.java)2
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/TestEIP.java (renamed from app/src/androidTest/java/se/leap/bitmaskclient/test/testEIP.java)4
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/TestGatewaysManager.java (renamed from app/src/androidTest/java/se/leap/bitmaskclient/test/testGatewaysManager.java)2
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/TestLeapSRPSession.java (renamed from app/src/androidTest/java/se/leap/bitmaskclient/test/testLeapSRPSession.java)4
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/TestUserStatusFragment.java (renamed from app/src/androidTest/java/se/leap/bitmaskclient/test/testUserStatusFragment.java)0
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnCertificateValidator.java (renamed from app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnCertificateValidator.java)0
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnFragment.java (renamed from app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java)33
8 files changed, 25 insertions, 28 deletions
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 8b897b96..1e1dbe4b 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestConfigurationWizard.java
@@ -1,5 +1,6 @@
package se.leap.bitmaskclient.test;
+import android.os.Build;
import android.test.*;
import android.widget.*;
@@ -81,7 +82,8 @@ public class testConfigurationWizard extends ActivityInstrumentationTestCase2<Co
}
public void testAddNewProvider() {
- addProvider("calyx.net");
+ //addProvider("calyx.net");
+ addProvider("riseup.net");
}
private void addProvider(String url) {
@@ -91,7 +93,9 @@ public class testConfigurationWizard extends ActivityInstrumentationTestCase2<Co
added_providers = added_providers + 1;
solo.clickOnActionBarItem(R.id.new_provider);
solo.enterText(0, url);
- solo.clickOnCheckBox(0);
+ if ( BuildConfig.FLAVOR.equals("insecure")) {
+ solo.clickOnCheckBox(0);
+ }
solo.clickOnText(solo.getString(R.string.save));
waitForProviderDetails();
solo.goBack();
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboardIntegration.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestDashboardIntegration.java
index ece70c59..faeb1791 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboardIntegration.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestDashboardIntegration.java
@@ -4,7 +4,7 @@ import java.io.*;
import se.leap.bitmaskclient.*;
-public class testDashboardIntegration extends BaseTestDashboardFragment {
+public class TestDashboardIntegration extends BaseTestDashboardFragment {
@Override
protected void tearDown() throws Exception {
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testEIP.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestEIP.java
index b504af99..1a32e1c9 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testEIP.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestEIP.java
@@ -27,13 +27,13 @@ import se.leap.bitmaskclient.eip.*;
/**
* @author parmegv
*/
-public class testEIP extends ServiceTestCase<EIP> {
+public class TestEIP extends ServiceTestCase<EIP> {
private Context context;
private Intent intent;
private SharedPreferences preferences;
- public testEIP(Class<EIP> activityClass) {
+ public TestEIP(Class<EIP> activityClass) {
super(activityClass);
context = getSystemContext();
intent = new Intent(context, EIP.class);
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testGatewaysManager.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestGatewaysManager.java
index 086c060f..4817adbb 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testGatewaysManager.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestGatewaysManager.java
@@ -29,7 +29,7 @@ import se.leap.bitmaskclient.eip.*;
/**
* @author parmegv
*/
-public class testGatewaysManager extends InstrumentationTestCase {
+public class TestGatewaysManager extends InstrumentationTestCase {
GatewaysManager gateways_manager;
Gateway gateway;
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testLeapSRPSession.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestLeapSRPSession.java
index 149c2c7f..8d0df59b 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testLeapSRPSession.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestLeapSRPSession.java
@@ -11,9 +11,9 @@ import se.leap.bitmaskclient.*;
import junit.framework.*;
-public class testLeapSRPSession extends TestCase {
+public class TestLeapSRPSession extends TestCase {
- public testLeapSRPSession(String name) {
+ public TestLeapSRPSession(String name) {
super(name);
}
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testUserStatusFragment.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestUserStatusFragment.java
index 2031f365..2031f365 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testUserStatusFragment.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestUserStatusFragment.java
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnCertificateValidator.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnCertificateValidator.java
index 672607be..672607be 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnCertificateValidator.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnCertificateValidator.java
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 12cb8c14..b16bcf4f 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testVpnFragment.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/TestVpnFragment.java
@@ -1,6 +1,6 @@
package se.leap.bitmaskclient.test;
-public class testVpnFragment extends BaseTestDashboardFragment {
+public class TestVpnFragment extends BaseTestDashboardFragment {
/**
* This test will fail if Android does not trust VPN connection.
@@ -8,7 +8,7 @@ public class testVpnFragment extends BaseTestDashboardFragment {
*/
public void testOnOffOpenVpn() {
vpn_controller.clickVpnButton();
- Screenshot.setTimeToSleep(8);
+ Screenshot.setTimeToSleep(2);
Screenshot.takeWithSleep("Turning VPN on");
vpn_controller.turningEipOn();
Screenshot.setTimeToSleep(0.5);
@@ -24,13 +24,6 @@ public class testVpnFragment extends BaseTestDashboardFragment {
vpn_controller.clickVpnButton();
vpn_controller.turningEipOff();
- /*clickVpnButton();;
- turningEipOn();
-
- turnNetworkOff();
- restartAdbServer(); // This doesn't work
- */
-
}
/**
@@ -47,27 +40,27 @@ public class testVpnFragment extends BaseTestDashboardFragment {
}
public void testVpnEveryProvider() {
- testDemoBitmaskNet();
- testRiseupNet();
- testCalyxNet();
+ checkDemoBitmaskNet();
+ checkRiseupNet();
+ checkCalyxNet();
}
- private void testDemoBitmaskNet() {
- testProvider("demo.bitmask.net");
+ private void checkDemoBitmaskNet() {
+ checkProvider("demo.bitmask.net");
}
- private void testRiseupNet() {
- testProvider("riseup.net");
+ private void checkRiseupNet() {
+ checkProvider("riseup.net");
}
- private void testCalyxNet() {
- testProvider("calyx.net");
+ private void checkCalyxNet() {
+ checkProvider("calyx.net");
}
- private void testProvider(String provider) {
+ private void checkProvider(String provider) {
changeProviderAndLogIn(provider);
vpn_controller.sleepSeconds(1);
- vpn_controller.turnVpnOndAndOff(provider);
+ vpn_controller.turnVpnOndAndOff();
vpn_controller.sleepSeconds(1);
}