Fix test
This commit is contained in:
parent
fa9268175e
commit
00a00ecbe4
2 changed files with 12 additions and 5 deletions
|
|
@ -225,7 +225,10 @@ class ChangeRolesViewTest {
|
||||||
)
|
)
|
||||||
// Unselect the user from the row list
|
// Unselect the user from the row list
|
||||||
val contentDescription = rule.activity.getString(CommonStrings.action_remove)
|
val contentDescription = rule.activity.getString(CommonStrings.action_remove)
|
||||||
rule.onNodeWithContentDescription(contentDescription).performClick()
|
rule.onNodeWithContentDescription(
|
||||||
|
label = contentDescription,
|
||||||
|
useUnmergedTree = true,
|
||||||
|
).performClick()
|
||||||
eventsRecorder.assertList(
|
eventsRecorder.assertList(
|
||||||
listOf(
|
listOf(
|
||||||
ChangeRolesEvent.QueryChanged(""),
|
ChangeRolesEvent.QueryChanged(""),
|
||||||
|
|
@ -248,7 +251,7 @@ class ChangeRolesViewTest {
|
||||||
rule.setChangeRolesContent(
|
rule.setChangeRolesContent(
|
||||||
state = state,
|
state = state,
|
||||||
)
|
)
|
||||||
// Select the user from the row list
|
// Select the user from the user list
|
||||||
rule.onNodeWithText("Carol").performClick()
|
rule.onNodeWithText("Carol").performClick()
|
||||||
eventsRecorder.assertList(
|
eventsRecorder.assertList(
|
||||||
listOf(
|
listOf(
|
||||||
|
|
@ -271,8 +274,11 @@ class ChangeRolesViewTest {
|
||||||
rule.setChangeRolesContent(
|
rule.setChangeRolesContent(
|
||||||
state = state,
|
state = state,
|
||||||
)
|
)
|
||||||
// Select the user from the rom list
|
// Unselect the user from the user list
|
||||||
rule.onAllNodesWithText("Bob")[1].performClick()
|
rule.onAllNodesWithText(
|
||||||
|
text = "Bob",
|
||||||
|
useUnmergedTree = true,
|
||||||
|
)[1].performClick()
|
||||||
eventsRecorder.assertList(
|
eventsRecorder.assertList(
|
||||||
listOf(
|
listOf(
|
||||||
ChangeRolesEvent.QueryChanged(""),
|
ChangeRolesEvent.QueryChanged(""),
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,8 @@ fun SelectedUser(
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.Close(),
|
imageVector = CompoundIcons.Close(),
|
||||||
contentDescription = null,
|
// Note: keep the context description for the test
|
||||||
|
contentDescription = stringResource(id = CommonStrings.action_remove),
|
||||||
tint = ElementTheme.colors.iconOnSolidPrimary,
|
tint = ElementTheme.colors.iconOnSolidPrimary,
|
||||||
modifier = Modifier.padding(2.dp)
|
modifier = Modifier.padding(2.dp)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue