forked from blallo/talk-hm-0x15
tests for initial section classes
This commit is contained in:
parent
f7b612b1e4
commit
f1a416d07c
1 changed files with 16 additions and 0 deletions
16
test/test.js
16
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
|
||||
|
|
Loading…
Reference in a new issue