GitHub PullRequestReviewCommentEvent at 2014-11-26 08:57:23
Repository: wymeditor
Actor: mightyiam
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/comments/20922545","id":20922545,"diff_hunk":"@@ -261,144 +263,150 @@ module(\"selection-_getSelectedNodes\", {setup: prepareUnitTestModule});\n // texts.\n // See https://github.com/wymeditor/wymeditor/issues/618.\n \n-testWymManipulation({\n-    testName: \"No selection\",\n-    startHtml: \"<p>Foo</p>\",\n-    prepareFunc: function (wymeditor) {\n-        wymeditor.deselect();\n-    },\n-    additionalAssertionsFunc: function (wymeditor) {\n-        expect(expect() + 1);\n-        ok(wymeditor._getSelectedNodes() === false);\n-    }\n+test(\"No selection\", function () {\n+    manipulationTestHelper({\n+        startHtml: \"<p>Foo</p>\",\n+        prepareFunc: function (wymeditor) {\n+            wymeditor.deselect();\n+        },\n+        additionalAssertionsFunc: function (wymeditor) {\n+            expect(expect() + 1);\n+            ok(wymeditor._getSelectedNodes() === false);\n+        }\n+    });\n });\n \n-testWymManipulation({\n-    testName: \"Collapsed selection\",\n-    startHtml: \"<p>Foo</p>\",\n-    prepareFunc: function (wymeditor) {\n-        wymeditor.setCaretIn(wymeditor.body().childNodes[0]);\n-    },\n-    additionalAssertionsFunc: function (wymeditor) {\n-        expect(expect() + 1);\n-        deepEqual(\n-            wymeditor._getSelectedNodes(),\n-            []\n-        );\n-    }\n+test(\"Collapsed selection\", function () {\n+    manipulationTestHelper({\n+        startHtml: \"<p>Foo</p>\",\n+        prepareFunc: function (wymeditor) {\n+            wymeditor.setCaretIn(wymeditor.body().childNodes[0]);\n+        },\n+        additionalAssertionsFunc: function (wymeditor) {\n+            expect(expect() + 1);\n+            deepEqual(\n+                wymeditor._getSelectedNodes(),\n+                []\n+            );\n+        }\n+    });\n });\n \n-testWymManipulation({\n-    testName: \"Single text node\",\n-    startHtml: \"<p>Foo</p>\",\n-    prepareFunc: function (wymeditor) {\n-        var range = rangy.createRange(wymeditor._doc),\n-            foo = wymeditor.body().childNodes[0].childNodes[0];\n+test(\"Single text node\", function () {\n+    manipulationTestHelper({\n+        startHtml: \"<p>Foo</p>\",\n+        prepareFunc: function (wymeditor) {\n+            var range = rangy.createRange(wymeditor._doc),\n+                foo = wymeditor.body().childNodes[0].childNodes[0];\n \n-        range.selectNode(foo);\n-        wymeditor.selection().setSingleRange(range);\n-    },\n-    additionalAssertionsFunc: function (wymeditor) {\n-        expect(expect() + 1);\n-        deepEqual(\n-            wymeditor.selection().getRangeAt(0).getNodes(),\n-            [wymeditor.body().childNodes[0].childNodes[0]]\n-        );\n-    }\n+            range.selectNode(foo);\n+            wymeditor.selection().setSingleRange(range);\n+        },\n+        additionalAssertionsFunc: function (wymeditor) {\n+            expect(expect() + 1);\n+            deepEqual(\n+                wymeditor.selection().getRangeAt(0).getNodes(),\n+                [wymeditor.body().childNodes[0].childNodes[0]]\n+            );\n+        }\n+    });\n });\n \n-testWymManipulation({\n-    testName: \"Partially selected text node\",\n-    startHtml: \"<p>Foo</p>\",\n-    prepareFunc: function (wymeditor) {\n-        var range = rangy.createRange(wymeditor._doc),\n-            foo = wymeditor.body().childNodes[0].childNodes[0];\n+test(\"Partially selected text node\", function () {\n+    manipulationTestHelper({\n+        startHtml: \"<p>Foo</p>\",\n+        prepareFunc: function (wymeditor) {\n+            var range = rangy.createRange(wymeditor._doc),\n+                foo = wymeditor.body().childNodes[0].childNodes[0];\n \n-        range.setStart(foo, 0);\n-        range.setEnd(foo, 1);\n-        wymeditor.selection().setSingleRange(range);\n-    },\n-    additionalAssertionsFunc: function (wymeditor) {\n-        expect(expect() + 1);\n-        deepEqual(\n-            wymeditor.selection().getRangeAt(0).getNodes(),\n-            [wymeditor.body().childNodes[0].childNodes[0]]\n-        );\n-    }\n+            range.setStart(foo, 0);\n+            range.setEnd(foo, 1);\n+            wymeditor.selection().setSingleRange(range);\n+        },\n+        additionalAssertionsFunc: function (wymeditor) {\n+            expect(expect() + 1);\n+            deepEqual(\n+                wymeditor.selection().getRangeAt(0).getNodes(),\n+                [wymeditor.body().childNodes[0].childNodes[0]]\n+            );\n+        }\n+    });\n });\n \n-testWymManipulation({\n-    testName: \"Two wholly selected text nodes\",\n-    startHtml: \"<p>Foo</p><p>Bar</p>\",\n-    prepareFunc: function (wymeditor) {\n-        var body = wymeditor.body(),\n-            range = rangy.createRange(wymeditor._doc),\n-            foo = body.childNodes[0].childNodes[0],\n-            bar = body.childNodes[1].childNodes[0];\n+test(\"Two wholly selected text nodes\", function () {\n+    manipulationTestHelper({\n+        startHtml: \"<p>Foo</p><p>Bar</p>\",","path":"src/test/unit/specific_feature_tests/selection.js","position":200,"original_position":200,"commit_id":"c068c62fcff2f160c7b14d49820cb425bdb67bf3","original_commit_id":"c068c62fcff2f160c7b14d49820cb425bdb67bf3","user":{"login":"mightyiam","id":635591,"avatar_url":"https://avatars.githubusercontent.com/u/635591?v=3","gravatar_id":"","url":"https://api.github.com/users/mightyiam","html_url":"https://github.com/mightyiam","followers_url":"https://api.github.com/users/mightyiam/followers","following_url":"https://api.github.com/users/mightyiam/following{/other_user}","gists_url":"https://api.github.com/users/mightyiam/gists{/gist_id}","starred_url":"https://api.github.com/users/mightyiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightyiam/subscriptions","organizations_url":"https://api.github.com/users/mightyiam/orgs","repos_url":"https://api.github.com/users/mightyiam/repos","events_url":"https://api.github.com/users/mightyiam/events{/privacy}","received_events_url":"https://api.github.com/users/mightyiam/received_events","type":"User","site_admin":false},"body":"Thanks. Looks weird but seems valid on closer look.","created_at":"2014-11-26T08:57:23Z","updated_at":"2014-11-26T08:57:23Z","html_url":"https://github.com/wymeditor/wymeditor/pull/627#discussion_r20922545","pull_request_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/627","_links":{"self":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/comments/20922545"},"html":{"href":"https://github.com/wymeditor/wymeditor/pull/627#discussion_r20922545"},"pull_request":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/627"}}},"pull_request":{"url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/627","id":25006941,"html_url":"https://github.com/wymeditor/wymeditor/pull/627","diff_url":"https://github.com/wymeditor/wymeditor/pull/627.diff","patch_url":"https://github.com/wymeditor/wymeditor/pull/627.patch","issue_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/627","number":627,"state":"closed","locked":false,"title":"manipulation test helper doesn't wrap test()","user":{"login":"mightyiam","id":635591,"avatar_url":"https://avatars.githubusercontent.com/u/635591?v=3","gravatar_id":"","url":"https://api.github.com/users/mightyiam","html_url":"https://github.com/mightyiam","followers_url":"https://api.github.com/users/mightyiam/followers","following_url":"https://api.github.com/users/mightyiam/following{/other_user}","gists_url":"https://api.github.com/users/mightyiam/gists{/gist_id}","starred_url":"https://api.github.com/users/mightyiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mightyiam/subscriptions","organizations_url":"https://api.github.com/users/mightyiam/orgs","repos_url":"https://api.github.com/users/mightyiam/repos","events_url":"https://api.github.com/users/mightyiam/events{/privacy}","received_events_url":"https://api.github.com/users/mightyiam/received_events","type":"User","site_admin":false},"body":null,"created_at":"2014-11-25T13:21:48Z","updated_at":"2014-11-26T08:57:23Z","closed_at":"2014-11-25T23:36:12Z","merged_at":"2014-11-25T23:36:12Z","merge_commit_sha":"53af49d8d3301105c8745c44187c6517236dcaa0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/627/commits","review_comments_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/627/comments","review_comment_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/627/comments","statuses_url":"https://api.github.com/repos/wymeditor/wymeditor/statuses/c068c62fcff2f160c7b14d49820cb425bdb67bf3","head":{"label":"wymeditor:manipulationTestHelper","ref":"manipulationTestHelper","sha":"c068c62fcff2f160c7b14d49820cb425bdb67bf3","user":{"login":"wymeditor","id":187598,"avatar_url":"https://avatars.githubusercontent.com/u/187598?v=3","gravatar_id":"","url":"https://api.github.com/users/wymeditor","html_url":"https://github.com/wymeditor","followers_url":"https://api.github.com/users/wymeditor/followers","following_url":"https://api.github.com/users/wymeditor/following{/other_user}","gists_url":"https://api.github.com/users/wymeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/wymeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wymeditor/subscriptions","organizations_url":"https://api.github.com/users/wymeditor/orgs","repos_url":"https://api.github.com/users/wymeditor/repos","events_url":"https://api.github.com/users/wymeditor/events{/privacy}","received_events_url":"https://api.github.com/users/wymeditor/received_events","type":"Organization","site_admin":false},"repo":{"id":483659,"name":"wymeditor","full_name":"wymeditor/wymeditor","owner":{"login":"wymeditor","id":187598,"avatar_url":"https://avatars.githubusercontent.com/u/187598?v=3","gravatar_id":"","url":"https://api.github.com/users/wymeditor","html_url":"https://github.com/wymeditor","followers_url":"https://api.github.com/users/wymeditor/followers","following_url":"https://api.github.com/users/wymeditor/following{/other_user}","gists_url":"https://api.github.com/users/wymeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/wymeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wymeditor/subscriptions","organizations_url":"https://api.github.com/users/wymeditor/orgs","repos_url":"https://api.github.com/users/wymeditor/repos","events_url":"https://api.github.com/users/wymeditor/events{/privacy}","received_events_url":"https://api.github.com/users/wymeditor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wymeditor/wymeditor","description":"Pure js cross-browser WYSIWYM editor with a focus on the clean separation of content and styling.","fork":false,"url":"https://api.github.com/repos/wymeditor/wymeditor","forks_url":"https://api.github.com/repos/wymeditor/wymeditor/forks","keys_url":"https://api.github.com/repos/wymeditor/wymeditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wymeditor/wymeditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wymeditor/wymeditor/teams","hooks_url":"https://api.github.com/repos/wymeditor/wymeditor/hooks","issue_events_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/events{/number}","events_url":"https://api.github.com/repos/wymeditor/wymeditor/events","assignees_url":"https://api.github.com/repos/wymeditor/wymeditor/assignees{/user}","branches_url":"https://api.github.com/repos/wymeditor/wymeditor/branches{/branch}","tags_url":"https://api.github.com/repos/wymeditor/wymeditor/tags","blobs_url":"https://api.github.com/repos/wymeditor/wymeditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wymeditor/wymeditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wymeditor/wymeditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/wymeditor/wymeditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wymeditor/wymeditor/statuses/{sha}","languages_url":"https://api.github.com/repos/wymeditor/wymeditor/languages","stargazers_url":"https://api.github.com/repos/wymeditor/wymeditor/stargazers","contributors_url":"https://api.github.com/repos/wymeditor/wymeditor/contributors","subscribers_url":"https://api.github.com/repos/wymeditor/wymeditor/subscribers","subscription_url":"https://api.github.com/repos/wymeditor/wymeditor/subscription","commits_url":"https://api.github.com/repos/wymeditor/wymeditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/wymeditor/wymeditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/wymeditor/wymeditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/comments/{number}","contents_url":"https://api.github.com/repos/wymeditor/wymeditor/contents/{+path}","compare_url":"https://api.github.com/repos/wymeditor/wymeditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wymeditor/wymeditor/merges","archive_url":"https://api.github.com/repos/wymeditor/wymeditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wymeditor/wymeditor/downloads","issues_url":"https://api.github.com/repos/wymeditor/wymeditor/issues{/number}","pulls_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls{/number}","milestones_url":"https://api.github.com/repos/wymeditor/wymeditor/milestones{/number}","notifications_url":"https://api.github.com/repos/wymeditor/wymeditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wymeditor/wymeditor/labels{/name}","releases_url":"https://api.github.com/repos/wymeditor/wymeditor/releases{/id}","created_at":"2010-01-22T10:50:59Z","updated_at":"2014-11-25T23:36:12Z","pushed_at":"2014-11-25T23:36:12Z","git_url":"git://github.com/wymeditor/wymeditor.git","ssh_url":"git@github.com:wymeditor/wymeditor.git","clone_url":"https://github.com/wymeditor/wymeditor.git","svn_url":"https://github.com/wymeditor/wymeditor","homepage":"http://wymeditor.github.io/wymeditor/","size":21146,"stargazers_count":481,"watchers_count":481,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"open_issues_count":108,"forks":98,"open_issues":108,"watchers":481,"default_branch":"master"}},"base":{"label":"wymeditor:master","ref":"master","sha":"bc88d0c0846e89ce5fba08470e4271ace65f95df","user":{"login":"wymeditor","id":187598,"avatar_url":"https://avatars.githubusercontent.com/u/187598?v=3","gravatar_id":"","url":"https://api.github.com/users/wymeditor","html_url":"https://github.com/wymeditor","followers_url":"https://api.github.com/users/wymeditor/followers","following_url":"https://api.github.com/users/wymeditor/following{/other_user}","gists_url":"https://api.github.com/users/wymeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/wymeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wymeditor/subscriptions","organizations_url":"https://api.github.com/users/wymeditor/orgs","repos_url":"https://api.github.com/users/wymeditor/repos","events_url":"https://api.github.com/users/wymeditor/events{/privacy}","received_events_url":"https://api.github.com/users/wymeditor/received_events","type":"Organization","site_admin":false},"repo":{"id":483659,"name":"wymeditor","full_name":"wymeditor/wymeditor","owner":{"login":"wymeditor","id":187598,"avatar_url":"https://avatars.githubusercontent.com/u/187598?v=3","gravatar_id":"","url":"https://api.github.com/users/wymeditor","html_url":"https://github.com/wymeditor","followers_url":"https://api.github.com/users/wymeditor/followers","following_url":"https://api.github.com/users/wymeditor/following{/other_user}","gists_url":"https://api.github.com/users/wymeditor/gists{/gist_id}","starred_url":"https://api.github.com/users/wymeditor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wymeditor/subscriptions","organizations_url":"https://api.github.com/users/wymeditor/orgs","repos_url":"https://api.github.com/users/wymeditor/repos","events_url":"https://api.github.com/users/wymeditor/events{/privacy}","received_events_url":"https://api.github.com/users/wymeditor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wymeditor/wymeditor","description":"Pure js cross-browser WYSIWYM editor with a focus on the clean separation of content and styling.","fork":false,"url":"https://api.github.com/repos/wymeditor/wymeditor","forks_url":"https://api.github.com/repos/wymeditor/wymeditor/forks","keys_url":"https://api.github.com/repos/wymeditor/wymeditor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wymeditor/wymeditor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wymeditor/wymeditor/teams","hooks_url":"https://api.github.com/repos/wymeditor/wymeditor/hooks","issue_events_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/events{/number}","events_url":"https://api.github.com/repos/wymeditor/wymeditor/events","assignees_url":"https://api.github.com/repos/wymeditor/wymeditor/assignees{/user}","branches_url":"https://api.github.com/repos/wymeditor/wymeditor/branches{/branch}","tags_url":"https://api.github.com/repos/wymeditor/wymeditor/tags","blobs_url":"https://api.github.com/repos/wymeditor/wymeditor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wymeditor/wymeditor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wymeditor/wymeditor/git/refs{/sha}","trees_url":"https://api.github.com/repos/wymeditor/wymeditor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wymeditor/wymeditor/statuses/{sha}","languages_url":"https://api.github.com/repos/wymeditor/wymeditor/languages","stargazers_url":"https://api.github.com/repos/wymeditor/wymeditor/stargazers","contributors_url":"https://api.github.com/repos/wymeditor/wymeditor/contributors","subscribers_url":"https://api.github.com/repos/wymeditor/wymeditor/subscribers","subscription_url":"https://api.github.com/repos/wymeditor/wymeditor/subscription","commits_url":"https://api.github.com/repos/wymeditor/wymeditor/commits{/sha}","git_commits_url":"https://api.github.com/repos/wymeditor/wymeditor/git/commits{/sha}","comments_url":"https://api.github.com/repos/wymeditor/wymeditor/comments{/number}","issue_comment_url":"https://api.github.com/repos/wymeditor/wymeditor/issues/comments/{number}","contents_url":"https://api.github.com/repos/wymeditor/wymeditor/contents/{+path}","compare_url":"https://api.github.com/repos/wymeditor/wymeditor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wymeditor/wymeditor/merges","archive_url":"https://api.github.com/repos/wymeditor/wymeditor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wymeditor/wymeditor/downloads","issues_url":"https://api.github.com/repos/wymeditor/wymeditor/issues{/number}","pulls_url":"https://api.github.com/repos/wymeditor/wymeditor/pulls{/number}","milestones_url":"https://api.github.com/repos/wymeditor/wymeditor/milestones{/number}","notifications_url":"https://api.github.com/repos/wymeditor/wymeditor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wymeditor/wymeditor/labels{/name}","releases_url":"https://api.github.com/repos/wymeditor/wymeditor/releases{/id}","created_at":"2010-01-22T10:50:59Z","updated_at":"2014-11-25T23:36:12Z","pushed_at":"2014-11-25T23:36:12Z","git_url":"git://github.com/wymeditor/wymeditor.git","ssh_url":"git@github.com:wymeditor/wymeditor.git","clone_url":"https://github.com/wymeditor/wymeditor.git","svn_url":"https://github.com/wymeditor/wymeditor","homepage":"http://wymeditor.github.io/wymeditor/","size":21146,"stargazers_count":481,"watchers_count":481,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":98,"mirror_url":null,"open_issues_count":108,"forks":98,"open_issues":108,"watchers":481,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/627"},"html":{"href":"https://github.com/wymeditor/wymeditor/pull/627"},"issue":{"href":"https://api.github.com/repos/wymeditor/wymeditor/issues/627"},"comments":{"href":"https://api.github.com/repos/wymeditor/wymeditor/issues/627/comments"},"review_comments":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/627/comments"},"review_comment":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wymeditor/wymeditor/pulls/627/commits"},"statuses":{"href":"https://api.github.com/repos/wymeditor/wymeditor/statuses/c068c62fcff2f160c7b14d49820cb425bdb67bf3"}}}}