GlanceNodeAssertionsProvider

interface GlanceNodeAssertionsProvider<R : Any?, T : GlanceNode<R>>

Known direct subclasses
GlanceAppWidgetUnitTest

Provides methods to enable you to test your logic of building Glance composable content in the runGlanceAppWidgetUnitTest scope.


Provides an entry point into testing exposing methods to find glance nodes

Summary

Public functions

GlanceNodeAssertionCollection<R, T>

Finds all Glance nodes that matches the given condition.

GlanceNodeAssertion<R, T>

Finds a Glance node that matches the given condition.

Public functions

onAllNodes

Added in 1.1.1
fun onAllNodes(matcher: GlanceNodeMatcher<R>): GlanceNodeAssertionCollection<R, T>

Finds all Glance nodes that matches the given condition.

Parameters
matcher: GlanceNodeMatcher<R>

Matcher used for filtering

onNode

Added in 1.1.1
fun onNode(matcher: GlanceNodeMatcher<R>): GlanceNodeAssertion<R, T>

Finds a Glance node that matches the given condition.

Any subsequent operation on its result will expect exactly one element found and will throw AssertionError if none or more than one element is found.

Parameters
matcher: GlanceNodeMatcher<R>

Matcher used for filtering