How to test for elements within a transition
See original GitHub issueIs there any way to test the rendering of an element that is contained in a transition?
<template>
<transition name="fade" mode="out-in">
<h1 v-if="showHeading">Herro<h1>
</transition>
</template>
<script>
export default {
data () {
return {
showHeading: false
};
}
};
</script>
<style>
.fade-enter-active, .fade-leave-active {
transition: opacity .5s
}
.fade-enter, .fade-leave-to {
opacity: 0
}
</style>
The following test will fail on the above component unless I remove the transition.
it('renders an h1 when showHeading is true', () => {
wrapper.setData({ showHeading: true });
expect(wrapper.find('h1').length).to.equal(1);
});
Thanks a lot for avoriaz, by the way. I’ve been using it for the past couple days, and I love it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Test yourself on the transition element reactions - YouTube
Quick video to test yourself on the equations for the reactions of transition elements. Video covers all reactions required for the OCR A ......
Read more >testing transition metal ions with sodium hydroxide solution
Practical skills assessment video - making butyl ethanoate video 1 : heating under reflux. Royal Society Of Chemistry.
Read more >Testing for positive ions - transition metals ions - YouTube
Testing for positive ions - transition metals ionsSee CLEAPSS PP100 for more ... North Carolina School of Science and Mathematics.
Read more >Test Yourself A Level Chemistry - Transition Elements 1
Link to questions https://drive.google.com/file/d/19T2SpfdgzxC37MbvDtuSF1qlhP6SEhrd/view?usp=sharing.
Read more >Qualitative tests on First Row Transition Metal Ions
This is best done in a series of test tubes using small samples (1 or 2 mg or the amount needed to cover...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got it, have to use
Vue.nextTick
here.I’m using karma, but I cannot get the transition to work in unit test. Anything I miss?
vue file:
Test
Here the 2nd expect would fail.