@@ -0,0 +1,3027 @@
+import android.support.test.filters.LargeTest;%0Aimport android.support.test.rule.ActivityTestRule;%0Aimport android.support.test.runner.AndroidJUnit4;%0A%0Aimport com.hewgill.android.nzsldict.NZSLDictionary;%0Aimport com.hewgill.android.nzsldict.R;%0A%0Aimport org.hamcrest.Matcher;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport static android.support.test.espresso.Espresso.onView;%0Aimport static android.support.test.espresso.action.ViewActions.click;%0Aimport static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;%0Aimport static android.support.test.espresso.action.ViewActions.typeText;%0Aimport static android.support.test.espresso.assertion.ViewAssertions.matches;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.isEnabled;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withId;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withText;%0Aimport static org.hamcrest.core.AllOf.allOf;%0Aimport static org.hamcrest.Matchers.instanceOf;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.hamcrest.Matchers.not;%0A%0A@RunWith(AndroidJUnit4.class)%0A@LargeTest%0Apublic class NZSLDictionaryTest %7B%0A    @Rule%0A    public ActivityTestRule%3CNZSLDictionary%3E mActivityRule = new ActivityTestRule%3C%3E(NZSLDictionary.class);%0A%0A    @Test%0A    public void test_wordOfTheDay() %7B%0A        onView(withId(R.id.building_list_wotd_gloss)).check(matches(isDisplayed()));%0A    %7D%0A%0A    @Test%0A    public void test_performingSearchShowsList() %7B%0A        onView(withId(R.id.building_list_search_box)).perform(typeText(%22Food%22), closeSoftKeyboard());%0A        onView(withId(android.R.id.list)).check(matches(isDisplayed()));%0A        onView(withId(R.id.building_list_wotd_gloss)).check(matches(not(isDisplayed())));%0A    %7D%0A%0A    @Test%0A    public void test_toggleHandshapeSearch() %7B%0A        onView(withId(R.id.toggle_search_mode)).perform(click());%0A        onView(withId(R.id.building_list_search_box))%0A                .check(matches(withText(%22(handshape search)%22)))%0A                .check(matches(not(isEnabled())));%0A%0A        // TODO JM: Test should also assert that handshape view is present, but I cannot get%0A        // http://google.github.io/android-testing-support-library/docs/espresso/advanced/#matching-a-view-that-is-a-footerheader-in-a-listview%0A        // to work%0A    %7D%0A%0A%0A    @Test%0A    public void test_toggleNormalSearch() %7B%0A        onView(withId(R.id.toggle_search_mode))%0A                .perform(click())%0A                .perform(click()); // Toggle twice to switch back%0A        onView(withId(R.id.building_list_search_box))%0A                .check(matches(withText(%22%22)))%0A                .check(matches(isEnabled()));%0A%0A        // TODO JM: Test should also assert that handshape view is present, but I cannot get%0A        // http://google.github.io/android-testing-support-library/docs/espresso/advanced/#matching-a-view-that-is-a-footerheader-in-a-listview%0A        // to work%0A    %7D%0A%0A%7D%0A

Add instrumented tests for NZSLDictionary