{"action":"created","comment":{"url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/comments/195646632","pull_request_review_id":129057162,"id":195646632,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTY0NjYzMg==","diff_hunk":"@@ -1,87 +1,92 @@\n import React from 'react';\n-import { shallow } from 'enzyme';\n+import { mount } from 'enzyme';\n import { Update } from '../../../../client/src/components/user/event/Update';\n import { centers } from '../../../__mocks__/center';\n import { eventBirthday } from '../../../__mocks__/event';\n import toastr from '../../../__mocks__/toastr';\n const props = {\n-  updateEventRequest: jest.fn(() => { }),\n-  fetchUserEventRequest: jest.fn(() => { }),\n-  fetchAllCentersRequest: jest.fn(() => { }),\n-  centers,\n+  updateEventRequest: jest.fn(event => {\n+    event.center = centers.find(center => center.id == event.centerId);\n+    wrapper.setProps({ event, actions: { updateEvent: 'UPDATED_EVENT' } });\n+  }),\n+  fetchUserEventRequest: jest.fn(() => {}),\n+  fetchAllCentersRequest: jest.fn(() => {}),\n+  centers: [],\n+  count: 0,\n   match: {\n     params: { index: '2' }\n   },\n-  event: { ...eventBirthday, centerId: 1 },\n+  event: {},\n   errors: {},\n   actions: {\n     getEvent: 'FETCHING_EVENT'\n   },\n   centerAction: {},\n-  reset: jest.fn(() => { })\n+  reset: jest.fn(() => {})\n };\n \n-const wrapper = shallow(<Update {...props} />);\n+const wrapper = mount(<Update {...props} />);\n \n describe('Update Component', () => {\n   it('renders preloader', () => {\n-    expect(wrapper.exists()).toBe(true);\n+    expect(wrapper.find('.preloader').exists()).toBe(true);\n   });\n \n-  it('set state for update event error', () => {\n+  it('should populate form with existing event', () => {\n     wrapper.setProps({\n-      ...props, errors: {\n-        endDate: ['End date can not be before start date']\n-      }, actions: { ...props.actions, updateEvent: 'UPDATE_EVENT_ERROR' }\n-    })\n-    expect(wrapper.state().errors.endDate).toEqual(['End date can not be before start date']);\n+      event: { ...eventBirthday, centerId: 1 },\n+      centers,\n+      count: centers.length,\n+      actions: { getEvent: 'RECEIVED_EVENT' },\n+      centerAction: { getCenters: 'RECEIVED_CENTERS' }\n+    });\n+\n+    expect(wrapper.find('input#title').props().defaultValue).toEqual(\n+      'Birthday Party'\n+    );\n+    expect(wrapper.find('input.startDate').props().defaultValue).toEqual(\n+      '12 October, 2018'\n+    );\n+    expect(wrapper.find('input.endDate').props().defaultValue).toEqual(\n+      '12 October, 2018'\n+    );\n   });\n \n-  it('received event and upate state', () => {\n+  it('Set error message for component when errors occurred from the server', () => {\n     wrapper.setProps({\n-      ...props, actions: { ...props.actions, getEvent: 'RECEIVED_EVENT' }\n+      errors: {\n+        title: ['Title is required'],\n+        startDate: ['Start date can not be before end date']\n+      },\n+      actions: { updateEvent: 'UPDATE_EVENT_ERROR' }\n     });\n-    expect(wrapper.state().event.title).toEqual('Birthday Party');\n+    expect(wrapper.find('.title .errors').text()).toEqual('Title is required ');\n+    expect(wrapper.find('#startDate .errors').text()).toEqual(","path":"__tests__/components/user/event/Update.test.js","position":82,"original_position":82,"commit_id":"d6b65474e9bacd3f9a5123987891e8da87afe75c","original_commit_id":"d6b65474e9bacd3f9a5123987891e8da87afe75c","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"'expect' is not defined                                                              no-undef<br>Unexpected newline after '('                                                         function-paren-newline","created_at":"2018-06-15T06:54:23Z","updated_at":"2018-06-15T06:54:25Z","html_url":"https://github.com/omokolataiwo/eventmanager/pull/58#discussion_r195646632","pull_request_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/58","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/comments/195646632"},"html":{"href":"https://github.com/omokolataiwo/eventmanager/pull/58#discussion_r195646632"},"pull_request":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/58","id":195089606,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MDg5NjA2","html_url":"https://github.com/omokolataiwo/eventmanager/pull/58","diff_url":"https://github.com/omokolataiwo/eventmanager/pull/58.diff","patch_url":"https://github.com/omokolataiwo/eventmanager/pull/58.patch","issue_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/58","number":58,"state":"open","locked":false,"title":"feat(frontend-test): complete frontend testing","user":{"login":"omokolataiwo","id":30238960,"node_id":"MDQ6VXNlcjMwMjM4OTYw","avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nAdds more assertion messages\r\n\r\n#### Description of Task to be completed?\r\n- add more descriptive assertion messages\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n[Finishes: #157912039]","created_at":"2018-06-15T06:44:11Z","updated_at":"2018-06-15T06:54:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12a5449f493de90338b4b312251971ce4087eed6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/58/commits","review_comments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/58/comments","review_comment_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/58/comments","statuses_url":"https://api.github.com/repos/omokolataiwo/eventmanager/statuses/d6b65474e9bacd3f9a5123987891e8da87afe75c","head":{"label":"omokolataiwo:feat/157912039/frontend-test","ref":"feat/157912039/frontend-test","sha":"d6b65474e9bacd3f9a5123987891e8da87afe75c","user":{"login":"omokolataiwo","id":30238960,"node_id":"MDQ6VXNlcjMwMjM4OTYw","avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"repo":{"id":110697270,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA2OTcyNzA=","name":"eventmanager","full_name":"omokolataiwo/eventmanager","owner":{"login":"omokolataiwo","id":30238960,"node_id":"MDQ6VXNlcjMwMjM4OTYw","avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omokolataiwo/eventmanager","description":"EventManager manages your centers for event bookings. EventManager is very convenient way of booking your events. ","fork":false,"url":"https://api.github.com/repos/omokolataiwo/eventmanager","forks_url":"https://api.github.com/repos/omokolataiwo/eventmanager/forks","keys_url":"https://api.github.com/repos/omokolataiwo/eventmanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omokolataiwo/eventmanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omokolataiwo/eventmanager/teams","hooks_url":"https://api.github.com/repos/omokolataiwo/eventmanager/hooks","issue_events_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/events{/number}","events_url":"https://api.github.com/repos/omokolataiwo/eventmanager/events","assignees_url":"https://api.github.com/repos/omokolataiwo/eventmanager/assignees{/user}","branches_url":"https://api.github.com/repos/omokolataiwo/eventmanager/branches{/branch}","tags_url":"https://api.github.com/repos/omokolataiwo/eventmanager/tags","blobs_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omokolataiwo/eventmanager/statuses/{sha}","languages_url":"https://api.github.com/repos/omokolataiwo/eventmanager/languages","stargazers_url":"https://api.github.com/repos/omokolataiwo/eventmanager/stargazers","contributors_url":"https://api.github.com/repos/omokolataiwo/eventmanager/contributors","subscribers_url":"https://api.github.com/repos/omokolataiwo/eventmanager/subscribers","subscription_url":"https://api.github.com/repos/omokolataiwo/eventmanager/subscription","commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/omokolataiwo/eventmanager/contents/{+path}","compare_url":"https://api.github.com/repos/omokolataiwo/eventmanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omokolataiwo/eventmanager/merges","archive_url":"https://api.github.com/repos/omokolataiwo/eventmanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omokolataiwo/eventmanager/downloads","issues_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues{/number}","pulls_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls{/number}","milestones_url":"https://api.github.com/repos/omokolataiwo/eventmanager/milestones{/number}","notifications_url":"https://api.github.com/repos/omokolataiwo/eventmanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omokolataiwo/eventmanager/labels{/name}","releases_url":"https://api.github.com/repos/omokolataiwo/eventmanager/releases{/id}","deployments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/deployments","created_at":"2017-11-14T13:59:38Z","updated_at":"2018-06-07T11:19:16Z","pushed_at":"2018-06-15T06:53:33Z","git_url":"git://github.com/omokolataiwo/eventmanager.git","ssh_url":"git@github.com:omokolataiwo/eventmanager.git","clone_url":"https://github.com/omokolataiwo/eventmanager.git","svn_url":"https://github.com/omokolataiwo/eventmanager","homepage":"http://eventmanng.herokuapp.com/","size":35056,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"omokolataiwo:develop","ref":"develop","sha":"600761cb989477052f20d97af29c0d92942a5a6d","user":{"login":"omokolataiwo","id":30238960,"node_id":"MDQ6VXNlcjMwMjM4OTYw","avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"repo":{"id":110697270,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA2OTcyNzA=","name":"eventmanager","full_name":"omokolataiwo/eventmanager","owner":{"login":"omokolataiwo","id":30238960,"node_id":"MDQ6VXNlcjMwMjM4OTYw","avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omokolataiwo/eventmanager","description":"EventManager manages your centers for event bookings. EventManager is very convenient way of booking your events. ","fork":false,"url":"https://api.github.com/repos/omokolataiwo/eventmanager","forks_url":"https://api.github.com/repos/omokolataiwo/eventmanager/forks","keys_url":"https://api.github.com/repos/omokolataiwo/eventmanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omokolataiwo/eventmanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omokolataiwo/eventmanager/teams","hooks_url":"https://api.github.com/repos/omokolataiwo/eventmanager/hooks","issue_events_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/events{/number}","events_url":"https://api.github.com/repos/omokolataiwo/eventmanager/events","assignees_url":"https://api.github.com/repos/omokolataiwo/eventmanager/assignees{/user}","branches_url":"https://api.github.com/repos/omokolataiwo/eventmanager/branches{/branch}","tags_url":"https://api.github.com/repos/omokolataiwo/eventmanager/tags","blobs_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omokolataiwo/eventmanager/statuses/{sha}","languages_url":"https://api.github.com/repos/omokolataiwo/eventmanager/languages","stargazers_url":"https://api.github.com/repos/omokolataiwo/eventmanager/stargazers","contributors_url":"https://api.github.com/repos/omokolataiwo/eventmanager/contributors","subscribers_url":"https://api.github.com/repos/omokolataiwo/eventmanager/subscribers","subscription_url":"https://api.github.com/repos/omokolataiwo/eventmanager/subscription","commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/omokolataiwo/eventmanager/contents/{+path}","compare_url":"https://api.github.com/repos/omokolataiwo/eventmanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omokolataiwo/eventmanager/merges","archive_url":"https://api.github.com/repos/omokolataiwo/eventmanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omokolataiwo/eventmanager/downloads","issues_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues{/number}","pulls_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls{/number}","milestones_url":"https://api.github.com/repos/omokolataiwo/eventmanager/milestones{/number}","notifications_url":"https://api.github.com/repos/omokolataiwo/eventmanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omokolataiwo/eventmanager/labels{/name}","releases_url":"https://api.github.com/repos/omokolataiwo/eventmanager/releases{/id}","deployments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/deployments","created_at":"2017-11-14T13:59:38Z","updated_at":"2018-06-07T11:19:16Z","pushed_at":"2018-06-15T06:53:33Z","git_url":"git://github.com/omokolataiwo/eventmanager.git","ssh_url":"git@github.com:omokolataiwo/eventmanager.git","clone_url":"https://github.com/omokolataiwo/eventmanager.git","svn_url":"https://github.com/omokolataiwo/eventmanager","homepage":"http://eventmanng.herokuapp.com/","size":35056,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/58"},"html":{"href":"https://github.com/omokolataiwo/eventmanager/pull/58"},"issue":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/58"},"comments":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/statuses/d6b65474e9bacd3f9a5123987891e8da87afe75c"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}