aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test-markdown-attributes.html32
-rw-r--r--test/test-markdown-attributes.js13
2 files changed, 44 insertions, 1 deletions
diff --git a/test/test-markdown-attributes.html b/test/test-markdown-attributes.html
index ed49ad4..262c6ae 100644
--- a/test/test-markdown-attributes.html
+++ b/test/test-markdown-attributes.html
@@ -55,6 +55,38 @@
</script>
</section>
+ <section data-markdown data-separator="^\n\n\n"
+ data-vertical="^\n\n"
+ data-notes="^Note:"
+ data-charset="utf-8">
+ <script type="text/template">
+ # Test attributes in Markdown with default separator
+ ## Slide 1 Def
+
+
+
+ ## Slide 2 Def
+ <!-- slide-attributes: id="slide2def" data-transition="concave" data-background="#A7C66B" -->
+
+
+ ## Slide 2.1 Def
+ <!-- slide-attributes: data-background="#f70000" data-transition="page" -->
+
+
+ ## Slide 2.2 Def
+ [Link to Slide2](#/slide2def)
+
+
+
+ ## Slide 3 Def
+ <!-- slide-attributes: data-transition="concave" data-background="#C7916B" -->
+
+
+
+ ## Slide 4
+ </script>
+ </section>
+
</div>
</div>
diff --git a/test/test-markdown-attributes.js b/test/test-markdown-attributes.js
index a0d8436..3e88341 100644
--- a/test/test-markdown-attributes.js
+++ b/test/test-markdown-attributes.js
@@ -5,7 +5,7 @@ Reveal.addEventListener( 'ready', function() {
QUnit.module( 'Markdown' );
test( 'Vertical separator', function() {
- strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 3, 'found three vertical slides' );
+ strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' );
});
test( 'Id on slide', function() {
@@ -25,6 +25,17 @@ Reveal.addEventListener( 'ready', function() {
strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' );
});
+ test( 'data-background attributes with default separator', function() {
+ strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
+ strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
+ strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
+ });
+
+ test( 'data-transition attributes with default separator', function() {
+ strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
+ strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
+ strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' );
+ });
} );
Reveal.initialize();