diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2013-11-28 11:31:16 -0500 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2013-11-28 11:31:16 -0500 |
commit | f1a416d07cddb395b49af8b029d1c054b051f793 (patch) | |
tree | aff1f7ee9c8f3f21dbdbfc9436d6b818660736d8 | |
parent | f7b612b1e4a916e5847cdf84be5628bd187a562f (diff) | |
download | perl-software-in-gnu-guix-f1a416d07cddb395b49af8b029d1c054b051f793.tar perl-software-in-gnu-guix-f1a416d07cddb395b49af8b029d1c054b051f793.tar.gz |
tests for initial section classes
-rw-r--r-- | test/test.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test.js b/test/test.js index 36983c8..f620b5b 100644 --- a/test/test.js +++ b/test/test.js @@ -11,6 +11,22 @@ Reveal.addEventListener( 'ready', function() { + // --------------------------------------------------------------- + // DOM TESTS + + QUnit.module( 'DOM' ); + + test( 'Initial slides classes', function() { + var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' ) + + strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' ); + strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' ); + strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' ); + + strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' ); + + ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' ); + }); // --------------------------------------------------------------- // API TESTS |