diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/waypointactivity/AddWaypointMysteryTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/waypointactivity/AddWaypointMysteryTest.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/waypointactivity/AddWaypointMysteryTest.java b/tests/src/cgeo/geocaching/waypointactivity/AddWaypointMysteryTest.java new file mode 100644 index 0000000..248f107 --- /dev/null +++ b/tests/src/cgeo/geocaching/waypointactivity/AddWaypointMysteryTest.java @@ -0,0 +1,32 @@ +package cgeo.geocaching.waypointactivity; + +import static com.google.android.apps.common.testing.ui.espresso.Espresso.onView; +import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches; +import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isDisplayed; +import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withChild; +import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId; +import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText; + +import cgeo.geocaching.Geocache; +import cgeo.geocaching.R; +import cgeo.geocaching.enumerations.CacheType; +import cgeo.geocaching.enumerations.WaypointType; + +import com.google.android.apps.common.testing.ui.espresso.ViewInteraction; + +public class AddWaypointMysteryTest extends AbstractAddWaypointActivityTest { + + @Override + protected Geocache createTestCache() { + final Geocache cache = super.createTestCache(); + cache.setType(CacheType.MYSTERY); + return cache; + } + + public static void testMysteryDefaultWaypointFinal() { + final ViewInteraction waypointTypeSelector = onView(withId(R.id.type)); + waypointTypeSelector.check(matches(isDisplayed())); + waypointTypeSelector.check(matches(withChild(withText(WaypointType.FINAL.getL10n())))); + } + +} |
