{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/758","repository_url":"https://api.github.com/repos/vuejs/vue-test-utils","labels_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/758/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/758/comments","events_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/758/events","html_url":"https://github.com/vuejs/vue-test-utils/issues/758","id":335761025,"node_id":"MDU6SXNzdWUzMzU3NjEwMjU=","number":758,"title":"Event are not retrieved by emitted() when using Collapse from BootstrapVue","user":{"login":"klak-bm","id":39295214,"node_id":"MDQ6VXNlcjM5Mjk1MjE0","avatar_url":"https://avatars3.githubusercontent.com/u/39295214?v=4","gravatar_id":"","url":"https://api.github.com/users/klak-bm","html_url":"https://github.com/klak-bm","followers_url":"https://api.github.com/users/klak-bm/followers","following_url":"https://api.github.com/users/klak-bm/following{/other_user}","gists_url":"https://api.github.com/users/klak-bm/gists{/gist_id}","starred_url":"https://api.github.com/users/klak-bm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klak-bm/subscriptions","organizations_url":"https://api.github.com/users/klak-bm/orgs","repos_url":"https://api.github.com/users/klak-bm/repos","events_url":"https://api.github.com/users/klak-bm/events{/privacy}","received_events_url":"https://api.github.com/users/klak-bm/received_events","type":"User","site_admin":false},"labels":[{"id":614772311,"node_id":"MDU6TGFiZWw2MTQ3NzIzMTE=","url":"https://api.github.com/repos/vuejs/vue-test-utils/labels/bug","name":"bug","color":"ee0701","default":true},{"id":939137078,"node_id":"MDU6TGFiZWw5MzkxMzcwNzg=","url":"https://api.github.com/repos/vuejs/vue-test-utils/labels/sync","name":"sync","color":"b797fc","default":false}],"state":"open","locked":false,"assignee":{"login":"eddyerburgh","id":13196123,"node_id":"MDQ6VXNlcjEzMTk2MTIz","avatar_url":"https://avatars3.githubusercontent.com/u/13196123?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyerburgh","html_url":"https://github.com/eddyerburgh","followers_url":"https://api.github.com/users/eddyerburgh/followers","following_url":"https://api.github.com/users/eddyerburgh/following{/other_user}","gists_url":"https://api.github.com/users/eddyerburgh/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyerburgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyerburgh/subscriptions","organizations_url":"https://api.github.com/users/eddyerburgh/orgs","repos_url":"https://api.github.com/users/eddyerburgh/repos","events_url":"https://api.github.com/users/eddyerburgh/events{/privacy}","received_events_url":"https://api.github.com/users/eddyerburgh/received_events","type":"User","site_admin":false},"assignees":[{"login":"eddyerburgh","id":13196123,"node_id":"MDQ6VXNlcjEzMTk2MTIz","avatar_url":"https://avatars3.githubusercontent.com/u/13196123?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyerburgh","html_url":"https://github.com/eddyerburgh","followers_url":"https://api.github.com/users/eddyerburgh/followers","following_url":"https://api.github.com/users/eddyerburgh/following{/other_user}","gists_url":"https://api.github.com/users/eddyerburgh/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyerburgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyerburgh/subscriptions","organizations_url":"https://api.github.com/users/eddyerburgh/orgs","repos_url":"https://api.github.com/users/eddyerburgh/repos","events_url":"https://api.github.com/users/eddyerburgh/events{/privacy}","received_events_url":"https://api.github.com/users/eddyerburgh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-26T10:45:59Z","updated_at":"2018-06-28T20:55:07Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Version\r\n1.0.0-beta.16\r\n\r\n### Reproduction link\r\n[https://github.com/klak-bm/bv-collapse-problem/](https://github.com/klak-bm/bv-collapse-problem/)\r\n\r\n### Steps to reproduce\r\n git clone https://github.com/klak-bm/bv-collapse-problem/ && cd bv-collapse-problem/ && npm i && npm test\r\n\r\n### What is expected?\r\nFirst test should return emitted events but it does not.\r\n\r\n### What is actually happening?\r\n0 event returned\r\n\r\n\r\n\r\n---\r\nI already tried in local with beta.20 but doesnt change anything.\r\n\r\nThe working test shows that instead of clicking on the button which triggers the \"expand\", if I force emitting the corresponding event the test is working (I expect another event to be emitted then).\r\n\r\nAt first, I thought the problem was coming from bootstrap-vue (and their collapse transition) but after discussing with their active members, they took a look and finally told me : \r\n\"The show should be emitted regardless of transition\r\nThe HTML already has the correct aria expanded and show class\r\nWhich makes me think, perhaps the test wrapper on the child component (b-collapse) isn't firing it's event on the test\"\r\n\r\n \"This sounds like a potential Vue test utils bug to be honest\"\r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/comments/401170343","html_url":"https://github.com/vuejs/vue-test-utils/issues/758#issuecomment-401170343","issue_url":"https://api.github.com/repos/vuejs/vue-test-utils/issues/758","id":401170343,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTE3MDM0Mw==","user":{"login":"eddyerburgh","id":13196123,"node_id":"MDQ6VXNlcjEzMTk2MTIz","avatar_url":"https://avatars3.githubusercontent.com/u/13196123?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyerburgh","html_url":"https://github.com/eddyerburgh","followers_url":"https://api.github.com/users/eddyerburgh/followers","following_url":"https://api.github.com/users/eddyerburgh/following{/other_user}","gists_url":"https://api.github.com/users/eddyerburgh/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyerburgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyerburgh/subscriptions","organizations_url":"https://api.github.com/users/eddyerburgh/orgs","repos_url":"https://api.github.com/users/eddyerburgh/repos","events_url":"https://api.github.com/users/eddyerburgh/events{/privacy}","received_events_url":"https://api.github.com/users/eddyerburgh/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T20:55:07Z","updated_at":"2018-06-28T20:55:07Z","author_association":"MEMBER","body":"Yes this is a bug with the transition, and is part of a wider bug we have with asynchrnous DOM updates.\r\n\r\nA temporary workaround if to run your tests asynchronously, without a transition stub:\r\n\r\n```js\r\nlet wrapper = mount(App, {\r\n    sync: false,\r\n    stubs: {\r\n        'transition': false\r\n    }\r\n});\r\n```\r\n\r\nYou'll need to edit your assertion to run in a timeout calback:\r\n```js\r\ntest('some test', (done) => {\r\n    // ..\r\n    setTimeout(() => {\r\n        expect(wrapper.emitted().MyCompExpand).toBeTruthy();\r\n        done()\r\n    })\r\n})\r\n```"}}
{"actor":{"display_login":"eddyerburgh"}}