summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-07-10 12:40:26 +0200
committerParménides GV <parmegv@sdf.org>2014-07-24 16:50:48 +0200
commit629a0b279a80938212b01c096e55c402d91739d4 (patch)
tree5e3a06fa200dc18d3891dddbeb8ee3f0ba04e62b
parentc552639de6e6192654c9aea02e89d6541baa3857 (diff)
We don't need support library from Robotium.
I've also fixed a simple test that wasn't letting the suite to finish correctly.
-rw-r--r--app/build.gradle6
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java2
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java4
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EIP.java2
4 files changed, 6 insertions, 8 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 82f71bc8..c4fdc44b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -46,9 +46,9 @@ android {
}
dependencies {
- androidTestCompile 'com.android.support:support-v4:20+'
- androidTestCompile 'com.android.support:appcompat-v7:20.+'
- androidTestCompile 'com.jayway.android.robotium:robotium-solo:4.3.1'
+ // androidTestCompile 'com.android.support:support-v4:20+'
+ // androidTestCompile 'com.android.support:appcompat-v7:20.+'
+ androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.2.1'
compile 'com.intellij:annotations:12.0'
}
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 8ddfbc57..229c3452 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testConfigurationWizard.java
@@ -2,7 +2,7 @@ package se.leap.bitmaskclient.test;
import android.test.ActivityInstrumentationTestCase2;
import android.widget.ListView;
-import com.jayway.android.robotium.solo.Solo;
+import com.robotium.solo.Solo;
import java.io.IOException;
import se.leap.bitmaskclient.AboutActivity;
import se.leap.bitmaskclient.ConfigurationWizard;
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java
index bbc3e97d..85197493 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboard.java
@@ -7,7 +7,7 @@ import android.content.IntentFilter;
import android.provider.Settings;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
-import com.jayway.android.robotium.solo.Solo;
+import com.robotium.solo.Solo;
import se.leap.bitmaskclient.ConfigurationWizard;
import se.leap.bitmaskclient.Dashboard;
import se.leap.bitmaskclient.R;
@@ -39,8 +39,6 @@ public class testDashboard extends ActivityInstrumentationTestCase2<Dashboard> {
*/
public void testOnOffOpenVpn() {
solo.clickOnView(solo.getView(R.id.eipSwitch));
- if(!solo.waitForText(getActivity().getString(R.string.eip_status_start_pending)))
- fail();
if(!solo.waitForText(getActivity().getString(R.string.state_auth)))
fail();
if(!solo.waitForText(getActivity().getString(R.string.eip_state_connected), 1, 30*1000))
diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java
index 0b43f9e1..7374d5ed 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java
@@ -445,7 +445,7 @@ public final class EIP extends IntentService {
} catch (JSONException e) {
Log.v(TAG,"Couldn't read gateway name for profile creation! Returning original name = " + mName);
e.printStackTrace();
- return mName;
+ return (mName != null) ? mName : "";
}
}