在Android Studio中,位于androidTest文件夹中,我有这个测试用例:
@RunWith(AndroidJUnit4.class)
@LargeTest
public class LoginActivityTest {
@Rule
public ActivityTestRule<LoginActivity> activityTestRule =
new ActivityTestRule<>(LoginActivity.class);
@Test
public void teamsListIsSortedAlphabetically() {
onView(withId(R.id.etEmail)).perform(click(), replaceText("asd@asd.vf")
);
onView(withId(R.id.etPassword)).perform(click(), replaceText("asdasd")
);
onView(withId(R.id.bLoginSubmit)).perform(click());
}
}
该应用程序启动LoginActivity,登录后,下一个活动显示1-2秒,然后退出该活动,将我留在启动器屏幕上。如何使Espresso停留在该屏幕上?