aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2015-09-10 08:28:52 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2015-09-10 08:28:52 +0200
commit0338f280d3942094782da57ea3b5b72bdb833e9d (patch)
tree371e619bc9474e78dd805635b6a210614b20d4c1 /test
parent5a40b4486f46b18aa640046595fc592cbb1a5735 (diff)
downloadperl-software-in-gnu-guix-0338f280d3942094782da57ea3b5b72bdb833e9d.tar
perl-software-in-gnu-guix-0338f280d3942094782da57ea3b5b72bdb833e9d.tar.gz
add getSlideNotes API method and tests
Diffstat (limited to 'test')
-rw-r--r--test/test.html3
-rw-r--r--test/test.js10
2 files changed, 11 insertions, 2 deletions
diff --git a/test/test.html b/test/test.html
index 34cf832..d08e4f0 100644
--- a/test/test.html
+++ b/test/test.html
@@ -24,10 +24,11 @@
<img data-src="fake-url.png">
<video data-src="fake-url.mp4"></video>
<audio data-src="fake-url.mp3"></audio>
+ <aside class="notes">speaker notes 1</aside>
</section>
<section>
- <section data-background="examples/assets/image2.png">
+ <section data-background="examples/assets/image2.png" data-notes="speaker notes 2">
<h1>2.1</h1>
</section>
<section>
diff --git a/test/test.js b/test/test.js
index 79ff81e..a96b70b 100644
--- a/test/test.js
+++ b/test/test.js
@@ -89,7 +89,7 @@ Reveal.addEventListener( 'ready', function() {
test( 'Reveal.isLastSlide after vertical slide', function() {
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
-
+
Reveal.slide( 1, 1 );
Reveal.slide( lastSlideIndex );
strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( '+ lastSlideIndex +', 0 )' );
@@ -139,6 +139,14 @@ Reveal.addEventListener( 'ready', function() {
strictEqual( Reveal.getSlideBackground( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
});
+ test( 'Reveal.getSlideNotes', function() {
+ Reveal.slide( 0, 0 );
+ ok( Reveal.getSlideNotes() === 'speaker notes 1', 'works with <aside class="notes">' );
+
+ Reveal.slide( 1, 0 );
+ ok( Reveal.getSlideNotes() === 'speaker notes 2', 'works with <section data-notes="">' );
+ });
+
test( 'Reveal.getPreviousSlide/getCurrentSlide', function() {
Reveal.slide( 0, 0 );
Reveal.slide( 1, 0 );