{"action":"created","comment":{"url":"https://api.github.com/repos/wix/stylable-components/pulls/comments/146611726","pull_request_review_id":71571120,"id":146611726,"diff_hunk":"@@ -87,24 +88,107 @@ describe('<Image />', () => {\n         await waitFor(() => expect(onLoad).to.have.been.calledWithMatch({src: onePixelBlack}));\n     });\n \n-    it('calls onError when it cannot load a source, and falls back to default source', async () => {\n+    it('calls onError when it cannot load a source', async () => {\n         const onError = sinon.spy();\n-        const {driver: image, waitForDom} = clientRenderer.render(\n-            <Image src={brokenSrc} defaultImage={onePixelBlue} onError={onError} />\n-        ).withDriver(ImageDriver);\n+        clientRenderer.render(<Image src={brokenSrc} onError={onError}/>).withDriver(ImageDriver);\n \n         await waitFor(() => expect(onError).to.have.been.calledWithMatch({src: brokenSrc}));\n-        await waitForDom(() => expect(image.source, 'incorrect image source').to.equal(onePixelBlue));\n     });\n \n-    it('calls onError when cannot load the default image, and falls back to `transparentImage`', async () => {\n+    it('calls onError when it cannot load default source', async () => {\n         const onError = sinon.spy();\n+        clientRenderer.render(<Image defaultImage={brokenSrc} onError={onError}/>);\n+\n+        await waitFor(() => expect(onError).to.have.been.calledWithMatch({src: brokenSrc}));\n+    });\n+\n+    it('after error - loads error image', async () => {\n         const {driver: image, waitForDom} = clientRenderer.render(\n-            <Image defaultImage={brokenSrc} onError={onError} />\n+            <Image src={brokenSrc} errorImage={onePixelBlue} />\n         ).withDriver(ImageDriver);\n \n-        await waitFor(() => expect(onError).to.have.been.calledWithMatch({src: brokenSrc}));\n-        await waitForDom(() => expect(image.source, 'incorrect image source').to.equal(transparentImage));\n+        await waitForDom(() => expect(\n+            image.source, 'Expected source to be as provided in errorImage'\n+        ).to.equal(onePixelBlue));\n+    });\n+\n+    it('after error - loads transparent image if no error image is given', async () => {","path":"test/components/image.spec.tsx","position":47,"original_position":47,"commit_id":"2acf390ae1a6dcf9b96be227c768d0a7f8f259a1","original_commit_id":"2acf390ae1a6dcf9b96be227c768d0a7f8f259a1","user":{"login":"AviVahl","id":8952081,"avatar_url":"https://avatars3.githubusercontent.com/u/8952081?v=4","gravatar_id":"","url":"https://api.github.com/users/AviVahl","html_url":"https://github.com/AviVahl","followers_url":"https://api.github.com/users/AviVahl/followers","following_url":"https://api.github.com/users/AviVahl/following{/other_user}","gists_url":"https://api.github.com/users/AviVahl/gists{/gist_id}","starred_url":"https://api.github.com/users/AviVahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AviVahl/subscriptions","organizations_url":"https://api.github.com/users/AviVahl/orgs","repos_url":"https://api.github.com/users/AviVahl/repos","events_url":"https://api.github.com/users/AviVahl/events{/privacy}","received_events_url":"https://api.github.com/users/AviVahl/received_events","type":"User","site_admin":false},"body":"it after error?","created_at":"2017-10-24T16:06:36Z","updated_at":"2017-10-24T16:20:43Z","html_url":"https://github.com/wix/stylable-components/pull/511#discussion_r146611726","pull_request_url":"https://api.github.com/repos/wix/stylable-components/pulls/511","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/comments/146611726"},"html":{"href":"https://github.com/wix/stylable-components/pull/511#discussion_r146611726"},"pull_request":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/511"}}},"pull_request":{"url":"https://api.github.com/repos/wix/stylable-components/pulls/511","id":147992968,"html_url":"https://github.com/wix/stylable-components/pull/511","diff_url":"https://github.com/wix/stylable-components/pull/511.diff","patch_url":"https://github.com/wix/stylable-components/pull/511.patch","issue_url":"https://api.github.com/repos/wix/stylable-components/issues/511","number":511,"state":"open","locked":false,"title":"Fixing <Image/> Issues","user":{"login":"JoMarton","id":18241740,"avatar_url":"https://avatars1.githubusercontent.com/u/18241740?v=4","gravatar_id":"","url":"https://api.github.com/users/JoMarton","html_url":"https://github.com/JoMarton","followers_url":"https://api.github.com/users/JoMarton/followers","following_url":"https://api.github.com/users/JoMarton/following{/other_user}","gists_url":"https://api.github.com/users/JoMarton/gists{/gist_id}","starred_url":"https://api.github.com/users/JoMarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoMarton/subscriptions","organizations_url":"https://api.github.com/users/JoMarton/orgs","repos_url":"https://api.github.com/users/JoMarton/repos","events_url":"https://api.github.com/users/JoMarton/events{/privacy}","received_events_url":"https://api.github.com/users/JoMarton/received_events","type":"User","site_admin":false},"body":"This PR addresses:\r\n1. Adding `errorImage?: string` prop to be used when either `src` or `defaultImage` are broken\r\n2. Adding `status` state to mark if the image is loading, loaded or erred.  \r\n3. Adding style states to the stylesheet based on above status.","created_at":"2017-10-22T13:15:59Z","updated_at":"2017-10-24T16:20:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5bb5d18f2c5d12f5c57365b7efde534da4362e4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/wix/stylable-components/pulls/511/commits","review_comments_url":"https://api.github.com/repos/wix/stylable-components/pulls/511/comments","review_comment_url":"https://api.github.com/repos/wix/stylable-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wix/stylable-components/issues/511/comments","statuses_url":"https://api.github.com/repos/wix/stylable-components/statuses/2acf390ae1a6dcf9b96be227c768d0a7f8f259a1","head":{"label":"wix:jomarton/image-issues","ref":"jomarton/image-issues","sha":"2acf390ae1a6dcf9b96be227c768d0a7f8f259a1","user":{"login":"wix","id":686511,"avatar_url":"https://avatars1.githubusercontent.com/u/686511?v=4","gravatar_id":"","url":"https://api.github.com/users/wix","html_url":"https://github.com/wix","followers_url":"https://api.github.com/users/wix/followers","following_url":"https://api.github.com/users/wix/following{/other_user}","gists_url":"https://api.github.com/users/wix/gists{/gist_id}","starred_url":"https://api.github.com/users/wix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wix/subscriptions","organizations_url":"https://api.github.com/users/wix/orgs","repos_url":"https://api.github.com/users/wix/repos","events_url":"https://api.github.com/users/wix/events{/privacy}","received_events_url":"https://api.github.com/users/wix/received_events","type":"Organization","site_admin":false},"repo":{"id":94888705,"name":"stylable-components","full_name":"wix/stylable-components","owner":{"login":"wix","id":686511,"avatar_url":"https://avatars1.githubusercontent.com/u/686511?v=4","gravatar_id":"","url":"https://api.github.com/users/wix","html_url":"https://github.com/wix","followers_url":"https://api.github.com/users/wix/followers","following_url":"https://api.github.com/users/wix/following{/other_user}","gists_url":"https://api.github.com/users/wix/gists{/gist_id}","starred_url":"https://api.github.com/users/wix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wix/subscriptions","organizations_url":"https://api.github.com/users/wix/orgs","repos_url":"https://api.github.com/users/wix/repos","events_url":"https://api.github.com/users/wix/events{/privacy}","received_events_url":"https://api.github.com/users/wix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wix/stylable-components","description":"Fully-tested & strictly-typed component library based on React, using optional Wix styling.","fork":false,"url":"https://api.github.com/repos/wix/stylable-components","forks_url":"https://api.github.com/repos/wix/stylable-components/forks","keys_url":"https://api.github.com/repos/wix/stylable-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wix/stylable-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wix/stylable-components/teams","hooks_url":"https://api.github.com/repos/wix/stylable-components/hooks","issue_events_url":"https://api.github.com/repos/wix/stylable-components/issues/events{/number}","events_url":"https://api.github.com/repos/wix/stylable-components/events","assignees_url":"https://api.github.com/repos/wix/stylable-components/assignees{/user}","branches_url":"https://api.github.com/repos/wix/stylable-components/branches{/branch}","tags_url":"https://api.github.com/repos/wix/stylable-components/tags","blobs_url":"https://api.github.com/repos/wix/stylable-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wix/stylable-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wix/stylable-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/wix/stylable-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wix/stylable-components/statuses/{sha}","languages_url":"https://api.github.com/repos/wix/stylable-components/languages","stargazers_url":"https://api.github.com/repos/wix/stylable-components/stargazers","contributors_url":"https://api.github.com/repos/wix/stylable-components/contributors","subscribers_url":"https://api.github.com/repos/wix/stylable-components/subscribers","subscription_url":"https://api.github.com/repos/wix/stylable-components/subscription","commits_url":"https://api.github.com/repos/wix/stylable-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/wix/stylable-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/wix/stylable-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/wix/stylable-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/wix/stylable-components/contents/{+path}","compare_url":"https://api.github.com/repos/wix/stylable-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wix/stylable-components/merges","archive_url":"https://api.github.com/repos/wix/stylable-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wix/stylable-components/downloads","issues_url":"https://api.github.com/repos/wix/stylable-components/issues{/number}","pulls_url":"https://api.github.com/repos/wix/stylable-components/pulls{/number}","milestones_url":"https://api.github.com/repos/wix/stylable-components/milestones{/number}","notifications_url":"https://api.github.com/repos/wix/stylable-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wix/stylable-components/labels{/name}","releases_url":"https://api.github.com/repos/wix/stylable-components/releases{/id}","deployments_url":"https://api.github.com/repos/wix/stylable-components/deployments","created_at":"2017-06-20T12:28:08Z","updated_at":"2017-10-19T11:25:57Z","pushed_at":"2017-10-24T15:18:51Z","git_url":"git://github.com/wix/stylable-components.git","ssh_url":"git@github.com:wix/stylable-components.git","clone_url":"https://github.com/wix/stylable-components.git","svn_url":"https://github.com/wix/stylable-components","homepage":"","size":6834,"stargazers_count":19,"watchers_count":19,"language":"TypeScript","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":91,"forks":0,"open_issues":91,"watchers":19,"default_branch":"master"}},"base":{"label":"wix:master","ref":"master","sha":"ea5677b39bb7504b87ddf778a9eb702e73ef56ac","user":{"login":"wix","id":686511,"avatar_url":"https://avatars1.githubusercontent.com/u/686511?v=4","gravatar_id":"","url":"https://api.github.com/users/wix","html_url":"https://github.com/wix","followers_url":"https://api.github.com/users/wix/followers","following_url":"https://api.github.com/users/wix/following{/other_user}","gists_url":"https://api.github.com/users/wix/gists{/gist_id}","starred_url":"https://api.github.com/users/wix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wix/subscriptions","organizations_url":"https://api.github.com/users/wix/orgs","repos_url":"https://api.github.com/users/wix/repos","events_url":"https://api.github.com/users/wix/events{/privacy}","received_events_url":"https://api.github.com/users/wix/received_events","type":"Organization","site_admin":false},"repo":{"id":94888705,"name":"stylable-components","full_name":"wix/stylable-components","owner":{"login":"wix","id":686511,"avatar_url":"https://avatars1.githubusercontent.com/u/686511?v=4","gravatar_id":"","url":"https://api.github.com/users/wix","html_url":"https://github.com/wix","followers_url":"https://api.github.com/users/wix/followers","following_url":"https://api.github.com/users/wix/following{/other_user}","gists_url":"https://api.github.com/users/wix/gists{/gist_id}","starred_url":"https://api.github.com/users/wix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wix/subscriptions","organizations_url":"https://api.github.com/users/wix/orgs","repos_url":"https://api.github.com/users/wix/repos","events_url":"https://api.github.com/users/wix/events{/privacy}","received_events_url":"https://api.github.com/users/wix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wix/stylable-components","description":"Fully-tested & strictly-typed component library based on React, using optional Wix styling.","fork":false,"url":"https://api.github.com/repos/wix/stylable-components","forks_url":"https://api.github.com/repos/wix/stylable-components/forks","keys_url":"https://api.github.com/repos/wix/stylable-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wix/stylable-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wix/stylable-components/teams","hooks_url":"https://api.github.com/repos/wix/stylable-components/hooks","issue_events_url":"https://api.github.com/repos/wix/stylable-components/issues/events{/number}","events_url":"https://api.github.com/repos/wix/stylable-components/events","assignees_url":"https://api.github.com/repos/wix/stylable-components/assignees{/user}","branches_url":"https://api.github.com/repos/wix/stylable-components/branches{/branch}","tags_url":"https://api.github.com/repos/wix/stylable-components/tags","blobs_url":"https://api.github.com/repos/wix/stylable-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wix/stylable-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wix/stylable-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/wix/stylable-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wix/stylable-components/statuses/{sha}","languages_url":"https://api.github.com/repos/wix/stylable-components/languages","stargazers_url":"https://api.github.com/repos/wix/stylable-components/stargazers","contributors_url":"https://api.github.com/repos/wix/stylable-components/contributors","subscribers_url":"https://api.github.com/repos/wix/stylable-components/subscribers","subscription_url":"https://api.github.com/repos/wix/stylable-components/subscription","commits_url":"https://api.github.com/repos/wix/stylable-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/wix/stylable-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/wix/stylable-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/wix/stylable-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/wix/stylable-components/contents/{+path}","compare_url":"https://api.github.com/repos/wix/stylable-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wix/stylable-components/merges","archive_url":"https://api.github.com/repos/wix/stylable-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wix/stylable-components/downloads","issues_url":"https://api.github.com/repos/wix/stylable-components/issues{/number}","pulls_url":"https://api.github.com/repos/wix/stylable-components/pulls{/number}","milestones_url":"https://api.github.com/repos/wix/stylable-components/milestones{/number}","notifications_url":"https://api.github.com/repos/wix/stylable-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wix/stylable-components/labels{/name}","releases_url":"https://api.github.com/repos/wix/stylable-components/releases{/id}","deployments_url":"https://api.github.com/repos/wix/stylable-components/deployments","created_at":"2017-06-20T12:28:08Z","updated_at":"2017-10-19T11:25:57Z","pushed_at":"2017-10-24T15:18:51Z","git_url":"git://github.com/wix/stylable-components.git","ssh_url":"git@github.com:wix/stylable-components.git","clone_url":"https://github.com/wix/stylable-components.git","svn_url":"https://github.com/wix/stylable-components","homepage":"","size":6834,"stargazers_count":19,"watchers_count":19,"language":"TypeScript","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":91,"forks":0,"open_issues":91,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/511"},"html":{"href":"https://github.com/wix/stylable-components/pull/511"},"issue":{"href":"https://api.github.com/repos/wix/stylable-components/issues/511"},"comments":{"href":"https://api.github.com/repos/wix/stylable-components/issues/511/comments"},"review_comments":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/511/comments"},"review_comment":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wix/stylable-components/pulls/511/commits"},"statuses":{"href":"https://api.github.com/repos/wix/stylable-components/statuses/2acf390ae1a6dcf9b96be227c768d0a7f8f259a1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AviVahl"}}