UI tests with Compose
By Moro
Shrek, Compose functions are the future!
Shrek, do you know something about testing?
Shrek, let’s try to test a Composable function..
Shrek, are you here?
FINE…
Let’s test a composable function.
According to the spec, we need to add the dependencies…
Sherek, before you ask, I found a composable function to test…
It is an app bar. I want to test the following behaviors:
FINE…
�Let’s do it.
We need to create a class defining the compose test rule.
Shrek, it is so beautiful. Is it a dream?
First test, we need to test if our Composable function is showing the button when there is a valid event…
Second test, we need to test if our Composable function hides the button when no event is passed…