https://github.com/faruktoptas/espresso-robot-pattern-sample
Espresso Robot Pattern Sample with Spoon Integration
https://github.com/faruktoptas/espresso-robot-pattern-sample
espresso kotlin pattern robot spoon ui-testing
Last synced: 6 months ago
JSON representation
Espresso Robot Pattern Sample with Spoon Integration
- Host: GitHub
- URL: https://github.com/faruktoptas/espresso-robot-pattern-sample
- Owner: faruktoptas
- License: apache-2.0
- Created: 2017-12-30T12:30:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-11T15:42:06.000Z (about 7 years ago)
- Last Synced: 2025-03-24T09:38:25.111Z (7 months ago)
- Topics: espresso, kotlin, pattern, robot, spoon, ui-testing
- Language: Kotlin
- Homepage: https://medium.com/android-bits/espresso-robot-pattern-in-kotlin-fc820ce250f7
- Size: 138 KB
- Stars: 43
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Espresso Robot Pattern Sample with Spoon Integration
A showcase project for Espresso Robot pattern written in Kotlin.
See the medium posts for more details:* [Espresso Robot Pattern in Kotlin](https://medium.com/android-bits/espresso-robot-pattern-in-kotlin-fc820ce250f7)
* [Running Espresso Tests on Multiple Devices with Spoon](https://medium.com/android-bits/running-espresso-tests-on-multiple-devices-with-spoon-842a5546e3d7)
```kotlin
@Test
fun loginMissingEmailPassword() {
login {
clickLogin()
matchErrorText(string(R.string.missing_fields))
}
}@Test
fun loginMissingPassword() {
login {
setEmail("mail@example.com")
clickLogin()
matchErrorText(string(R.string.missing_fields))
}
}@Test
fun loginWrongPassword() {
login {
setEmail("mail@example.com")
setPassword("wrong")
clickLogin()
matchErrorText(string(R.string.login_fail))
}}
@Test
fun loginSuccess() {
login {
setEmail("mail@example.com")
setPassword("pass")
clickLogin()
matchText(R.id.tvName, string(R.string.name_surname))
}
}@Test
fun loginProfileAndSettings() {
login {
setEmail("mail@example.com")
setPassword("pass")
clickLogin()
}
profile {
clickSettings()
toggleNotifications()
toggleNightMode()
}
}
```