GitHub PullRequestReviewCommentEvent at 2014-10-08 11:27:28
Repository: gaia
Actor: azasypkin
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/18575942","id":18575942,"diff_hunk":"@@ -717,57 +718,115 @@ suite('Information view', function() {\n \n         reportView.id = 1;\n         reportView.render();\n-        data.deliveryL10n = 'message-status-error';\n+        data.titleL10n = 'message-status-error';\n         sinon.assert.calledWith(Template.prototype.interpolate, data);\n+        reportDiv = reportView.renderContactList.args[0][0][0].infoBlock;\n+        assert.equal(reportDiv.dataset.deliveryStatus, 'error');\n       });\n     });\n \n     suite('Render report block in contact list(read status)', function() {\n-      var data;\n+      var data,\n+          block;\n \n       setup(function() {\n         data = {\n-          deliveryClass: 'hide',\n-          deliveryL10n: '',\n-          deliveryDateL10n: '',\n-          deliveryTimestamp: '',\n-          readClass: '',\n-          readL10n: '',\n-          readDateL10n: '',\n-          readTimestamp: '',\n+          titleL10n: '',\n+          reportDateL10n: sinon.match.any,\n+          timestamp: '',\n           messageL10nDateFormat12: 'report-dateTimeFormat12',\n           messageL10nDateFormat24: 'report-dateTimeFormat24'\n         };\n       });\n \n-      test('no read report', function() {\n-        messageOpts = {\n-          sender: null,\n-          delivery: 'sent',\n-          deliveryInfo: [{\n-            receiver: 'receiver',\n-            readStatus: 'not-applicable'\n-          }]\n-        };\n-        reportView.id = 2;\n-        reportView.render();\n-        data.readClass = 'hide';\n-        sinon.assert.calledWith(Template.prototype.interpolate, data);\n+      suite('no read report', function() {\n+        setup(function() {\n+          messageOpts = {\n+            sender: null,\n+            delivery: 'sent',\n+            deliveryInfo: [{\n+              receiver: 'receiver',\n+              readStatus: 'not-applicable'\n+            }]\n+          };\n+          reportView.id = 2;\n+        });\n+\n+        ['not-applicable', 'pending', 'success', 'error'].forEach((delivery) =>{\n+          test('when delivery status is ' + delivery, function() {\n+            var deliveryInfo = messageOpts.deliveryInfo[0];\n+            deliveryInfo.deliveryStatus = delivery;\n+            deliveryInfo.deliveryTimestamp =","path":"apps/sms/test/unit/information_test.js","position":558,"original_position":558,"commit_id":"cbea4d3a5ae5f13e94d0753d7007fdbb5198d06d","original_commit_id":"cbea4d3a5ae5f13e94d0753d7007fdbb5198d06d","user":{"login":"azasypkin","id":1713708,"avatar_url":"https://avatars.githubusercontent.com/u/1713708?v=2","gravatar_id":"","url":"https://api.github.com/users/azasypkin","html_url":"https://github.com/azasypkin","followers_url":"https://api.github.com/users/azasypkin/followers","following_url":"https://api.github.com/users/azasypkin/following{/other_user}","gists_url":"https://api.github.com/users/azasypkin/gists{/gist_id}","starred_url":"https://api.github.com/users/azasypkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azasypkin/subscriptions","organizations_url":"https://api.github.com/users/azasypkin/orgs","repos_url":"https://api.github.com/users/azasypkin/repos","events_url":"https://api.github.com/users/azasypkin/events{/privacy}","received_events_url":"https://api.github.com/users/azasypkin/received_events","type":"User","site_admin":false},"body":"I'm fine with any that we agree on :)\r\n\r\n> Maybe we should separate each condition in different line?\r\n\r\nDo you mean this one?\r\n\r\n```\r\ndeliveryInfo.deliveryTimestamp = delivery === 'success' ?\r\n  Date.now() : \r\n  null;\r\n```","created_at":"2014-10-08T11:27:28Z","updated_at":"2014-10-08T11:27:28Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/24761#discussion_r18575942","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24761","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/18575942"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/24761#discussion_r18575942"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24761"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24761","id":22216128,"html_url":"https://github.com/mozilla-b2g/gaia/pull/24761","diff_url":"https://github.com/mozilla-b2g/gaia/pull/24761.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/24761.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/24761","number":24761,"state":"open","locked":false,"title":"Bug 1021608 - [Messages] Report view visual refresh","user":{"login":"steveck-chung","id":1704452,"avatar_url":"https://avatars.githubusercontent.com/u/1704452?v=2","gravatar_id":"","url":"https://api.github.com/users/steveck-chung","html_url":"https://github.com/steveck-chung","followers_url":"https://api.github.com/users/steveck-chung/followers","following_url":"https://api.github.com/users/steveck-chung/following{/other_user}","gists_url":"https://api.github.com/users/steveck-chung/gists{/gist_id}","starred_url":"https://api.github.com/users/steveck-chung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveck-chung/subscriptions","organizations_url":"https://api.github.com/users/steveck-chung/orgs","repos_url":"https://api.github.com/users/steveck-chung/repos","events_url":"https://api.github.com/users/steveck-chung/events{/privacy}","received_events_url":"https://api.github.com/users/steveck-chung/received_events","type":"User","site_admin":false},"body":"- Report view visual refresh\r\n- Adding a resend button in error status report page\r\n- Add more message event listener for report view update\r\n\r\n","created_at":"2014-10-03T17:08:49Z","updated_at":"2014-10-08T11:27:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e7b0ee703e67360a53786513c4151e7c9a52115","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24761/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24761/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/24761/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/cbea4d3a5ae5f13e94d0753d7007fdbb5198d06d","head":{"label":"steveck-chung:message-report-view-refresh-and-test","ref":"message-report-view-refresh-and-test","sha":"cbea4d3a5ae5f13e94d0753d7007fdbb5198d06d","user":{"login":"steveck-chung","id":1704452,"avatar_url":"https://avatars.githubusercontent.com/u/1704452?v=2","gravatar_id":"","url":"https://api.github.com/users/steveck-chung","html_url":"https://github.com/steveck-chung","followers_url":"https://api.github.com/users/steveck-chung/followers","following_url":"https://api.github.com/users/steveck-chung/following{/other_user}","gists_url":"https://api.github.com/users/steveck-chung/gists{/gist_id}","starred_url":"https://api.github.com/users/steveck-chung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveck-chung/subscriptions","organizations_url":"https://api.github.com/users/steveck-chung/orgs","repos_url":"https://api.github.com/users/steveck-chung/repos","events_url":"https://api.github.com/users/steveck-chung/events{/privacy}","received_events_url":"https://api.github.com/users/steveck-chung/received_events","type":"User","site_admin":false},"repo":{"id":4223220,"name":"gaia","full_name":"steveck-chung/gaia","owner":{"login":"steveck-chung","id":1704452,"avatar_url":"https://avatars.githubusercontent.com/u/1704452?v=2","gravatar_id":"","url":"https://api.github.com/users/steveck-chung","html_url":"https://github.com/steveck-chung","followers_url":"https://api.github.com/users/steveck-chung/followers","following_url":"https://api.github.com/users/steveck-chung/following{/other_user}","gists_url":"https://api.github.com/users/steveck-chung/gists{/gist_id}","starred_url":"https://api.github.com/users/steveck-chung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveck-chung/subscriptions","organizations_url":"https://api.github.com/users/steveck-chung/orgs","repos_url":"https://api.github.com/users/steveck-chung/repos","events_url":"https://api.github.com/users/steveck-chung/events{/privacy}","received_events_url":"https://api.github.com/users/steveck-chung/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/steveck-chung/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project","fork":true,"url":"https://api.github.com/repos/steveck-chung/gaia","forks_url":"https://api.github.com/repos/steveck-chung/gaia/forks","keys_url":"https://api.github.com/repos/steveck-chung/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/steveck-chung/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/steveck-chung/gaia/teams","hooks_url":"https://api.github.com/repos/steveck-chung/gaia/hooks","issue_events_url":"https://api.github.com/repos/steveck-chung/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/steveck-chung/gaia/events","assignees_url":"https://api.github.com/repos/steveck-chung/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/steveck-chung/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/steveck-chung/gaia/tags","blobs_url":"https://api.github.com/repos/steveck-chung/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/steveck-chung/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/steveck-chung/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/steveck-chung/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/steveck-chung/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/steveck-chung/gaia/languages","stargazers_url":"https://api.github.com/repos/steveck-chung/gaia/stargazers","contributors_url":"https://api.github.com/repos/steveck-chung/gaia/contributors","subscribers_url":"https://api.github.com/repos/steveck-chung/gaia/subscribers","subscription_url":"https://api.github.com/repos/steveck-chung/gaia/subscription","commits_url":"https://api.github.com/repos/steveck-chung/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/steveck-chung/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/steveck-chung/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/steveck-chung/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/steveck-chung/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/steveck-chung/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/steveck-chung/gaia/merges","archive_url":"https://api.github.com/repos/steveck-chung/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/steveck-chung/gaia/downloads","issues_url":"https://api.github.com/repos/steveck-chung/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/steveck-chung/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/steveck-chung/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/steveck-chung/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/steveck-chung/gaia/labels{/name}","releases_url":"https://api.github.com/repos/steveck-chung/gaia/releases{/id}","created_at":"2012-05-04T09:08:36Z","updated_at":"2014-06-18T06:34:24Z","pushed_at":"2014-10-06T03:40:11Z","git_url":"git://github.com/steveck-chung/gaia.git","ssh_url":"git@github.com:steveck-chung/gaia.git","clone_url":"https://github.com/steveck-chung/gaia.git","svn_url":"https://github.com/steveck-chung/gaia","homepage":"https://wiki.mozilla.org/B2G","size":853644,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"6394efe72ce08843ef183d42d7eb1f8263be47ed","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2014-10-07T15:13:55Z","pushed_at":"2014-10-08T10:56:19Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1480826,"stargazers_count":1763,"watchers_count":1763,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1968,"mirror_url":null,"open_issues_count":454,"forks":1968,"open_issues":454,"watchers":1763,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24761"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/24761"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/24761"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/24761/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24761/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/24761/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/cbea4d3a5ae5f13e94d0753d7007fdbb5198d06d"}}}}