mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
Fix an error when test in Chinese.
This commit is contained in:
+1
-1
@@ -345,7 +345,7 @@ public class CreateAndSendTrackTest extends ActivityInstrumentationTestCase2<Tra
|
||||
*/
|
||||
private void createWaypoint() {
|
||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_markers), true);
|
||||
EndToEndTestUtils.SOLO.waitForText(activityMyTracks.getString(R.string.marker_list_empty_message));
|
||||
assertTrue(EndToEndTestUtils.SOLO.waitForText(activityMyTracks.getString(R.string.marker_list_empty_message)));
|
||||
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.menu_insert_marker), true);
|
||||
EndToEndTestUtils.enterTextAvoidSoftKeyBoard(0, WAYPOINT_NAME);
|
||||
EndToEndTestUtils.SOLO.clickOnButton(activityMyTracks.getString(R.string.generic_add));
|
||||
|
||||
+5
-5
@@ -53,7 +53,7 @@ public class EndToEndTestUtils {
|
||||
|
||||
private static final String ANDROID_LOCAL_IP = "10.0.2.2";
|
||||
// usually 5554.
|
||||
public static int emulatorPort = 5558;
|
||||
public static int emulatorPort = 5554;
|
||||
|
||||
private static final int ORIENTATION_PORTRAIT = 1;
|
||||
private static final int ORIENTATION_LANDSCAPE = 0;
|
||||
@@ -593,21 +593,21 @@ public class EndToEndTestUtils {
|
||||
return findResult;
|
||||
}
|
||||
showMenuItem();
|
||||
findResult = SOLO.searchText(menuName);
|
||||
findResult = SOLO.getText(menuName) != null;
|
||||
} else {
|
||||
// Non-ICS phone.
|
||||
SOLO.sendKey(KeyEvent.KEYCODE_MENU);
|
||||
if (SOLO.searchText(menuName)) {
|
||||
if (SOLO.getText(menuName) != null) {
|
||||
findResult = true;
|
||||
} else if (SOLO.searchText(MENU_MORE)) {
|
||||
SOLO.clickOnText(MENU_MORE);
|
||||
findResult = SOLO.searchText(menuName);
|
||||
findResult = SOLO.getText(menuName) != null;
|
||||
isMoreMenuOpened = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (findResult && click) {
|
||||
SOLO.clickOnText(menuName);
|
||||
SOLO.clickOnView(SOLO.getText(menuName));
|
||||
instrumentation.waitForIdleSync();
|
||||
} else {
|
||||
// Quit more menu list if opened.
|
||||
|
||||
Reference in New Issue
Block a user