本文整理汇总了Java中android.support.test.espresso.intent.Intents.intended方法的典型用法代码示例。如果您正苦于以下问题:Java Intents.intended方法的具体用法?Java Intents.intended怎么用?Java Intents.intended使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.test.espresso.intent.Intents
的用法示例。
在下文中一共展示了Intents.intended方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testStartsLogInActivity
import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testStartsLogInActivity() throws Exception {
onView(withId(R.id.pager)).perform(swipeLeft());
onView(withId(R.id.pager)).perform(swipeLeft());
onView(withId(R.id.btn_walkthrough)).perform(click());
Intents.intended(hasComponent(LogInActivity.class.getName()));
}
示例2: testErrorThenCorrect
import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testErrorThenCorrect() throws Exception {
errorInputAndClick();
onView(LOGIN_INPUT_LAYOUT).check(matches(withInputError(R.string.error)));
clearInputs();
correctInputAndClick();
Intents.intended(hasComponent(RepositoriesActivity.class.getName()));
}
示例3: testRecipeAnalysis
import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testRecipeAnalysis() {
when(repository.getRecipeAnalysisData(ArgumentMatchers.<RecipeAnalysisParams>any()))
.thenReturn(Single.just(AssetUtils.getRecipeAnalysisResult(context)));
rule.launchActivity(new Intent());
selectTab();
inputFields();
onView(withId(R.id.btn_analyze)).perform(click());
Intents.intended(IntentMatchers.hasComponent(RecipeAnalysisDetailsActivity.class.getName()));
}
示例4: testClickOnItem
import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testClickOnItem() throws Exception {
onView(withId(R.id.recyclerView))
.perform(actionOnItemAtPosition(14, click()));
Intents.intended(hasComponent(CommitsActivity.class.getName()));
}
示例5: testSuccessAuth
import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testSuccessAuth() throws Exception {
onView(withId(R.id.loginEdit)).perform(typeText("login"));
closeSoftKeyboard();
onView(withId(R.id.passwordEdit)).perform(typeText("pass"));
closeSoftKeyboard();
onView(withId(R.id.logInButton)).perform(click());
IdlingResource idlingResource = TimeIdlingResource.timeout(4000);
Intents.intended(hasComponent(RepositoriesActivity.class.getName()));
Espresso.unregisterIdlingResources(idlingResource);
}
示例6: testLogInCorrect
import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testLogInCorrect() throws Exception {
correctInputAndClick();
Intents.intended(hasComponent(
RepositoriesActivity.class.getName()));
}
示例7: shouldLoginWithSkip
import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
public void shouldLoginWithSkip() {
onView(withId(R.id.emailEditText)).check(matches(isDisplayed()));
onView(withId(R.id.passwordEditText)).perform(typeText("[email protected]"));
onView(withId(R.id.signupButton)).perform(click());
Intents.intended(IntentMatchers.hasComponent(MainActivity.class.getName()));
}