bihealth / sodar-server

SODAR: System for Omics Data Access and Retrieval
https://github.com/bihealth/sodar-server
MIT License
14 stars 3 forks source link

Solve Vue app unit testing issues with nested components #1034

Open mikkonie opened 4 years ago

mikkonie commented 4 years ago

I'm encountering issues testing nested components. For example in IrodsButtonsRenderer.spec.js, no elements generated from nested bootstrap-vue components can be found during testing even though the topmost IrodsButtons element exists.

Also, we get a mountain of Vue.warn error messages (yes, these appear under console.error()) for stuff which in fact works.

Bootstrap-vue seems to be the major offender here, but it does not fail consistently. Something to do with lifecycle stuff I guess? In renderers (and presumably editors) it's especially bad.

I'm not the only one experiencing this, found a lot of questions about it. People have offered workarounds, some of which (e.g. triggering element.vm.$emit('event') instead of element.trigger('event') work in some cases, but not consistently.

Some discussion on these issues can be found here.

See #750, #1030.

Will copy paste some stuff and resources in comments when I investigate this.

mikkonie commented 4 years ago

mentioned in commit 8eff8a31ffa8f2c7f1f8b362c48be71bada9423b

mikkonie commented 4 years ago

mentioned in commit f5bc5ee1d81229d4dcae641cd835a5bc9086710c