{"action":"created","comment":{"url":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/comments/34518313","id":34518313,"diff_hunk":"@@ -0,0 +1,125 @@\n+import { Editor } from 'content-kit-editor';\n+import Helpers from '../test-helpers';\n+\n+const { test, module } = QUnit;\n+\n+let fixture, editor, editorElement, selectedText;\n+\n+module('Acceptance: Editor commands', {\n+  beforeEach() {\n+    fixture = document.getElementById('qunit-fixture');\n+    editorElement = document.createElement('div');\n+    editorElement.setAttribute('id', 'editor');\n+    editorElement.innerHTML = 'THIS IS A TEST';\n+    fixture.appendChild(editorElement);\n+    editor = new Editor(editorElement);\n+\n+    selectedText = 'IS A';\n+    Helpers.dom.selectText(selectedText, editorElement);\n+    Helpers.dom.triggerEvent(document, 'mouseup');","path":"tests/acceptance/editor-commands-test.js","position":19,"original_position":19,"commit_id":"6e30ac8f5da89973f6aaeb8daa9f47752711a776","original_commit_id":"6e30ac8f5da89973f6aaeb8daa9f47752711a776","user":{"login":"mixonic","id":8752,"avatar_url":"https://avatars.githubusercontent.com/u/8752?v=3","gravatar_id":"","url":"https://api.github.com/users/mixonic","html_url":"https://github.com/mixonic","followers_url":"https://api.github.com/users/mixonic/followers","following_url":"https://api.github.com/users/mixonic/following{/other_user}","gists_url":"https://api.github.com/users/mixonic/gists{/gist_id}","starred_url":"https://api.github.com/users/mixonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixonic/subscriptions","organizations_url":"https://api.github.com/users/mixonic/orgs","repos_url":"https://api.github.com/users/mixonic/repos","events_url":"https://api.github.com/users/mixonic/events{/privacy}","received_events_url":"https://api.github.com/users/mixonic/received_events","type":"User","site_admin":false},"body":"You could just add the async control here:\r\n\r\n```\r\nwindow.QUnit.stop();\r\nsetTimeout(window.QUnit.start, 10);\r\n```","created_at":"2015-07-13T22:13:31Z","updated_at":"2015-07-13T22:13:31Z","html_url":"https://github.com/bustlelabs/content-kit-editor/pull/17#discussion_r34518313","pull_request_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/comments/34518313"},"html":{"href":"https://github.com/bustlelabs/content-kit-editor/pull/17#discussion_r34518313"},"pull_request":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/17","id":39849361,"html_url":"https://github.com/bustlelabs/content-kit-editor/pull/17","diff_url":"https://github.com/bustlelabs/content-kit-editor/pull/17.diff","patch_url":"https://github.com/bustlelabs/content-kit-editor/pull/17.patch","issue_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues/17","number":17,"state":"open","locked":false,"title":"Editor commands tests","user":{"login":"bantic","id":2023,"avatar_url":"https://avatars.githubusercontent.com/u/2023?v=3","gravatar_id":"","url":"https://api.github.com/users/bantic","html_url":"https://github.com/bantic","followers_url":"https://api.github.com/users/bantic/followers","following_url":"https://api.github.com/users/bantic/following{/other_user}","gists_url":"https://api.github.com/users/bantic/gists{/gist_id}","starred_url":"https://api.github.com/users/bantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bantic/subscriptions","organizations_url":"https://api.github.com/users/bantic/orgs","repos_url":"https://api.github.com/users/bantic/repos","events_url":"https://api.github.com/users/bantic/events{/privacy}","received_events_url":"https://api.github.com/users/bantic/received_events","type":"User","site_admin":false},"body":"@mixonic for you\r\n\r\n  * fixed many jshint failures\r\n  * test for displaying toolbar, clicking the b, i, link, heading, subheading and blockquote buttons\r\n  * misc tests for `editor#destroy` cleanup of views (specifically, removing the toolbar)\r\n  * qunit `hasElement` and `hasNoElement` assertions\r\n  * test helpers for dom interaction: `selectText(text, containingElement)`, `triggerEvent`, `triggerKeyEvent`\r\n  * ~~bring in `KeyboardEvent` [polyfill](https://github.com/BladeRunnerJS/keyboard-event) for tests~~\r\n  * skip 1 link test when running via phantom — I could not find a solid way to simulate a keyboard event in phantomjs\r\n\r\nThese tests now pass in all mac browsers *and* phantomjs.\r\nThere is an existing failing test in Firefox that is not from this PR.","created_at":"2015-07-13T19:52:54Z","updated_at":"2015-07-13T22:13:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc49a9ded8722d59680368840f6c44437992ce7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/17/commits","review_comments_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/17/comments","review_comment_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues/17/comments","statuses_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/statuses/6e30ac8f5da89973f6aaeb8daa9f47752711a776","head":{"label":"bustlelabs:editor-commands-tests","ref":"editor-commands-tests","sha":"6e30ac8f5da89973f6aaeb8daa9f47752711a776","user":{"login":"bustlelabs","id":2198187,"avatar_url":"https://avatars.githubusercontent.com/u/2198187?v=3","gravatar_id":"","url":"https://api.github.com/users/bustlelabs","html_url":"https://github.com/bustlelabs","followers_url":"https://api.github.com/users/bustlelabs/followers","following_url":"https://api.github.com/users/bustlelabs/following{/other_user}","gists_url":"https://api.github.com/users/bustlelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/bustlelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bustlelabs/subscriptions","organizations_url":"https://api.github.com/users/bustlelabs/orgs","repos_url":"https://api.github.com/users/bustlelabs/repos","events_url":"https://api.github.com/users/bustlelabs/events{/privacy}","received_events_url":"https://api.github.com/users/bustlelabs/received_events","type":"Organization","site_admin":false},"repo":{"id":21694966,"name":"content-kit-editor","full_name":"bustlelabs/content-kit-editor","owner":{"login":"bustlelabs","id":2198187,"avatar_url":"https://avatars.githubusercontent.com/u/2198187?v=3","gravatar_id":"","url":"https://api.github.com/users/bustlelabs","html_url":"https://github.com/bustlelabs","followers_url":"https://api.github.com/users/bustlelabs/followers","following_url":"https://api.github.com/users/bustlelabs/following{/other_user}","gists_url":"https://api.github.com/users/bustlelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/bustlelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bustlelabs/subscriptions","organizations_url":"https://api.github.com/users/bustlelabs/orgs","repos_url":"https://api.github.com/users/bustlelabs/repos","events_url":"https://api.github.com/users/bustlelabs/events{/privacy}","received_events_url":"https://api.github.com/users/bustlelabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bustlelabs/content-kit-editor","description":"A modern, minimalist WYSIWYG editor","fork":false,"url":"https://api.github.com/repos/bustlelabs/content-kit-editor","forks_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/forks","keys_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/teams","hooks_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/hooks","issue_events_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues/events{/number}","events_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/events","assignees_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/assignees{/user}","branches_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/branches{/branch}","tags_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/tags","blobs_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/refs{/sha}","trees_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/statuses/{sha}","languages_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/languages","stargazers_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/stargazers","contributors_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/contributors","subscribers_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/subscribers","subscription_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/subscription","commits_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/commits{/sha}","git_commits_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/commits{/sha}","comments_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/comments{/number}","issue_comment_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues/comments{/number}","contents_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/contents/{+path}","compare_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/merges","archive_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/downloads","issues_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues{/number}","pulls_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls{/number}","milestones_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/milestones{/number}","notifications_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/labels{/name}","releases_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/releases{/id}","created_at":"2014-07-10T13:22:19Z","updated_at":"2015-06-28T23:50:32Z","pushed_at":"2015-07-13T20:58:15Z","git_url":"git://github.com/bustlelabs/content-kit-editor.git","ssh_url":"git@github.com:bustlelabs/content-kit-editor.git","clone_url":"https://github.com/bustlelabs/content-kit-editor.git","svn_url":"https://github.com/bustlelabs/content-kit-editor","homepage":"","size":1190,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":18,"default_branch":"master"}},"base":{"label":"bustlelabs:summertime","ref":"summertime","sha":"4a6edfb638b3f314db65890798dec99ba326266b","user":{"login":"bustlelabs","id":2198187,"avatar_url":"https://avatars.githubusercontent.com/u/2198187?v=3","gravatar_id":"","url":"https://api.github.com/users/bustlelabs","html_url":"https://github.com/bustlelabs","followers_url":"https://api.github.com/users/bustlelabs/followers","following_url":"https://api.github.com/users/bustlelabs/following{/other_user}","gists_url":"https://api.github.com/users/bustlelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/bustlelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bustlelabs/subscriptions","organizations_url":"https://api.github.com/users/bustlelabs/orgs","repos_url":"https://api.github.com/users/bustlelabs/repos","events_url":"https://api.github.com/users/bustlelabs/events{/privacy}","received_events_url":"https://api.github.com/users/bustlelabs/received_events","type":"Organization","site_admin":false},"repo":{"id":21694966,"name":"content-kit-editor","full_name":"bustlelabs/content-kit-editor","owner":{"login":"bustlelabs","id":2198187,"avatar_url":"https://avatars.githubusercontent.com/u/2198187?v=3","gravatar_id":"","url":"https://api.github.com/users/bustlelabs","html_url":"https://github.com/bustlelabs","followers_url":"https://api.github.com/users/bustlelabs/followers","following_url":"https://api.github.com/users/bustlelabs/following{/other_user}","gists_url":"https://api.github.com/users/bustlelabs/gists{/gist_id}","starred_url":"https://api.github.com/users/bustlelabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bustlelabs/subscriptions","organizations_url":"https://api.github.com/users/bustlelabs/orgs","repos_url":"https://api.github.com/users/bustlelabs/repos","events_url":"https://api.github.com/users/bustlelabs/events{/privacy}","received_events_url":"https://api.github.com/users/bustlelabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bustlelabs/content-kit-editor","description":"A modern, minimalist WYSIWYG editor","fork":false,"url":"https://api.github.com/repos/bustlelabs/content-kit-editor","forks_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/forks","keys_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/teams","hooks_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/hooks","issue_events_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues/events{/number}","events_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/events","assignees_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/assignees{/user}","branches_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/branches{/branch}","tags_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/tags","blobs_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/refs{/sha}","trees_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/statuses/{sha}","languages_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/languages","stargazers_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/stargazers","contributors_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/contributors","subscribers_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/subscribers","subscription_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/subscription","commits_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/commits{/sha}","git_commits_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/git/commits{/sha}","comments_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/comments{/number}","issue_comment_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues/comments{/number}","contents_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/contents/{+path}","compare_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/merges","archive_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/downloads","issues_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues{/number}","pulls_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls{/number}","milestones_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/milestones{/number}","notifications_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/labels{/name}","releases_url":"https://api.github.com/repos/bustlelabs/content-kit-editor/releases{/id}","created_at":"2014-07-10T13:22:19Z","updated_at":"2015-06-28T23:50:32Z","pushed_at":"2015-07-13T20:58:15Z","git_url":"git://github.com/bustlelabs/content-kit-editor.git","ssh_url":"git@github.com:bustlelabs/content-kit-editor.git","clone_url":"https://github.com/bustlelabs/content-kit-editor.git","svn_url":"https://github.com/bustlelabs/content-kit-editor","homepage":"","size":1190,"stargazers_count":18,"watchers_count":18,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/17"},"html":{"href":"https://github.com/bustlelabs/content-kit-editor/pull/17"},"issue":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues/17"},"comments":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/bustlelabs/content-kit-editor/statuses/6e30ac8f5da89973f6aaeb8daa9f47752711a776"}}}}