payload: {"action":"created","comment":{"url":"https://api.github.com/repos/opendatakit/collect/pulls/comments/320051591","pull_request_review_id":282710046,"id":320051591,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMDA1MTU5MQ==","diff_hunk":"@@ -0,0 +1,282 @@\n+package org.odk.collect.android.formentry;\n+\n+import android.Manifest;\n+\n+import androidx.test.espresso.intent.rule.IntentsTestRule;\n+import androidx.test.rule.GrantPermissionRule;\n+\n+import org.junit.Rule;\n+import org.junit.Test;\n+import org.junit.rules.RuleChain;\n+import org.odk.collect.android.R;\n+import org.odk.collect.android.activities.FormEntryActivity;\n+import org.odk.collect.android.espressoutils.FormEntry;\n+import org.odk.collect.android.support.CopyFormRule;\n+import org.odk.collect.android.support.ResetStateRule;\n+import org.odk.collect.android.support.matchers.RecyclerViewMatcher;\n+import org.odk.collect.android.test.FormLoadingUtils;\n+\n+import static androidx.test.espresso.Espresso.onView;\n+import static androidx.test.espresso.action.ViewActions.click;\n+import static androidx.test.espresso.action.ViewActions.longClick;\n+import static androidx.test.espresso.assertion.ViewAssertions.matches;\n+import static androidx.test.espresso.matcher.ViewMatchers.withId;\n+import static androidx.test.espresso.matcher.ViewMatchers.withText;\n+\n+public class DeletingRepeatGroupsTest {\n+    private static final String TEST_FORM = \"repeat_groups.xml\";\n+\n+    @Rule\n+    public IntentsTestRule<FormEntryActivity> activityTestRule = FormLoadingUtils.getFormActivityTestRuleFor(TEST_FORM);\n+\n+    @Rule\n+    public RuleChain copyFormChain = RuleChain\n+            .outerRule(GrantPermissionRule.grant(\n+                    Manifest.permission.READ_EXTERNAL_STORAGE,\n+                    Manifest.permission.WRITE_EXTERNAL_STORAGE\n+                    )\n+            )\n+            .around(new ResetStateRule())\n+            .around(new CopyFormRule(TEST_FORM, null));\n+\n+    @Test\n+    public void testDeletingRepeatGroupsInForm() {","path":"collect_app/src/androidTest/java/org/odk/collect/android/formentry/DeletingRepeatGroupsTest.java","position":43,"original_position":43,"commit_id":"415df904eb2d86e4a6814622a5396c23bd4ef9d2","original_commit_id":"415df904eb2d86e4a6814622a5396c23bd4ef9d2","user":{"login":"lognaturel","id":967540,"node_id":"MDQ6VXNlcjk2NzU0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/967540?v=4","gravatar_id":"","url":"https://api.github.com/users/lognaturel","html_url":"https://github.com/lognaturel","followers_url":"https://api.github.com/users/lognaturel/followers","following_url":"https://api.github.com/users/lognaturel/following{/other_user}","gists_url":"https://api.github.com/users/lognaturel/gists{/gist_id}","starred_url":"https://api.github.com/users/lognaturel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lognaturel/subscriptions","organizations_url":"https://api.github.com/users/lognaturel/orgs","repos_url":"https://api.github.com/users/lognaturel/repos","events_url":"https://api.github.com/users/lognaturel/events{/privacy}","received_events_url":"https://api.github.com/users/lognaturel/received_events","type":"User","site_admin":false},"body":"I see two high-level issues with these tests:\r\n- they're going to take a long time to run because there's a lot of swiping back and forth\r\n- if one fails, it's going to be hard to know what that means since the cases aren't identified\r\n\r\nWhat are the cases that need to be verified? Seems to me that they are deleting the first repeat, deleting the last repeat and deleting some repeat in the middle. What is the fourth case you have? Is it necessary? \r\n\r\nWhy are all of the repeats after the deleted ones verified? Would perhaps just checking the one before and the one after be enough?\r\n\r\nWhy are there two questions in each repeat? I think it's to visually differentiate the field list and non-field list case but does that actually matter for the test? That is, would the field list test fail before the fix even if there was just a single question in each repeat? I think so and in that case, it'd be simpler to have a single question in each.\r\n\r\nSince populating the repeats is not part of the test, could you set the form definition to include them? I mean having something like the following in the form definition `instance` block:\r\n```\r\n<repeatGroup>\r\n  <text>foo</text>\r\n</repeatGroup>\r\n<repeatGroup>\r\n  <text>bar</text>\r\n</repeatGroup>\r\n...\r\n<repeatGroupFieldList>\r\n  <number>12</number>\r\n</repeatGroupFieldList>\r\n<repeatGroupFieldList>\r\n  <number>24</number>\r\n</repeatGroupFieldList>\r\n```\r\n\r\nThat way you can jump directly to the repeat to delete and avoid a lot of the swiping.\r\n\r\nThen it also makes it easier to have independent cases like `requestingDeletionOfFirstRepeat_deletesFirstRepeat` and `requestingDeletionOfMiddleRepeat_deletesMiddleRepeat`.","created_at":"2019-09-02T22:27:18Z","updated_at":"2019-09-02T22:28:03Z","html_url":"https://github.com/opendatakit/collect/pull/3327#discussion_r320051591","pull_request_url":"https://api.github.com/repos/opendatakit/collect/pulls/3327","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/opendatakit/collect/pulls/comments/320051591"},"html":{"href":"https://github.com/opendatakit/collect/pull/3327#discussion_r320051591"},"pull_request":{"href":"https://api.github.com/repos/opendatakit/collect/pulls/3327"}}},"pull_request":{"url":"https://api.github.com/repos/opendatakit/collect/pulls/3327","id":312680920,"node_id":"MDExOlB1bGxSZXF1ZXN0MzEyNjgwOTIw","html_url":"https://github.com/opendatakit/collect/pull/3327","diff_url":"https://github.com/opendatakit/collect/pull/3327.diff","patch_url":"https://github.com/opendatakit/collect/pull/3327.patch","issue_url":"https://api.github.com/repos/opendatakit/collect/issues/3327","number":3327,"state":"open","locked":false,"title":"Fixed removing repeat groups","user":{"login":"grzesiek2010","id":3276264,"node_id":"MDQ6VXNlcjMyNzYyNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3276264?v=4","gravatar_id":"","url":"https://api.github.com/users/grzesiek2010","html_url":"https://github.com/grzesiek2010","followers_url":"https://api.github.com/users/grzesiek2010/followers","following_url":"https://api.github.com/users/grzesiek2010/following{/other_user}","gists_url":"https://api.github.com/users/grzesiek2010/gists{/gist_id}","starred_url":"https://api.github.com/users/grzesiek2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grzesiek2010/subscriptions","organizations_url":"https://api.github.com/users/grzesiek2010/orgs","repos_url":"https://api.github.com/users/grzesiek2010/repos","events_url":"https://api.github.com/users/grzesiek2010/events{/privacy}","received_events_url":"https://api.github.com/users/grzesiek2010/received_events","type":"User","site_admin":false},"body":"Closes #3033\r\n\r\n#### What has been done to verify that this works as intended?\r\nI tested implemented changes manually and added automated tests.\r\n\r\n#### Why is this the best possible solution? Were any other approaches considered?\r\nIt was a regression, we fixed one issue 2 years ago https://github.com/opendatakit/collect/pull/1034 which introduced this problem so I just combined two solutions to handle both cases.\r\n\r\n#### How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?\r\nThe change is not very risky, I added automated tests so testing the form attached to this pr would be enough but @mmarciniak90 you can try some more complicated forms of course as well to be sure everything is fine.\r\n\r\n#### Do we need any specific form for testing your changes? If so, please attach one.\r\nThe form attached to this pr https://github.com/opendatakit/collect/compare/master...grzesiek2010:COLLECT-3033?expand=1#diff-fe55d3110049e63221b4a8a2a49067cb\r\n\r\n#### Does this change require updates to documentation? If so, please file an issue [here]( https://github.com/opendatakit/docs/issues/new) and include the link below.\r\nNo.\r\n\r\n#### Before submitting this PR, please make sure you have:\r\n- [x] run `./gradlew checkAll` and confirmed all checks still pass OR confirm CircleCI build passes and run `./gradlew connectedDebugAndroidTest` locally.\r\n- [x] verified that any code or assets from external sources are properly credited in comments and/or in the [about file](https://github.com/opendatakit/collect/blob/master/collect_app/src/main/assets/open_source_licenses.html).\r\n- [x] verified that any new UI elements use theme colors. [UI Components Style guidelines](https://github.com/opendatakit/collect/blob/master/CONTRIBUTING.md#ui-components-style-guidelines)","created_at":"2019-08-30T10:29:59Z","updated_at":"2019-09-02T22:28:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"432b0fb07fb10a70e4b1783e7f1fa1d15d7a145c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/opendatakit/collect/pulls/3327/commits","review_comments_url":"https://api.github.com/repos/opendatakit/collect/pulls/3327/comments","review_comment_url":"https://api.github.com/repos/opendatakit/collect/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opendatakit/collect/issues/3327/comments","statuses_url":"https://api.github.com/repos/opendatakit/collect/statuses/415df904eb2d86e4a6814622a5396c23bd4ef9d2","head":{"label":"grzesiek2010:COLLECT-3033","ref":"COLLECT-3033","sha":"415df904eb2d86e4a6814622a5396c23bd4ef9d2","user":{"login":"grzesiek2010","id":3276264,"node_id":"MDQ6VXNlcjMyNzYyNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3276264?v=4","gravatar_id":"","url":"https://api.github.com/users/grzesiek2010","html_url":"https://github.com/grzesiek2010","followers_url":"https://api.github.com/users/grzesiek2010/followers","following_url":"https://api.github.com/users/grzesiek2010/following{/other_user}","gists_url":"https://api.github.com/users/grzesiek2010/gists{/gist_id}","starred_url":"https://api.github.com/users/grzesiek2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grzesiek2010/subscriptions","organizations_url":"https://api.github.com/users/grzesiek2010/orgs","repos_url":"https://api.github.com/users/grzesiek2010/repos","events_url":"https://api.github.com/users/grzesiek2010/events{/privacy}","received_events_url":"https://api.github.com/users/grzesiek2010/received_events","type":"User","site_admin":false},"repo":{"id":75389799,"node_id":"MDEwOlJlcG9zaXRvcnk3NTM4OTc5OQ==","name":"collect","full_name":"grzesiek2010/collect","private":false,"owner":{"login":"grzesiek2010","id":3276264,"node_id":"MDQ6VXNlcjMyNzYyNjQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3276264?v=4","gravatar_id":"","url":"https://api.github.com/users/grzesiek2010","html_url":"https://github.com/grzesiek2010","followers_url":"https://api.github.com/users/grzesiek2010/followers","following_url":"https://api.github.com/users/grzesiek2010/following{/other_user}","gists_url":"https://api.github.com/users/grzesiek2010/gists{/gist_id}","starred_url":"https://api.github.com/users/grzesiek2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grzesiek2010/subscriptions","organizations_url":"https://api.github.com/users/grzesiek2010/orgs","repos_url":"https://api.github.com/users/grzesiek2010/repos","events_url":"https://api.github.com/users/grzesiek2010/events{/privacy}","received_events_url":"https://api.github.com/users/grzesiek2010/received_events","type":"User","site_admin":false},"html_url":"https://github.com/grzesiek2010/collect","description":"ODK Collect is an Android app for filling out forms. It's been used to collect millions of data points in challenging environments around the world. Contribute and make the world a better place! ✨🌍✨","fork":true,"url":"https://api.github.com/repos/grzesiek2010/collect","forks_url":"https://api.github.com/repos/grzesiek2010/collect/forks","keys_url":"https://api.github.com/repos/grzesiek2010/collect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grzesiek2010/collect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grzesiek2010/collect/teams","hooks_url":"https://api.github.com/repos/grzesiek2010/collect/hooks","issue_events_url":"https://api.github.com/repos/grzesiek2010/collect/issues/events{/number}","events_url":"https://api.github.com/repos/grzesiek2010/collect/events","assignees_url":"https://api.github.com/repos/grzesiek2010/collect/assignees{/user}","branches_url":"https://api.github.com/repos/grzesiek2010/collect/branches{/branch}","tags_url":"https://api.github.com/repos/grzesiek2010/collect/tags","blobs_url":"https://api.github.com/repos/grzesiek2010/collect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grzesiek2010/collect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grzesiek2010/collect/git/refs{/sha}","trees_url":"https://api.github.com/repos/grzesiek2010/collect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grzesiek2010/collect/statuses/{sha}","languages_url":"https://api.github.com/repos/grzesiek2010/collect/languages","stargazers_url":"https://api.github.com/repos/grzesiek2010/collect/stargazers","contributors_url":"https://api.github.com/repos/grzesiek2010/collect/contributors","subscribers_url":"https://api.github.com/repos/grzesiek2010/collect/subscribers","subscription_url":"https://api.github.com/repos/grzesiek2010/collect/subscription","commits_url":"https://api.github.com/repos/grzesiek2010/collect/commits{/sha}","git_commits_url":"https://api.github.com/repos/grzesiek2010/collect/git/commits{/sha}","comments_url":"https://api.github.com/repos/grzesiek2010/collect/comments{/number}","issue_comment_url":"https://api.github.com/repos/grzesiek2010/collect/issues/comments{/number}","contents_url":"https://api.github.com/repos/grzesiek2010/collect/contents/{+path}","compare_url":"https://api.github.com/repos/grzesiek2010/collect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grzesiek2010/collect/merges","archive_url":"https://api.github.com/repos/grzesiek2010/collect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grzesiek2010/collect/downloads","issues_url":"https://api.github.com/repos/grzesiek2010/collect/issues{/number}","pulls_url":"https://api.github.com/repos/grzesiek2010/collect/pulls{/number}","milestones_url":"https://api.github.com/repos/grzesiek2010/collect/milestones{/number}","notifications_url":"https://api.github.com/repos/grzesiek2010/collect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grzesiek2010/collect/labels{/name}","releases_url":"https://api.github.com/repos/grzesiek2010/collect/releases{/id}","deployments_url":"https://api.github.com/repos/grzesiek2010/collect/deployments","created_at":"2016-12-02T11:26:41Z","updated_at":"2018-05-24T19:10:02Z","pushed_at":"2019-08-30T13:54:50Z","git_url":"git://github.com/grzesiek2010/collect.git","ssh_url":"git@github.com:grzesiek2010/collect.git","clone_url":"https://github.com/grzesiek2010/collect.git","svn_url":"https://github.com/grzesiek2010/collect","homepage":"https://github.com/opendatakit/collect","size":48473,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opendatakit:master","ref":"master","sha":"fef3495aa6c1b1cd9d4e4eefa4f3fef412b9e971","user":{"login":"opendatakit","id":6222985,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMjI5ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/6222985?v=4","gravatar_id":"","url":"https://api.github.com/users/opendatakit","html_url":"https://github.com/opendatakit","followers_url":"https://api.github.com/users/opendatakit/followers","following_url":"https://api.github.com/users/opendatakit/following{/other_user}","gists_url":"https://api.github.com/users/opendatakit/gists{/gist_id}","starred_url":"https://api.github.com/users/opendatakit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opendatakit/subscriptions","organizations_url":"https://api.github.com/users/opendatakit/orgs","repos_url":"https://api.github.com/users/opendatakit/repos","events_url":"https://api.github.com/users/opendatakit/events{/privacy}","received_events_url":"https://api.github.com/users/opendatakit/received_events","type":"Organization","site_admin":false},"repo":{"id":40213809,"node_id":"MDEwOlJlcG9zaXRvcnk0MDIxMzgwOQ==","name":"collect","full_name":"opendatakit/collect","private":false,"owner":{"login":"opendatakit","id":6222985,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyMjI5ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/6222985?v=4","gravatar_id":"","url":"https://api.github.com/users/opendatakit","html_url":"https://github.com/opendatakit","followers_url":"https://api.github.com/users/opendatakit/followers","following_url":"https://api.github.com/users/opendatakit/following{/other_user}","gists_url":"https://api.github.com/users/opendatakit/gists{/gist_id}","starred_url":"https://api.github.com/users/opendatakit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opendatakit/subscriptions","organizations_url":"https://api.github.com/users/opendatakit/orgs","repos_url":"https://api.github.com/users/opendatakit/repos","events_url":"https://api.github.com/users/opendatakit/events{/privacy}","received_events_url":"https://api.github.com/users/opendatakit/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/opendatakit/collect","description":"ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨","fork":false,"url":"https://api.github.com/repos/opendatakit/collect","forks_url":"https://api.github.com/repos/opendatakit/collect/forks","keys_url":"https://api.github.com/repos/opendatakit/collect/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opendatakit/collect/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opendatakit/collect/teams","hooks_url":"https://api.github.com/repos/opendatakit/collect/hooks","issue_events_url":"https://api.github.com/repos/opendatakit/collect/issues/events{/number}","events_url":"https://api.github.com/repos/opendatakit/collect/events","assignees_url":"https://api.github.com/repos/opendatakit/collect/assignees{/user}","branches_url":"https://api.github.com/repos/opendatakit/collect/branches{/branch}","tags_url":"https://api.github.com/repos/opendatakit/collect/tags","blobs_url":"https://api.github.com/repos/opendatakit/collect/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opendatakit/collect/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opendatakit/collect/git/refs{/sha}","trees_url":"https://api.github.com/repos/opendatakit/collect/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opendatakit/collect/statuses/{sha}","languages_url":"https://api.github.com/repos/opendatakit/collect/languages","stargazers_url":"https://api.github.com/repos/opendatakit/collect/stargazers","contributors_url":"https://api.github.com/repos/opendatakit/collect/contributors","subscribers_url":"https://api.github.com/repos/opendatakit/collect/subscribers","subscription_url":"https://api.github.com/repos/opendatakit/collect/subscription","commits_url":"https://api.github.com/repos/opendatakit/collect/commits{/sha}","git_commits_url":"https://api.github.com/repos/opendatakit/collect/git/commits{/sha}","comments_url":"https://api.github.com/repos/opendatakit/collect/comments{/number}","issue_comment_url":"https://api.github.com/repos/opendatakit/collect/issues/comments{/number}","contents_url":"https://api.github.com/repos/opendatakit/collect/contents/{+path}","compare_url":"https://api.github.com/repos/opendatakit/collect/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opendatakit/collect/merges","archive_url":"https://api.github.com/repos/opendatakit/collect/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opendatakit/collect/downloads","issues_url":"https://api.github.com/repos/opendatakit/collect/issues{/number}","pulls_url":"https://api.github.com/repos/opendatakit/collect/pulls{/number}","milestones_url":"https://api.github.com/repos/opendatakit/collect/milestones{/number}","notifications_url":"https://api.github.com/repos/opendatakit/collect/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opendatakit/collect/labels{/name}","releases_url":"https://api.github.com/repos/opendatakit/collect/releases{/id}","deployments_url":"https://api.github.com/repos/opendatakit/collect/deployments","created_at":"2015-08-04T23:21:33Z","updated_at":"2019-09-02T13:54:12Z","pushed_at":"2019-09-02T13:35:21Z","git_url":"git://github.com/opendatakit/collect.git","ssh_url":"git@github.com:opendatakit/collect.git","clone_url":"https://github.com/opendatakit/collect.git","svn_url":"https://github.com/opendatakit/collect","homepage":"https://docs.opendatakit.org/collect-intro","size":46957,"stargazers_count":421,"watchers_count":421,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":910,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":223,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":910,"open_issues":223,"watchers":421,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opendatakit/collect/pulls/3327"},"html":{"href":"https://github.com/opendatakit/collect/pull/3327"},"issue":{"href":"https://api.github.com/repos/opendatakit/collect/issues/3327"},"comments":{"href":"https://api.github.com/repos/opendatakit/collect/issues/3327/comments"},"review_comments":{"href":"https://api.github.com/repos/opendatakit/collect/pulls/3327/comments"},"review_comment":{"href":"https://api.github.com/repos/opendatakit/collect/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opendatakit/collect/pulls/3327/commits"},"statuses":{"href":"https://api.github.com/repos/opendatakit/collect/statuses/415df904eb2d86e4a6814622a5396c23bd4ef9d2"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"lognaturel"}}