forked from upstream-mirrors/OpenTracks
Make some change to make test more stable.
This commit is contained in:
+1
-1
@@ -300,7 +300,7 @@ public class CreateAndSendTrackTest extends ActivityInstrumentationTestCase2<Tra
|
||||
EndToEndTestUtils.enterTextAvoidSoftKeyBoard(0, WAYPOINT_NAME);
|
||||
EndToEndTestUtils.SOLO.clickOnButton(activityMyTracks.getString(R.string.generic_add));
|
||||
if (EndToEndTestUtils.hasGpsSingal) {
|
||||
assertTrue(EndToEndTestUtils.SOLO.searchText(WAYPOINT_NAME));
|
||||
assertTrue(EndToEndTestUtils.SOLO.waitForText(WAYPOINT_NAME, 1, EndToEndTestUtils.LONG_WAIT_TIME, true));
|
||||
} else {
|
||||
assertFalse(EndToEndTestUtils.SOLO.searchText(WAYPOINT_NAME));
|
||||
}
|
||||
|
||||
+3
-3
@@ -52,7 +52,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;
|
||||
@@ -416,8 +416,8 @@ public class EndToEndTestUtils {
|
||||
trackName = TRACK_NAME_PREFIX
|
||||
+ System.currentTimeMillis();
|
||||
SOLO.sendKey(KeyEvent.KEYCODE_DEL);
|
||||
SOLO.enterText(0, trackName);
|
||||
SOLO.enterText(1, DEFAULTACTIVITY);
|
||||
enterTextAvoidSoftKeyBoard(0, trackName);
|
||||
enterTextAvoidSoftKeyBoard(1, DEFAULTACTIVITY);
|
||||
SOLO.clickOnText(activityMytracks.getString(R.string.generic_save));
|
||||
instrumentation.waitForIdleSync();
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class MenuItemsTest extends ActivityInstrumentationTestCase2<TrackListAct
|
||||
|
||||
EndToEndTestUtils.SOLO.goBack();
|
||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_help), true);
|
||||
EndToEndTestUtils.SOLO.clickOnText(activityMyTracks.getString(R.string.help_about));
|
||||
EndToEndTestUtils.getButtonOnScreen(activityMyTracks.getString(R.string.help_about), true, true);
|
||||
EndToEndTestUtils.getButtonOnScreen(activityMyTracks.getString(R.string.generic_ok), true, true);
|
||||
EndToEndTestUtils.getButtonOnScreen(activityMyTracks.getString(R.string.generic_ok), true, true);
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public class SettingTest extends ActivityInstrumentationTestCase2<TrackListActiv
|
||||
.getString(R.string.settings_backup_restore));
|
||||
EndToEndTestUtils.getButtonOnScreen(activityMyTracks.getString(R.string.generic_ok), true, true);
|
||||
assertTrue(EndToEndTestUtils.SOLO.waitForText(
|
||||
activityMyTracks.getString(R.string.sd_card_import_success), 0, EndToEndTestUtils.NORMAL_WAIT_TIME));
|
||||
activityMyTracks.getString(R.string.sd_card_import_success), 0, EndToEndTestUtils.SUPER_LONG_WAIT_TIME));
|
||||
// Check restore track.
|
||||
assertTrue(EndToEndTestUtils.SOLO.searchText(EndToEndTestUtils.trackName));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user