{"action":"created","issue":{"url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/218","repository_url":"https://api.github.com/repos/SchibstedSpain/Barista","labels_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/218/comments","events_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/218/events","html_url":"https://github.com/SchibstedSpain/Barista/issues/218","id":329670232,"node_id":"MDU6SXNzdWUzMjk2NzAyMzI=","number":218,"title":"Add hasErrorText to BaristaEditTextIteractios","user":{"login":"diogosq","id":2547281,"node_id":"MDQ6VXNlcjI1NDcyODE=","avatar_url":"https://avatars3.githubusercontent.com/u/2547281?v=4","gravatar_id":"","url":"https://api.github.com/users/diogosq","html_url":"https://github.com/diogosq","followers_url":"https://api.github.com/users/diogosq/followers","following_url":"https://api.github.com/users/diogosq/following{/other_user}","gists_url":"https://api.github.com/users/diogosq/gists{/gist_id}","starred_url":"https://api.github.com/users/diogosq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diogosq/subscriptions","organizations_url":"https://api.github.com/users/diogosq/orgs","repos_url":"https://api.github.com/users/diogosq/repos","events_url":"https://api.github.com/users/diogosq/events{/privacy}","received_events_url":"https://api.github.com/users/diogosq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-06T00:29:59Z","updated_at":"2018-06-28T09:36:30Z","closed_at":null,"author_association":"NONE","body":"Hello everyone\r\n\r\nI noticed that BaristaEditTextIteractios  does not have a check if edittext has an error message with a specific text.\r\n\r\nSo I created an extension for that. If it's of interest ...\r\n\r\n```kotlin\r\nfun BaristaEditTextInteractions.hasErrorText (@IdRes editTextId: Int, text: String) {\r\n     BaristaScrollInteractions.safelyScrollTo (editTextId)\r\n     Espresso.onView (DisplayedMatchers.displayedAnd (ViewMatchers.withId (editTextId)).) Check (ViewAssertions.matches (hasEditeTextErrorText (text)))\r\n}\r\n\r\nfun hasEditeTextErrorText (expectedErrorText: String): Matcher <View> {\r\n     return object: TypeSafeMatcher <View> () {\r\n\r\n         public override fun matchesSafely (view: View): Boolean {\r\n             if (view! is EditText) {\r\n                 return false\r\n             }\r\n\r\n             val error = view.error\r\n\r\n             return error! = null && expectedErrorText == error.toString ()\r\n\r\n         }\r\n\r\n         override fun describeTo (description: Description) {}\r\n     }\r\n} ```"},"comment":{"url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/comments/400975429","html_url":"https://github.com/SchibstedSpain/Barista/issues/218#issuecomment-400975429","issue_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/218","id":400975429,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDk3NTQyOQ==","user":{"login":"Sloy","id":545251,"node_id":"MDQ6VXNlcjU0NTI1MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/545251?v=4","gravatar_id":"","url":"https://api.github.com/users/Sloy","html_url":"https://github.com/Sloy","followers_url":"https://api.github.com/users/Sloy/followers","following_url":"https://api.github.com/users/Sloy/following{/other_user}","gists_url":"https://api.github.com/users/Sloy/gists{/gist_id}","starred_url":"https://api.github.com/users/Sloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sloy/subscriptions","organizations_url":"https://api.github.com/users/Sloy/orgs","repos_url":"https://api.github.com/users/Sloy/repos","events_url":"https://api.github.com/users/Sloy/events{/privacy}","received_events_url":"https://api.github.com/users/Sloy/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T09:36:30Z","updated_at":"2018-06-28T09:36:30Z","author_association":"MEMBER","body":"Hi @diogosq! Thanks for the heads up and the code.\r\nI think this will be addressed with the changes from PR #223. It includes `assertError` functions that checks for both EditText and TextInputLayout errors. \r\n\r\nWe'll set this issue as resolved when that code is merged :) "}}
{"actor":{"display_login":"Sloy"}}