mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
web animation updates
This commit is contained in:
22
scripts/vendor/web-animations-js/test/js/group-constructors.js
vendored
Executable file
22
scripts/vendor/web-animations-js/test/js/group-constructors.js
vendored
Executable file
@ -0,0 +1,22 @@
|
||||
suite('group-constructors', function() {
|
||||
function simpleGroupEffect() {
|
||||
return new SequenceEffect([
|
||||
new KeyframeEffect(document.body, [], 2000),
|
||||
new GroupEffect([
|
||||
new KeyframeEffect(document.body, [], 2000),
|
||||
new KeyframeEffect(document.body, [], 1000)
|
||||
])
|
||||
]);
|
||||
}
|
||||
|
||||
test('animation getter for children in groups works as expected', function() {
|
||||
var anim = document.timeline.play(simpleGroupEffect());
|
||||
tick(0);
|
||||
assert.equal(anim.effect.animation, anim);
|
||||
assert.equal(anim._childAnimations[0].effect.animation, anim);
|
||||
assert.equal(anim._childAnimations[1].effect.animation, anim);
|
||||
tick(2100);
|
||||
assert.equal(anim._childAnimations[1]._childAnimations[0].effect.animation, anim);
|
||||
assert.equal(anim._childAnimations[1]._childAnimations[1].effect.animation, anim);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user