fix(test): use waitUntil and assertIsDisplayed in ChatViewModelScopeTest

This commit is contained in:
Ochenstarik 2026-08-25 10:06:34 +07:00
parent 97f2f929c3
commit 95a5633e5f

View file

@ -1,6 +1,6 @@
package app.hermes.mobile.feature.chat package app.hermes.mobile.feature.chat
import androidx.compose.ui.test.assertExists import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.onAllNodesWithText import androidx.compose.ui.test.onAllNodesWithText
import androidx.compose.ui.test.onNodeWithText import androidx.compose.ui.test.onNodeWithText
@ -52,6 +52,6 @@ class ChatViewModelScopeTest {
composeTestRule.onAllNodesWithText("Draft prompt before rotation", substring = true) composeTestRule.onAllNodesWithText("Draft prompt before rotation", substring = true)
.fetchSemanticsNodes().isNotEmpty() .fetchSemanticsNodes().isNotEmpty()
} }
composeTestRule.onNodeWithText("Draft prompt before rotation", substring = true).assertExists() composeTestRule.onNodeWithText("Draft prompt before rotation", substring = true).assertIsDisplayed()
} }
} }