{"action":"created","comment":{"url":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/comments/109127304","pull_request_review_id":30208729,"id":109127304,"diff_hunk":"@@ -0,0 +1,61 @@\n+package com.schibsted.spain.barista.custom;\n+\n+import android.support.test.espresso.UiController;\n+import android.support.test.espresso.ViewAction;\n+import android.view.View;\n+import android.widget.TextView;\n+\n+import com.schibsted.spain.barista.util.ViewTreeAnalyzer;\n+\n+import org.hamcrest.Matcher;\n+\n+public class ClickChildAction {\n+\n+  public static ViewAction clickChildWithId(final int id) {\n+    return new ViewAction() {\n+      @Override\n+      public Matcher<View> getConstraints() {\n+        return null;\n+      }\n+\n+      @Override\n+      public String getDescription() {\n+        return \"Click on a child View with specified id\";\n+      }\n+\n+      @Override\n+      public void perform(UiController uiController, View view) {\n+        View child = view.findViewById(id);\n+        child.performClick();\n+      }\n+    };\n+  }\n+\n+  public static ViewAction clickChildWithText(final String text) {","path":"library/src/main/java/com/schibsted/spain/barista/custom/ClickChildAction.java","position":35,"original_position":34,"commit_id":"505f9be019959ac898a41eb95a1561bfb000295a","original_commit_id":"dcda25526ca8d96ae0d9503ce30f0f3343fba431","user":{"login":"Sloy","id":545251,"avatar_url":"https://avatars2.githubusercontent.com/u/545251?v=3","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},"body":"Okai 👍 ","created_at":"2017-03-31T09:57:47Z","updated_at":"2017-03-31T09:57:47Z","html_url":"https://github.com/SchibstedSpain/Barista/pull/40#discussion_r109127304","pull_request_url":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/comments/109127304"},"html":{"href":"https://github.com/SchibstedSpain/Barista/pull/40#discussion_r109127304"},"pull_request":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/40","id":113401449,"html_url":"https://github.com/SchibstedSpain/Barista/pull/40","diff_url":"https://github.com/SchibstedSpain/Barista/pull/40.diff","patch_url":"https://github.com/SchibstedSpain/Barista/pull/40.patch","issue_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/40","number":40,"state":"open","locked":false,"title":"Click button inside a Recycler's adapter","user":{"login":"rocboronat","id":456499,"avatar_url":"https://avatars0.githubusercontent.com/u/456499?v=3","gravatar_id":"","url":"https://api.github.com/users/rocboronat","html_url":"https://github.com/rocboronat","followers_url":"https://api.github.com/users/rocboronat/followers","following_url":"https://api.github.com/users/rocboronat/following{/other_user}","gists_url":"https://api.github.com/users/rocboronat/gists{/gist_id}","starred_url":"https://api.github.com/users/rocboronat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocboronat/subscriptions","organizations_url":"https://api.github.com/users/rocboronat/orgs","repos_url":"https://api.github.com/users/rocboronat/repos","events_url":"https://api.github.com/users/rocboronat/events{/privacy}","received_events_url":"https://api.github.com/users/rocboronat/received_events","type":"User","site_admin":false},"body":"This PR has not been too easy :·)\r\n\r\nTapping the item inside a row of an `Adapter` was not too hard, thanks to this StackOverflow question http://stackoverflow.com/questions/28476507/using-espresso-to-click-view-inside-recyclerview-item and an answer by http://stackoverflow.com/users/1270534/blade (thanks, **Blade**!)\r\n\r\nBy the way, adding this behavior broke some existing code. Why? When adding new buttons to the previously existing row, the top left corner of one of the button was appearing in the center of the row. As the usual `ViewActions.click()` doesn't use `perfomClick()` but just taps in the center of the view using a touch, that was clicking one of the new buttons instead of the row itself. For that reason, we needed to create a new `ViewAction` called `PerformClickAction` that does the click via `performClick()`.\r\n\r\nThe same happens on the old `ListView` actions, so it has been applied there, too :·)\r\n\r\n**So**! This PR adds the behavior of its title and also fixes a bug that was affecting to previous `BaristaRecyclerViewActions.performClick()` method.","created_at":"2017-03-30T11:02:40Z","updated_at":"2017-03-31T09:57:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d6f929acbd93d98303d2c6926064d26426b3894","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/40/commits","review_comments_url":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/40/comments","review_comment_url":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/40/comments","statuses_url":"https://api.github.com/repos/SchibstedSpain/Barista/statuses/505f9be019959ac898a41eb95a1561bfb000295a","head":{"label":"SchibstedSpain:click-button-inside-recyclers-adapter","ref":"click-button-inside-recyclers-adapter","sha":"505f9be019959ac898a41eb95a1561bfb000295a","user":{"login":"SchibstedSpain","id":18301133,"avatar_url":"https://avatars2.githubusercontent.com/u/18301133?v=3","gravatar_id":"","url":"https://api.github.com/users/SchibstedSpain","html_url":"https://github.com/SchibstedSpain","followers_url":"https://api.github.com/users/SchibstedSpain/followers","following_url":"https://api.github.com/users/SchibstedSpain/following{/other_user}","gists_url":"https://api.github.com/users/SchibstedSpain/gists{/gist_id}","starred_url":"https://api.github.com/users/SchibstedSpain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchibstedSpain/subscriptions","organizations_url":"https://api.github.com/users/SchibstedSpain/orgs","repos_url":"https://api.github.com/users/SchibstedSpain/repos","events_url":"https://api.github.com/users/SchibstedSpain/events{/privacy}","received_events_url":"https://api.github.com/users/SchibstedSpain/received_events","type":"Organization","site_admin":false},"repo":{"id":79541183,"name":"Barista","full_name":"SchibstedSpain/Barista","owner":{"login":"SchibstedSpain","id":18301133,"avatar_url":"https://avatars2.githubusercontent.com/u/18301133?v=3","gravatar_id":"","url":"https://api.github.com/users/SchibstedSpain","html_url":"https://github.com/SchibstedSpain","followers_url":"https://api.github.com/users/SchibstedSpain/followers","following_url":"https://api.github.com/users/SchibstedSpain/following{/other_user}","gists_url":"https://api.github.com/users/SchibstedSpain/gists{/gist_id}","starred_url":"https://api.github.com/users/SchibstedSpain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchibstedSpain/subscriptions","organizations_url":"https://api.github.com/users/SchibstedSpain/orgs","repos_url":"https://api.github.com/users/SchibstedSpain/repos","events_url":"https://api.github.com/users/SchibstedSpain/events{/privacy}","received_events_url":"https://api.github.com/users/SchibstedSpain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SchibstedSpain/Barista","description":"The guy who serves a great Espresso","fork":false,"url":"https://api.github.com/repos/SchibstedSpain/Barista","forks_url":"https://api.github.com/repos/SchibstedSpain/Barista/forks","keys_url":"https://api.github.com/repos/SchibstedSpain/Barista/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SchibstedSpain/Barista/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SchibstedSpain/Barista/teams","hooks_url":"https://api.github.com/repos/SchibstedSpain/Barista/hooks","issue_events_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/events{/number}","events_url":"https://api.github.com/repos/SchibstedSpain/Barista/events","assignees_url":"https://api.github.com/repos/SchibstedSpain/Barista/assignees{/user}","branches_url":"https://api.github.com/repos/SchibstedSpain/Barista/branches{/branch}","tags_url":"https://api.github.com/repos/SchibstedSpain/Barista/tags","blobs_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/refs{/sha}","trees_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SchibstedSpain/Barista/statuses/{sha}","languages_url":"https://api.github.com/repos/SchibstedSpain/Barista/languages","stargazers_url":"https://api.github.com/repos/SchibstedSpain/Barista/stargazers","contributors_url":"https://api.github.com/repos/SchibstedSpain/Barista/contributors","subscribers_url":"https://api.github.com/repos/SchibstedSpain/Barista/subscribers","subscription_url":"https://api.github.com/repos/SchibstedSpain/Barista/subscription","commits_url":"https://api.github.com/repos/SchibstedSpain/Barista/commits{/sha}","git_commits_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/commits{/sha}","comments_url":"https://api.github.com/repos/SchibstedSpain/Barista/comments{/number}","issue_comment_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/comments{/number}","contents_url":"https://api.github.com/repos/SchibstedSpain/Barista/contents/{+path}","compare_url":"https://api.github.com/repos/SchibstedSpain/Barista/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SchibstedSpain/Barista/merges","archive_url":"https://api.github.com/repos/SchibstedSpain/Barista/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SchibstedSpain/Barista/downloads","issues_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues{/number}","pulls_url":"https://api.github.com/repos/SchibstedSpain/Barista/pulls{/number}","milestones_url":"https://api.github.com/repos/SchibstedSpain/Barista/milestones{/number}","notifications_url":"https://api.github.com/repos/SchibstedSpain/Barista/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SchibstedSpain/Barista/labels{/name}","releases_url":"https://api.github.com/repos/SchibstedSpain/Barista/releases{/id}","deployments_url":"https://api.github.com/repos/SchibstedSpain/Barista/deployments","created_at":"2017-01-20T08:34:07Z","updated_at":"2017-03-30T18:46:42Z","pushed_at":"2017-03-31T09:54:48Z","git_url":"git://github.com/SchibstedSpain/Barista.git","ssh_url":"git@github.com:SchibstedSpain/Barista.git","clone_url":"https://github.com/SchibstedSpain/Barista.git","svn_url":"https://github.com/SchibstedSpain/Barista","homepage":"","size":300,"stargazers_count":61,"watchers_count":61,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":20,"forks":1,"open_issues":20,"watchers":61,"default_branch":"master"}},"base":{"label":"SchibstedSpain:master","ref":"master","sha":"380f64b276ebfcf4558d846623f534eaee663ef9","user":{"login":"SchibstedSpain","id":18301133,"avatar_url":"https://avatars2.githubusercontent.com/u/18301133?v=3","gravatar_id":"","url":"https://api.github.com/users/SchibstedSpain","html_url":"https://github.com/SchibstedSpain","followers_url":"https://api.github.com/users/SchibstedSpain/followers","following_url":"https://api.github.com/users/SchibstedSpain/following{/other_user}","gists_url":"https://api.github.com/users/SchibstedSpain/gists{/gist_id}","starred_url":"https://api.github.com/users/SchibstedSpain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchibstedSpain/subscriptions","organizations_url":"https://api.github.com/users/SchibstedSpain/orgs","repos_url":"https://api.github.com/users/SchibstedSpain/repos","events_url":"https://api.github.com/users/SchibstedSpain/events{/privacy}","received_events_url":"https://api.github.com/users/SchibstedSpain/received_events","type":"Organization","site_admin":false},"repo":{"id":79541183,"name":"Barista","full_name":"SchibstedSpain/Barista","owner":{"login":"SchibstedSpain","id":18301133,"avatar_url":"https://avatars2.githubusercontent.com/u/18301133?v=3","gravatar_id":"","url":"https://api.github.com/users/SchibstedSpain","html_url":"https://github.com/SchibstedSpain","followers_url":"https://api.github.com/users/SchibstedSpain/followers","following_url":"https://api.github.com/users/SchibstedSpain/following{/other_user}","gists_url":"https://api.github.com/users/SchibstedSpain/gists{/gist_id}","starred_url":"https://api.github.com/users/SchibstedSpain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchibstedSpain/subscriptions","organizations_url":"https://api.github.com/users/SchibstedSpain/orgs","repos_url":"https://api.github.com/users/SchibstedSpain/repos","events_url":"https://api.github.com/users/SchibstedSpain/events{/privacy}","received_events_url":"https://api.github.com/users/SchibstedSpain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SchibstedSpain/Barista","description":"The guy who serves a great Espresso","fork":false,"url":"https://api.github.com/repos/SchibstedSpain/Barista","forks_url":"https://api.github.com/repos/SchibstedSpain/Barista/forks","keys_url":"https://api.github.com/repos/SchibstedSpain/Barista/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SchibstedSpain/Barista/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SchibstedSpain/Barista/teams","hooks_url":"https://api.github.com/repos/SchibstedSpain/Barista/hooks","issue_events_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/events{/number}","events_url":"https://api.github.com/repos/SchibstedSpain/Barista/events","assignees_url":"https://api.github.com/repos/SchibstedSpain/Barista/assignees{/user}","branches_url":"https://api.github.com/repos/SchibstedSpain/Barista/branches{/branch}","tags_url":"https://api.github.com/repos/SchibstedSpain/Barista/tags","blobs_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/refs{/sha}","trees_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SchibstedSpain/Barista/statuses/{sha}","languages_url":"https://api.github.com/repos/SchibstedSpain/Barista/languages","stargazers_url":"https://api.github.com/repos/SchibstedSpain/Barista/stargazers","contributors_url":"https://api.github.com/repos/SchibstedSpain/Barista/contributors","subscribers_url":"https://api.github.com/repos/SchibstedSpain/Barista/subscribers","subscription_url":"https://api.github.com/repos/SchibstedSpain/Barista/subscription","commits_url":"https://api.github.com/repos/SchibstedSpain/Barista/commits{/sha}","git_commits_url":"https://api.github.com/repos/SchibstedSpain/Barista/git/commits{/sha}","comments_url":"https://api.github.com/repos/SchibstedSpain/Barista/comments{/number}","issue_comment_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues/comments{/number}","contents_url":"https://api.github.com/repos/SchibstedSpain/Barista/contents/{+path}","compare_url":"https://api.github.com/repos/SchibstedSpain/Barista/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SchibstedSpain/Barista/merges","archive_url":"https://api.github.com/repos/SchibstedSpain/Barista/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SchibstedSpain/Barista/downloads","issues_url":"https://api.github.com/repos/SchibstedSpain/Barista/issues{/number}","pulls_url":"https://api.github.com/repos/SchibstedSpain/Barista/pulls{/number}","milestones_url":"https://api.github.com/repos/SchibstedSpain/Barista/milestones{/number}","notifications_url":"https://api.github.com/repos/SchibstedSpain/Barista/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SchibstedSpain/Barista/labels{/name}","releases_url":"https://api.github.com/repos/SchibstedSpain/Barista/releases{/id}","deployments_url":"https://api.github.com/repos/SchibstedSpain/Barista/deployments","created_at":"2017-01-20T08:34:07Z","updated_at":"2017-03-30T18:46:42Z","pushed_at":"2017-03-31T09:54:48Z","git_url":"git://github.com/SchibstedSpain/Barista.git","ssh_url":"git@github.com:SchibstedSpain/Barista.git","clone_url":"https://github.com/SchibstedSpain/Barista.git","svn_url":"https://github.com/SchibstedSpain/Barista","homepage":"","size":300,"stargazers_count":61,"watchers_count":61,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":20,"forks":1,"open_issues":20,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/40"},"html":{"href":"https://github.com/SchibstedSpain/Barista/pull/40"},"issue":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/issues/40"},"comments":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/SchibstedSpain/Barista/statuses/505f9be019959ac898a41eb95a1561bfb000295a"}}}}
{"actor":{"display_login":"Sloy"}}