From f7f760e0faab25e735d6b4eca186c786ac5be682 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Sat, 5 Sep 2015 22:59:18 -0700 Subject: Add test for deleting host --- app/src/androidTest/java/org/connectbot/StartupTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/src') diff --git a/app/src/androidTest/java/org/connectbot/StartupTest.java b/app/src/androidTest/java/org/connectbot/StartupTest.java index 8025517..a60d00e 100644 --- a/app/src/androidTest/java/org/connectbot/StartupTest.java +++ b/app/src/androidTest/java/org/connectbot/StartupTest.java @@ -34,6 +34,7 @@ import static android.support.test.espresso.action.ViewActions.pressBack; import static android.support.test.espresso.action.ViewActions.pressImeActionButton; import static android.support.test.espresso.action.ViewActions.pressMenuKey; import static android.support.test.espresso.action.ViewActions.typeText; +import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist; import static android.support.test.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.intent.Intents.intended; import static android.support.test.espresso.intent.matcher.IntentMatchers.hasComponent; @@ -96,6 +97,15 @@ public class StartupTest { .check(matches(hostDisconnected())); } + @Test + public void localConnectionCanDelete() { + startNewLocalConnectionAndGoBack("Local"); + onData(withHostNickname("Local")).inAdapterView(withId(android.R.id.list)) + .perform(longClick()); + onView(withText(R.string.list_host_delete)).perform(click()); + onView(withText(R.string.delete_pos)).perform(click()); + } + @Test public void localConnectionCanChangeToRed() throws Exception { startNewLocalConnectionAndGoBack("Local1"); -- cgit v1.2.3