{"action":"created","comment":{"url":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/comments/175258959","pull_request_review_id":104767221,"id":175258959,"diff_hunk":"@@ -1,3 +1,150 @@\n+import React from 'react';\n+import App from './App';\n+import {render, shallow} from 'enzyme';\n+import $ from 'jquery';\n+\n+jest.mock('jquery', () => ({\n+  ajax: jest.fn()\n+}));\n+\n test('test runs', () => {\n   expect(true);\n });\n+\n+describe('App', () => {\n+  it('renders a company number field', () => {\n+    const wrapper = render(<App/>);\n+    expect(wrapper.find('#company-number').length).toEqual(1);\n+  });\n+});\n+\n+describe('App', () => {\n+  it('renders a customer number field', () => {\n+    const wrapper = render(<App/>);\n+    expect(wrapper.find('#customer-number').length).toEqual(1);\n+  });\n+});\n+\n+describe('App', () => {\n+  it('renders a text message field', () => {\n+    const wrapper = render(<App/>);\n+    expect(wrapper.find('#text-message').length).toEqual(1);\n+  });\n+});\n+\n+describe('App', () => {\n+  it('renders a text message field', () => {\n+    const wrapper = render(<App/>);\n+    expect(wrapper.find('#secret-key').length).toEqual(1);\n+  });\n+});\n+\n+describe('App', () => {\n+  it('renders a submit button', () => {\n+    const wrapper = render(<App/>);\n+    expect(wrapper.find('#submit-button').length).toEqual(1);\n+  });\n+});\n+\n+describe('App', () => {\n+  it('updates the company number on change event', () => {\n+    const wrapper = shallow(<App/>);\n+    const instance = wrapper.instance();\n+    instance.onCompanyNumberChange({\n+      target: {\n+        value: 'Test Company Number'\n+      }\n+    });\n+\n+    expect(wrapper.state().companyNumber).toEqual('Test Company Number');\n+  });\n+});\n+\n+describe('App', () => {\n+  it('updates the customer number on change event', () => {\n+    const wrapper = shallow(<App/>);\n+    const instance = wrapper.instance();\n+    instance.onCustomerNumberChange({\n+      target: {\n+        value: 'Test Customer Number'\n+      }\n+    });\n+\n+    expect(wrapper.state().customerNumber).toEqual('Test Customer Number');\n+  });\n+});\n+\n+describe('App', () => {\n+  it('updates the text message on change event', () => {\n+    const wrapper = shallow(<App/>);\n+    const instance = wrapper.instance();\n+    instance.onTextMessageChange({\n+      target: {\n+        value: 'Test Text Message'\n+      }\n+    });\n+\n+    expect(wrapper.state().message).toEqual('Test Text Message');\n+  });\n+});\n+\n+describe('App', () => {\n+  it('updates the secret on change event', () => {\n+    const wrapper = shallow(<App/>);\n+    const instance = wrapper.instance();\n+    instance.onSecretChange({\n+      target: {\n+        value: 'Test Secret'\n+      }\n+    });\n+\n+    expect(wrapper.state().secret).toEqual('Test Secret');\n+  });\n+});\n+\n+describe('App', () => {\n+  it('button is disabled when nothing is entered', () => {\n+    const wrapper = shallow(<App/>);\n+    const button = wrapper.find('#submit-button');\n+    expect(button.props().disabled).toEqual(true);\n+  });\n+","path":"client/src/components/App.test.js","position":111,"original_position":111,"commit_id":"5045817ac95762067e28a07f2be43feae7e4a858","original_commit_id":"5045817ac95762067e28a07f2be43feae7e4a858","user":{"login":"NikolasMcGovern","id":10985772,"avatar_url":"https://avatars3.githubusercontent.com/u/10985772?v=4","gravatar_id":"","url":"https://api.github.com/users/NikolasMcGovern","html_url":"https://github.com/NikolasMcGovern","followers_url":"https://api.github.com/users/NikolasMcGovern/followers","following_url":"https://api.github.com/users/NikolasMcGovern/following{/other_user}","gists_url":"https://api.github.com/users/NikolasMcGovern/gists{/gist_id}","starred_url":"https://api.github.com/users/NikolasMcGovern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikolasMcGovern/subscriptions","organizations_url":"https://api.github.com/users/NikolasMcGovern/orgs","repos_url":"https://api.github.com/users/NikolasMcGovern/repos","events_url":"https://api.github.com/users/NikolasMcGovern/events{/privacy}","received_events_url":"https://api.github.com/users/NikolasMcGovern/received_events","type":"User","site_admin":false},"body":"A lot of changes will be made to the current front-end. More extensive testing will be done once the customer list is functioning.","created_at":"2018-03-17T14:01:19Z","updated_at":"2018-03-17T14:01:19Z","html_url":"https://github.com/BandwidthExamples/context-call/pull/4#discussion_r175258959","pull_request_url":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/4","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/comments/175258959"},"html":{"href":"https://github.com/BandwidthExamples/context-call/pull/4#discussion_r175258959"},"pull_request":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/4"}},"in_reply_to_id":174583044},"pull_request":{"url":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/4","id":172073834,"html_url":"https://github.com/BandwidthExamples/context-call/pull/4","diff_url":"https://github.com/BandwidthExamples/context-call/pull/4.diff","patch_url":"https://github.com/BandwidthExamples/context-call/pull/4.patch","issue_url":"https://api.github.com/repos/BandwidthExamples/context-call/issues/4","number":4,"state":"open","locked":false,"title":"Add tests for the React client","user":{"login":"NikolasMcGovern","id":10985772,"avatar_url":"https://avatars3.githubusercontent.com/u/10985772?v=4","gravatar_id":"","url":"https://api.github.com/users/NikolasMcGovern","html_url":"https://github.com/NikolasMcGovern","followers_url":"https://api.github.com/users/NikolasMcGovern/followers","following_url":"https://api.github.com/users/NikolasMcGovern/following{/other_user}","gists_url":"https://api.github.com/users/NikolasMcGovern/gists{/gist_id}","starred_url":"https://api.github.com/users/NikolasMcGovern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikolasMcGovern/subscriptions","organizations_url":"https://api.github.com/users/NikolasMcGovern/orgs","repos_url":"https://api.github.com/users/NikolasMcGovern/repos","events_url":"https://api.github.com/users/NikolasMcGovern/events{/privacy}","received_events_url":"https://api.github.com/users/NikolasMcGovern/received_events","type":"User","site_admin":false},"body":"Tests have 100% coverage, though they still need some improvement.","created_at":"2018-02-28T21:12:04Z","updated_at":"2018-03-17T14:01:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f2d357e78615096c855591ac56b09ed43d13112","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/BandwidthExamples/context-call/milestones/1","html_url":"https://github.com/BandwidthExamples/context-call/milestone/1","labels_url":"https://api.github.com/repos/BandwidthExamples/context-call/milestones/1/labels","id":3154803,"number":1,"title":"Iteration 1","description":"Bridges calls between two users. Design is monolithic and doesn't scale well.\r\nDoes not save information for repeated contact, log anything, support call scheduling, or wait for a variable time.","creator":{"login":"nashley","id":2084330,"avatar_url":"https://avatars3.githubusercontent.com/u/2084330?v=4","gravatar_id":"","url":"https://api.github.com/users/nashley","html_url":"https://github.com/nashley","followers_url":"https://api.github.com/users/nashley/followers","following_url":"https://api.github.com/users/nashley/following{/other_user}","gists_url":"https://api.github.com/users/nashley/gists{/gist_id}","starred_url":"https://api.github.com/users/nashley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nashley/subscriptions","organizations_url":"https://api.github.com/users/nashley/orgs","repos_url":"https://api.github.com/users/nashley/repos","events_url":"https://api.github.com/users/nashley/events{/privacy}","received_events_url":"https://api.github.com/users/nashley/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2018-03-01T21:40:43Z","updated_at":"2018-03-13T17:23:09Z","due_on":"2018-03-01T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/4/commits","review_comments_url":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/4/comments","review_comment_url":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BandwidthExamples/context-call/issues/4/comments","statuses_url":"https://api.github.com/repos/BandwidthExamples/context-call/statuses/5045817ac95762067e28a07f2be43feae7e4a858","head":{"label":"BandwidthExamples:client-tests","ref":"client-tests","sha":"5045817ac95762067e28a07f2be43feae7e4a858","user":{"login":"BandwidthExamples","id":12057884,"avatar_url":"https://avatars2.githubusercontent.com/u/12057884?v=4","gravatar_id":"","url":"https://api.github.com/users/BandwidthExamples","html_url":"https://github.com/BandwidthExamples","followers_url":"https://api.github.com/users/BandwidthExamples/followers","following_url":"https://api.github.com/users/BandwidthExamples/following{/other_user}","gists_url":"https://api.github.com/users/BandwidthExamples/gists{/gist_id}","starred_url":"https://api.github.com/users/BandwidthExamples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BandwidthExamples/subscriptions","organizations_url":"https://api.github.com/users/BandwidthExamples/orgs","repos_url":"https://api.github.com/users/BandwidthExamples/repos","events_url":"https://api.github.com/users/BandwidthExamples/events{/privacy}","received_events_url":"https://api.github.com/users/BandwidthExamples/received_events","type":"Organization","site_admin":false},"repo":{"id":121418123,"name":"context-call","full_name":"BandwidthExamples/context-call","owner":{"login":"BandwidthExamples","id":12057884,"avatar_url":"https://avatars2.githubusercontent.com/u/12057884?v=4","gravatar_id":"","url":"https://api.github.com/users/BandwidthExamples","html_url":"https://github.com/BandwidthExamples","followers_url":"https://api.github.com/users/BandwidthExamples/followers","following_url":"https://api.github.com/users/BandwidthExamples/following{/other_user}","gists_url":"https://api.github.com/users/BandwidthExamples/gists{/gist_id}","starred_url":"https://api.github.com/users/BandwidthExamples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BandwidthExamples/subscriptions","organizations_url":"https://api.github.com/users/BandwidthExamples/orgs","repos_url":"https://api.github.com/users/BandwidthExamples/repos","events_url":"https://api.github.com/users/BandwidthExamples/events{/privacy}","received_events_url":"https://api.github.com/users/BandwidthExamples/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BandwidthExamples/context-call","description":"Announce unknown callers via text message before calling. [Call me maybe]","fork":false,"url":"https://api.github.com/repos/BandwidthExamples/context-call","forks_url":"https://api.github.com/repos/BandwidthExamples/context-call/forks","keys_url":"https://api.github.com/repos/BandwidthExamples/context-call/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BandwidthExamples/context-call/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BandwidthExamples/context-call/teams","hooks_url":"https://api.github.com/repos/BandwidthExamples/context-call/hooks","issue_events_url":"https://api.github.com/repos/BandwidthExamples/context-call/issues/events{/number}","events_url":"https://api.github.com/repos/BandwidthExamples/context-call/events","assignees_url":"https://api.github.com/repos/BandwidthExamples/context-call/assignees{/user}","branches_url":"https://api.github.com/repos/BandwidthExamples/context-call/branches{/branch}","tags_url":"https://api.github.com/repos/BandwidthExamples/context-call/tags","blobs_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/refs{/sha}","trees_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BandwidthExamples/context-call/statuses/{sha}","languages_url":"https://api.github.com/repos/BandwidthExamples/context-call/languages","stargazers_url":"https://api.github.com/repos/BandwidthExamples/context-call/stargazers","contributors_url":"https://api.github.com/repos/BandwidthExamples/context-call/contributors","subscribers_url":"https://api.github.com/repos/BandwidthExamples/context-call/subscribers","subscription_url":"https://api.github.com/repos/BandwidthExamples/context-call/subscription","commits_url":"https://api.github.com/repos/BandwidthExamples/context-call/commits{/sha}","git_commits_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/commits{/sha}","comments_url":"https://api.github.com/repos/BandwidthExamples/context-call/comments{/number}","issue_comment_url":"https://api.github.com/repos/BandwidthExamples/context-call/issues/comments{/number}","contents_url":"https://api.github.com/repos/BandwidthExamples/context-call/contents/{+path}","compare_url":"https://api.github.com/repos/BandwidthExamples/context-call/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BandwidthExamples/context-call/merges","archive_url":"https://api.github.com/repos/BandwidthExamples/context-call/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BandwidthExamples/context-call/downloads","issues_url":"https://api.github.com/repos/BandwidthExamples/context-call/issues{/number}","pulls_url":"https://api.github.com/repos/BandwidthExamples/context-call/pulls{/number}","milestones_url":"https://api.github.com/repos/BandwidthExamples/context-call/milestones{/number}","notifications_url":"https://api.github.com/repos/BandwidthExamples/context-call/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BandwidthExamples/context-call/labels{/name}","releases_url":"https://api.github.com/repos/BandwidthExamples/context-call/releases{/id}","deployments_url":"https://api.github.com/repos/BandwidthExamples/context-call/deployments","created_at":"2018-02-13T18:14:30Z","updated_at":"2018-03-15T17:25:31Z","pushed_at":"2018-03-16T19:06:08Z","git_url":"git://github.com/BandwidthExamples/context-call.git","ssh_url":"git@github.com:BandwidthExamples/context-call.git","clone_url":"https://github.com/BandwidthExamples/context-call.git","svn_url":"https://github.com/BandwidthExamples/context-call","homepage":null,"size":2133,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"BandwidthExamples:master","ref":"master","sha":"a11eb21071acfcb6c729cfd6d0b7f4bf4a81720b","user":{"login":"BandwidthExamples","id":12057884,"avatar_url":"https://avatars2.githubusercontent.com/u/12057884?v=4","gravatar_id":"","url":"https://api.github.com/users/BandwidthExamples","html_url":"https://github.com/BandwidthExamples","followers_url":"https://api.github.com/users/BandwidthExamples/followers","following_url":"https://api.github.com/users/BandwidthExamples/following{/other_user}","gists_url":"https://api.github.com/users/BandwidthExamples/gists{/gist_id}","starred_url":"https://api.github.com/users/BandwidthExamples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BandwidthExamples/subscriptions","organizations_url":"https://api.github.com/users/BandwidthExamples/orgs","repos_url":"https://api.github.com/users/BandwidthExamples/repos","events_url":"https://api.github.com/users/BandwidthExamples/events{/privacy}","received_events_url":"https://api.github.com/users/BandwidthExamples/received_events","type":"Organization","site_admin":false},"repo":{"id":121418123,"name":"context-call","full_name":"BandwidthExamples/context-call","owner":{"login":"BandwidthExamples","id":12057884,"avatar_url":"https://avatars2.githubusercontent.com/u/12057884?v=4","gravatar_id":"","url":"https://api.github.com/users/BandwidthExamples","html_url":"https://github.com/BandwidthExamples","followers_url":"https://api.github.com/users/BandwidthExamples/followers","following_url":"https://api.github.com/users/BandwidthExamples/following{/other_user}","gists_url":"https://api.github.com/users/BandwidthExamples/gists{/gist_id}","starred_url":"https://api.github.com/users/BandwidthExamples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BandwidthExamples/subscriptions","organizations_url":"https://api.github.com/users/BandwidthExamples/orgs","repos_url":"https://api.github.com/users/BandwidthExamples/repos","events_url":"https://api.github.com/users/BandwidthExamples/events{/privacy}","received_events_url":"https://api.github.com/users/BandwidthExamples/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BandwidthExamples/context-call","description":"Announce unknown callers via text message before calling. [Call me maybe]","fork":false,"url":"https://api.github.com/repos/BandwidthExamples/context-call","forks_url":"https://api.github.com/repos/BandwidthExamples/context-call/forks","keys_url":"https://api.github.com/repos/BandwidthExamples/context-call/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BandwidthExamples/context-call/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BandwidthExamples/context-call/teams","hooks_url":"https://api.github.com/repos/BandwidthExamples/context-call/hooks","issue_events_url":"https://api.github.com/repos/BandwidthExamples/context-call/issues/events{/number}","events_url":"https://api.github.com/repos/BandwidthExamples/context-call/events","assignees_url":"https://api.github.com/repos/BandwidthExamples/context-call/assignees{/user}","branches_url":"https://api.github.com/repos/BandwidthExamples/context-call/branches{/branch}","tags_url":"https://api.github.com/repos/BandwidthExamples/context-call/tags","blobs_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/refs{/sha}","trees_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BandwidthExamples/context-call/statuses/{sha}","languages_url":"https://api.github.com/repos/BandwidthExamples/context-call/languages","stargazers_url":"https://api.github.com/repos/BandwidthExamples/context-call/stargazers","contributors_url":"https://api.github.com/repos/BandwidthExamples/context-call/contributors","subscribers_url":"https://api.github.com/repos/BandwidthExamples/context-call/subscribers","subscription_url":"https://api.github.com/repos/BandwidthExamples/context-call/subscription","commits_url":"https://api.github.com/repos/BandwidthExamples/context-call/commits{/sha}","git_commits_url":"https://api.github.com/repos/BandwidthExamples/context-call/git/commits{/sha}","comments_url":"https://api.github.com/repos/BandwidthExamples/context-call/comments{/number}","issue_comment_url":"https://api.github.com/repos/BandwidthExamples/context-call/issues/comments{/number}","contents_url":"https://api.github.com/repos/BandwidthExamples/context-call/contents/{+path}","compare_url":"https://api.github.com/repos/BandwidthExamples/context-call/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BandwidthExamples/context-call/merges","archive_url":"https://api.github.com/repos/BandwidthExamples/context-call/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BandwidthExamples/context-call/downloads","issues_url":"https://api.github.com/repos/BandwidthExamples/context-call/issues{/number}","pulls_url":"https://api.github.com/repos/BandwidthExamples/context-call/pulls{/number}","milestones_url":"https://api.github.com/repos/BandwidthExamples/context-call/milestones{/number}","notifications_url":"https://api.github.com/repos/BandwidthExamples/context-call/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BandwidthExamples/context-call/labels{/name}","releases_url":"https://api.github.com/repos/BandwidthExamples/context-call/releases{/id}","deployments_url":"https://api.github.com/repos/BandwidthExamples/context-call/deployments","created_at":"2018-02-13T18:14:30Z","updated_at":"2018-03-15T17:25:31Z","pushed_at":"2018-03-16T19:06:08Z","git_url":"git://github.com/BandwidthExamples/context-call.git","ssh_url":"git@github.com:BandwidthExamples/context-call.git","clone_url":"https://github.com/BandwidthExamples/context-call.git","svn_url":"https://github.com/BandwidthExamples/context-call","homepage":null,"size":2133,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/4"},"html":{"href":"https://github.com/BandwidthExamples/context-call/pull/4"},"issue":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/issues/4"},"comments":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/BandwidthExamples/context-call/statuses/5045817ac95762067e28a07f2be43feae7e4a858"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"NikolasMcGovern"}}