assertPositionInRootIsEqualTo
Source set: Common
@Deprecated(
message = "Use assertPositionInRootIsEqualTo with tolerance",
level = DeprecationLevel.HIDDEN,
)
public fun SemanticsNodeInteraction.assertPositionInRootIsEqualTo(
expectedLeft: Dp,
expectedTop: Dp,
): SemanticsNodeInteraction
Asserts that the layout of this node has position in the root composable that is equal to the given position.
Parameters
| expectedLeft | The left (x) position to assert. |
| expectedTop | The top (y) position to assert. |
Throws: AssertionError
if comparison fails.
assertPositionInRootIsEqualTo
Source set: Common
public fun SemanticsNodeInteraction.assertPositionInRootIsEqualTo(
expectedLeft: Dp,
expectedTop: Dp,
tolerance: Dp = 0.5.dp,
): SemanticsNodeInteraction
Asserts that the layout of this node has position in the root composable that is equal to the expectedLeft and expectedTop within the given tolerance.
Parameters
| expectedLeft | The left (x) position to assert. |
| expectedTop | The top (y) position to assert. |
| tolerance | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |
Throws: AssertionError
if comparison fails.