testing-library / vue-testing-library

🦎 Simple and complete Vue.js testing utilities that encourage good testing practices.
http://testing-library.com/vue
MIT License
1.08k stars 110 forks source link

Fix vuetify example #134

Closed mediafreakch closed 4 years ago

mediafreakch commented 4 years ago

In #123 I introduced a different approach to integrate with Vuetify. Unfortunately setAttribute always returns undefined, so container eventually was undefined.

In my own project this lead to bespoken Unable to localte target [data-app] warnings when rendering certain vuetify components, such as v-menu or v-dialog. In this example that went unnoticed, because the example component itself was wrapped within v-app.

I fixed that and added tests for it.

A sidenote: In my own project, adding the container to the body(document.body.appendChild(root)) lead to side-effects when interacting with v-menu. It seemed like the component was leaking between tests. Even with Jest running as --runInBand. However it doesn't happen in this repo. So for this, I am lost πŸ˜’. Indeed if I copy paste this test and the tested component over to my project, it fails because it cannot find the opened menu item :/

codecov[bot] commented 4 years ago

Codecov Report

Merging #134 into master will not change coverage by %. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #134   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           68        68           
  Branches        14        14           
=========================================
  Hits            68        68           

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update d628f36...16c7860. Read the comment docs.

afontcu commented 4 years ago

:tada: This PR is included in version 5.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: