ViewTreeAssert

class ViewTreeAssert : AbstractAssert<SELF, ACTUAL>

Assertions which require checking an entire view tree

NOTE: Assertions looking for visible attributes are limited to checking the visibility of the nodes, but do not check actual layout. So a visible view might have 0 pixels available for it in actual app code and still pass the checks done here

Properties

Link copied to clipboard
val info: WritableAssertionInfo

Functions

Link copied to clipboard
open fun as(description: String, args: Array<Any>): SELF
Link copied to clipboard
open fun asList(): AbstractListAssert<out Any, List<out Any>, Any, ObjectAssert<Any>>
Link copied to clipboard
Link copied to clipboard
open fun asString(): AbstractCharSequenceAssert<out Any, String>
Link copied to clipboard
open fun describedAs(description: String, args: Array<Any>): SELF
Link copied to clipboard
Link copied to clipboard
open fun doesNotHave(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
open fun doesNotHaveSameClassAs(other: Any): SELF
Link copied to clipboard
open fun <V : View?> doesNotHaveVisible(clazz: Class<V>, predicate: Predicate<Any>): ViewTreeAssert
Link copied to clipboard
Tests all views in the hierarchy under the root, for which the path is visible, are not displaying the requested drawable
Tests all views in the hierarchy under the root, for which the path is visible, do not have the requested drawable by the given resource id.
Link copied to clipboard
Tests that all views in the hierarchy under the root, for which the path is visible, do not have any text appearing on them
Tests that all views in the hierarchy under the root, for which the path is visible, do not have text equal to the string matching the given resource id
Tests that all views in the hierarchy under the root, for which the path is visible, do not have text equal to the given string
Link copied to clipboard
Tests that all views in the hierarchy under the root, for which the path is visible, do not have text that matches against the given regular expression
Link copied to clipboard
Whether there is not a visible view in the hierarchy with the given id.
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun getWritableAssertionInfo(): WritableAssertionInfo
Link copied to clipboard
open fun has(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
open fun hasContentDescription(contentDescription: String): ViewTreeAssert
Tests if any view hierarchy under the root has the given contentDescription.
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun hasNoContentDescription(contentDescription: String): ViewTreeAssert
Tests if any view hierarchy under the root do not has the given contentDescription.
Link copied to clipboard
open fun hasSameClassAs(other: Any): SELF
Link copied to clipboard
open fun hasSameHashCodeAs(other: Any): SELF
Link copied to clipboard
open fun hasToString(expectedToString: String): SELF
Link copied to clipboard
open fun hasViewTag(tagId: Int, tagValue: Any): ViewTreeAssert
Tests if any view hierarchy under the root has the given view tag and value.
Link copied to clipboard
open fun <V : View?> hasVisible(clazz: Class<V>, predicate: Predicate<V>): ViewTreeAssert
Link copied to clipboard
Tests if any view in the hierarchy under the root, for which the path is visible, is displaying the requested drawable
open fun hasVisibleDrawable(resourceId: Int): ViewTreeAssert
Tests if any view in the hierarchy under the root, for which the path is visible, is displaying the requested drawable by the given resource id.
Link copied to clipboard
open fun hasVisibleText(resourceId: Int): ViewTreeAssert
Tests if any view has visible text identified by the resource id
Tests if any view in the hierarchy under the root, for which the path is visible, has the requested piece of text as its text
Link copied to clipboard
Tests if any view in the hierarchy under the root, for which the path is visible, has text that matches the given regular expression
Link copied to clipboard
open fun hasVisibleTextWithTag(text: String, tagId: Int, tagValue: Any): ViewTreeAssert
Tests if any view in the hierarchy under the root, for which the path is visible, has the requested piece of text as its text and has a tag set on that TextView with the given tag id and tag value.
Link copied to clipboard
Whether there is a visible view in the hierarchy with the given id.
Link copied to clipboard
open fun is(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
open fun isEqualTo(expected: Any): SELF
Link copied to clipboard
open fun isExactlyInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isIn(values: Array<Any>): SELF
Link copied to clipboard
open fun isInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isInstanceOfAny(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isNot(condition: Condition<in ACTUAL>): SELF
Link copied to clipboard
open fun isNotEqualTo(other: Any): SELF
Link copied to clipboard
open fun isNotExactlyInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isNotIn(values: Array<Any>): SELF
Link copied to clipboard
open fun isNotInstanceOf(type: Class<out Any>): SELF
Link copied to clipboard
open fun isNotInstanceOfAny(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isNotNull(): SELF
Link copied to clipboard
open fun isNotOfAnyClassIn(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isNotSameAs(other: Any): SELF
Link copied to clipboard
open fun isNull()
Link copied to clipboard
open fun isOfAnyClassIn(types: Array<Class<out Any>>): SELF
Link copied to clipboard
open fun isSameAs(expected: Any): SELF
Link copied to clipboard
open fun overridingErrorMessage(newErrorMessage: String, args: Array<Any>): SELF
Link copied to clipboard
open fun setCustomRepresentation(customRepresentation: Representation)
Link copied to clipboard
open fun usingComparator(customComparator: Comparator<in ACTUAL>): SELF
Link copied to clipboard
open fun usingDefaultComparator(): SELF
Link copied to clipboard
open fun withFailMessage(newErrorMessage: String, args: Array<Any>): SELF
Link copied to clipboard
open fun withRepresentation(representation: Representation): SELF
Link copied to clipboard
open fun withThreadDumpOnError(): SELF