diff --git a/test/test-auto-animate.html b/test/test-auto-animate.html
index 2fe77580..2d757101 100644
--- a/test/test-auto-animate.html
+++ b/test/test-auto-animate.html
@@ -26,7 +26,7 @@
@@ -60,22 +60,22 @@
} );
QUnit.test( 'Adds data-auto-animate-target', assert => {
- Reveal.next();
+ Reveal.slide(1);
assert.strictEqual( slides[0].h1.getAttribute( 'data-auto-animate-target' ), '', 'From elements have blank data-auto-animate-target' );
assert.ok( slides[1].h1.getAttribute( 'data-auto-animate-target' ).length > 0, 'To elements have a data-auto-animate-target value' );
});
QUnit.test( 'Ends on correct target styles', assert => {
- Reveal.next();
+ Reveal.slide(1);
assert.strictEqual( slides[1].h2.style.opacity, "0" );
assert.strictEqual( slides[1].h3.offsetLeft, 100 );
});
- QUnit.test( 'data-auto-animate-duration', assert => {
- assert.timeout( 400 );
+ QUnit.test( 'Slide specific data-auto-animate-duration', assert => {
+ assert.timeout( 350 );
var done = assert.async();
- Reveal.next();
+ Reveal.slide(2);
slides[2].h3.addEventListener( 'transitionend', function() {
assert.ok( true, 'Transition ended within time window' );
@@ -83,6 +83,18 @@
} );
});
+ QUnit.test( 'Element specific data-auto-animate-duration', assert => {
+ assert.timeout( 350 );
+ var done = assert.async();
+
+ Reveal.slide(1);
+
+ slides[1].h1.addEventListener( 'transitionend', function() {
+ assert.ok( true, 'Transition ended within time window' );
+ done();
+ } );
+ });
+
} );
Reveal.initialize();