Sample project to demonstrate unit testing of composable functions
Testing Composable in Jetpack Compose Android - Testing Fundamentals
- Initial state: Once we launch our activity, the first image would be our initial state with Start copying as the default text placed until we perform any click action on the Copy button. TextField remain empty with Input as label.
- Invalid state: User can enter any input text but we're checking it for Int type. So, if the input is not a number and user clicks on the Copy button then we'll show Invalid entry in place of Start copying label.
- Valid state: If user enter any number then we'll show the entered input along with text Counter = $input on click on Copy Button.