@@ -0,0 +1,2672 @@
+/*%0A * Copyright 2014 Uwe Trottmann%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.battlelancer.seriesguide.ui;%0A%0Aimport android.test.ActivityInstrumentationTestCase2;%0Aimport android.test.suitebuilder.annotation.LargeTest;%0Aimport com.battlelancer.seriesguide.R;%0Aimport com.battlelancer.seriesguide.ui.ShowsActivity;%0A%0Aimport static com.google.android.apps.common.testing.ui.espresso.Espresso.onData;%0Aimport static com.google.android.apps.common.testing.ui.espresso.Espresso.onView;%0Aimport static com.google.android.apps.common.testing.ui.espresso.action.ViewActions.click;%0Aimport static com.google.android.apps.common.testing.ui.espresso.assertion.ViewAssertions.matches;%0Aimport static com.google.android.apps.common.testing.ui.espresso.contrib.DrawerActions.closeDrawer;%0Aimport static com.google.android.apps.common.testing.ui.espresso.contrib.DrawerActions.openDrawer;%0Aimport static com.google.android.apps.common.testing.ui.espresso.contrib.DrawerMatchers.isClosed;%0Aimport static com.google.android.apps.common.testing.ui.espresso.contrib.DrawerMatchers.isOpen;%0Aimport static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId;%0Aimport static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText;%0Aimport static org.hamcrest.Matchers.allOf;%0Aimport static org.hamcrest.Matchers.instanceOf;%0Aimport static org.hamcrest.Matchers.is;%0A%0A@LargeTest%0Apublic class DrawerNavTest extends ActivityInstrumentationTestCase2%3CShowsActivity%3E %7B%0A%0A    public DrawerNavTest() %7B%0A        super(ShowsActivity.class);%0A    %7D%0A%0A    @Override%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A        // Espresso will not launch our activity for us, we must launch it via getActivity().%0A        getActivity();%0A    %7D%0A%0A    public void testOpenAndCloseDrawer() %7B%0A        // drawer should be closed%0A        onView(withId(R.id.drawer_layout)).check(matches(isClosed()));%0A%0A        openDrawer(R.id.drawer_layout);%0A%0A        onView(withId(R.id.drawer_layout)).check(matches(isOpen()));%0A%0A        closeDrawer(R.id.drawer_layout);%0A%0A        onView(withId(R.id.drawer_layout)).check(matches(isClosed()));%0A    %7D%0A%0A%7D%0A

Add simple drawer open close test for ShowsActivity.