Assertions & Performing Actions
Verify state and simulate user input.
Find, Then Verify
Finding a node is only half the job. To prove your UI behaves, you add an assertion that states what should be true about that node. ✅
assertIsDisplayed
The most common assertion is assertIsDisplayed. It confirms the node is actually visible to the user, not just present in the tree.
composeTestRule.onNodeWithText("Welcome")
.assertIsDisplayed()All lessons in this course
- createComposeRule & Finders
- Assertions & Performing Actions
- Semantics & Test Tags
- Testing ViewModels & Flows