BIT-2040 Correct redirect behavior for Import Items action (#1150)

This commit is contained in:
Patrick Honkonen
2024-06-20 17:08:07 +01:00
committed by Álison Fernandes
parent 143a46165c
commit 3ba2f704e3
3 changed files with 10 additions and 8 deletions
@@ -29,7 +29,7 @@ class VaultSettingsScreenTest : BaseComposeTest() {
private val mutableEventFlow = bufferedMutableSharedFlow<VaultSettingsEvent>()
private val mutableStateFlow = MutableStateFlow(
VaultSettingsState(
baseUrl = "testUrl", importUrl = "testUrl/#/tools/import",
importUrl = "testUrl/#/tools/import",
),
)
private val intentManager: IntentManager = mockk(relaxed = true) {
@@ -97,6 +97,14 @@ class VaultSettingsScreenTest : BaseComposeTest() {
}
}
@Test
fun `import items click should display dialog with importUrl`() {
composeTestRule.onNodeWithText("Import items").performClick()
composeTestRule
.onNodeWithText(mutableStateFlow.value.importUrl, substring = true)
.assertIsDisplayed()
}
@Test
fun `NavigateBack should call onNavigateBack`() {
mutableEventFlow.tryEmit(VaultSettingsEvent.NavigateBack)