mirror of
https://github.com/Noratrieb/slides.git
synced 2026-01-14 16:35:07 +01:00
add getSlideNotes API method and tests
This commit is contained in:
parent
5a40b4486f
commit
0338f280d3
4 changed files with 44 additions and 18 deletions
10
test/test.js
10
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 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue