mirror of https://github.com/sveltejs/svelte
failing test for #648
parent
29a156957f
commit
e6f92bb0e4
@ -0,0 +1,26 @@
|
||||
export default {
|
||||
// solo: true,
|
||||
|
||||
data: {
|
||||
visible: true
|
||||
},
|
||||
|
||||
test(assert, component, target, window, raf) {
|
||||
component.set({ visible: false });
|
||||
|
||||
const outer = target.querySelector('.outer');
|
||||
const inner = target.querySelector('.inner');
|
||||
|
||||
const animations = [
|
||||
outer.style.animation,
|
||||
inner.style.animation
|
||||
];
|
||||
|
||||
raf.tick(150);
|
||||
|
||||
assert.deepEqual([
|
||||
outer.style.animation,
|
||||
inner.style.animation
|
||||
], animations);
|
||||
},
|
||||
};
|
@ -0,0 +1,31 @@
|
||||
{{#if visible}}
|
||||
<span class='outer' out:foo>
|
||||
<span class='inner' out:bar>
|
||||
double transition
|
||||
</span>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
<script>
|
||||
export default {
|
||||
transitions: {
|
||||
foo(node) {
|
||||
return {
|
||||
duration: 200,
|
||||
css: t => {
|
||||
return `opacity: ${t}`;
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
bar(node) {
|
||||
return {
|
||||
duration: 100,
|
||||
css: t => {
|
||||
return `left: ${t * 100}px`;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue