aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/androidTest/java
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2015-09-18 09:53:17 -0700
committerKenny Root <kenny@the-b.org>2015-09-18 09:53:17 -0700
commit348b7c2e4e679cf9a81f3a18cb7b21262c7f19b9 (patch)
treeb9a55f0e43043ac4b72dd7bcafea81c13c62f0b3 /app/src/androidTest/java
parent2d5eb56a00cb3f2d890cc8f894a1d5844022f236 (diff)
parentcb9142d03d2f122341922e37f5b94825084a4b45 (diff)
downloadconnectbot-348b7c2e4e679cf9a81f3a18cb7b21262c7f19b9.tar.gz
connectbot-348b7c2e4e679cf9a81f3a18cb7b21262c7f19b9.tar.bz2
connectbot-348b7c2e4e679cf9a81f3a18cb7b21262c7f19b9.zip
Merge pull request #221 from kruton/tests-fixup
Tests fixup to make instrumentation tests a bit more reliable
Diffstat (limited to 'app/src/androidTest/java')
-rw-r--r--app/src/androidTest/java/org/connectbot/ConnectbotMatchers.java6
-rw-r--r--app/src/androidTest/java/org/connectbot/StartupTest.java3
2 files changed, 5 insertions, 4 deletions
diff --git a/app/src/androidTest/java/org/connectbot/ConnectbotMatchers.java b/app/src/androidTest/java/org/connectbot/ConnectbotMatchers.java
index a44e88c..76864e2 100644
--- a/app/src/androidTest/java/org/connectbot/ConnectbotMatchers.java
+++ b/app/src/androidTest/java/org/connectbot/ConnectbotMatchers.java
@@ -44,7 +44,7 @@ public class ConnectbotMatchers {
@Override
public void describeTo(Description description) {
- description.appendText("is displayed");
+ description.appendText("is connected status");
}
};
}
@@ -59,7 +59,7 @@ public class ConnectbotMatchers {
@Override
public void describeTo(Description description) {
- description.appendText("is displayed");
+ description.appendText("is disconnected status");
}
};
}
@@ -74,7 +74,7 @@ public class ConnectbotMatchers {
@Override
public void describeTo(Description description) {
- description.appendText("is displayed");
+ description.appendText("is text color " + expectedColor);
}
};
}
diff --git a/app/src/androidTest/java/org/connectbot/StartupTest.java b/app/src/androidTest/java/org/connectbot/StartupTest.java
index 72259eb..7cd4f1a 100644
--- a/app/src/androidTest/java/org/connectbot/StartupTest.java
+++ b/app/src/androidTest/java/org/connectbot/StartupTest.java
@@ -24,6 +24,7 @@ import android.view.View;
import static android.support.test.espresso.Espresso.onData;
import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.longClick;
import static android.support.test.espresso.action.ViewActions.pressBack;
@@ -83,7 +84,7 @@ public class StartupTest {
public void localConnectionDisconnectConsoleActivity() {
startNewLocalConnection();
- onView(withId(R.id.console_flip)).perform(pressMenuKey());
+ openActionBarOverflowOrOptionsMenu(InstrumentationRegistry.getTargetContext());
// Click on the disconnect context menu item.
onView(withText(R.string.list_host_disconnect)).check(matches(isDisplayed())).perform(click());