Fill the blank
Tap the Add button and check that one note shows.
@get:Rule val compose = createComposeRule()
@Test
fun addShowsNote() {
compose.setContent { NotesTestScreen() }
compose.onNodeWithText("Add").____()
compose.onNodeWithText("Note 1").assertIsDisplayed()
}Hint 1 of 1
Actions on nodes start with perform.
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A performClick
Correct. It sends a click to the node.
Why not the others?
- B click. click() exists inside performTouchInput, not on the node.
- C assertIsDisplayed. That asserts; it doesn't tap.
- D invoke. Not a test action.