3 Reveal
.addEventListener( 'ready', function() {
5 QUnit
.module( 'Markdown' );
7 test( 'Vertical separator', function() {
8 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section' ).length
, 6, 'found six vertical slides' );
11 test( 'Id on slide', function() {
12 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section#slide2' ).length
, 1, 'found one slide with id slide2' );
13 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length
, 1, 'found one slide with a link to slide2' );
16 test( 'data-background attributes', function() {
17 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length
, 1, 'found one vertical slide with data-background="#A0C66B"' );
18 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length
, 1, 'found one vertical slide with data-background="#ff0000"' );
19 strictEqual( document
.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length
, 1, 'found one slide with data-background="#C6916B"' );
22 test( 'data-transition attributes', function() {
23 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length
, 1, 'found one vertical slide with data-transition="zoom"' );
24 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length
, 1, 'found one vertical slide with data-transition="fade"' );
25 strictEqual( document
.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length
, 1, 'found one slide with data-transition="zoom"' );
28 test( 'data-background attributes with default separator', function() {
29 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length
, 1, 'found one vertical slide with data-background="#A0C66B"' );
30 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length
, 1, 'found one vertical slide with data-background="#ff0000"' );
31 strictEqual( document
.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length
, 1, 'found one slide with data-background="#C6916B"' );
34 test( 'data-transition attributes with default separator', function() {
35 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length
, 1, 'found one vertical slide with data-transition="zoom"' );
36 strictEqual( document
.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length
, 1, 'found one vertical slide with data-transition="fade"' );
37 strictEqual( document
.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length
, 1, 'found one slide with data-transition="zoom"' );
40 test( 'data-transition attributes with inline content', function() {
41 strictEqual( document
.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length
, 3, 'found three horizontal slides with data-background="#ff0000"' );