ComponentConditions

Various helpers to match against InspectableComponents. This is to be used with subComponentWith and deepSubComponentWith.

Functions

Link copied to clipboard
open fun inspectedTypeIs(clazz: Class<out Component>): Condition<InspectableComponent>
Matcher that succeeds if the class of an InspectableComponent exactly matches the provided component class.
Link copied to clipboard
open fun text(condition: Condition<String>): Condition<InspectableComponent>
Matcher that succeeds if a InspectableComponent has text content that matches the provided condition.
open fun text(matcher: Matcher<String>): Condition<InspectableComponent>
Matcher that succeeds if a InspectableComponent has text content that matches the provided hamcrest matcher.
Link copied to clipboard
open fun textEquals(text: CharSequence): Condition<InspectableComponent>
Matcher that succeeds if a InspectableComponent has a text content that exactly matches the provided string.
open fun textEquals(text: String): Condition<InspectableComponent>
Link copied to clipboard
open fun typeIs(clazz: Class<out Component>): Condition<Component>
Matcher that succeeds if the class of an Component exactly matches the provided component class.
open fun typeIs(clazz: KClass<out Component>): Condition<Component>