Change the code to check whether it is necessary to create a track for each test, and make the test run faster.

This commit is contained in:
youtaol
2012-05-11 16:28:21 +08:00
parent 5f017ab96c
commit f1573a550a
9 changed files with 171 additions and 74 deletions
@@ -47,9 +47,11 @@ public class GoToMyLocationTest extends ActivityInstrumentationTestCase2<TrackLi
* Tests the menu My Location.
*/
public void testGotoMyLocation() {
EndToEndTestUtils.createSimpleTrack(0);
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.my_location), true,
false);
if (EndToEndTestUtils.isTrackListEmpty(true)) {
// Create a simple track.
EndToEndTestUtils.createSimpleTrack(2);
}
EndToEndTestUtils.findMenuItem(activityMyTracks.getString(R.string.my_location), true, false);
// TODO How to verify the location is shown on the map.
}