Java Code Examples for androidx.test.espresso.action.ViewActions#actionWithAssertions()

The following examples show how to use androidx.test.espresso.action.ViewActions#actionWithAssertions() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppendTextAction.java    From Emoji with Apache License 2.0 4 votes vote down vote up
static ViewAction append(final String text) {
  return ViewActions.actionWithAssertions(new AppendTextAction(text));
}
 
Example 2
Source File: MultiSliderActions.java    From MultiSlider with Apache License 2.0 4 votes vote down vote up
public static ViewAction moveThumbForward(int thumbId) {
    return ViewActions.actionWithAssertions(new SetThumbValueAction(thumbId, Integer.MAX_VALUE));
}
 
Example 3
Source File: MultiSliderActions.java    From MultiSlider with Apache License 2.0 4 votes vote down vote up
public static ViewAction moveThumbBackward(int thumbId) {
    return ViewActions.actionWithAssertions(new SetThumbValueAction(thumbId, Integer.MIN_VALUE));
}
 
Example 4
Source File: MultiSliderActions.java    From MultiSlider with Apache License 2.0 4 votes vote down vote up
public static ViewAction setThumbValue(int thumbId, int value) {
    return ViewActions.actionWithAssertions(new SetThumbValueAction(thumbId, value));
}
 
Example 5
Source File: DescendantViewActions.java    From EspressoDescendantActions with Apache License 2.0 2 votes vote down vote up
/**
 * Perform an action on a descendant view.
 *
 * @param viewMatcher used to select the descendant view in the hierarchy
 * @param viewAction the action to perform against the descendant view
 * @return A ViewAction object that should be performed on the parent view
 */
public static ViewAction performDescendantAction(Matcher<View> viewMatcher, ViewAction viewAction) {
    return ViewActions.actionWithAssertions(new DescendantViewAction(viewMatcher, viewAction));
}
 
Example 6
Source File: DescendantViewActions.java    From EspressoDescendantActions with Apache License 2.0 2 votes vote down vote up
/**
 * Perform a check against a view that only allows actions such as a view found by
 * RecyclerViewActions
 *
 * @param viewAssertion the assertion to check.
 * @return The ViewAction to perform
 */
public static ViewAction checkViewAction(ViewAssertion viewAssertion) {
    return ViewActions.actionWithAssertions(new CheckAssertionAction(viewAssertion));
}
 
Example 7
Source File: DescendantViewActions.java    From EspressoDescendantActions with Apache License 2.0 2 votes vote down vote up
/**
 * Perform a check against a descendant view where the root only allows actions such
 * a view found by RecyclerView actions
 *
 * @param viewMatcher   used to select the descendant view in the hierarchy
 * @param viewAssertion the assertion to check
 * @return A ViewAction to be performed on the parent view
 */
public static ViewAction checkDescendantViewAction(Matcher<View> viewMatcher, ViewAssertion viewAssertion) {
    return ViewActions.actionWithAssertions(new CheckDescendantViewAction(viewMatcher, viewAssertion));
}