mirror of
https://github.com/bitwarden/android.git
synced 2026-11-20 11:37:52 -06:00
BIT-748: Settings about, rate app (#765)
This commit is contained in:
committed by
Álison Fernandes
parent
84346e2b29
commit
c2e6497fd8
+10
@@ -142,6 +142,16 @@ class AboutScreenTest : BaseComposeTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on NavigateToAboutSend should call launchUri on intentManager`() {
|
||||
mutableEventFlow.tryEmit(AboutEvent.NavigateToRateApp)
|
||||
verify {
|
||||
intentManager.launchUri(
|
||||
"https://play.google.com/store/apps/details?id=com.x8bit.bitwarden".toUri(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MaxLineLength")
|
||||
@Test
|
||||
fun `on rate the app click should display confirmation dialog and confirm click should emit RateAppClick`() {
|
||||
|
||||
+2
-2
@@ -49,11 +49,11 @@ class AboutViewModelTest : BaseViewModelTest() {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `on RateAppClick should emit ShowToast`() = runTest {
|
||||
fun `on RateAppClick should emit NavigateToRateApp`() = runTest {
|
||||
val viewModel = createViewModel(DEFAULT_ABOUT_STATE)
|
||||
viewModel.eventFlow.test {
|
||||
viewModel.trySendAction(AboutAction.RateAppClick)
|
||||
assertEquals(AboutEvent.ShowToast("Navigate to rate the app.".asText()), awaitItem())
|
||||
assertEquals(AboutEvent.NavigateToRateApp, awaitItem())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user