createPropertyPredicate

fun <T> createPropertyPredicate(propertyName: String, expectedValue: T, extractor: NodeInfoTestHelper.PropertyExtractor<T>): Predicate<View>

Creates a predicate that checks if a view has a NodeInfo with a property matching the given value.

Return

a predicate that returns true if the view has the expected property value

Parameters

propertyName

the name of the property (used for debugging)

expectedValue

the expected value of the property

extractor

function to extract the property from NodeInfo