Java 类android.support.test.espresso.contrib.DrawerActions 实例源码

项目:Runnest    文件:MessageTest.java   
@Test
public void challengeRequestAccept() {
    // Send message
    sendTestMessage(Message.Type.CHALLENGE_REQUEST, Challenge.Type.DISTANCE, true);

    //Tap on the request
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_messages));
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());

    //Tap on Accept
    tryIsDisplayed(withId(R.id.request_layout), UI_TEST_TIMEOUT);
    onView(withId(R.id.accept_btn)).perform(click());
    onView(isRoot()).perform(waitForMatch(withId(R.id.readyBtn), UI_TEST_TIMEOUT));

    //Delete challenges from firebase
    new FirebaseHelper().deleteChallengeNode("Runnest IHL vs Test User test1");
}
项目:Runnest    文件:MessageTest.java   
@Test
public void scheduleMessageCancelAndAccept() {
    // Send message
    sendTestMessage(Message.Type.SCHEDULE_REQUEST, Challenge.Type.DISTANCE, false);

    //Tap on the request
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_messages));

    //Tap on Cancel
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());
    tryIsDisplayed(withId(R.id.cancel_btn), UI_TEST_TIMEOUT);
    onView(withId(R.id.cancel_btn)).perform(click());

    //Tap on Accept
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());
    tryIsDisplayed(withId(R.id.accept_btn), UI_TEST_TIMEOUT);
    onView(withId(R.id.accept_btn)).perform(click());
}
项目:Runnest    文件:MessageTest.java   
@Test
public void scheduleMessageDecline() {
    // Send message
    sendTestMessage(Message.Type.SCHEDULE_REQUEST, Challenge.Type.TIME, false);

    //Tap on the request
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_messages));

    //Tap on Decline
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());
    tryIsDisplayed(withId(R.id.decline_btn), UI_TEST_TIMEOUT);
    onView(withId(R.id.decline_btn)).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
}
项目:Runnest    文件:MessageTest.java   
@Test
public void memoMessageCloseDelete() {
    // Send message
    sendTestMessage(Message.Type.MEMO, Challenge.Type.TIME, false);

    //Tap on the request
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_messages));
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());

    //Tap on Close
    tryIsDisplayed(withId(R.id.cancel_btn), UI_TEST_TIMEOUT);
    onView(withId(R.id.cancel_btn)).perform(click());

    //Tap on Delete
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());
    tryIsDisplayed(withId(R.id.decline_btn), UI_TEST_TIMEOUT);
    onView(withId(R.id.decline_btn)).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
}
项目:Runnest    文件:MessageTest.java   
@Test
public void memoMessageChallenge() {
    // Send message
    sendTestMessage(Message.Type.MEMO, Challenge.Type.DISTANCE, false);

    //Tap on the request
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_messages));

    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());

    //Tap on Challenge
    tryIsDisplayed(withId(R.id.accept_btn), UI_TEST_TIMEOUT);
    onView(withId(R.id.accept_btn)).perform(click());

    tryIsDisplayed(withId(R.id.time_radio), UI_TEST_TIMEOUT);
}
项目:Runnest    文件:BackHandTest.java   
@Test
public void runFragmentLifecycleTest() {

    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_run));

    // Jenkins sleep (1/3)
    //
    // Sleep necessary in order to successfully build on Jenkins, I wasn't able to
    // reproduce the failure in local. After a lot of attempts I decided to keep it.
    SystemClock.sleep(FIREBASE_DURATION);

    onView(isRoot()).perform(waitForMatch(withId(R.id.start_run), UI_TEST_TIMEOUT));

    activityRule.getActivity().finish();
    activityRule.getActivity();
}
项目:Runnest    文件:RunTest.java   
@Test
public void startAndStopRun() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_run));

    // Jenkins sleep (1/3)
    //
    // Sleep necessary in order to successfully build on Jenkins, I wasn't able to
    // reproduce the failure in local. After a lot of attempts I decided to keep it.
    SystemClock.sleep(FIREBASE_DURATION);

    onView(isRoot()).perform(waitForMatch(withId(R.id.start_run), UI_TEST_TIMEOUT));
    onView(withId(R.id.start_run)).perform(click());

    SystemClock.sleep(MOCK_LOCATION_DURATION);

    onView(isRoot()).perform(waitForMatch(withId(R.id.stop_run), UI_TEST_TIMEOUT));
    onView(withId(R.id.stop_run)).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.button_history), UI_TEST_TIMEOUT));
    onView(withId(R.id.button_history)).perform(click());
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void navigateToLogout() {
    // Logout cancel
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_logout));
    tryIsDisplayed(withId(android.R.id.button2), UI_TEST_TIMEOUT);
    onView(withId(android.R.id.button2)).perform(click());

    // Logout ok
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_logout));
    tryIsDisplayed(withId(android.R.id.button2), UI_TEST_TIMEOUT);
    onView(withText("OK")).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.sign_in_button), UI_TEST_TIMEOUT));
}
项目:delern    文件:NavigationTest.java   
@Test
public void inviteWasNotSent() {
    Instrumentation.ActivityResult result = new Instrumentation
            .ActivityResult(Activity.RESULT_CANCELED, null);
    intending(toPackage("com.google.android.gms")).respondWith(result);
    waitView(() -> onView(withId(R.id.fab)).check(matches(isDisplayed())));
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    waitView(() -> onView(withId(R.id.nav_view)).check(matches(isDisplayed())));
    onView(withId(R.id.nav_view))
            .perform(NavigationViewActions.navigateTo(R.id.nav_invite));
    intended(allOf(hasAction("com.google.android.gms.appinvite.ACTION_APP_INVITE"),
            toPackage("com.google.android.gms")));
    onView(withText(R.string.invitation_failed_message))
            .inRoot(withDecorView(not(mActivityRule.getActivity().getWindow().getDecorView())))
            .check(matches(isDisplayed()));
}
项目:delern    文件:NavigationTest.java   
@Test
public void inviteSent() {
    Instrumentation.ActivityResult result = new Instrumentation
            .ActivityResult(Activity.RESULT_OK, null);
    intending(toPackage("com.google.android.gms")).respondWith(result);
    waitView(() -> onView(withId(R.id.fab)).check(matches(isDisplayed())));
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    waitView(() -> onView(withId(R.id.nav_view)).check(matches(isDisplayed())));
    onView(withId(R.id.nav_view))
            .perform(NavigationViewActions.navigateTo(R.id.nav_invite));
    intended(allOf(hasAction("com.google.android.gms.appinvite.ACTION_APP_INVITE"),
            toPackage("com.google.android.gms")));
    waitView(() -> onView(withText(R.string.invitation_sent_message))
            .inRoot(withDecorView(not(mActivityRule.getActivity().getWindow().getDecorView())))
            .check(matches(isDisplayed())));
}
项目:delern    文件:NavigationTest.java   
@Test
public void sendFeedbackEmailTest() {
    Context context = mActivityRule.getActivity().getBaseContext();
    intending(toPackage("android.intent.action.CHOOSER"));

    waitView(() -> onView(withId(R.id.fab)).check(matches(isDisplayed())));
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    waitView(() -> onView(withId(R.id.nav_view)).check(matches(isDisplayed())));
    waitView(() -> onView(withId(R.id.nav_view))
            .perform(NavigationViewActions.navigateTo(R.id.nav_contact_us)));
    intended(allOf(
            hasAction("android.intent.action.CHOOSER"),
            hasExtra("android.intent.extra.TITLE", context.
                    getString(R.string.send_email_intent_chooser_message))));

}
项目:Runnest    文件:MessageTest.java   
@Test
public void challengeRequestCancelAndDecline() {
    // Send message
    sendTestMessage(Message.Type.CHALLENGE_REQUEST, Challenge.Type.TIME, true);

    //Tap on the request
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_messages));

    //Tap on Cancel
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());

    SystemClock.sleep(FIREBASE_DURATION);

    tryIsDisplayed(withId(R.id.request_layout), UI_TEST_TIMEOUT);
    onView(withId(R.id.cancel_btn)).perform(click());

    //Tap on Decline
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());
    tryIsDisplayed(withId(R.id.request_layout), UI_TEST_TIMEOUT);
    onView(withId(R.id.decline_btn)).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));

    //Delete challenges from firebase
    new FirebaseHelper().deleteChallengeNode("Runnest IHL vs Test User test1");
}
项目:Runnest    文件:MessageTest.java   
@Test
public void memoMessageBusyChallenge() {
    // Send message
    Message msg1 = new Message("busyEmail",
            "Test User",
            "busyUser",
            "Test User",
            Message.Type.MEMO,
            "test1",
            new Date(),
            1,
            0,
            Challenge.Type.DISTANCE);

    FirebaseHelper firebaseHelper = new FirebaseHelper();
    firebaseHelper.sendMessage(msg1);

    // Needed to be sure that the sent message appears on firebase
    SystemClock.sleep(FIREBASE_DURATION);

    //Tap on the request
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_messages));

    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());

    //Tap on Challenge
    tryIsDisplayed(withId(R.id.accept_btn), UI_TEST_TIMEOUT);
    onView(withId(R.id.accept_btn)).perform(click());
}
项目:Runnest    文件:ChallengeTest.java   
@Test
public void displayChallenge() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_history));

    onView(isRoot()).perform(waitForMatch(withId(R.id.tabs), UI_TEST_TIMEOUT));
    onView(allOf(withText("Challenges"), isDescendantOfA(withId(R.id.tabs)))).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());
}
项目:Runnest    文件:RunTest.java   
@Test
public void startAndAbortRun() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_run));

    // Jenkins sleep (2/3)
    //
    // Sleep necessary in order to successfully build on Jenkins, I wasn't able to
    // reproduce the failure in local. After a lot of attempts I decided to keep it.
    SystemClock.sleep(FIREBASE_DURATION);

    onView(isRoot()).perform(waitForMatch(withId(R.id.start_run), UI_TEST_TIMEOUT));
    onView(withId(R.id.start_run)).perform(click());

    SystemClock.sleep(MOCK_LOCATION_DURATION);

    //Press on CANCEL
    pressBack();
    tryIsDisplayed(withId(android.R.id.button2), UI_TEST_TIMEOUT);
    onView(withId(android.R.id.button2)).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.stop_run), UI_TEST_TIMEOUT));

    pressBack();
    tryIsDisplayed(withId(android.R.id.button1), UI_TEST_TIMEOUT);
    onView(withId(android.R.id.button1)).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.main_layout), UI_TEST_TIMEOUT));
}
项目:Runnest    文件:RunTest.java   
@Test
public void deleteRun() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_run));

    // Jenkins sleep (3/3)
    //
    // Sleep necessary in order to successfully build on Jenkins, I wasn't able to
    // reproduce the failure in local. After a lot of attempts I decided to keep it.
    SystemClock.sleep(FIREBASE_DURATION);

    onView(isRoot()).perform(waitForMatch(withId(R.id.start_run), UI_TEST_TIMEOUT));
    onView(withId(R.id.start_run)).perform(click());

    SystemClock.sleep(MOCK_LOCATION_DURATION);

    onView(isRoot()).perform(waitForMatch(withId(R.id.stop_run), UI_TEST_TIMEOUT));
    onView(withId(R.id.stop_run)).perform(click());

    // Exit and enter displayChallenge
    tryIsDisplayed(withId(R.id.button_history), TIME_CHALLENGE_DURATION + UI_TEST_TIMEOUT);

    onView(withId(R.id.button_history)).perform(click());
    onView(isRoot()).perform(waitForMatch(withId(R.id.tabs), UI_TEST_TIMEOUT));
    onView(allOf(withText("Runs"), isDescendantOfA(withId(R.id.tabs)))).perform(click());
    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.button_delete), UI_TEST_TIMEOUT));
    onView(withId(R.id.button_delete)).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.tabs), UI_TEST_TIMEOUT));
}
项目:Runnest    文件:RunTest.java   
@Test
public void displayRun() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_history));

    onView(isRoot()).perform(waitForMatch(withId(R.id.tabs), UI_TEST_TIMEOUT));
    onView(allOf(withText("Runs"), isDescendantOfA(withId(R.id.tabs)))).perform(click());

    onView(isRoot()).perform(waitForMatch(withId(R.id.list), UI_TEST_TIMEOUT));
    onData(anything()).inAdapterView(withId(R.id.list)).atPosition(0).perform(click());
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void navigateToChallengeHistory() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_history));

    onView(isRoot()).perform(waitForMatch(withId(R.id.tabs), UI_TEST_TIMEOUT));
    onView(allOf(withText("Challenges"), isDescendantOfA(withId(R.id.tabs)))).perform(click());
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void navigateToSingleRunHistory() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_history));

    onView(isRoot()).perform(waitForMatch(withId(R.id.tabs), UI_TEST_TIMEOUT));
    onView(allOf(withText("Runs"), isDescendantOfA(withId(R.id.tabs)))).perform(click());
    onView(allOf(withText("Challenges"), isDescendantOfA(withId(R.id.tabs)))).perform(click());
    onView(allOf(withText("Runs"), isDescendantOfA(withId(R.id.tabs)))).perform(click());
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void backButtonWorks() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_run));
    onView(isRoot()).perform(waitForMatch(withId(R.id.start_run),  UI_TEST_TIMEOUT));

    Espresso.pressBack();
    onView(isRoot()).perform(waitForMatch(withId(R.id.main_layout),  UI_TEST_TIMEOUT));
}
项目:delern    文件:SharingTest.java   
private static void signOut() {
    waitView(() -> onView(withId(R.id.fab)).check(matches(isDisplayed())));
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    waitView(() -> onView(withId(R.id.nav_view)).check(matches(isDisplayed())));
    waitView(() -> onView(withId(R.id.nav_view))
            .perform(NavigationViewActions.navigateTo(R.id.nav_sign_out)));
    onView(withText(R.string.sign_out)).check(matches(isDisplayed()));
    onView(withText(R.string.sign_out)).perform(click());
    waitView(() -> onView(withId(R.id.sign_in_button)).check(matches(isDisplayed())));
}
项目:delern    文件:NavigationTest.java   
@Test
public void openNavigationDrawer() {
    waitView(() -> onView(withId(R.id.fab)).check(matches(isDisplayed())));
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    waitView(() -> onView(withId(R.id.nav_view)).check(matches(isDisplayed())));
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.close());
}
项目:delern    文件:NavigationTest.java   
@Test
public void signOut() {
    waitView(() -> onView(withId(R.id.fab)).check(matches(isDisplayed())));
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    waitView(() -> onView(withId(R.id.nav_view)).check(matches(isDisplayed())));
    waitView(() -> onView(withId(R.id.nav_view))
            .perform(NavigationViewActions.navigateTo(R.id.nav_sign_out)));
    onView(withText(R.string.sign_out)).check(matches(isDisplayed()));
    onView(withText(R.string.sign_out)).perform(click());
}
项目:delern    文件:NavigationTest.java   
@Test
public void openAndCloseNavigationDrawerPressingBack() {
    waitView(() -> onView(withId(R.id.fab)).check(matches(isDisplayed())));
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    waitView(() -> onView(withId(R.id.nav_view)).check(matches(isDisplayed())));
    // Close navigation drawer by pressing back.
    pressBack();
    waitView(() -> onView(withId(R.id.nav_view)).check(matches(not(isDisplayed()))));
}
项目:aws-device-farm-sample-app-for-android    文件:BaseADFTest.java   
/**
 * Gets the activity and navigates to the Class's category in the navigation drawer
 *
 * Uses espresso-contrib dor navigation drawer and recyclerView support
 *
 * @throws Exception instrumentation ActivityInstrumentationTestCase2 exception
 */
@Override
protected void setUp() throws Exception {
    getActivity(); //IMPORTANT you must call this before your tests!
    super.setUp();
    DrawerActions.openDrawer(R.id.drawer_layout);
    RecyclerViewActions.scrollTo(withText(getClassName()));
    onView(withId(R.id.drawerList)).perform(RecyclerViewActions.actionOnItem(hasDescendant(withText(getClassName())), click()));
    InstrumentationRegistry.getInstrumentation().waitForIdleSync();
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void aDrawerLayout() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.drawer_layout)).check(matches(isOpen()));
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void navigateToRunningMap() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_run));
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void navigateToRunHistory() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_history));
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void navigateToMessages() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_messages));
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void navigateToProfile() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_profile));
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void navigateToNewChallenge() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_new_challenge));
    onView(isRoot()).perform(waitForMatch(withId(R.id.empty_layout),  UI_TEST_TIMEOUT));
}
项目:Runnest    文件:AppNavigationTest.java   
@Test
public void backButtonCloseDrawer() {
    onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
    Espresso.pressBack();
    onView(isRoot()).perform(waitForMatch(withId(R.id.main_layout),  UI_TEST_TIMEOUT));
}
项目:Android    文件:Achievements_InstrumentationTest.java   
private void openDrawer()
{
   onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
}
项目:Android    文件:Achievements_InstrumentationTest.java   
private void closeDrawer(){
   onView(withId(R.id.drawer_layout)).perform(DrawerActions.close());
}
项目:Android    文件:LoginFlow_InstrumentationTest.java   
private void openDrawer()
{
   onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
}
项目:Android    文件:LoginFlow_InstrumentationTest.java   
private void closeDrawer(){
   onView(withId(R.id.drawer_layout)).perform(DrawerActions.close());
}
项目:Android    文件:ApplicationTest.java   
private void openDrawer()
{
 onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
}
项目:Android    文件:ApplicationTest.java   
private void closeDrawer(){
 onView(withId(R.id.drawer_layout)).perform(DrawerActions.close());
}
项目:Android    文件:TrailMap_InstrumentationTest.java   
private void openDrawer()
{
   onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
}
项目:Android    文件:TrailMap_InstrumentationTest.java   
private void closeDrawer(){
   onView(withId(R.id.drawer_layout)).perform(DrawerActions.close());
}