Skip to content

Commit

Permalink
failing test for #648
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Feb 7, 2018
1 parent 29a1569 commit e6f92bb
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/runtime/samples/transition-css-deferred-removal/_config.js
Original file line number Diff line number Diff line change
@@ -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);
},
};
31 changes: 31 additions & 0 deletions test/runtime/samples/transition-css-deferred-removal/main.html
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit e6f92bb

Please sign in to comment.