Skip to content

Commit 66eebb7

Browse files
committed
test(ui): distinguish dialog headings from matching page labels
1 parent 475c47f commit 66eebb7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎app/src/androidTest/java/com/system/location/service/UiDesignTest.kt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,8 @@ class UiDesignTest {
315315
}
316316
scenario.onActivity { it.findNavController(R.id.nav_host_fragment_content_main).navigate(R.id.nav_settings_location) }
317317
compose.scrollToText("地图提供方").performClick()
318-
compose.onNodeWithText("地图服务").assertIsDisplayed()
318+
compose.onNode(hasText("地图服务") and SemanticsMatcher.keyIsDefined(androidx.compose.ui.semantics.SemanticsProperties.Heading))
319+
.assertIsDisplayed()
319320
// The dialog window enter animation is independent of Compose idleness.
320321
android.os.SystemClock.sleep(350)
321322
capture("map-provider-$suffix")

0 commit comments

Comments
 (0)