{"action":"created","comment":{"url":"https://api.github.com/repos/systers/vms/pulls/comments/200245656","pull_request_review_id":134521941,"id":200245656,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDI0NTY1Ng==","diff_hunk":"@@ -406,31 +442,150 @@ def test_volunteer_organization_field(self):\n         self.assertTrue(expected_result_one in result)\n         self.assertTrue(expected_result_two in result)\n \n-        search_page.search_organization_field('vol-')\n+    def test_volunteer_event_field(self):\n+        search_page = self.search_page\n+        search_page.live_server_url = self.live_server_url\n+        search_page.navigate_to_volunteer_search_page()\n+\n+        credentials_1 = [\n+            'volunteer-username', 'volunteer-first-name',\n+            'volunteer-last-name', 'volunteer-address', 'volunteer-city',\n+            'volunteer-state', 'volunteer-country', '9999999999',\n+            'volunteer-email@systers.org', 'volunteer-organization'\n+        ]\n+\n+        volunteer_1 = create_volunteer_with_details(credentials_1)\n+\n+        credentials_2 = [\n+            'volunteer-usernameq', 'volunteer-first-nameq',\n+            'volunteer-last-nameq', 'volunteer-addressq', 'volunteer-cityq',\n+            'volunteer-stateq', 'volunteer-countryq', '9999999999',\n+            'volunteer-email2@systers.orgq', 'volunteer-organizationq'\n+        ]\n+\n+        volunteer_2 = create_volunteer_with_details(credentials_2)\n+\n+        event = register_event_utility()\n+        job = register_job_utility()\n+        shift = register_shift_utility()\n+\n+        expected_result_one = credentials_1[1:-1]\n+        expected_result_two = credentials_2[1:-1]\n+\n+        # search events with no volunteers\n+        search_page.search_event_field(event.id)\n         search_page.submit_form()\n+        search_results = search_page.get_search_results()\n+        result = search_page.get_results_list(search_results)\n+        self.assertEqual(len(result), 0)\n+        self.assertRaisesRegexp(NoSuchElementException,\n+                                'Unable to locate element: //table//tbody',\n+                                search_page.get_search_results)\n \n-        with self.assertRaises(NoSuchElementException):\n-            search_results = search_page.get_search_results()\n+        # volunteer_1 registered for event_1\n+        register_volunteer_for_shift_utility(shift, volunteer_1)\n \n-        search_page.search_organization_field('volunteer-fail-test')\n+        # search event_1\n+        search_page.navigate_to_volunteer_search_page()\n+        search_page.search_event_field(event.id)\n         search_page.submit_form()\n+        search_results = search_page.get_search_results()\n+        result = search_page.get_results_list(search_results)\n+        self.assertEqual(len(result), 1)\n+        self.assertTrue(expected_result_one in result)\n \n-        with self.assertRaises(NoSuchElementException):\n-            search_results = search_page.get_search_results()\n+        # volunteer_1 and volunteer_2 both registered for event_1\n+        register_volunteer_for_shift_utility(shift, volunteer_2)\n \n-        search_page.search_organization_field('!@#$%^&*()_')\n+        # search event_1\n+        search_page.navigate_to_volunteer_search_page()\n+        search_page.search_event_field(event.id)\n         search_page.submit_form()\n-        self.assertNotEqual(search_page.get_help_block(), None)\n+        search_results = search_page.get_search_results()\n+        result = search_page.get_results_list(search_results)\n+        self.assertEqual(len(result), 2)\n+        self.assertTrue(expected_result_one in result)\n+        self.assertTrue(expected_result_two in result)\n+\n+    def test_volunteer_job_field(self):\n+        search_page = self.search_page\n+        search_page.live_server_url = self.live_server_url\n+        search_page.navigate_to_volunteer_search_page()\n+\n+        credentials_1 = [\n+            'volunteer-username', 'volunteer-first-name',\n+            'volunteer-last-name', 'volunteer-address', 'volunteer-city',\n+            'volunteer-state', 'volunteer-country', '9999999999',\n+            'volunteer-email@systers.org', 'volunteer-organization'\n+        ]\n+\n+        volunteer_1 = create_volunteer_with_details(credentials_1)\n+\n+        credentials_2 = [\n+            'volunteer-usernameq', 'volunteer-first-nameq',\n+            'volunteer-last-nameq', 'volunteer-addressq', 'volunteer-cityq',\n+            'volunteer-stateq', 'volunteer-countryq', '9999999999',\n+            'volunteer-email2@systers.orgq', 'volunteer-organizationq'\n+        ]\n+\n+        volunteer_2 = create_volunteer_with_details(credentials_2)\n+\n+        event = register_event_utility()","path":"vms/volunteer/tests/test_searchVolunteer.py","position":426,"original_position":498,"commit_id":"c51fcb7acd0411c496245b85e8819e41ca8c8c44","original_commit_id":"c51fcb7acd0411c496245b85e8819e41ca8c8c44","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Unused variable 'event'](https://app.codacy.com/app/Systers/vms/pullRequest?prid=1850355)","created_at":"2018-07-05T06:39:24Z","updated_at":"2018-07-05T06:39:24Z","html_url":"https://github.com/systers/vms/pull/774#discussion_r200245656","pull_request_url":"https://api.github.com/repos/systers/vms/pulls/774","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/systers/vms/pulls/comments/200245656"},"html":{"href":"https://github.com/systers/vms/pull/774#discussion_r200245656"},"pull_request":{"href":"https://api.github.com/repos/systers/vms/pulls/774"}}},"pull_request":{"url":"https://api.github.com/repos/systers/vms/pulls/774","id":198649568,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NjQ5NTY4","html_url":"https://github.com/systers/vms/pull/774","diff_url":"https://github.com/systers/vms/pull/774.diff","patch_url":"https://github.com/systers/vms/pull/774.patch","issue_url":"https://api.github.com/repos/systers/vms/issues/774","number":774,"state":"open","locked":false,"title":"Event and job fields add in Volunteer search form","user":{"login":"anjali-dhanuka","id":22369767,"node_id":"MDQ6VXNlcjIyMzY5NzY3","avatar_url":"https://avatars3.githubusercontent.com/u/22369767?v=4","gravatar_id":"","url":"https://api.github.com/users/anjali-dhanuka","html_url":"https://github.com/anjali-dhanuka","followers_url":"https://api.github.com/users/anjali-dhanuka/followers","following_url":"https://api.github.com/users/anjali-dhanuka/following{/other_user}","gists_url":"https://api.github.com/users/anjali-dhanuka/gists{/gist_id}","starred_url":"https://api.github.com/users/anjali-dhanuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjali-dhanuka/subscriptions","organizations_url":"https://api.github.com/users/anjali-dhanuka/orgs","repos_url":"https://api.github.com/users/anjali-dhanuka/repos","events_url":"https://api.github.com/users/anjali-dhanuka/events{/privacy}","received_events_url":"https://api.github.com/users/anjali-dhanuka/received_events","type":"User","site_admin":false},"body":"# Description\r\nAdd event and job in search volunteer form\r\n\r\nFixes #773 \r\n\r\n# Type of Change:\r\n- Code\r\n- Quality Assurance\r\n\r\n**Code/Quality Assurance Only**\r\n- New feature (non-breaking change which adds functionality pre-approved by mentors)\r\n\r\n# How Has This Been Tested?\r\n![image](https://user-images.githubusercontent.com/22369767/42161441-9e27aa32-7e18-11e8-816c-1e07978e58eb.png)\r\n\r\n\r\n# Checklist:\r\n- [ ] My PR follows the style guidelines of this project\r\n- [ ] I have performed a self-review of my own code or materials\r\n- [ ] I have commented my code or provided relevant documentation, particularly in hard-to-understand areas\r\n- [ ] I have made corresponding changes to the documentation\r\n- [ ] Any dependent changes have been merged \r\n\r\n**Code/Quality Assurance Only**\r\n- [ ] My changes generate no new warnings \r\n- [ ] I have added tests that prove my fix is effective or that my feature works\r\n- [ ] New and existing unit tests pass locally with my changes\r\n- [ ] Any dependent changes have been published in downstream modules\r\n","created_at":"2018-07-02T11:25:13Z","updated_at":"2018-07-05T06:39:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6427b95e2780425392ada75e220a5a30fc25c5d7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/systers/vms/pulls/774/commits","review_comments_url":"https://api.github.com/repos/systers/vms/pulls/774/comments","review_comment_url":"https://api.github.com/repos/systers/vms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systers/vms/issues/774/comments","statuses_url":"https://api.github.com/repos/systers/vms/statuses/c51fcb7acd0411c496245b85e8819e41ca8c8c44","head":{"label":"anjali-dhanuka:volunteer_search","ref":"volunteer_search","sha":"c51fcb7acd0411c496245b85e8819e41ca8c8c44","user":{"login":"anjali-dhanuka","id":22369767,"node_id":"MDQ6VXNlcjIyMzY5NzY3","avatar_url":"https://avatars3.githubusercontent.com/u/22369767?v=4","gravatar_id":"","url":"https://api.github.com/users/anjali-dhanuka","html_url":"https://github.com/anjali-dhanuka","followers_url":"https://api.github.com/users/anjali-dhanuka/followers","following_url":"https://api.github.com/users/anjali-dhanuka/following{/other_user}","gists_url":"https://api.github.com/users/anjali-dhanuka/gists{/gist_id}","starred_url":"https://api.github.com/users/anjali-dhanuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjali-dhanuka/subscriptions","organizations_url":"https://api.github.com/users/anjali-dhanuka/orgs","repos_url":"https://api.github.com/users/anjali-dhanuka/repos","events_url":"https://api.github.com/users/anjali-dhanuka/events{/privacy}","received_events_url":"https://api.github.com/users/anjali-dhanuka/received_events","type":"User","site_admin":false},"repo":{"id":113863490,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM4NjM0OTA=","name":"vms","full_name":"anjali-dhanuka/vms","owner":{"login":"anjali-dhanuka","id":22369767,"node_id":"MDQ6VXNlcjIyMzY5NzY3","avatar_url":"https://avatars3.githubusercontent.com/u/22369767?v=4","gravatar_id":"","url":"https://api.github.com/users/anjali-dhanuka","html_url":"https://github.com/anjali-dhanuka","followers_url":"https://api.github.com/users/anjali-dhanuka/followers","following_url":"https://api.github.com/users/anjali-dhanuka/following{/other_user}","gists_url":"https://api.github.com/users/anjali-dhanuka/gists{/gist_id}","starred_url":"https://api.github.com/users/anjali-dhanuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anjali-dhanuka/subscriptions","organizations_url":"https://api.github.com/users/anjali-dhanuka/orgs","repos_url":"https://api.github.com/users/anjali-dhanuka/repos","events_url":"https://api.github.com/users/anjali-dhanuka/events{/privacy}","received_events_url":"https://api.github.com/users/anjali-dhanuka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anjali-dhanuka/vms","description":"Volunteer Management System","fork":true,"url":"https://api.github.com/repos/anjali-dhanuka/vms","forks_url":"https://api.github.com/repos/anjali-dhanuka/vms/forks","keys_url":"https://api.github.com/repos/anjali-dhanuka/vms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anjali-dhanuka/vms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anjali-dhanuka/vms/teams","hooks_url":"https://api.github.com/repos/anjali-dhanuka/vms/hooks","issue_events_url":"https://api.github.com/repos/anjali-dhanuka/vms/issues/events{/number}","events_url":"https://api.github.com/repos/anjali-dhanuka/vms/events","assignees_url":"https://api.github.com/repos/anjali-dhanuka/vms/assignees{/user}","branches_url":"https://api.github.com/repos/anjali-dhanuka/vms/branches{/branch}","tags_url":"https://api.github.com/repos/anjali-dhanuka/vms/tags","blobs_url":"https://api.github.com/repos/anjali-dhanuka/vms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anjali-dhanuka/vms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anjali-dhanuka/vms/git/refs{/sha}","trees_url":"https://api.github.com/repos/anjali-dhanuka/vms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anjali-dhanuka/vms/statuses/{sha}","languages_url":"https://api.github.com/repos/anjali-dhanuka/vms/languages","stargazers_url":"https://api.github.com/repos/anjali-dhanuka/vms/stargazers","contributors_url":"https://api.github.com/repos/anjali-dhanuka/vms/contributors","subscribers_url":"https://api.github.com/repos/anjali-dhanuka/vms/subscribers","subscription_url":"https://api.github.com/repos/anjali-dhanuka/vms/subscription","commits_url":"https://api.github.com/repos/anjali-dhanuka/vms/commits{/sha}","git_commits_url":"https://api.github.com/repos/anjali-dhanuka/vms/git/commits{/sha}","comments_url":"https://api.github.com/repos/anjali-dhanuka/vms/comments{/number}","issue_comment_url":"https://api.github.com/repos/anjali-dhanuka/vms/issues/comments{/number}","contents_url":"https://api.github.com/repos/anjali-dhanuka/vms/contents/{+path}","compare_url":"https://api.github.com/repos/anjali-dhanuka/vms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anjali-dhanuka/vms/merges","archive_url":"https://api.github.com/repos/anjali-dhanuka/vms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anjali-dhanuka/vms/downloads","issues_url":"https://api.github.com/repos/anjali-dhanuka/vms/issues{/number}","pulls_url":"https://api.github.com/repos/anjali-dhanuka/vms/pulls{/number}","milestones_url":"https://api.github.com/repos/anjali-dhanuka/vms/milestones{/number}","notifications_url":"https://api.github.com/repos/anjali-dhanuka/vms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anjali-dhanuka/vms/labels{/name}","releases_url":"https://api.github.com/repos/anjali-dhanuka/vms/releases{/id}","deployments_url":"https://api.github.com/repos/anjali-dhanuka/vms/deployments","created_at":"2017-12-11T13:39:21Z","updated_at":"2018-04-07T17:17:20Z","pushed_at":"2018-07-05T06:37:09Z","git_url":"git://github.com/anjali-dhanuka/vms.git","ssh_url":"git@github.com:anjali-dhanuka/vms.git","clone_url":"https://github.com/anjali-dhanuka/vms.git","svn_url":"https://github.com/anjali-dhanuka/vms","homepage":null,"size":3083,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"systers:gsoc18-code","ref":"gsoc18-code","sha":"1197a8a6ef2793b7254b2cd2ac5c0be84817e70f","user":{"login":"systers","id":6520415,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1MjA0MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/6520415?v=4","gravatar_id":"","url":"https://api.github.com/users/systers","html_url":"https://github.com/systers","followers_url":"https://api.github.com/users/systers/followers","following_url":"https://api.github.com/users/systers/following{/other_user}","gists_url":"https://api.github.com/users/systers/gists{/gist_id}","starred_url":"https://api.github.com/users/systers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systers/subscriptions","organizations_url":"https://api.github.com/users/systers/orgs","repos_url":"https://api.github.com/users/systers/repos","events_url":"https://api.github.com/users/systers/events{/privacy}","received_events_url":"https://api.github.com/users/systers/received_events","type":"Organization","site_admin":false},"repo":{"id":19032264,"node_id":"MDEwOlJlcG9zaXRvcnkxOTAzMjI2NA==","name":"vms","full_name":"systers/vms","owner":{"login":"systers","id":6520415,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1MjA0MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/6520415?v=4","gravatar_id":"","url":"https://api.github.com/users/systers","html_url":"https://github.com/systers","followers_url":"https://api.github.com/users/systers/followers","following_url":"https://api.github.com/users/systers/following{/other_user}","gists_url":"https://api.github.com/users/systers/gists{/gist_id}","starred_url":"https://api.github.com/users/systers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systers/subscriptions","organizations_url":"https://api.github.com/users/systers/orgs","repos_url":"https://api.github.com/users/systers/repos","events_url":"https://api.github.com/users/systers/events{/privacy}","received_events_url":"https://api.github.com/users/systers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systers/vms","description":"Volunteer Management System","fork":false,"url":"https://api.github.com/repos/systers/vms","forks_url":"https://api.github.com/repos/systers/vms/forks","keys_url":"https://api.github.com/repos/systers/vms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systers/vms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systers/vms/teams","hooks_url":"https://api.github.com/repos/systers/vms/hooks","issue_events_url":"https://api.github.com/repos/systers/vms/issues/events{/number}","events_url":"https://api.github.com/repos/systers/vms/events","assignees_url":"https://api.github.com/repos/systers/vms/assignees{/user}","branches_url":"https://api.github.com/repos/systers/vms/branches{/branch}","tags_url":"https://api.github.com/repos/systers/vms/tags","blobs_url":"https://api.github.com/repos/systers/vms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systers/vms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systers/vms/git/refs{/sha}","trees_url":"https://api.github.com/repos/systers/vms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systers/vms/statuses/{sha}","languages_url":"https://api.github.com/repos/systers/vms/languages","stargazers_url":"https://api.github.com/repos/systers/vms/stargazers","contributors_url":"https://api.github.com/repos/systers/vms/contributors","subscribers_url":"https://api.github.com/repos/systers/vms/subscribers","subscription_url":"https://api.github.com/repos/systers/vms/subscription","commits_url":"https://api.github.com/repos/systers/vms/commits{/sha}","git_commits_url":"https://api.github.com/repos/systers/vms/git/commits{/sha}","comments_url":"https://api.github.com/repos/systers/vms/comments{/number}","issue_comment_url":"https://api.github.com/repos/systers/vms/issues/comments{/number}","contents_url":"https://api.github.com/repos/systers/vms/contents/{+path}","compare_url":"https://api.github.com/repos/systers/vms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systers/vms/merges","archive_url":"https://api.github.com/repos/systers/vms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systers/vms/downloads","issues_url":"https://api.github.com/repos/systers/vms/issues{/number}","pulls_url":"https://api.github.com/repos/systers/vms/pulls{/number}","milestones_url":"https://api.github.com/repos/systers/vms/milestones{/number}","notifications_url":"https://api.github.com/repos/systers/vms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systers/vms/labels{/name}","releases_url":"https://api.github.com/repos/systers/vms/releases{/id}","deployments_url":"https://api.github.com/repos/systers/vms/deployments","created_at":"2014-04-22T14:13:57Z","updated_at":"2018-07-02T07:06:55Z","pushed_at":"2018-07-05T06:37:11Z","git_url":"git://github.com/systers/vms.git","ssh_url":"git@github.com:systers/vms.git","clone_url":"https://github.com/systers/vms.git","svn_url":"https://github.com/systers/vms","homepage":"http://52.8.110.63/","size":2897,"stargazers_count":55,"watchers_count":55,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":150,"mirror_url":null,"archived":false,"open_issues_count":113,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":150,"open_issues":113,"watchers":55,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/systers/vms/pulls/774"},"html":{"href":"https://github.com/systers/vms/pull/774"},"issue":{"href":"https://api.github.com/repos/systers/vms/issues/774"},"comments":{"href":"https://api.github.com/repos/systers/vms/issues/774/comments"},"review_comments":{"href":"https://api.github.com/repos/systers/vms/pulls/774/comments"},"review_comment":{"href":"https://api.github.com/repos/systers/vms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systers/vms/pulls/774/commits"},"statuses":{"href":"https://api.github.com/repos/systers/vms/statuses/c51fcb7acd0411c496245b85e8819e41ca8c8c44"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"codacy-bot"}}