Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75d514e8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Only assert on nodes with content descriptions in drag and drop test" into main

parents 3e5930bf 063ee6d0
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -22,7 +22,10 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.SemanticsProperties
import androidx.compose.ui.test.SemanticsMatcher
import androidx.compose.ui.test.assert
import androidx.compose.ui.test.filter
import androidx.compose.ui.test.hasContentDescription
import androidx.compose.ui.test.junit4.ComposeContentTestRule
import androidx.compose.ui.test.junit4.createComposeRule
@@ -182,7 +185,10 @@ class DragAndDropTest : SysuiTestCase() {
    }

    private fun ComposeContentTestRule.assertTileGridContainsExactly(specs: List<String>) {
        onNodeWithTag(CURRENT_TILES_GRID_TEST_TAG).onChildren().apply {
        onNodeWithTag(CURRENT_TILES_GRID_TEST_TAG)
            .onChildren()
            .filter(SemanticsMatcher.keyIsDefined(SemanticsProperties.ContentDescription))
            .apply {
                fetchSemanticsNodes().forEachIndexed { index, _ ->
                    get(index).assert(hasContentDescription(specs[index]))
                }