# androidx.xr.compose.testing

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | Wrapper for semantics matcher lambdas that allows building a description string explaining to the developer what conditions were being tested. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | Represents a semantics node and the path to fetch it from the subspace semantics tree. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteractionCollection` | Represents a collection of semantics nodes and the path to fetch them from the subspace semantics tree. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceTestContext` | Provides the testing context used for retrieving and interacting with 3D Semantics nodes present within a Subspace spatial compose hierarchy. |

## Top-level functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasAnyAncestor(androidx.xr.compose.testing.SubspaceSemanticsMatcher)(matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher)` Verifies whether any ancestor in the path to the 3D semantics root satisfies the given matcher. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasAnyChild(androidx.xr.compose.testing.SubspaceSemanticsMatcher)(matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher)` Verifies whether any immediate child of the 3D semantic node satisfies the given criteria. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasAnyDescendant(androidx.xr.compose.testing.SubspaceSemanticsMatcher)(matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher)` Verifies whether any descendant of the 3D semantic node satisfies the given condition. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasAnySibling(androidx.xr.compose.testing.SubspaceSemanticsMatcher)(matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher)` Verifies whether the 3D semantic node has any sibling satisfying the given condition. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasContentDescription(kotlin.String,kotlin.Boolean,kotlin.Boolean)( value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Verifies the 3D semantic node's content description for accessibility services. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasParent(androidx.xr.compose.testing.SubspaceSemanticsMatcher)(matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher)` Verifies the direct parent of a 3D semantic node. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasTestTag(kotlin.String)(testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Verifies the 3D semantic node's test tag. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#isRoot()()` Verifies that the node is the root of the 3D semantics hierarchy. |

## Extension functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedMinDepth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has depth that is greater than or equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedDepth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has depth equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedDepth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has depth that is NOT equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedMinHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has height that is greater than or equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has height equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has height that is NOT equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertLeftPositionInRootIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has the left position in the root composable that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertPositionInRootIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedX: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, expectedY: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, expectedZ: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has position in the root composable that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertPositionIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedX: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, expectedY: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, expectedZ: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has position that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertRotationInRootIsEqualTo(androidx.xr.runtime.math.Quaternion,kotlin.Float)( expected: https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/Quaternion, tolerance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Asserts that the layout of this node has rotation in the root composable that is equal to the given rotation. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertRotationIsEqualTo(androidx.xr.runtime.math.Quaternion,kotlin.Float)( expected: https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/Quaternion, tolerance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html )` Asserts that the layout of this node has rotation that is equal to the given rotation. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertTopPositionInRootIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedTop: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has the top position in the root composable that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedMinWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has width that is greater than or equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has width equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has width that is NOT equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertXPositionInRootIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedX: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has the x position in the root composable that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertXPositionIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedX: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has the x position that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertYPositionInRootIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedY: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has the y position in the root composable that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertYPositionIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedY: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has the y position that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertZPositionInRootIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedZ: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has the z position in the root composable that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertZPositionIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)( expectedZ: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Asserts that the layout of this node has the z position that is equal to the given position. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).getPosition()()` Returns the position of the node relative to its parent layout node. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/Vector3` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).getPositionInRoot()()` Returns the position of the node relative to the root node. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/Quaternion` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).getRotation()()` Returns the rotation of the node relative to its parent layout node. |
| `https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/Quaternion` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).getRotationInRoot()()` Returns the rotation of the node relative to the root node. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/unit/DpVolumeSize` | `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).getSize()()` Returns the size of the node. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteractionCollection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule<*, *>.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.compose.ui.test.junit4.AndroidComposeTestRule).onAllSubspaceNodes(androidx.xr.compose.testing.SubspaceSemanticsMatcher)( matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher )` Finds all semantics nodes in the Subspace hierarchy that match the given condition. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteractionCollection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule<*, *>.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.compose.ui.test.junit4.AndroidComposeTestRule).onAllSubspaceNodesWithTag(kotlin.String)( testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html )` Finds all semantics nodes in the Subspace hierarchy identified by the provided test tag. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule<*, *>.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.compose.ui.test.junit4.AndroidComposeTestRule).onSubspaceNode(androidx.xr.compose.testing.SubspaceSemanticsMatcher)( matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher )` Finds a semantics node in the Subspace hierarchy that matches the given condition. |
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule<*, *>.https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.compose.ui.test.junit4.AndroidComposeTestRule).onSubspaceNodeWithTag(kotlin.String)(testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Finds a semantics node in the Subspace hierarchy identified by the provided test tag. |

## Top-level functions

### hasAnyAncestor

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceFilters.kt+function:hasAnyAncestor) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun hasAnyAncestor(matcher: SubspaceSemanticsMatcher): SubspaceSemanticsMatcher
```

Verifies whether any ancestor in the path to the 3D semantics root satisfies the given matcher.

Example: For the following spatial semantic tree:

```kotlin
|-X
|-A
  |-B
    |-C1
    |-C2
```

In case of C1, we would check the matcher against A and B.

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | The semantic criteria to evaluate against all ancestors up to the root. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | a matcher validating the presence of the specified ancestor. |

### hasAnyChild

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceFilters.kt+function:hasAnyChild) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun hasAnyChild(matcher: SubspaceSemanticsMatcher): SubspaceSemanticsMatcher
```

Verifies whether any immediate child of the 3D semantic node satisfies the given criteria.

Useful when testing spatial composite layouts or multiple anchored floating panels grouped under a common parent semantic container.

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | The semantic criteria for the expected child. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | a matcher validating the node's children. |

### hasAnyDescendant

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceFilters.kt+function:hasAnyDescendant) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun hasAnyDescendant(matcher: SubspaceSemanticsMatcher): SubspaceSemanticsMatcher
```

Verifies whether any descendant of the 3D semantic node satisfies the given condition.

Recursively descends the 3D semantic structure to locate deeply nested elements.

Example usage:

```kotlin
|-X
|-A
  |-B
    |-C1
    |-C2
```

In case of A, we would check the matcher against B, C1 and C2.

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | The semantic criteria for the expected descendant. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | a matcher validating the presence of the specified descendant. |

### hasAnySibling

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceFilters.kt+function:hasAnySibling) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun hasAnySibling(matcher: SubspaceSemanticsMatcher): SubspaceSemanticsMatcher
```

Verifies whether the 3D semantic node has any sibling satisfying the given condition.

A sibling is defined as any other spatial node sharing the exact same parent container.

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | The semantic criteria to evaluate against siblings. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | a matcher validating the node's siblings. |

### hasContentDescription

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceFilters.kt+function:hasContentDescription) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun hasContentDescription(
    value: String,
    substring: Boolean = true,
    ignoreCase: Boolean = false
): SubspaceSemanticsMatcher
```

Verifies the 3D semantic node's content description for accessibility services.

Note that 2D UI content rendered inside a Subspace panel (like text or buttons) maintains a separate 2D semantics tree.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The exact or partial description string expected on the spatial node. |
| `substring: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | If true, matches any node whose description contains `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasContentDescription(kotlin.String,kotlin.Boolean,kotlin.Boolean)`. Defaults to true. |
| `ignoreCase: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | If true, case differences are ignored during comparison. Defaults to false. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | a matcher validating the presence of the content description. |

### hasParent

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceFilters.kt+function:hasParent) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun hasParent(matcher: SubspaceSemanticsMatcher): SubspaceSemanticsMatcher
```

Verifies the direct parent of a 3D semantic node.

This is indispensable for nested spatial compositions, such as a `PlanarEmbeddedSubspace` composed inside a `SpatialPanel`, to confirm exact container anchoring.

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | The semantic check to evaluate against the parent node. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | a matcher validating the parent's properties. |

### hasTestTag

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceFilters.kt+function:hasTestTag) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun hasTestTag(testTag: String): SubspaceSemanticsMatcher
```

Verifies the 3D semantic node's test tag.

This is the primary mechanism for addressing spatial containers, anchors, and 3D panels in Compose for XR tests.

| Parameters |
|---|---|
| `testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The string identifier assigned to the spatial element. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | a matcher for the specified `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#hasTestTag(kotlin.String)`. |

### isRoot

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceFilters.kt+function:isRoot) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun isRoot(): SubspaceSemanticsMatcher
```

Verifies that the node is the root of the 3D semantics hierarchy.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | a matcher that matches the root semantics node. |

## Extension functions

### SubspaceSemanticsNodeInteraction.assertDepthIsAtLeast

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertDepthIsAtLeast) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertDepthIsAtLeast(
    expectedMinDepth: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has depth that is greater than or equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

| Parameters |
|---|---|
| `expectedMinDepth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The minimum depth to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertDepthIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertDepthIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertDepthIsEqualTo(
    expectedDepth: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has depth equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

| Parameters |
|---|---|
| `expectedDepth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The depth to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertDepthIsNotEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertDepthIsNotEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertDepthIsNotEqualTo(
    expectedDepth: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has depth that is NOT equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertDepthIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

| Parameters |
|---|---|
| `expectedDepth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The depth to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertHeightIsAtLeast

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertHeightIsAtLeast) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertHeightIsAtLeast(
    expectedMinHeight: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has height that is greater than or equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

| Parameters |
|---|---|
| `expectedMinHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The minimum height to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertHeightIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertHeightIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertHeightIsEqualTo(
    expectedHeight: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has height equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

```kotlin
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertHeightIsEqualTo
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.assertWidthIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.width(100.dp).height(100.dp).testTag("myPanel")) {}
    }
}

// Check existence and exact spatial dimensions in DP using semantic matchers
composeTestRule
    .onSubspaceNodeWithTag("myPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)
    .assertWidthIsEqualTo(100.dp)
    .assertHeightIsEqualTo(100.dp)
```

| Parameters |
|---|---|
| `expectedHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The height to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertHeightIsNotEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertHeightIsNotEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertHeightIsNotEqualTo(
    expectedHeight: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has height that is NOT equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertHeightIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

| Parameters |
|---|---|
| `expectedHeight: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The height to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertLeftPositionInRootIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertLeftPositionInRootIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
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. `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertXPositionInRootIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`) 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: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The left position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertPositionInRootIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertPositionInRootIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertPositionInRootIsEqualTo(
    expectedX: Dp,
    expectedY: Dp,
    expectedZ: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

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

| Parameters |
|---|---|
| `expectedX: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The x position to assert. |
| `expectedY: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The y position to assert. |
| `expectedZ: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The z position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertPositionIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertPositionIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertPositionIsEqualTo(
    expectedX: Dp,
    expectedY: Dp,
    expectedZ: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has position that is equal to the given position.

| Parameters |
|---|---|
| `expectedX: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The x position to assert. |
| `expectedY: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The y position to assert. |
| `expectedZ: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The z position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertRotationInRootIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertRotationInRootIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertRotationInRootIsEqualTo(
    expected: Quaternion,
    tolerance: Float = 0.01f
): SubspaceSemanticsNodeInteraction
```

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

This assertion uses a tolerance to account for floating-point inaccuracies.

| Parameters |
|---|---|
| `expected: https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/Quaternion` | The expected rotation in the root space to assert. |
| `tolerance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.01f` | The maximum allowed angular distance in degrees between the orientations. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertRotationIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertRotationIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertRotationIsEqualTo(
    expected: Quaternion,
    tolerance: Float = 0.01f
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has rotation that is equal to the given rotation.

This assertion uses a tolerance to account for floating-point inaccuracies.

| Parameters |
|---|---|
| `expected: https://developer.android.com/reference/kotlin/androidx/xr/runtime/math/Quaternion` | The rotation to assert. |
| `tolerance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.01f` | The maximum allowed angular distance in degrees between the orientations. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertTopPositionInRootIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertTopPositionInRootIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertTopPositionInRootIsEqualTo(
    expectedTop: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

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

In Subspace, the y position (e.g. `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertYPositionInRootIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`) refers to the center of the node along the Y-axis. The top position refers to the position of the top edge (maximum Y boundary) of the node's bounding volume, calculated as (center Y + height / 2).

| Parameters |
|---|---|
| `expectedTop: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The top position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertWidthIsAtLeast

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertWidthIsAtLeast) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertWidthIsAtLeast(
    expectedMinWidth: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has width that is greater than or equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsAtLeast(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

| Parameters |
|---|---|
| `expectedMinWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The minimum width to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertWidthIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertWidthIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertWidthIsEqualTo(
    expectedWidth: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has width equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

```kotlin
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertHeightIsEqualTo
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.assertWidthIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.width(100.dp).height(100.dp).testTag("myPanel")) {}
    }
}

// Check existence and exact spatial dimensions in DP using semantic matchers
composeTestRule
    .onSubspaceNodeWithTag("myPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)
    .assertWidthIsEqualTo(100.dp)
    .assertHeightIsEqualTo(100.dp)
```

| Parameters |
|---|---|
| `expectedWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The width to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertWidthIsNotEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertWidthIsNotEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertWidthIsNotEqualTo(
    expectedWidth: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has width that is NOT equal to `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.xr.compose.testing.SubspaceSemanticsNodeInteraction).assertWidthIsNotEqualTo(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)`.

| Parameters |
|---|---|
| `expectedWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The width to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertXPositionInRootIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertXPositionInRootIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertXPositionInRootIsEqualTo(
    expectedX: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

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

| Parameters |
|---|---|
| `expectedX: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The x position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertXPositionIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertXPositionIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertXPositionIsEqualTo(
    expectedX: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has the x position that is equal to the given position.

| Parameters |
|---|---|
| `expectedX: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The x position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertYPositionInRootIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertYPositionInRootIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertYPositionInRootIsEqualTo(
    expectedY: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

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

| Parameters |
|---|---|
| `expectedY: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The y position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertYPositionIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertYPositionIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertYPositionIsEqualTo(
    expectedY: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has the y position that is equal to the given position.

| Parameters |
|---|---|
| `expectedY: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The y position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertZPositionInRootIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertZPositionInRootIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertZPositionInRootIsEqualTo(
    expectedZ: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

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

| Parameters |
|---|---|
| `expectedZ: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The z position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.assertZPositionIsEqualTo

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:assertZPositionIsEqualTo) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
@CanIgnoreReturnValue
fun SubspaceSemanticsNodeInteraction.assertZPositionIsEqualTo(
    expectedZ: Dp,
    tolerance: Dp = Dp(.5f)
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has the z position that is equal to the given position.

| Parameters |
|---|---|
| `expectedZ: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The z position to assert. |
| `tolerance: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp(.5f)` | The tolerance within which the values should be treated as equal. Defaults to 0.5.dp. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-assertion-error/index.html` | if comparison fails. |

### SubspaceSemanticsNodeInteraction.getPosition

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:getPosition) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun SubspaceSemanticsNodeInteraction.getPosition(): Vector3
```

Returns the position of the node relative to its parent layout node.

Additional assertions with custom tolerances may be performed on the individual values.

### SubspaceSemanticsNodeInteraction.getPositionInRoot

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:getPositionInRoot) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun SubspaceSemanticsNodeInteraction.getPositionInRoot(): Vector3
```

Returns the position of the node relative to the root node.

Additional assertions with custom tolerances may be performed on the individual values.

### SubspaceSemanticsNodeInteraction.getRotation

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:getRotation) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun SubspaceSemanticsNodeInteraction.getRotation(): Quaternion
```

Returns the rotation of the node relative to its parent layout node.

Additional assertions with custom tolerances may be performed on the individual values.

### SubspaceSemanticsNodeInteraction.getRotationInRoot

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:getRotationInRoot) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun SubspaceSemanticsNodeInteraction.getRotationInRoot(): Quaternion
```

Returns the rotation of the node relative to the root node.

Additional assertions with custom tolerances may be performed on the individual values.

### SubspaceSemanticsNodeInteraction.getSize

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/SubspaceAssertions.kt+function:getSize) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun SubspaceSemanticsNodeInteraction.getSize(): DpVolumeSize
```

Returns the size of the node.

Additional assertions with custom tolerances may be performed on the individual values.

### AndroidComposeTestRule.onAllSubspaceNodes

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/AndroidComposeTestRuleExt.kt+function:onAllSubspaceNodes) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun AndroidComposeTestRule<*, *>.onAllSubspaceNodes(
    matcher: SubspaceSemanticsMatcher
): SubspaceSemanticsNodeInteractionCollection
```

Finds all semantics nodes in the Subspace hierarchy that match the given condition.

This function only locates nodes within the Subspace hierarchy and does not include nodes from standard 2D compose contexts. For locating 2D nodes, use `AndroidComposeTestRule.onAllNodes`. If you are dealing with elements guaranteed to occur exactly once, prefer using `onSubspaceNode` to enforce uniqueness constraints and improve clarity.

```kotlin
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

var count = 0

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.testTag("spatialPanel")) {
            Button(onClick = { count++ }) { Text("Increment") }
        }
    }
}

// Assert subspace node existence, position, and dimensions in the Spatial hierarchy
composeTestRule
    .onSubspaceNodeWithTag("spatialPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)

// Interact with the 2D Compose node nested within the Spatial container
composeTestRule.onNodeWithText("Increment").performClick()

composeTestRule.waitForIdle()

// Verify outcomes
assert(count == 1)
```

```kotlin
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertHeightIsEqualTo
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.assertWidthIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.width(100.dp).height(100.dp).testTag("myPanel")) {}
    }
}

// Check existence and exact spatial dimensions in DP using semantic matchers
composeTestRule
    .onSubspaceNodeWithTag("myPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)
    .assertWidthIsEqualTo(100.dp)
    .assertHeightIsEqualTo(100.dp)
```

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | the `SubspaceSemanticsMatcher` used to filter the semantics nodes. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteractionCollection` | the `SubspaceSemanticsNodeInteractionCollection` containing all matching nodes. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.compose.ui.test.junit4.AndroidComposeTestRule).onSubspaceNode(androidx.xr.compose.testing.SubspaceSemanticsMatcher)` |   |

### AndroidComposeTestRule.onAllSubspaceNodesWithTag

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/AndroidComposeTestRuleExt.kt+function:onAllSubspaceNodesWithTag) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun AndroidComposeTestRule<*, *>.onAllSubspaceNodesWithTag(
    testTag: String
): SubspaceSemanticsNodeInteractionCollection
```

Finds all semantics nodes in the Subspace hierarchy identified by the provided test tag.

This convenience function specifically searches for nodes within the Subspace hierarchy and does not locate standard 2D compose elements. The search evaluates for an exact string match on the test tag.

```kotlin
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

var count = 0

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.testTag("spatialPanel")) {
            Button(onClick = { count++ }) { Text("Increment") }
        }
    }
}

// Assert subspace node existence, position, and dimensions in the Spatial hierarchy
composeTestRule
    .onSubspaceNodeWithTag("spatialPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)

// Interact with the 2D Compose node nested within the Spatial container
composeTestRule.onNodeWithText("Increment").performClick()

composeTestRule.waitForIdle()

// Verify outcomes
assert(count == 1)
```

```kotlin
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertHeightIsEqualTo
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.assertWidthIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.width(100.dp).height(100.dp).testTag("myPanel")) {}
    }
}

// Check existence and exact spatial dimensions in DP using semantic matchers
composeTestRule
    .onSubspaceNodeWithTag("myPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)
    .assertWidthIsEqualTo(100.dp)
    .assertHeightIsEqualTo(100.dp)
```

| Parameters |
|---|---|
| `testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the specific tag string to search for within the hierarchy. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteractionCollection` | the `SubspaceSemanticsNodeInteractionCollection` containing all matching nodes. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.compose.ui.test.junit4.AndroidComposeTestRule).onAllSubspaceNodes(androidx.xr.compose.testing.SubspaceSemanticsMatcher)` |   |

### AndroidComposeTestRule.onSubspaceNode

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/AndroidComposeTestRuleExt.kt+function:onSubspaceNode) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun AndroidComposeTestRule<*, *>.onSubspaceNode(
    matcher: SubspaceSemanticsMatcher
): SubspaceSemanticsNodeInteraction
```

Finds a semantics node in the Subspace hierarchy that matches the given condition.

This function only locates nodes within the Subspace hierarchy and does not include nodes from standard 2D compose contexts. For example, it targets `SpatialPanel`, `SpatialRow`, or `SpatialColumn` nodes but not standard `Row`, `Column`, or `Text` nodes. For locating 2D nodes, use `AndroidComposeTestRule.onNode`.

Any subsequent operation on the returned interaction expects exactly one element to be found (unless `SubspaceSemanticsNodeInteraction.assertDoesNotExist` is used) and throws an `AssertionError` if zero or multiple elements are found.

```kotlin
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

var count = 0

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.testTag("spatialPanel")) {
            Button(onClick = { count++ }) { Text("Increment") }
        }
    }
}

// Assert subspace node existence, position, and dimensions in the Spatial hierarchy
composeTestRule
    .onSubspaceNodeWithTag("spatialPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)

// Interact with the 2D Compose node nested within the Spatial container
composeTestRule.onNodeWithText("Increment").performClick()

composeTestRule.waitForIdle()

// Verify outcomes
assert(count == 1)
```

```kotlin
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertHeightIsEqualTo
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.assertWidthIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.width(100.dp).height(100.dp).testTag("myPanel")) {}
    }
}

// Check existence and exact spatial dimensions in DP using semantic matchers
composeTestRule
    .onSubspaceNodeWithTag("myPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)
    .assertWidthIsEqualTo(100.dp)
    .assertHeightIsEqualTo(100.dp)
```

| Parameters |
|---|---|
| `matcher: https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsMatcher` | the `SubspaceSemanticsMatcher` used to identify the matching semantics node. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | the `SubspaceSemanticsNodeInteraction` for the matched node. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.compose.ui.test.junit4.AndroidComposeTestRule).onAllSubspaceNodes(androidx.xr.compose.testing.SubspaceSemanticsMatcher)` |   |

### AndroidComposeTestRule.onSubspaceNodeWithTag

Artifact: [androidx.xr.compose:compose-testing](https://developer.android.com/jetpack/androidx/releases/xr-compose) [View Source](https://cs.android.com/search?q=file:androidx/xr/compose/testing/AndroidComposeTestRuleExt.kt+function:onSubspaceNodeWithTag) Added in [1.0.0-beta02](https://developer.android.com/jetpack/androidx/releases/xr-compose#1.0.0-beta02)

```
fun AndroidComposeTestRule<*, *>.onSubspaceNodeWithTag(testTag: String): SubspaceSemanticsNodeInteraction
```

Finds a semantics node in the Subspace hierarchy identified by the provided test tag.

This convenience function specifically searches for nodes within the Subspace hierarchy and does not locate standard 2D compose elements. The search evaluates for an exact string match on the test tag.

```kotlin
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

var count = 0

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.testTag("spatialPanel")) {
            Button(onClick = { count++ }) { Text("Increment") }
        }
    }
}

// Assert subspace node existence, position, and dimensions in the Spatial hierarchy
composeTestRule
    .onSubspaceNodeWithTag("spatialPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)

// Interact with the 2D Compose node nested within the Spatial container
composeTestRule.onNodeWithText("Increment").performClick()

composeTestRule.waitForIdle()

// Verify outcomes
assert(count == 1)
```

```kotlin
import androidx.compose.ui.unit.dp
import androidx.xr.compose.spatial.Subspace
import androidx.xr.compose.subspace.SpatialPanel
import androidx.xr.compose.subspace.layout.SubspaceModifier
import androidx.xr.compose.subspace.layout.height
import androidx.xr.compose.subspace.layout.width
import androidx.xr.compose.subspace.semantics.testTag
import androidx.xr.compose.testing.assertHeightIsEqualTo
import androidx.xr.compose.testing.assertPositionInRootIsEqualTo
import androidx.xr.compose.testing.assertWidthIsEqualTo
import androidx.xr.compose.testing.onSubspaceNode
import androidx.xr.compose.testing.onSubspaceNodeWithTag

composeTestRule.setContent {
    Subspace {
        SpatialPanel(SubspaceModifier.width(100.dp).height(100.dp).testTag("myPanel")) {}
    }
}

// Check existence and exact spatial dimensions in DP using semantic matchers
composeTestRule
    .onSubspaceNodeWithTag("myPanel")
    .assertExists()
    .assertPositionInRootIsEqualTo(0.dp, 0.dp, 0.dp)
    .assertWidthIsEqualTo(100.dp)
    .assertHeightIsEqualTo(100.dp)
```

| Parameters |
|---|---|
| `testTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the specific tag string to search for within the hierarchy. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/SubspaceSemanticsNodeInteraction` | the `SubspaceSemanticsNodeInteraction` for the matched node. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/xr/compose/testing/package-summary#(androidx.compose.ui.test.junit4.AndroidComposeTestRule).onSubspaceNode(androidx.xr.compose.testing.SubspaceSemanticsMatcher)` |   |