findTestItems

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

Example use:

final LithoView lithoView = ComponentTestHelper.mountComponent(
mContext,
new InlineLayoutSpec() {
protected ComponentLayout onCreateLayout(ComponentContext c) {
return Column.create(c)
.child(
Column.create(c)
.child(SimpleMountSpecTester.create(c))
.child(SimpleMountSpecTester.create(c))
.testKey("mytestkey"))
.build();
}
});
final TestItem testItem = LithoViewTestHelper.findTestItem(lithoView, "mytestkey");

Return

Queue of mounted items in order by mount time.

Parameters

lithoView

The component view the component is mounted to.

testKey

The unique identifier the component was constructed with.

Throws

If the e2e flag is not enabled in the configuration.