{"action":"created","comment":{"url":"https://api.github.com/repos/simplabs/qunit-dom/pulls/comments/191864406","pull_request_review_id":124519981,"id":191864406,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MTg2NDQwNg==","diff_hunk":"@@ -673,28 +673,42 @@ export default class DOMAssertions {\n   }\n \n   /**\n+   * Finds a valid HTMLElement from target, or pushes a failing assertion if a valid\n+   * element is not found.\n    * @private\n+   * @returns a valid HTMLElement, or null\n    */\n   findTargetElement() {\n-    if (this.target === null) {\n-      let message = `Element <unknown> exists`;\n+    let el = this.findElement();\n+\n+    if (el === null) {\n+      let message = `Element ${this.target || '<unknown>'} should exist`;\n       this.pushResult({ message, result: false });\n       return null;\n     }\n \n-    if (typeof this.target === 'string') {\n+    return el;\n+  }\n+\n+  /**\n+   * Finds a valid HTMLElement from target\n+   * @private\n+   * @returns a valid HTMLElement, or null\n+   * @throws TypeError will be thrown if target is an unrecognized type\n+   */\n+  findElement() {","path":"lib/assertions.js","position":30,"original_position":30,"commit_id":"99ff793d9718b3c8c7806df9cde24860c714a67f","original_commit_id":"6579c43146f7ddc1f41348d95c4b4af52782ac87","user":{"login":"rwjblue","id":12637,"node_id":"MDQ6VXNlcjEyNjM3","avatar_url":"https://avatars0.githubusercontent.com/u/12637?v=4","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"body":"Since this is private, should it be underscored (I'm not sure what the norm is in qunit-dom)?\r\n\r\nAlso, is there a name that better describes the split between this method and `findTargetElement`?  Maybe `findTargetElementWithoutAssertion` (yeah, I know its pretty long)?","created_at":"2018-05-30T17:57:15Z","updated_at":"2018-05-30T18:01:36Z","html_url":"https://github.com/simplabs/qunit-dom/pull/91#discussion_r191864406","pull_request_url":"https://api.github.com/repos/simplabs/qunit-dom/pulls/91","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/simplabs/qunit-dom/pulls/comments/191864406"},"html":{"href":"https://github.com/simplabs/qunit-dom/pull/91#discussion_r191864406"},"pull_request":{"href":"https://api.github.com/repos/simplabs/qunit-dom/pulls/91"}}},"pull_request":{"url":"https://api.github.com/repos/simplabs/qunit-dom/pulls/91","id":191529813,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNTI5ODEz","html_url":"https://github.com/simplabs/qunit-dom/pull/91","diff_url":"https://github.com/simplabs/qunit-dom/pull/91.diff","patch_url":"https://github.com/simplabs/qunit-dom/pull/91.patch","issue_url":"https://api.github.com/repos/simplabs/qunit-dom/issues/91","number":91,"state":"open","locked":false,"title":"Fixing is-visible/is-not-visible assertions to correctly account for missing elements","user":{"login":"scalvert","id":180990,"node_id":"MDQ6VXNlcjE4MDk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/180990?v=4","gravatar_id":"","url":"https://api.github.com/users/scalvert","html_url":"https://github.com/scalvert","followers_url":"https://api.github.com/users/scalvert/followers","following_url":"https://api.github.com/users/scalvert/following{/other_user}","gists_url":"https://api.github.com/users/scalvert/gists{/gist_id}","starred_url":"https://api.github.com/users/scalvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalvert/subscriptions","organizations_url":"https://api.github.com/users/scalvert/orgs","repos_url":"https://api.github.com/users/scalvert/repos","events_url":"https://api.github.com/users/scalvert/events{/privacy}","received_events_url":"https://api.github.com/users/scalvert/received_events","type":"User","site_admin":false},"body":"This PR is attempting to do two main things:\r\n\r\n1. Fixing the logic in `is-visible`/`is-not-visible` to account for when elements are missing in the DOM\r\n    - these assertions would trigger the `Element <el> exists` assertion that was triggered when an element was not found in the DOM, regardless of correctness\r\n    - `is-visible` should *pass* in the case where the element _exists_ *and* is visible\r\n    - `is-visible` should *fail* in the case where the element _doesn't exist_ *or* is not visible\r\n    - `is-not-visible` should *pass* in the case where the element _doesn't exist_ *or* is not visible\r\n    - `is-not-visible` should *fail* in the case where the element _exists_ *and* is visible\r\n1. Updating the assertion message when an element is not present but is expected to be so\r\n    - the *old* assertion was `Element <el|unknown> exists`, which was mildly confusing\r\n    - the *new* assertion message is `Element <el|unknown> should exist`.\r\n\r\nThis PR in part addresses #84. ","created_at":"2018-05-30T17:42:58Z","updated_at":"2018-05-30T18:01:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18477d7efa579443dd4d63b7919f0df9c9f432ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/simplabs/qunit-dom/pulls/91/commits","review_comments_url":"https://api.github.com/repos/simplabs/qunit-dom/pulls/91/comments","review_comment_url":"https://api.github.com/repos/simplabs/qunit-dom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/simplabs/qunit-dom/issues/91/comments","statuses_url":"https://api.github.com/repos/simplabs/qunit-dom/statuses/99ff793d9718b3c8c7806df9cde24860c714a67f","head":{"label":"scalvert:bugfix-visible-assertions","ref":"bugfix-visible-assertions","sha":"99ff793d9718b3c8c7806df9cde24860c714a67f","user":{"login":"scalvert","id":180990,"node_id":"MDQ6VXNlcjE4MDk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/180990?v=4","gravatar_id":"","url":"https://api.github.com/users/scalvert","html_url":"https://github.com/scalvert","followers_url":"https://api.github.com/users/scalvert/followers","following_url":"https://api.github.com/users/scalvert/following{/other_user}","gists_url":"https://api.github.com/users/scalvert/gists{/gist_id}","starred_url":"https://api.github.com/users/scalvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalvert/subscriptions","organizations_url":"https://api.github.com/users/scalvert/orgs","repos_url":"https://api.github.com/users/scalvert/repos","events_url":"https://api.github.com/users/scalvert/events{/privacy}","received_events_url":"https://api.github.com/users/scalvert/received_events","type":"User","site_admin":false},"repo":{"id":125389467,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUzODk0Njc=","name":"qunit-dom","full_name":"scalvert/qunit-dom","owner":{"login":"scalvert","id":180990,"node_id":"MDQ6VXNlcjE4MDk5MA==","avatar_url":"https://avatars2.githubusercontent.com/u/180990?v=4","gravatar_id":"","url":"https://api.github.com/users/scalvert","html_url":"https://github.com/scalvert","followers_url":"https://api.github.com/users/scalvert/followers","following_url":"https://api.github.com/users/scalvert/following{/other_user}","gists_url":"https://api.github.com/users/scalvert/gists{/gist_id}","starred_url":"https://api.github.com/users/scalvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scalvert/subscriptions","organizations_url":"https://api.github.com/users/scalvert/orgs","repos_url":"https://api.github.com/users/scalvert/repos","events_url":"https://api.github.com/users/scalvert/events{/privacy}","received_events_url":"https://api.github.com/users/scalvert/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scalvert/qunit-dom","description":"High Level DOM Assertions for QUnit","fork":true,"url":"https://api.github.com/repos/scalvert/qunit-dom","forks_url":"https://api.github.com/repos/scalvert/qunit-dom/forks","keys_url":"https://api.github.com/repos/scalvert/qunit-dom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scalvert/qunit-dom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scalvert/qunit-dom/teams","hooks_url":"https://api.github.com/repos/scalvert/qunit-dom/hooks","issue_events_url":"https://api.github.com/repos/scalvert/qunit-dom/issues/events{/number}","events_url":"https://api.github.com/repos/scalvert/qunit-dom/events","assignees_url":"https://api.github.com/repos/scalvert/qunit-dom/assignees{/user}","branches_url":"https://api.github.com/repos/scalvert/qunit-dom/branches{/branch}","tags_url":"https://api.github.com/repos/scalvert/qunit-dom/tags","blobs_url":"https://api.github.com/repos/scalvert/qunit-dom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scalvert/qunit-dom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scalvert/qunit-dom/git/refs{/sha}","trees_url":"https://api.github.com/repos/scalvert/qunit-dom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scalvert/qunit-dom/statuses/{sha}","languages_url":"https://api.github.com/repos/scalvert/qunit-dom/languages","stargazers_url":"https://api.github.com/repos/scalvert/qunit-dom/stargazers","contributors_url":"https://api.github.com/repos/scalvert/qunit-dom/contributors","subscribers_url":"https://api.github.com/repos/scalvert/qunit-dom/subscribers","subscription_url":"https://api.github.com/repos/scalvert/qunit-dom/subscription","commits_url":"https://api.github.com/repos/scalvert/qunit-dom/commits{/sha}","git_commits_url":"https://api.github.com/repos/scalvert/qunit-dom/git/commits{/sha}","comments_url":"https://api.github.com/repos/scalvert/qunit-dom/comments{/number}","issue_comment_url":"https://api.github.com/repos/scalvert/qunit-dom/issues/comments{/number}","contents_url":"https://api.github.com/repos/scalvert/qunit-dom/contents/{+path}","compare_url":"https://api.github.com/repos/scalvert/qunit-dom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scalvert/qunit-dom/merges","archive_url":"https://api.github.com/repos/scalvert/qunit-dom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scalvert/qunit-dom/downloads","issues_url":"https://api.github.com/repos/scalvert/qunit-dom/issues{/number}","pulls_url":"https://api.github.com/repos/scalvert/qunit-dom/pulls{/number}","milestones_url":"https://api.github.com/repos/scalvert/qunit-dom/milestones{/number}","notifications_url":"https://api.github.com/repos/scalvert/qunit-dom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scalvert/qunit-dom/labels{/name}","releases_url":"https://api.github.com/repos/scalvert/qunit-dom/releases{/id}","deployments_url":"https://api.github.com/repos/scalvert/qunit-dom/deployments","created_at":"2018-03-15T15:40:20Z","updated_at":"2018-03-27T17:48:08Z","pushed_at":"2018-05-30T18:01:19Z","git_url":"git://github.com/scalvert/qunit-dom.git","ssh_url":"git@github.com:scalvert/qunit-dom.git","clone_url":"https://github.com/scalvert/qunit-dom.git","svn_url":"https://github.com/scalvert/qunit-dom","homepage":"","size":256,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"simplabs:master","ref":"master","sha":"1a7c4fb14c3b27db4622afa4935bda6441557850","user":{"login":"simplabs","id":56627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NjI3","avatar_url":"https://avatars3.githubusercontent.com/u/56627?v=4","gravatar_id":"","url":"https://api.github.com/users/simplabs","html_url":"https://github.com/simplabs","followers_url":"https://api.github.com/users/simplabs/followers","following_url":"https://api.github.com/users/simplabs/following{/other_user}","gists_url":"https://api.github.com/users/simplabs/gists{/gist_id}","starred_url":"https://api.github.com/users/simplabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplabs/subscriptions","organizations_url":"https://api.github.com/users/simplabs/orgs","repos_url":"https://api.github.com/users/simplabs/repos","events_url":"https://api.github.com/users/simplabs/events{/privacy}","received_events_url":"https://api.github.com/users/simplabs/received_events","type":"Organization","site_admin":false},"repo":{"id":101902241,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE5MDIyNDE=","name":"qunit-dom","full_name":"simplabs/qunit-dom","owner":{"login":"simplabs","id":56627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NjI3","avatar_url":"https://avatars3.githubusercontent.com/u/56627?v=4","gravatar_id":"","url":"https://api.github.com/users/simplabs","html_url":"https://github.com/simplabs","followers_url":"https://api.github.com/users/simplabs/followers","following_url":"https://api.github.com/users/simplabs/following{/other_user}","gists_url":"https://api.github.com/users/simplabs/gists{/gist_id}","starred_url":"https://api.github.com/users/simplabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simplabs/subscriptions","organizations_url":"https://api.github.com/users/simplabs/orgs","repos_url":"https://api.github.com/users/simplabs/repos","events_url":"https://api.github.com/users/simplabs/events{/privacy}","received_events_url":"https://api.github.com/users/simplabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simplabs/qunit-dom","description":"High Level DOM Assertions for QUnit","fork":false,"url":"https://api.github.com/repos/simplabs/qunit-dom","forks_url":"https://api.github.com/repos/simplabs/qunit-dom/forks","keys_url":"https://api.github.com/repos/simplabs/qunit-dom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simplabs/qunit-dom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simplabs/qunit-dom/teams","hooks_url":"https://api.github.com/repos/simplabs/qunit-dom/hooks","issue_events_url":"https://api.github.com/repos/simplabs/qunit-dom/issues/events{/number}","events_url":"https://api.github.com/repos/simplabs/qunit-dom/events","assignees_url":"https://api.github.com/repos/simplabs/qunit-dom/assignees{/user}","branches_url":"https://api.github.com/repos/simplabs/qunit-dom/branches{/branch}","tags_url":"https://api.github.com/repos/simplabs/qunit-dom/tags","blobs_url":"https://api.github.com/repos/simplabs/qunit-dom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simplabs/qunit-dom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simplabs/qunit-dom/git/refs{/sha}","trees_url":"https://api.github.com/repos/simplabs/qunit-dom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simplabs/qunit-dom/statuses/{sha}","languages_url":"https://api.github.com/repos/simplabs/qunit-dom/languages","stargazers_url":"https://api.github.com/repos/simplabs/qunit-dom/stargazers","contributors_url":"https://api.github.com/repos/simplabs/qunit-dom/contributors","subscribers_url":"https://api.github.com/repos/simplabs/qunit-dom/subscribers","subscription_url":"https://api.github.com/repos/simplabs/qunit-dom/subscription","commits_url":"https://api.github.com/repos/simplabs/qunit-dom/commits{/sha}","git_commits_url":"https://api.github.com/repos/simplabs/qunit-dom/git/commits{/sha}","comments_url":"https://api.github.com/repos/simplabs/qunit-dom/comments{/number}","issue_comment_url":"https://api.github.com/repos/simplabs/qunit-dom/issues/comments{/number}","contents_url":"https://api.github.com/repos/simplabs/qunit-dom/contents/{+path}","compare_url":"https://api.github.com/repos/simplabs/qunit-dom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simplabs/qunit-dom/merges","archive_url":"https://api.github.com/repos/simplabs/qunit-dom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simplabs/qunit-dom/downloads","issues_url":"https://api.github.com/repos/simplabs/qunit-dom/issues{/number}","pulls_url":"https://api.github.com/repos/simplabs/qunit-dom/pulls{/number}","milestones_url":"https://api.github.com/repos/simplabs/qunit-dom/milestones{/number}","notifications_url":"https://api.github.com/repos/simplabs/qunit-dom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simplabs/qunit-dom/labels{/name}","releases_url":"https://api.github.com/repos/simplabs/qunit-dom/releases{/id}","deployments_url":"https://api.github.com/repos/simplabs/qunit-dom/deployments","created_at":"2017-08-30T16:05:54Z","updated_at":"2018-05-24T11:08:18Z","pushed_at":"2018-05-30T18:01:20Z","git_url":"git://github.com/simplabs/qunit-dom.git","ssh_url":"git@github.com:simplabs/qunit-dom.git","clone_url":"https://github.com/simplabs/qunit-dom.git","svn_url":"https://github.com/simplabs/qunit-dom","homepage":"http://qunit-dom.com","size":919,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":23,"open_issues":6,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simplabs/qunit-dom/pulls/91"},"html":{"href":"https://github.com/simplabs/qunit-dom/pull/91"},"issue":{"href":"https://api.github.com/repos/simplabs/qunit-dom/issues/91"},"comments":{"href":"https://api.github.com/repos/simplabs/qunit-dom/issues/91/comments"},"review_comments":{"href":"https://api.github.com/repos/simplabs/qunit-dom/pulls/91/comments"},"review_comment":{"href":"https://api.github.com/repos/simplabs/qunit-dom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/simplabs/qunit-dom/pulls/91/commits"},"statuses":{"href":"https://api.github.com/repos/simplabs/qunit-dom/statuses/99ff793d9718b3c8c7806df9cde24860c714a67f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rwjblue"}}