assertTopPositionInRootIsEqualTo
Source set: Common
@Deprecated(
message = "Use assertTopPositionInRootIsEqualTo with tolerance",
level = DeprecationLevel.HIDDEN,
)
public fun SemanticsNodeInteraction.assertTopPositionInRootIsEqualTo(
expectedTop: Dp
): SemanticsNodeInteraction
Asserts that the layout of this node has the top position in the root composable that is equal to the given position.
Parameters
| expectedTop | The top (y) position to assert. |
Throws: AssertionError
if comparison fails.
assertTopPositionInRootIsEqualTo
Source set: Common
public fun SemanticsNodeInteraction.assertTopPositionInRootIsEqualTo(
expectedTop: Dp,
tolerance: Dp = 0.5.dp,
): SemanticsNodeInteraction
Asserts that the layout of this node has the top position in the root composable that is equal to expectedTop within the given tolerance.
Parameters
| 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.