chanjungskim
03/06/2023, 4:08 AMInstrumentation run failed due to Process crashed.
error. Is there any solution?androidTest
.
@HiltAndroidTest
class VitaminScreenComposeTest {
@get:Rule(order = 0)
val hiltRule = HiltAndroidRule(this)
@get:Rule(order = 1)
val composeTestRule = createComposeRule()
@Test
fun entryQuestionLayout(){
val entryQuestionJson = loadFileText(this, "/surveyQuestion.json")
val entryQuestion = Gson().fromJsonToArrayList(entryQuestionJson, Question::class.java)[0]
composeTestRule.setContent {
VitaminScreen(false, entryQuestion, {},{},{})
}
composeTestRule.onNodeWithText("scientific").assertIsDisplayed()
composeTestRule.onNodeWithText("professional").assertIsDisplayed()
}
}
scientific
and professional
text are visible(I get this data from API). How can I wait and assert them here?