FriendsListTest.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:301p 作者:
/**
 * UC02.03.01
 */
@Test
public void testAddAndRemoveFriend() throws InterruptedException {

    onView(withId(R.id.addFriendFab)).perform(click());
    pause();
    onView(withClassName(new StringContains("EditText")))
            .perform(typeText(TEST_OTHER_USER),
                    closeSoftKeyboard());
    pause();
    onView(withText("Add"))
            .perform(click());
    pause();
    onData(hasToString(TEST_OTHER_USER))
            .inAdapterView(withId(R.id.friendsListListView))
            .check(matches(isDisplayed()));
    pause();
    onData(hasToString(TEST_OTHER_USER))
            .inAdapterView(withId(R.id.friendsListListView))
            .perform(longClick());
    pause();
    onView(withId(R.id.friendsListListView))
            .check(matches(not(withAdaptedData(hasToString(TEST_OTHER_USER)))));
    pause();

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号