TextViewAssertions

public interface TextViewAssertions implements BaseAssertions

Provides text based assertions for views

Inheritors

Functions

Link copied to clipboard
public Unit assert(Function0<ViewAssertion> function)

Check the view with the given custom assertion

Link copied to clipboard
public Unit containsText(String text)

Checks if the view contains given text

Link copied to clipboard
public Unit doesNotExist()

Checks if the matched view does not exist

Link copied to clipboard
public abstract Matcher<Root> getRoot()
Link copied to clipboard
public abstract ViewInteractionDelegate getView()
Link copied to clipboard
public Unit hasAnyTag(String tags)

Checks if the view has at least one of the given tags

Link copied to clipboard
public Unit hasAnyText()

Checks if the view has any text

Link copied to clipboard
public Unit hasBackgroundColor(String colorCode)

Checks if the view has given background color

Link copied to clipboard
public Unit hasCompoundDrawable(@DrawableRes() Integer left, @DrawableRes() Integer top, @DrawableRes() Integer right, @DrawableRes() Integer bottom, @ColorRes() Integer tintColorId)

Checks if the view have compound drawables

Link copied to clipboard

Checks if the view has given content description

Link copied to clipboard
public Unit hasDescendant(Function1<ViewBuilder, Unit> function)

Checks if the view has given descendant

Link copied to clipboard
public Unit hasDrawableSpan(Integer spanIndex, Drawable drawable, Function1<Drawable, Bitmap> toBitmap)
public Unit hasDrawableSpan(Integer spanIndex, @DrawableRes() Integer resId, Function1<Drawable, Bitmap> toBitmap)
public Unit hasDrawableSpan(Integer queryStart, Integer queryEnd, Drawable drawable, Function1<Drawable, Bitmap> toBitmap)
public Unit hasDrawableSpan(Integer queryStart, Integer queryEnd, @DrawableRes() Integer resId, Function1<Drawable, Bitmap> toBitmap)

Checks if the drawable span displayed in the view

Link copied to clipboard
public Unit hasDrawableSpanWithTint(Integer spanIndex, Drawable drawable, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)
public Unit hasDrawableSpanWithTint(Integer spanIndex, @DrawableRes() Integer resId, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)
public Unit hasDrawableSpanWithTint(Integer queryStart, Integer queryEnd, Drawable drawable, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)
public Unit hasDrawableSpanWithTint(Integer queryStart, Integer queryEnd, @DrawableRes() Integer resId, @ColorRes() Integer tintColorId, Function1<Drawable, Bitmap> toBitmap)

Checks if the drawable span displayed in the view

Link copied to clipboard
public Unit hasEmptyText()

Checks if the view have not any text

Link copied to clipboard
public Unit hasGravity(Integer horizontalGravity, Integer verticalGravity)

Checks if the view has given gravity

Link copied to clipboard
public Unit hasHint(@StringRes() Integer resId)
public Unit hasHint(String hint)

Checks if the view has given hint

Link copied to clipboard
public Unit hasNotDescendant(Function1<ViewBuilder, Unit> function)

Checks if the view has not given descendant

Link copied to clipboard
public Unit hasNoText(@StringRes() Integer resId)
public Unit hasNoText(String text)

Checks if the view does not have a given text

Link copied to clipboard
public Unit hasNotSibling(Function1<ViewBuilder, Unit> function)

Checks if the view has not given sibling

Link copied to clipboard
public Unit hasSibling(Function1<ViewBuilder, Unit> function)

Checks if the view has given sibling

Link copied to clipboard
public Unit hasTag(String tag)

Checks if the view has given tag

Link copied to clipboard
public Unit hasText(@StringRes() Integer resId)
public Unit hasText(String text)

Checks if the view has given text

public Unit hasText(Matcher<String> matcher)

Checks if the view has text that matches given matcher

Link copied to clipboard
public Unit hasTextColor(@ColorRes() Integer resId)

Checks if the view has given text color

Link copied to clipboard
public Unit hasTextSize(Integer sp)

Checks if the view has text size in sp

Link copied to clipboard
public Unit hasTypeface(Typeface typeface)

Checks if the view has given typeface

Link copied to clipboard
public Unit inRoot(Function1<RootBuilder, Unit> function)

Check if the view is in given root

Link copied to clipboard
public Unit isActivated()

Checks if the view is activated

Link copied to clipboard

Checks if the view is auto handwriting enabled

Link copied to clipboard
public Unit isBold()

Checks if the text view is bold

Link copied to clipboard
public Unit isClickable()

Checks if the view is clickable

Link copied to clipboard
public Unit isCompletelyAbove(Function1<ViewBuilder, Unit> function)

Checks if the view displayed is completely above of the view matching the given matcher.

Link copied to clipboard
public Unit isCompletelyBelow(Function1<ViewBuilder, Unit> function)

Checks if the view displayed is completely below of the view matching the given matcher.

Link copied to clipboard

Checks if the view is completely displayed

Link copied to clipboard
public Unit isCompletelyLeftOf(Function1<ViewBuilder, Unit> function)

Checks if the view displayed is completely right of the view matching the given matcher.

Link copied to clipboard
public Unit isCompletelyRightOf(Function1<ViewBuilder, Unit> function)

Checks if the view displayed is completely right of the view matching the given matcher.

Link copied to clipboard
public Unit isDirty()

Checks if the view is dirty

Link copied to clipboard
public Unit isDisabled()

Checks if the view is disabled

Link copied to clipboard
public Unit isDisplayed()

Checks if the view is displayed

Link copied to clipboard
public Unit isEnabled()

Checks if the view is enabled

Link copied to clipboard
public Unit isFocusable()

Checks if the view is focusable

Link copied to clipboard
public Unit isFocused()

Checks if the view is focused

Link copied to clipboard

Checks if the view is force dark allowed

Link copied to clipboard
public Unit isGone()

Checks if the view has GONE visibility

Link copied to clipboard

Checks if the view is haptic feedback enabled

Link copied to clipboard
public Unit isHovered()

Checks if the view is hovered

Link copied to clipboard
public Unit isInvisible()

Checks if the view has INVISIBLE visibility

Link copied to clipboard
public Unit isItalic()

Checks if the text view is italic

Link copied to clipboard
public Unit isNotBold()

Checks if the text view is not bold

Link copied to clipboard

Checks if the view is not clickable

Link copied to clipboard

Checks if the view is not completely displayed

Link copied to clipboard

Checks if the view is not displayed

Link copied to clipboard

Checks if the view is not focusable

Link copied to clipboard
public Unit isNotFocused()

Checks if the view is not focused

Link copied to clipboard
public Unit isNotItalic()

Checks if the text view is not italic

Link copied to clipboard

Checks if the view is not selected

Link copied to clipboard
public Unit isSelected()

Checks if the view is selected

Link copied to clipboard
public Unit isVisible()

Checks if the view has VISIBLE visibility

Link copied to clipboard
public Unit matches(Function1<ViewBuilder, Unit> function)

Check if the view matches given matcher

Link copied to clipboard
public Unit notMatches(Function1<ViewBuilder, Unit> function)

Check if the view does not match given matcher

Link copied to clipboard
public abstract Unit setRoot(Matcher<Root> root)
Link copied to clipboard
public Unit startsWithText(String text)

Checks if the view text start with given substring