hasDirectMatchingComponent
Asserts that the LithoView will render Component as a direct children of the root satisfying the given condition.
example:
FBStory -> Story -> Column
-- StoryDescription -> Column
---- Text
-- Text
-- Comments -> Column
---- Text
---- Text
Content copied to clipboard
Each row here is a single Node and the arrow indicates 'returns from render'. Direct children for FBStory Component is Story only and direct components for StoryDescription and Comments Components are Columns
fun <T1, T2> hasDirectMatchingComponent(kClass: KClass<out Component>, vararg propsValuePairs: Pair<KProperty1<T2, T1>, T1>): LithoViewAssert
Asserts that the LithoView contains a direct Component with given props
Parameters
kClass
class of a component
propsValuePairs
Pairs of props and their expected values