Skip to content

Commit

Permalink
#9 - Merged and unmerged Semantics trees
Browse files Browse the repository at this point in the history
  • Loading branch information
jhg3410 committed Feb 24, 2023
1 parent 398f639 commit 403a301
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.example.compose.rally

import androidx.compose.ui.test.*
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.text.toUpperCase
import com.example.compose.rally.ui.components.RallyTopAppBar
import org.junit.Rule
import org.junit.Test
Expand Down Expand Up @@ -38,10 +37,14 @@ class TopAppBarTest {
currentScreen = RallyScreen.Accounts
)
}
composeTestRule.onRoot().printToLog("currentLabelExists")
composeTestRule.onRoot(useUnmergedTree = true).printToLog("currentLabelExists")

composeTestRule
.onNodeWithContentDescription(RallyScreen.Accounts.name)
.onNode(
matcher = hasText(RallyScreen.Accounts.name.uppercase()) and
hasParent(hasContentDescription(RallyScreen.Accounts.name)),
useUnmergedTree = true,
)
.assertExists()
}
}

0 comments on commit 403a301

Please sign in to comment.