{"action":"created","comment":{"url":"https://api.github.com/repos/angular/material/pulls/comments/22647161","id":22647161,"diff_hunk":"@@ -0,0 +1,73 @@\n+describe('<md-popover> directive', function() {\n+\n+  beforeEach(module('material.components.popover', function($provide) {\n+    $provide.value('$$rAF', mockRaf);\n+\n+    // fake synchronous version of rAF\n+    function mockRaf(cb) { cb(); }\n+    mockRaf.debounce = function(cb) {\n+      var context = this, args = arguments;\n+      return function() {\n+        cb.apply(context, args);\n+      };\n+    };\n+    findPopover().remove();\n+  }));\n+\n+  function findPopover() {\n+    return angular.element(document.body).find('md-popover');\n+  }\n+\n+  it('should show and hide when visible is set', inject(function($compile, $rootScope, $timeout) {\n+    var element = $compile('<md-button>' +\n+               'Hello' +\n+               '<md-popover md-visible=\"isVisible\">Popover</md-popover>' +\n+             '</md-button>')($rootScope);\n+\n+    $rootScope.$apply();\n+    expect(findPopover().length).toBe(0);\n+\n+    $rootScope.$apply('isVisible = true');\n+    expect(findPopover().length).toBe(1);\n+    expect(findPopover().hasClass('md-show')).toBe(true);\n+    expect(findPopover().hasClass('md-hide')).toBe(false);\n+\n+    $rootScope.$apply('isVisible = false');\n+    expect(findPopover().hasClass('md-hide')).toBe(true);\n+    expect(findPopover().hasClass('md-show')).toBe(false);\n+    $timeout.flush();\n+    expect(findPopover().length).toBe(0);\n+  }));\n+\n+  it('should describe parent', inject(function($compile, $rootScope, $timeout) {\n+    var element = $compile('<md-button>' +\n+               'Hello' +\n+               '<md-popover md-visible=\"isVisible\">Popover</md-popover>' +\n+             '</md-button>')($rootScope);\n+\n+    $rootScope.$apply('isVisible = true');\n+\n+    expect(element.attr('aria-describedby')).toEqual(findPopover().attr('id'));\n+\n+    $rootScope.$apply('isVisible = false');\n+    expect(element.attr('aria-describedby')).toBeFalsy();\n+\n+  }));\n+\n+  it('should set visible on click and invisible on second click', inject(function($compile, $rootScope, $timeout) {\n+    var element = $compile('<md-button>' +\n+               'Hello' +\n+               '<md-popover md-visible=\"isVisible\">Popover</md-popover>' +\n+             '</md-button>')($rootScope);\n+\n+    $rootScope.$apply();\n+\n+    element.triggerHandler('click');\n+    $timeout.flush();\n+    expect($rootScope.isVisible).toBe(true);\n+\n+    element.triggerHandler('click');\n+    $timeout.flush();\n+    expect($rootScope.isVisible).toBe(false);\n+  }));\n+});","path":"src/components/popover/popover.spec.js","position":73,"original_position":73,"commit_id":"88ad094e3141076dd8fd8d9eec9e676746e31c98","original_commit_id":"88ad094e3141076dd8fd8d9eec9e676746e31c98","user":{"login":"stevenh77","id":307670,"avatar_url":"https://avatars.githubusercontent.com/u/307670?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenh77","html_url":"https://github.com/stevenh77","followers_url":"https://api.github.com/users/stevenh77/followers","following_url":"https://api.github.com/users/stevenh77/following{/other_user}","gists_url":"https://api.github.com/users/stevenh77/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenh77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenh77/subscriptions","organizations_url":"https://api.github.com/users/stevenh77/orgs","repos_url":"https://api.github.com/users/stevenh77/repos","events_url":"https://api.github.com/users/stevenh77/events{/privacy}","received_events_url":"https://api.github.com/users/stevenh77/received_events","type":"User","site_admin":false},"body":"Could you point me in the direction of the tests for toast placement coverage?  I couldn't find any when looking for a point of reference.  Or is the only test required that md-placement exists?","created_at":"2015-01-08T11:40:26Z","updated_at":"2015-01-08T11:40:26Z","html_url":"https://github.com/angular/material/pull/1132#discussion_r22647161","pull_request_url":"https://api.github.com/repos/angular/material/pulls/1132","_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/comments/22647161"},"html":{"href":"https://github.com/angular/material/pull/1132#discussion_r22647161"},"pull_request":{"href":"https://api.github.com/repos/angular/material/pulls/1132"}}},"pull_request":{"url":"https://api.github.com/repos/angular/material/pulls/1132","id":26928515,"html_url":"https://github.com/angular/material/pull/1132","diff_url":"https://github.com/angular/material/pull/1132.diff","patch_url":"https://github.com/angular/material/pull/1132.patch","issue_url":"https://api.github.com/repos/angular/material/issues/1132","number":1132,"state":"open","locked":false,"title":"feat(popover): add popover component","user":{"login":"stevenh77","id":307670,"avatar_url":"https://avatars.githubusercontent.com/u/307670?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenh77","html_url":"https://github.com/stevenh77","followers_url":"https://api.github.com/users/stevenh77/followers","following_url":"https://api.github.com/users/stevenh77/following{/other_user}","gists_url":"https://api.github.com/users/stevenh77/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenh77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenh77/subscriptions","organizations_url":"https://api.github.com/users/stevenh77/orgs","repos_url":"https://api.github.com/users/stevenh77/repos","events_url":"https://api.github.com/users/stevenh77/events{/privacy}","received_events_url":"https://api.github.com/users/stevenh77/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-07T00:06:00Z","updated_at":"2015-01-08T11:40:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"225ff96767fa54174caf31eeabe5391f5f6b3b9b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/material/pulls/1132/commits","review_comments_url":"https://api.github.com/repos/angular/material/pulls/1132/comments","review_comment_url":"https://api.github.com/repos/angular/material/pulls/comments/{number}","comments_url":"https://api.github.com/repos/angular/material/issues/1132/comments","statuses_url":"https://api.github.com/repos/angular/material/statuses/88ad094e3141076dd8fd8d9eec9e676746e31c98","head":{"label":"stevenh77:popover-feature","ref":"popover-feature","sha":"88ad094e3141076dd8fd8d9eec9e676746e31c98","user":{"login":"stevenh77","id":307670,"avatar_url":"https://avatars.githubusercontent.com/u/307670?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenh77","html_url":"https://github.com/stevenh77","followers_url":"https://api.github.com/users/stevenh77/followers","following_url":"https://api.github.com/users/stevenh77/following{/other_user}","gists_url":"https://api.github.com/users/stevenh77/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenh77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenh77/subscriptions","organizations_url":"https://api.github.com/users/stevenh77/orgs","repos_url":"https://api.github.com/users/stevenh77/repos","events_url":"https://api.github.com/users/stevenh77/events{/privacy}","received_events_url":"https://api.github.com/users/stevenh77/received_events","type":"User","site_admin":false},"repo":{"id":28888829,"name":"material","full_name":"stevenh77/material","owner":{"login":"stevenh77","id":307670,"avatar_url":"https://avatars.githubusercontent.com/u/307670?v=3","gravatar_id":"","url":"https://api.github.com/users/stevenh77","html_url":"https://github.com/stevenh77","followers_url":"https://api.github.com/users/stevenh77/followers","following_url":"https://api.github.com/users/stevenh77/following{/other_user}","gists_url":"https://api.github.com/users/stevenh77/gists{/gist_id}","starred_url":"https://api.github.com/users/stevenh77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevenh77/subscriptions","organizations_url":"https://api.github.com/users/stevenh77/orgs","repos_url":"https://api.github.com/users/stevenh77/repos","events_url":"https://api.github.com/users/stevenh77/events{/privacy}","received_events_url":"https://api.github.com/users/stevenh77/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevenh77/material","description":"Material design for Angular","fork":true,"url":"https://api.github.com/repos/stevenh77/material","forks_url":"https://api.github.com/repos/stevenh77/material/forks","keys_url":"https://api.github.com/repos/stevenh77/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevenh77/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevenh77/material/teams","hooks_url":"https://api.github.com/repos/stevenh77/material/hooks","issue_events_url":"https://api.github.com/repos/stevenh77/material/issues/events{/number}","events_url":"https://api.github.com/repos/stevenh77/material/events","assignees_url":"https://api.github.com/repos/stevenh77/material/assignees{/user}","branches_url":"https://api.github.com/repos/stevenh77/material/branches{/branch}","tags_url":"https://api.github.com/repos/stevenh77/material/tags","blobs_url":"https://api.github.com/repos/stevenh77/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevenh77/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevenh77/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevenh77/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevenh77/material/statuses/{sha}","languages_url":"https://api.github.com/repos/stevenh77/material/languages","stargazers_url":"https://api.github.com/repos/stevenh77/material/stargazers","contributors_url":"https://api.github.com/repos/stevenh77/material/contributors","subscribers_url":"https://api.github.com/repos/stevenh77/material/subscribers","subscription_url":"https://api.github.com/repos/stevenh77/material/subscription","commits_url":"https://api.github.com/repos/stevenh77/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevenh77/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevenh77/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevenh77/material/issues/comments/{number}","contents_url":"https://api.github.com/repos/stevenh77/material/contents/{+path}","compare_url":"https://api.github.com/repos/stevenh77/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevenh77/material/merges","archive_url":"https://api.github.com/repos/stevenh77/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevenh77/material/downloads","issues_url":"https://api.github.com/repos/stevenh77/material/issues{/number}","pulls_url":"https://api.github.com/repos/stevenh77/material/pulls{/number}","milestones_url":"https://api.github.com/repos/stevenh77/material/milestones{/number}","notifications_url":"https://api.github.com/repos/stevenh77/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevenh77/material/labels{/name}","releases_url":"https://api.github.com/repos/stevenh77/material/releases{/id}","created_at":"2015-01-06T23:37:44Z","updated_at":"2015-01-06T23:37:45Z","pushed_at":"2015-01-07T12:13:24Z","git_url":"git://github.com/stevenh77/material.git","ssh_url":"git@github.com:stevenh77/material.git","clone_url":"https://github.com/stevenh77/material.git","svn_url":"https://github.com/stevenh77/material","homepage":"https://material.angularjs.org/","size":34818,"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":"angular:master","ref":"master","sha":"91bc598fab00150e26b11a2c7a0e7c9b3b364bec","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":21399598,"name":"material","full_name":"angular/material","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/material","description":"Material design for Angular","fork":false,"url":"https://api.github.com/repos/angular/material","forks_url":"https://api.github.com/repos/angular/material/forks","keys_url":"https://api.github.com/repos/angular/material/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/material/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/material/teams","hooks_url":"https://api.github.com/repos/angular/material/hooks","issue_events_url":"https://api.github.com/repos/angular/material/issues/events{/number}","events_url":"https://api.github.com/repos/angular/material/events","assignees_url":"https://api.github.com/repos/angular/material/assignees{/user}","branches_url":"https://api.github.com/repos/angular/material/branches{/branch}","tags_url":"https://api.github.com/repos/angular/material/tags","blobs_url":"https://api.github.com/repos/angular/material/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/material/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/material/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/material/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/material/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/material/languages","stargazers_url":"https://api.github.com/repos/angular/material/stargazers","contributors_url":"https://api.github.com/repos/angular/material/contributors","subscribers_url":"https://api.github.com/repos/angular/material/subscribers","subscription_url":"https://api.github.com/repos/angular/material/subscription","commits_url":"https://api.github.com/repos/angular/material/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/material/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/material/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/material/issues/comments/{number}","contents_url":"https://api.github.com/repos/angular/material/contents/{+path}","compare_url":"https://api.github.com/repos/angular/material/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/material/merges","archive_url":"https://api.github.com/repos/angular/material/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/material/downloads","issues_url":"https://api.github.com/repos/angular/material/issues{/number}","pulls_url":"https://api.github.com/repos/angular/material/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/material/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/material/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/material/labels{/name}","releases_url":"https://api.github.com/repos/angular/material/releases{/id}","created_at":"2014-07-01T19:20:06Z","updated_at":"2015-01-08T11:30:15Z","pushed_at":"2015-01-08T00:38:36Z","git_url":"git://github.com/angular/material.git","ssh_url":"git@github.com:angular/material.git","clone_url":"https://github.com/angular/material.git","svn_url":"https://github.com/angular/material","homepage":"https://material.angularjs.org/","size":73956,"stargazers_count":5982,"watchers_count":5982,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":689,"mirror_url":null,"open_issues_count":276,"forks":689,"open_issues":276,"watchers":5982,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/material/pulls/1132"},"html":{"href":"https://github.com/angular/material/pull/1132"},"issue":{"href":"https://api.github.com/repos/angular/material/issues/1132"},"comments":{"href":"https://api.github.com/repos/angular/material/issues/1132/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/material/pulls/1132/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/material/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/angular/material/pulls/1132/commits"},"statuses":{"href":"https://api.github.com/repos/angular/material/statuses/88ad094e3141076dd8fd8d9eec9e676746e31c98"}}}}