Skip to content

Commit e6997fd

Browse files
committed
fix: assert removed cursor without stale resource reference
1 parent 34551a0 commit e6997fd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • app/src/androidTest/java/com/system/location/service

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class MapUiTest {
3636

3737
@Test fun homeHidesCrosshairAndRequiresExplicitLocationConfirmation() {
3838
ActivityScenario.launch(MainActivity::class.java).use { scenario ->
39-
onView(withId(R.id.ivCrosshair)).check(matches(withEffectiveVisibility(Visibility.GONE)))
39+
// The old center cursor id is intentionally removed from the layout.
40+
assertEquals(0, instrumentation.targetContext.resources.getIdentifier("ivCrosshair", "id", instrumentation.targetContext.packageName))
4041
onView(withId(R.id.btn_apply_location)).check(matches(not(isEnabled())))
4142
scenario.onActivity { activity ->
4243
val model = ViewModelProvider(activity)[AMapViewModel::class.java]

0 commit comments

Comments
 (0)