You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this test to work: // Verify that third email is displayed on the details screen composeTestRule.onNodeWithTagForStringId(R.string.details_screen).onChildren() .assertAny(hasAnyDescendant(hasText( composeTestRule.activity.getString(LocalEmailsDataProvider.allEmails[2].body))) )
the details_screen testTag needs to be added to the modifier in (at least) a couple of places. In ReplyHomeScreen.kt } else { val replyScreenDetailsContentDescription = stringResource(R.string.details_screen) ReplyDetailsScreen( replyUiState = replyUiState, isFullScreen = true, onBackPressed = onDetailScreenBackPressed, modifier = modifier .testTag(replyScreenDetailsContentDescription) ) }
and in ReplyHomeContent.kt val activity = LocalContext.current as Activity val replyScreenDetailsContentDescription = stringResource(R.string.details_screen) ReplyDetailsScreen( replyUiState = replyUiState, modifier = Modifier .testTag(replyScreenDetailsContentDescription) .padding(top = dimensionResource(R.dimen.email_list_item_vertical_spacing)) .weight(1f), onBackPressed = { activity.finish() } )
The text was updated successfully, but these errors were encountered:
For this test to work:
// Verify that third email is displayed on the details screen composeTestRule.onNodeWithTagForStringId(R.string.details_screen).onChildren() .assertAny(hasAnyDescendant(hasText( composeTestRule.activity.getString(LocalEmailsDataProvider.allEmails[2].body))) )
the details_screen testTag needs to be added to the modifier in (at least) a couple of places. In ReplyHomeScreen.kt
} else { val replyScreenDetailsContentDescription = stringResource(R.string.details_screen) ReplyDetailsScreen( replyUiState = replyUiState, isFullScreen = true, onBackPressed = onDetailScreenBackPressed, modifier = modifier .testTag(replyScreenDetailsContentDescription) ) }
and in ReplyHomeContent.kt
val activity = LocalContext.current as Activity val replyScreenDetailsContentDescription = stringResource(R.string.details_screen) ReplyDetailsScreen( replyUiState = replyUiState, modifier = Modifier .testTag(replyScreenDetailsContentDescription) .padding(top = dimensionResource(R.dimen.email_list_item_vertical_spacing)) .weight(1f), onBackPressed = { activity.finish() } )
The text was updated successfully, but these errors were encountered: