better test for fragment indices

edit
Hakim El Hattab 2014-09-09 12:42:11 +02:00
parent cbef64b860
commit 4823b267cc
1 changed files with 7 additions and 0 deletions

View File

@ -313,6 +313,13 @@ Reveal.addEventListener( 'ready', function() {
Reveal.slide( 3, 0, 0 ); Reveal.slide( 3, 0, 0 );
equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' ); equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' );
// This slide has three fragments, first one is index 0, second and third have index 1
Reveal.slide( 2, 2, 0 );
equal( Reveal.getIndices().f, 0, 'returns correct index for first fragment' );
Reveal.slide( 2, 2, 1 );
equal( Reveal.getIndices().f, 1, 'returns correct index for two fragments with same index' );
}); });
test( 'Index generation', function() { test( 'Index generation', function() {