{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/63913212","id":63913212,"diff_hunk":"@@ -0,0 +1,446 @@\n+import { set } from 'ember-metal/property_set';\n+import TextField from 'ember-templates/components/text_field';\n+import Checkbox from 'ember-templates/components/checkbox';\n+import { RenderingTest, moduleFor } from '../../utils/test-case';\n+\n+class InputRenderingTest extends RenderingTest {\n+  constructor() {\n+    super();\n+\n+    this.registerComponent('-text-field', { ComponentClass: TextField });\n+    this.registerComponent('-checkbox', { ComponentClass: Checkbox });\n+  }\n+\n+  $input() {\n+    return this.$('input');\n+  }\n+\n+  inputID() {\n+    return this.$input().prop('id');\n+  }\n+\n+  assertDisabled() {\n+    this.assert.ok(this.$('input').is(':disabled'), 'The input is disabled');\n+  }\n+\n+  assertNotDisabled() {\n+    this.assert.ok(this.$('input').is(':not(:disabled)'), 'The input is not disabled');\n+  }\n+\n+  assertInputId(expectedId) {\n+    this.assert.equal(this.inputID(), expectedId, 'the input id should be `expectedId`');\n+  }\n+\n+  assertSingleInput() {\n+    this.assert.equal(this.$('input').length, 1, 'A single text field was inserted');\n+  }\n+\n+  assertSingleCheckbox() {\n+    this.assert.equal(this.$('input[type=checkbox]').length, 1, 'A single checkbox is added');\n+  }\n+\n+  assertCheckboxIsChecked() {\n+    this.assert.equal(this.$input().prop('checked'), true, 'the checkbox is checked');\n+  }\n+\n+  assertCheckboxIsNotChecked() {\n+    this.assert.equal(this.$input().prop('checked'), false, 'the checkbox is not checked');\n+  }\n+\n+  assertValue(expected) {\n+    this.assert.equal(this.$input().val(), expected, `the input value should be ${expected}`);\n+  }\n+\n+  assertAttr(name, expected) {\n+    this.assert.equal(this.$input().attr(name), expected, `the input ${name} attribute has the value '${expected}'`);\n+  }\n+\n+  assertAllAttrs(names, expected) {\n+    names.forEach((name) => this.assertAttr(name, expected));\n+  }\n+\n+  assertSelectionRange(start, end) {\n+    let input = this.$input()[0];\n+    this.assert.equal(input.selectionStart, start, `the cursor start position should be ${start}`);\n+    this.assert.equal(input.selectionEnd, end, `the cursor end position should be ${end}`);\n+  }\n+}\n+\n+moduleFor('@htmlbars Helpers test: {{input}}', class extends InputRenderingTest {\n+\n+  ['@test a single text field is inserted into the DOM'](assert) {\n+    this.render(`{{input type=\"text\" value=value}}`, { value: 'hello' });\n+\n+    let id = this.inputID();\n+\n+    this.assertValue('hello');\n+    this.assertSingleInput();\n+\n+    this.runTask(() => this.rerender());\n+\n+    this.assertValue('hello');\n+    this.assertSingleInput();\n+    this.assertInputId(id);\n+\n+    this.runTask(() => set(this.context, 'value', 'goodbye'));\n+\n+    this.assertValue('goodbye');\n+    this.assertSingleInput();\n+    this.assertInputId(id);\n+\n+    this.runTask(() => set(this.context, 'value', 'hello'));\n+\n+    this.assertValue('hello');\n+    this.assertSingleInput();\n+    this.assertInputId(id);\n+  }\n+\n+  ['@test default type']() {\n+    this.render(`{{input}}`);\n+\n+    this.assertAttr('type', 'text');\n+\n+    this.runTask(() => this.rerender());\n+\n+    this.assertAttr('type', 'text');\n+  }\n+\n+  ['@test dynamic attributes']() {\n+    this.render(`\n+      {{input type=\"text\"\n+        disabled=disabled\n+        value=value\n+        placeholder=placeholder\n+        name=name\n+        maxlength=maxlength\n+        size=size\n+        tabindex=tabindex\n+      }}`, {\n+        disabled: false,\n+        value: 'Original value',\n+        placeholder: 'Original placeholder',\n+        name: 'original-name',\n+        maxlength: 10,\n+        size: 20,\n+        tabindex: 30\n+      }\n+    );\n+\n+    this.assertNotDisabled();\n+    this.assertValue('Original value');\n+    this.assertAttr('placeholder', 'Original placeholder');\n+    this.assertAttr('name', 'original-name');\n+    this.assertAttr('maxlength', '10');\n+    // this.assertAttr('size', '20');","path":"packages/ember-glimmer/tests/integration/helpers/input-test.js","position":null,"original_position":134,"commit_id":"3b53bd9f494f3640164c09336e99dccb6627f8f5","original_commit_id":"b0a93be02b2c47e036598b4e498b41be8e59bb80","user":{"login":"GavinJoyce","id":2526,"avatar_url":"https://avatars.githubusercontent.com/u/2526?v=3","gravatar_id":"","url":"https://api.github.com/users/GavinJoyce","html_url":"https://github.com/GavinJoyce","followers_url":"https://api.github.com/users/GavinJoyce/followers","following_url":"https://api.github.com/users/GavinJoyce/following{/other_user}","gists_url":"https://api.github.com/users/GavinJoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/GavinJoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GavinJoyce/subscriptions","organizations_url":"https://api.github.com/users/GavinJoyce/orgs","repos_url":"https://api.github.com/users/GavinJoyce/repos","events_url":"https://api.github.com/users/GavinJoyce/events{/privacy}","received_events_url":"https://api.github.com/users/GavinJoyce/received_events","type":"User","site_admin":false},"body":"@krisselden most of the failures are `@htmlbars`. I've duplicated the tests and commented out the failing lines for `@htmlbars`. I've one last test to do later and we should be good to","created_at":"2016-05-19T16:43:02Z","updated_at":"2016-05-19T16:43:02Z","html_url":"https://github.com/emberjs/ember.js/pull/13194#discussion_r63913212","pull_request_url":"https://api.github.com/repos/emberjs/ember.js/pulls/13194","_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/63913212"},"html":{"href":"https://github.com/emberjs/ember.js/pull/13194#discussion_r63913212"},"pull_request":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/13194"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/13194","id":64272734,"html_url":"https://github.com/emberjs/ember.js/pull/13194","diff_url":"https://github.com/emberjs/ember.js/pull/13194.diff","patch_url":"https://github.com/emberjs/ember.js/pull/13194.patch","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/13194","number":13194,"state":"open","locked":false,"title":"[wip] [Glimmer2] port {{input}} helper tests","user":{"login":"GavinJoyce","id":2526,"avatar_url":"https://avatars.githubusercontent.com/u/2526?v=3","gravatar_id":"","url":"https://api.github.com/users/GavinJoyce","html_url":"https://github.com/GavinJoyce","followers_url":"https://api.github.com/users/GavinJoyce/followers","following_url":"https://api.github.com/users/GavinJoyce/following{/other_user}","gists_url":"https://api.github.com/users/GavinJoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/GavinJoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GavinJoyce/subscriptions","organizations_url":"https://api.github.com/users/GavinJoyce/orgs","repos_url":"https://api.github.com/users/GavinJoyce/repos","events_url":"https://api.github.com/users/GavinJoyce/events{/privacy}","received_events_url":"https://api.github.com/users/GavinJoyce/received_events","type":"User","site_admin":false},"body":"Part of https://github.com/emberjs/ember.js/issues/13127\r\n\r\nTODO:\r\n\r\n * [x] port main tests\r\n * [x] port remaining two tests\r\n * [x] refactor to remove boilerplate\r\n * [ ] 🍏 build (there are some tests failing in saucelabs possible due to a [bug with `{{input}}` on firefox](https://ember-twiddle.com/33e506329f8176ae874422644d4cc08c?fileTreeShown=false&openFiles=components.input-component.js%2Ctemplates.components.input-component.hbs)?)\r\n * [x] annotate/deleted moved tests\r\n * [x] comment on commented out `null` tests ([comment here](https://github.com/emberjs/ember.js/pull/13194#discussion_r60652043))","created_at":"2016-03-27T19:02:06Z","updated_at":"2016-05-19T16:43:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f405c1ee42d7453ffcd83e63188e14cf073b458","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/ember.js/pulls/13194/commits","review_comments_url":"https://api.github.com/repos/emberjs/ember.js/pulls/13194/comments","review_comment_url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/13194/comments","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/3b53bd9f494f3640164c09336e99dccb6627f8f5","head":{"label":"GavinJoyce:gj/glimmer2-port-input-helper-tests","ref":"gj/glimmer2-port-input-helper-tests","sha":"3b53bd9f494f3640164c09336e99dccb6627f8f5","user":{"login":"GavinJoyce","id":2526,"avatar_url":"https://avatars.githubusercontent.com/u/2526?v=3","gravatar_id":"","url":"https://api.github.com/users/GavinJoyce","html_url":"https://github.com/GavinJoyce","followers_url":"https://api.github.com/users/GavinJoyce/followers","following_url":"https://api.github.com/users/GavinJoyce/following{/other_user}","gists_url":"https://api.github.com/users/GavinJoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/GavinJoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GavinJoyce/subscriptions","organizations_url":"https://api.github.com/users/GavinJoyce/orgs","repos_url":"https://api.github.com/users/GavinJoyce/repos","events_url":"https://api.github.com/users/GavinJoyce/events{/privacy}","received_events_url":"https://api.github.com/users/GavinJoyce/received_events","type":"User","site_admin":false},"repo":{"id":50780854,"name":"ember.js","full_name":"GavinJoyce/ember.js","owner":{"login":"GavinJoyce","id":2526,"avatar_url":"https://avatars.githubusercontent.com/u/2526?v=3","gravatar_id":"","url":"https://api.github.com/users/GavinJoyce","html_url":"https://github.com/GavinJoyce","followers_url":"https://api.github.com/users/GavinJoyce/followers","following_url":"https://api.github.com/users/GavinJoyce/following{/other_user}","gists_url":"https://api.github.com/users/GavinJoyce/gists{/gist_id}","starred_url":"https://api.github.com/users/GavinJoyce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GavinJoyce/subscriptions","organizations_url":"https://api.github.com/users/GavinJoyce/orgs","repos_url":"https://api.github.com/users/GavinJoyce/repos","events_url":"https://api.github.com/users/GavinJoyce/events{/privacy}","received_events_url":"https://api.github.com/users/GavinJoyce/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GavinJoyce/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":true,"url":"https://api.github.com/repos/GavinJoyce/ember.js","forks_url":"https://api.github.com/repos/GavinJoyce/ember.js/forks","keys_url":"https://api.github.com/repos/GavinJoyce/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GavinJoyce/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GavinJoyce/ember.js/teams","hooks_url":"https://api.github.com/repos/GavinJoyce/ember.js/hooks","issue_events_url":"https://api.github.com/repos/GavinJoyce/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/GavinJoyce/ember.js/events","assignees_url":"https://api.github.com/repos/GavinJoyce/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/GavinJoyce/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/GavinJoyce/ember.js/tags","blobs_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GavinJoyce/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/GavinJoyce/ember.js/languages","stargazers_url":"https://api.github.com/repos/GavinJoyce/ember.js/stargazers","contributors_url":"https://api.github.com/repos/GavinJoyce/ember.js/contributors","subscribers_url":"https://api.github.com/repos/GavinJoyce/ember.js/subscribers","subscription_url":"https://api.github.com/repos/GavinJoyce/ember.js/subscription","commits_url":"https://api.github.com/repos/GavinJoyce/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/GavinJoyce/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/GavinJoyce/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/GavinJoyce/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/GavinJoyce/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/GavinJoyce/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GavinJoyce/ember.js/merges","archive_url":"https://api.github.com/repos/GavinJoyce/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GavinJoyce/ember.js/downloads","issues_url":"https://api.github.com/repos/GavinJoyce/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/GavinJoyce/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/GavinJoyce/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/GavinJoyce/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GavinJoyce/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/GavinJoyce/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/GavinJoyce/ember.js/deployments","created_at":"2016-01-31T15:27:27Z","updated_at":"2016-01-31T15:27:31Z","pushed_at":"2016-05-19T12:19:14Z","git_url":"git://github.com/GavinJoyce/ember.js.git","ssh_url":"git@github.com:GavinJoyce/ember.js.git","clone_url":"https://github.com/GavinJoyce/ember.js.git","svn_url":"https://github.com/GavinJoyce/ember.js","homepage":"http://www.emberjs.com","size":33332,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"emberjs:master","ref":"master","sha":"42051ac6f38cac6ab997874e097c123bfabd541f","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":1801829,"name":"ember.js","full_name":"emberjs/ember.js","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emberjs/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":false,"url":"https://api.github.com/repos/emberjs/ember.js","forks_url":"https://api.github.com/repos/emberjs/ember.js/forks","keys_url":"https://api.github.com/repos/emberjs/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/ember.js/teams","hooks_url":"https://api.github.com/repos/emberjs/ember.js/hooks","issue_events_url":"https://api.github.com/repos/emberjs/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/ember.js/events","assignees_url":"https://api.github.com/repos/emberjs/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/ember.js/tags","blobs_url":"https://api.github.com/repos/emberjs/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/ember.js/languages","stargazers_url":"https://api.github.com/repos/emberjs/ember.js/stargazers","contributors_url":"https://api.github.com/repos/emberjs/ember.js/contributors","subscribers_url":"https://api.github.com/repos/emberjs/ember.js/subscribers","subscription_url":"https://api.github.com/repos/emberjs/ember.js/subscription","commits_url":"https://api.github.com/repos/emberjs/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/emberjs/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/ember.js/merges","archive_url":"https://api.github.com/repos/emberjs/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/ember.js/downloads","issues_url":"https://api.github.com/repos/emberjs/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/emberjs/ember.js/deployments","created_at":"2011-05-25T23:39:40Z","updated_at":"2016-05-19T13:37:36Z","pushed_at":"2016-05-19T14:02:10Z","git_url":"git://github.com/emberjs/ember.js.git","ssh_url":"git@github.com:emberjs/ember.js.git","clone_url":"https://github.com/emberjs/ember.js.git","svn_url":"https://github.com/emberjs/ember.js","homepage":"http://www.emberjs.com","size":68423,"stargazers_count":16225,"watchers_count":16225,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3487,"mirror_url":null,"open_issues_count":242,"forks":3487,"open_issues":242,"watchers":16225,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/13194"},"html":{"href":"https://github.com/emberjs/ember.js/pull/13194"},"issue":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/13194"},"comments":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/13194/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/13194/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/13194/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/ember.js/statuses/3b53bd9f494f3640164c09336e99dccb6627f8f5"}}}}