LithoViewTestHelper

Helper class to access metadata from LithoView that is relevant during end to end tests. In order for the data to be collected, ComponentsConfiguration#isEndToEndTestRun must be enabled.

Types

Link copied to clipboard
class InternalNodeRef(val internalNodeRef: LithoLayoutResult)

Holds an opaque reference to an LithoNode without giving the holder any access to it.

Functions

Link copied to clipboard
fun findTestItem(lithoView: LithoView, testKey: String?): TestItem?
Link copied to clipboard

Finds a TestItem given a LithoView based on the test key it was assigned during construction.

Link copied to clipboard

Obtain a reference to a LithoView's internal layout root, if present. This is used to restore a view's root after it has been freed for testing purposes.

Link copied to clipboard
fun rootInstanceToString(root: DebugComponent?, embedded: Boolean, startingDepth: Int): String

Provides a nested string representation of a DebugComponent and its nested components for debugging.

Link copied to clipboard

Restore a previously saved root layout reference.

Link copied to clipboard
Link copied to clipboard

Provide a nested string representation of a LithoView and its nested components for debugging purposes.

Link copied to clipboard

Provide a nested string representation of a LithoView and its nested components for E2E testing purposes. Note: this method is called via reflection to prevent direct or shared dependencies. DO NOT CHANGE the method signature.