{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/327","repository_url":"https://api.github.com/repos/vuejs/vue-test-utils","labels_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/327/comments","events_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/327/events","html_url":"https://github.com/vuejs/vue-test-utils/issues/327","id":285952330,"node_id":"MDU6SXNzdWUyODU5NTIzMzA=","number":327,"title":"How to check an element is displayed (v-show) ?","user":{"login":"Toilal","id":1165758,"node_id":"MDQ6VXNlcjExNjU3NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1165758?v=4","gravatar_id":"","url":"https://api.github.com/users/Toilal","html_url":"https://github.com/Toilal","followers_url":"https://api.github.com/users/Toilal/followers","following_url":"https://api.github.com/users/Toilal/following{/other_user}","gists_url":"https://api.github.com/users/Toilal/gists{/gist_id}","starred_url":"https://api.github.com/users/Toilal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toilal/subscriptions","organizations_url":"https://api.github.com/users/Toilal/orgs","repos_url":"https://api.github.com/users/Toilal/repos","events_url":"https://api.github.com/users/Toilal/events{/privacy}","received_events_url":"https://api.github.com/users/Toilal/received_events","type":"User","site_admin":false},"labels":[{"id":734249215,"node_id":"MDU6TGFiZWw3MzQyNDkyMTU=","url":"https://api.github.com/repos/vuejs/vue-test-utils/labels/feature%20request","name":"feature request","color":"fbca04","default":false},{"id":734250235,"node_id":"MDU6TGFiZWw3MzQyNTAyMzU=","url":"https://api.github.com/repos/vuejs/vue-test-utils/labels/intend%20to%20implement","name":"intend to implement","color":"207de5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-01-04T11:15:30Z","updated_at":"2018-12-18T14:06:00Z","closed_at":"2018-01-20T17:48:37Z","author_association":"CONTRIBUTOR","body":"I try to assert that elements are displayed or not. Those elements are children (or even grand-children) of a v-show node.\r\n\r\nConsider the following, I wish to assert display of `.item` elements.\r\n\r\n```html\r\n<div>\r\n  <div v-show=\"modelAttrA\">\r\n    <span class=\"item\">Ax</span>\r\n    <span class=\"item\">Ay</span>\r\n  </div>\r\n  <div v-show=\"modelAttrB\">\r\n    <span class=\"item\">Bx</span>\r\n    <span class=\"item\">By</span>\r\n  </div>\r\n<div>\r\n``` \r\n\r\nIt seems a common use case, but I can't find any way in vue-test-utils to do that. I can't rely on DOM element properties as I run tests with JEST (JSDOM doesn't layout elements and can't tell if an element is displayed neither). Maybe there's something possible with VueJS VNode API ?\r\n\r\nI would expect some kind of `displayed` method in the Wrapper API.\r\n```\r\nexpect(wrapper.findAll('.item').at(3).displayed()).toBeTruthy()\r\n```\r\n  "},"comment":{"url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/comments/448231684","html_url":"https://github.com/vuejs/vue-test-utils/issues/327#issuecomment-448231684","issue_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/327","id":448231684,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODIzMTY4NA==","user":{"login":"RiZKiT","id":600083,"node_id":"MDQ6VXNlcjYwMDA4Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/600083?v=4","gravatar_id":"","url":"https://api.github.com/users/RiZKiT","html_url":"https://github.com/RiZKiT","followers_url":"https://api.github.com/users/RiZKiT/followers","following_url":"https://api.github.com/users/RiZKiT/following{/other_user}","gists_url":"https://api.github.com/users/RiZKiT/gists{/gist_id}","starred_url":"https://api.github.com/users/RiZKiT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RiZKiT/subscriptions","organizations_url":"https://api.github.com/users/RiZKiT/orgs","repos_url":"https://api.github.com/users/RiZKiT/repos","events_url":"https://api.github.com/users/RiZKiT/events{/privacy}","received_events_url":"https://api.github.com/users/RiZKiT/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T14:06:00Z","updated_at":"2018-12-18T14:06:00Z","author_association":"NONE","body":"@Toilal Just for completion, you may ment `parent()` or `parentNode` instead of `parent`?"}}
{"actor":{"display_login":"RiZKiT"}}