How to test dynamic ui from Anko with expresso in Android
When I say dynamic UI I mean the UI you generated from a library like Anko
or just plain Android API.
1. Test whether the alert has been shown
1.1 Add a title for this alert
1 | alert{ |
1.2 Then assert it with the title
1 |
|
2.Check a TextEdit in an alert has been set to some error
2.1 Create a id
This is a file named ids.xml
in res/values
1 |
|
2.2 Apply it to your TextEdit
1 | alert { |
2.3 Assert in espresso like usual
1 | Espresso |
3. End
Hope it helps. :)
Thanks for reading!
Follow me (albertgao) on twitter, if you want to hear more about my interesting ideas.