Package-level declarations

Types

Link copied to clipboard
open class BackgroundLayoutLooperRule : TestRule
TestRule which allows a test to manually step through the default ComponentTree layout thread Looper while still executing those tasks on a background thread.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open class InteractionUtil
Utilities for interacting with an app.
Link copied to clipboard
class LegacyLithoViewRule @JvmOverloads constructor(val componentsConfiguration: ComponentsConfiguration? = null, val themeResId: Int? = null) : TestRule

This test utility allows clients to test assertion on the view hierarchy rendered by a Litho components. The utility has methods to override the default {@link LithoView}, {@link ComponentTree}, width, and height specs.

Link copied to clipboard
open class LithoStatsRule : TestRule
This rule resets the litho stats counters resetAllCounters after every test, and provides utilities methods to get the litho stats.
Link copied to clipboard
class LithoViewRule @JvmOverloads constructor(val componentsConfiguration: ComponentsConfiguration? = null, val themeResId: Int? = null, lithoVisibilityEventsController: () -> LithoVisibilityEventsController? = null) : TestRule

This test utility allows clients to create a TestLithoView instance that allows to test assertion on the view hierarchy rendered by a Litho components.

Link copied to clipboard
class Message(val messageType: MessageType, val semaphore: TimeOutSemaphore)
Link copied to clipboard
Link copied to clipboard

A wrapper class that exposes methods specific to testing collection components.

Link copied to clipboard
data class TestCollectionItem(testCollection: TestCollection, componentTreeHolder: ComponentTreeHolder, val index: Int)

A wrapper class that exposes methods specific to testing collection children.

Link copied to clipboard
Base class for test components which expose lifecycle information.
Link copied to clipboard
open class TestDrawable : Drawable
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Holder class for the result of LithoViewRule.render call, exposing methods to for finding the views/components and assertions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class ThreadLooperController(val layoutLooper: ShadowLooper = Shadows.shadowOf( Whitebox.invokeMethod<Any>(ComponentTree::class.java, "getDefaultLayoutThreadLooper") as Looper)) : BaseThreadLooperController

Helper class extracting looper functionality from BackgroundLayoutLooperRule that can be reused in other TestRules

Link copied to clipboard
Link copied to clipboard
open class TimeOutSemaphore
Semaphore wrapper that automatically times out in 5 seconds so that we don't forget to do it and hang tests or not check for whether the lock was successfully acquired.
Link copied to clipboard
class TrackedItemPool(lifecycle: Any, size: Int) : MountItemsPool.DefaultItemPool
Link copied to clipboard
open class TransitionTestRule : TestRule
Link copied to clipboard
Exception thrown when a view isn't found in a test.
Link copied to clipboard
open class Whitebox
Internal copy of Whitebox implementation of Powermock.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun atMost(px: Int): Int

Shorthand for creating a View.MeasureSpec.AT_MOST measure spec.

Link copied to clipboard
fun exactly(px: Int): Int

Shorthand for creating a View.MeasureSpec.EXACTLY measure spec.

Link copied to clipboard

Shorthand for creating a View.MeasureSpec.UNSPECIFIED measure spec.