LithoViewAssert
Assertion methods for LithoViews.
To create an instance of this class, invoke [LithoViewAssert.assertThat]
.
Alternatively, use LegacyLithoAssertions which provides entry points to all Litho AssertJ helpers.
Types
Functions
Assert that the LithoView under test has the provided Component classes in the Component Tree hierarchy
Assert that the LithoView has a direct component of type clazz
Assert that the LithoView under test has the provided Component class in the Component Tree hierarchy given number of times
Assert that the LithoView under test has the provided Component class once in the Component Tree hierarchy.
Assert that the LithoView under test does not contain the provided Component classes in the Component Tree hierarchy
Assert that the LithoView does not have a direct component of type clazz
Asserts that the LithoView does not contain a Component with given props at any level of the hierarchy. This function uses DFS algorithm to go through the whole component tree
Inverse of .hasVisibleDrawable
Inverse of .hasVisibleText
Inverse of .hasVisibleTextContaining.
Inverse of .hasVisibleTextMatching.
Asserts that the LithoView contains a Component satisfying the given condition at any level of the hierarchy
Asserts that the LithoView contains a Component with given props at any level of the hierarchy. This function uses DFS algorithm to go through the whole component tree
Asserts that the LithoView contains a Component with props that matches given matcher at any level of the hierarchy
Assert that any view in the given Component has the provided content description.
Asserts that the LithoView will render Component as a direct children of the root satisfying the given condition.
Asserts that the LithoView contains a direct Component with given props
Asserts that the LithoView contains a Component with props that matches given matcher at any level of the hierarchy
Assert that the LithoView under test has the provided measured height.
Assert that the LithoView under test has the provided measured width.
Assert that any view in the given Component do not have the provided content description.
Assert that the view tag is present for the given index.
Assert that the given component contains the drawable provided.
Assert that the given component contains the drawable identified by the provided drawable resource id.
Assert that the given component has the exact text identified by resource id.
Assert that the given component has the exact text provided.
Assert that the given component contains the provided text. Useful if checking portion of text that may be appended with other text in a span.
Assert that the given component contains the provided pattern.
Assert that the LithoView will not render content, the root component will either return null or a child with width and height equal to 0
Assert that the LithoView will render content, the root component won't return null nor a child with height and width equal to 0