GlanceAppWidgetUnitTestDefaults

object GlanceAppWidgetUnitTestDefaults


Provides default values for various properties used in the Glance appWidget unit tests.

Summary

Public functions

GlanceId

GlanceId that can be assumed for state updates testing a Glance composable in isolation.

Int

Default category of the appWidget assumed in the unit tests.

DpSize

Default size of the appWidget assumed in the unit tests.

Public functions

glanceId

Added in 1.1.1
fun glanceId(): GlanceId

GlanceId that can be assumed for state updates testing a Glance composable in isolation.

hostCategory

Added in 1.1.1
fun hostCategory(): Int

Default category of the appWidget assumed in the unit tests.

The default is WIDGET_CATEGORY_HOME_SCREEN

size

Added in 1.1.1
fun size(): DpSize

Default size of the appWidget assumed in the unit tests. To override the size, use the GlanceAppWidgetUnitTest.setAppWidgetSize function.

The default 349.dp, 455.dp is that of a 5x4 widget in Pixel 4 portrait mode.