diff --git a/MyTracksTest/src/com/google/android/apps/mytracks/endtoendtest/EndToEndTestUtils.java b/MyTracksTest/src/com/google/android/apps/mytracks/endtoendtest/EndToEndTestUtils.java index 1d5c34464..864e0d32d 100644 --- a/MyTracksTest/src/com/google/android/apps/mytracks/endtoendtest/EndToEndTestUtils.java +++ b/MyTracksTest/src/com/google/android/apps/mytracks/endtoendtest/EndToEndTestUtils.java @@ -56,7 +56,7 @@ public class EndToEndTestUtils { private static final String ANDROID_LOCAL_IP = "10.0.2.2"; // usually 5554. - public static int emulatorPort = 5554; + public static int emulatorPort = 5558; private static final int ORIENTATION_PORTRAIT = 1; private static final int ORIENTATION_LANDSCAPE = 0; @@ -965,5 +965,15 @@ public class EndToEndTestUtils { } SOLO.goBack(); } + + /** + * Waits a text to disappear. + */ + public static void waitTextToDisappear(String text) { + // The first wait should longer than following waits. + SOLO.waitForText(text, 1, SHORT_WAIT_TIME); + while (SOLO.waitForText(text, 1, 200)) {} + return; + } } \ No newline at end of file diff --git a/MyTracksTest/src/com/google/android/apps/mytracks/endtoendtest/MenuItemsTest.java b/MyTracksTest/src/com/google/android/apps/mytracks/endtoendtest/MenuItemsTest.java index 1c303a552..6fa645958 100644 --- a/MyTracksTest/src/com/google/android/apps/mytracks/endtoendtest/MenuItemsTest.java +++ b/MyTracksTest/src/com/google/android/apps/mytracks/endtoendtest/MenuItemsTest.java @@ -190,19 +190,23 @@ public class MenuItemsTest extends ActivityInstrumentationTestCase2