{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/comments/157539874","pull_request_review_id":84194366,"id":157539874,"diff_hunk":"@@ -0,0 +1,203 @@\n+import Ember from 'ember';\n+import { moduleForComponent } from 'ember-qunit';\n+import test from 'ember-sinon-qunit/test-support/test';\n+import tHelper from 'ember-i18n/helper';\n+\n+\n+moduleForComponent('preprint-status-banner', 'Unit | Component | preprint status banner', {\n+    // Specify the other units that are required for this test\n+    // needs: ['component:foo', 'helper:bar'],\n+    unit: true,\n+    needs: [\n+        'model:action',\n+        'model:node',\n+        'model:user',\n+        'model:preprint',\n+        'model:preprint-provider',\n+        'model:institution',\n+        'model:comment',\n+        'model:contributor',\n+        'model:citation',\n+        'model:file-provider',\n+        'model:registration',\n+        'model:draft-registration',\n+        'model:log',\n+        'model:taxonomy',\n+        'model:license',\n+        'model:wiki',\n+        'service:i18n',\n+        'service:theme',\n+        'service:session',\n+        'service:head-tags',\n+    ],\n+});\n+\n+\n+test('getClassName computed property', function(assert) {\n+    this.inject.service('store');\n+    const component = this.subject();\n+\n+    Ember.run(() => {\n+        const node = this.store.createRecord('node', {\n+            title: 'test title',\n+            description: 'test description',\n+        });\n+\n+        const provider = this.store.createRecord('preprint-provider', {\n+            reviewsWorkflow: 'pre-moderation',\n+        });\n+\n+        const submission = this.store.createRecord('preprint', { node, provider });\n+        component.setProperties({ submission });\n+        component.set('reviewsWorkflow', 'pre-moderation');\n+\n+        component.set('submission.reviewsState', 'pending');\n+        assert.strictEqual(component.get('getClassName'), 'preprint-status-pending-pre');\n+\n+        component.set('submission.reviewsState', 'accepted');\n+        assert.strictEqual(component.get('getClassName'), 'preprint-status-accepted');\n+    });\n+});\n+\n+// Stub i18n service\n+const i18nStub = Ember.Service.extend({","path":"tests/unit/components/preprint-status-banner-test.js","position":63,"original_position":63,"commit_id":"8f61d0788513cfb1cfee07624028f80c8307f025","original_commit_id":"8f61d0788513cfb1cfee07624028f80c8307f025","user":{"login":"aaxelb","id":6776190,"avatar_url":"https://avatars3.githubusercontent.com/u/6776190?v=4","gravatar_id":"","url":"https://api.github.com/users/aaxelb","html_url":"https://github.com/aaxelb","followers_url":"https://api.github.com/users/aaxelb/followers","following_url":"https://api.github.com/users/aaxelb/following{/other_user}","gists_url":"https://api.github.com/users/aaxelb/gists{/gist_id}","starred_url":"https://api.github.com/users/aaxelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaxelb/subscriptions","organizations_url":"https://api.github.com/users/aaxelb/orgs","repos_url":"https://api.github.com/users/aaxelb/repos","events_url":"https://api.github.com/users/aaxelb/events{/privacy}","received_events_url":"https://api.github.com/users/aaxelb/received_events","type":"User","site_admin":false},"body":"Are translations unavailable during tests? Why do you need to stub `i18n`?","created_at":"2017-12-18T16:53:14Z","updated_at":"2017-12-18T16:54:18Z","html_url":"https://github.com/CenterForOpenScience/ember-osf-preprints/pull/502#discussion_r157539874","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/502","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/comments/157539874"},"html":{"href":"https://github.com/CenterForOpenScience/ember-osf-preprints/pull/502#discussion_r157539874"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/502"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/502","id":158641669,"html_url":"https://github.com/CenterForOpenScience/ember-osf-preprints/pull/502","diff_url":"https://github.com/CenterForOpenScience/ember-osf-preprints/pull/502.diff","patch_url":"https://github.com/CenterForOpenScience/ember-osf-preprints/pull/502.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/issues/502","number":502,"state":"open","locked":false,"title":"[Feature][EOSF-959] Add message about when DOI will be minted","user":{"login":"sheriefvt","id":11130339,"avatar_url":"https://avatars2.githubusercontent.com/u/11130339?v=4","gravatar_id":"","url":"https://api.github.com/users/sheriefvt","html_url":"https://github.com/sheriefvt","followers_url":"https://api.github.com/users/sheriefvt/followers","following_url":"https://api.github.com/users/sheriefvt/following{/other_user}","gists_url":"https://api.github.com/users/sheriefvt/gists{/gist_id}","starred_url":"https://api.github.com/users/sheriefvt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheriefvt/subscriptions","organizations_url":"https://api.github.com/users/sheriefvt/orgs","repos_url":"https://api.github.com/users/sheriefvt/repos","events_url":"https://api.github.com/users/sheriefvt/events{/privacy}","received_events_url":"https://api.github.com/users/sheriefvt/received_events","type":"User","site_admin":false},"body":"## Purpose\r\nAdd message about when DOI will be minted. Users will want to know when they will have a DOI for their preprint.\r\n\r\nfollow-up PR for previous PRs #475 and #501 \r\n\r\n## Summary of Changes\r\nif DOI: display DOI\r\nelse if node.private: \"DOI created after preprint is made public\"\r\nelse if workflow and !isPublished: \"DOI created after moderator approval\"\r\nelse: display nothing\r\n\r\n* Add unit tests for preprint-status-banner\r\n\r\n## Side Effects / Testing Notes\r\n\r\n\r\n\r\n## Ticket\r\n\r\nhttps://openscience.atlassian.net/browse/EOSF-959\r\n\r\n# Reviewer Checklist\r\n\r\n- [ ] meets requirements\r\n- [ ] easy to understand\r\n- [ ] DRY\r\n- [ ] testable and includes test(s)\r\n- [ ] changes described in `CHANGELOG.md`\r\n\r\n<!-- Please strike through any checks that you think are not relevant for this PR and indicate why, e.g.\r\n\r\n     - [ ] ~~easy to understand~~ *(necessarily complex)*\r\n-->\r\n","created_at":"2017-12-15T16:26:13Z","updated_at":"2017-12-18T16:54:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42270ccd50964e132b9c77a4d036a9d0b94d56ab","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/502/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/502/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/issues/502/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/statuses/8f61d0788513cfb1cfee07624028f80c8307f025","head":{"label":"sheriefvt:feature/EOSF-959","ref":"feature/EOSF-959","sha":"8f61d0788513cfb1cfee07624028f80c8307f025","user":{"login":"sheriefvt","id":11130339,"avatar_url":"https://avatars2.githubusercontent.com/u/11130339?v=4","gravatar_id":"","url":"https://api.github.com/users/sheriefvt","html_url":"https://github.com/sheriefvt","followers_url":"https://api.github.com/users/sheriefvt/followers","following_url":"https://api.github.com/users/sheriefvt/following{/other_user}","gists_url":"https://api.github.com/users/sheriefvt/gists{/gist_id}","starred_url":"https://api.github.com/users/sheriefvt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheriefvt/subscriptions","organizations_url":"https://api.github.com/users/sheriefvt/orgs","repos_url":"https://api.github.com/users/sheriefvt/repos","events_url":"https://api.github.com/users/sheriefvt/events{/privacy}","received_events_url":"https://api.github.com/users/sheriefvt/received_events","type":"User","site_admin":false},"repo":{"id":78126419,"name":"ember-preprints","full_name":"sheriefvt/ember-preprints","owner":{"login":"sheriefvt","id":11130339,"avatar_url":"https://avatars2.githubusercontent.com/u/11130339?v=4","gravatar_id":"","url":"https://api.github.com/users/sheriefvt","html_url":"https://github.com/sheriefvt","followers_url":"https://api.github.com/users/sheriefvt/followers","following_url":"https://api.github.com/users/sheriefvt/following{/other_user}","gists_url":"https://api.github.com/users/sheriefvt/gists{/gist_id}","starred_url":"https://api.github.com/users/sheriefvt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheriefvt/subscriptions","organizations_url":"https://api.github.com/users/sheriefvt/orgs","repos_url":"https://api.github.com/users/sheriefvt/repos","events_url":"https://api.github.com/users/sheriefvt/events{/privacy}","received_events_url":"https://api.github.com/users/sheriefvt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sheriefvt/ember-preprints","description":"This is the codebase for OSF Preprints, the open preprint repository network","fork":true,"url":"https://api.github.com/repos/sheriefvt/ember-preprints","forks_url":"https://api.github.com/repos/sheriefvt/ember-preprints/forks","keys_url":"https://api.github.com/repos/sheriefvt/ember-preprints/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sheriefvt/ember-preprints/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sheriefvt/ember-preprints/teams","hooks_url":"https://api.github.com/repos/sheriefvt/ember-preprints/hooks","issue_events_url":"https://api.github.com/repos/sheriefvt/ember-preprints/issues/events{/number}","events_url":"https://api.github.com/repos/sheriefvt/ember-preprints/events","assignees_url":"https://api.github.com/repos/sheriefvt/ember-preprints/assignees{/user}","branches_url":"https://api.github.com/repos/sheriefvt/ember-preprints/branches{/branch}","tags_url":"https://api.github.com/repos/sheriefvt/ember-preprints/tags","blobs_url":"https://api.github.com/repos/sheriefvt/ember-preprints/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sheriefvt/ember-preprints/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sheriefvt/ember-preprints/git/refs{/sha}","trees_url":"https://api.github.com/repos/sheriefvt/ember-preprints/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sheriefvt/ember-preprints/statuses/{sha}","languages_url":"https://api.github.com/repos/sheriefvt/ember-preprints/languages","stargazers_url":"https://api.github.com/repos/sheriefvt/ember-preprints/stargazers","contributors_url":"https://api.github.com/repos/sheriefvt/ember-preprints/contributors","subscribers_url":"https://api.github.com/repos/sheriefvt/ember-preprints/subscribers","subscription_url":"https://api.github.com/repos/sheriefvt/ember-preprints/subscription","commits_url":"https://api.github.com/repos/sheriefvt/ember-preprints/commits{/sha}","git_commits_url":"https://api.github.com/repos/sheriefvt/ember-preprints/git/commits{/sha}","comments_url":"https://api.github.com/repos/sheriefvt/ember-preprints/comments{/number}","issue_comment_url":"https://api.github.com/repos/sheriefvt/ember-preprints/issues/comments{/number}","contents_url":"https://api.github.com/repos/sheriefvt/ember-preprints/contents/{+path}","compare_url":"https://api.github.com/repos/sheriefvt/ember-preprints/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sheriefvt/ember-preprints/merges","archive_url":"https://api.github.com/repos/sheriefvt/ember-preprints/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sheriefvt/ember-preprints/downloads","issues_url":"https://api.github.com/repos/sheriefvt/ember-preprints/issues{/number}","pulls_url":"https://api.github.com/repos/sheriefvt/ember-preprints/pulls{/number}","milestones_url":"https://api.github.com/repos/sheriefvt/ember-preprints/milestones{/number}","notifications_url":"https://api.github.com/repos/sheriefvt/ember-preprints/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sheriefvt/ember-preprints/labels{/name}","releases_url":"https://api.github.com/repos/sheriefvt/ember-preprints/releases{/id}","deployments_url":"https://api.github.com/repos/sheriefvt/ember-preprints/deployments","created_at":"2017-01-05T15:51:15Z","updated_at":"2017-01-05T15:51:18Z","pushed_at":"2017-12-16T01:49:34Z","git_url":"git://github.com/sheriefvt/ember-preprints.git","ssh_url":"git@github.com:sheriefvt/ember-preprints.git","clone_url":"https://github.com/sheriefvt/ember-preprints.git","svn_url":"https://github.com/sheriefvt/ember-preprints","homepage":"https://osf.io/preprints/","size":19266,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:release/post-review-actions","ref":"release/post-review-actions","sha":"1a8215a1986bb6b50f4f9a11372224abcc2bc10d","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":63790282,"name":"ember-osf-preprints","full_name":"CenterForOpenScience/ember-osf-preprints","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars1.githubusercontent.com/u/3344584?v=4","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/ember-osf-preprints","description":"OSF Preprints: The open preprint repository network","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints","forks_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/deployments","created_at":"2016-07-20T14:56:36Z","updated_at":"2017-12-03T04:23:23Z","pushed_at":"2017-12-18T14:52:45Z","git_url":"git://github.com/CenterForOpenScience/ember-osf-preprints.git","ssh_url":"git@github.com:CenterForOpenScience/ember-osf-preprints.git","clone_url":"https://github.com/CenterForOpenScience/ember-osf-preprints.git","svn_url":"https://github.com/CenterForOpenScience/ember-osf-preprints","homepage":"https://osf.io/preprints/","size":19215,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":31,"open_issues":25,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/502"},"html":{"href":"https://github.com/CenterForOpenScience/ember-osf-preprints/pull/502"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/issues/502"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/issues/502/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/502/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/pulls/502/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-osf-preprints/statuses/8f61d0788513cfb1cfee07624028f80c8307f025"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"aaxelb"}}