Fix CI
This commit is contained in:
parent
a60364d304
commit
4290ec7e70
2 changed files with 6 additions and 3 deletions
|
|
@ -21,7 +21,6 @@ import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.MutableState
|
import androidx.compose.runtime.MutableState
|
||||||
import androidx.compose.runtime.collectAsState
|
import androidx.compose.runtime.collectAsState
|
||||||
import androidx.compose.runtime.derivedStateOf
|
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
|
|
|
||||||
|
|
@ -361,11 +361,15 @@ class MessagesPresenterTest {
|
||||||
assertThat(initialState.showReinvitePrompt).isFalse()
|
assertThat(initialState.showReinvitePrompt).isFalse()
|
||||||
// When the input field is focused we show the alert
|
// When the input field is focused we show the alert
|
||||||
initialState.composerState.eventSink(MessageComposerEvents.FocusChanged(true))
|
initialState.composerState.eventSink(MessageComposerEvents.FocusChanged(true))
|
||||||
val focusedState = awaitItem()
|
val focusedState = consumeItemsUntilPredicate { state ->
|
||||||
|
state.showReinvitePrompt
|
||||||
|
}.last()
|
||||||
assertThat(focusedState.showReinvitePrompt).isTrue()
|
assertThat(focusedState.showReinvitePrompt).isTrue()
|
||||||
// If it's dismissed then we stop showing the alert
|
// If it's dismissed then we stop showing the alert
|
||||||
initialState.eventSink(MessagesEvents.InviteDialogDismissed(InviteDialogAction.Cancel))
|
initialState.eventSink(MessagesEvents.InviteDialogDismissed(InviteDialogAction.Cancel))
|
||||||
val dismissedState = awaitItem()
|
val dismissedState = consumeItemsUntilPredicate { state ->
|
||||||
|
!state.showReinvitePrompt
|
||||||
|
}.last()
|
||||||
assertThat(dismissedState.showReinvitePrompt).isFalse()
|
assertThat(dismissedState.showReinvitePrompt).isFalse()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue