aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-11-07 08:39:19 -0500
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-11-07 08:39:19 -0500
commita119c83f86ab5aed459757553e3aa27313f7c60a (patch)
tree729ae2af1a083a5f8b28be617fc06efd06f6cf28 /test
parente7e941b66363a70e04fd994439f32611a6a0a136 (diff)
downloadfosdem-2018-presentation-a119c83f86ab5aed459757553e3aa27313f7c60a.tar
fosdem-2018-presentation-a119c83f86ab5aed459757553e3aa27313f7c60a.tar.gz
ensure that all fragments on past slides are visible #684
Diffstat (limited to 'test')
-rw-r--r--test/test.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test.js b/test/test.js
index 00c9622..bd5cad1 100644
--- a/test/test.js
+++ b/test/test.js
@@ -204,6 +204,16 @@ Reveal.addEventListener( 'ready', function() {
deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'left() goes to prev fragment' );
});
+ test( 'Stepping past fragments', function() {
+ var fragmentSlide = document.querySelector( '.reveal .slides>section:nth-child(3)' );
+
+ Reveal.slide( 0, 0, 0 );
+ equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when on previous slide' );
+
+ Reveal.slide( 3, 0, 0 );
+ equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 3, 'all fragments visible when on future slide' );
+ });
+
asyncTest( 'fragmentshown event', function() {
expect( 2 );