Start native apps faster with the Composables CLI ->
Function

assertLeftPositionInRootIsEqualTo

Asserts that the layout of this node has the left position in the root composable that is equal to the given position.

assertLeftPositionInRootIsEqualTo

Source set: Android
@CanIgnoreReturnValue
public fun SubspaceSemanticsNodeInteraction.assertLeftPositionInRootIsEqualTo(
    expectedLeft: Dp,
    tolerance: Dp = Dp(.5f),
): SubspaceSemanticsNodeInteraction

Asserts that the layout of this node has the left position in the root composable that is equal to the given position.

In Subspace, the x position (e.g. assertXPositionInRootIsEqualTo) refers to the center of the node along the X-axis. The left position refers to the position of the left edge (minimum X boundary) of the node's bounding volume, calculated as (center X - width / 2).

Parameters

expectedLeft The left position to assert.
tolerance The tolerance within which the values should be treated as equal. Defaults to 0.5.dp.

Last updated: