aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2018-04-27 15:53:02 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2018-04-27 15:53:02 +0200
commit4ba0d733458408ee666163792c0dc13ebec41ac4 (patch)
tree23a8bc39606be3f2c290929082d0149f210c20f0 /test
parentde41f6cf50a04ee8d8cdca2254ea919e1130590b (diff)
downloadperl-software-in-gnu-guix-4ba0d733458408ee666163792c0dc13ebec41ac4.tar
perl-software-in-gnu-guix-4ba0d733458408ee666163792c0dc13ebec41ac4.tar.gz
add , adds wrapper element around background images/videos/iframes
Diffstat (limited to 'test')
-rw-r--r--test/test.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test.js b/test/test.js
index 042e4e8..f8515a0 100644
--- a/test/test.js
+++ b/test/test.js
@@ -130,8 +130,8 @@ Reveal.addEventListener( 'ready', function() {
QUnit.test( 'Reveal.getSlideBackground', function( assert ) {
assert.equal( Reveal.getSlideBackground( 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:first-child' ), 'gets correct first background' );
assert.equal( Reveal.getSlideBackground( 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2)' ), 'no v index returns stack' );
- assert.equal( Reveal.getSlideBackground( 1, 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(1)' ), 'v index 0 returns first vertical child' );
- assert.equal( Reveal.getSlideBackground( 1, 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(2)' ), 'v index 1 returns second vertical child' );
+ assert.equal( Reveal.getSlideBackground( 1, 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(2)' ), 'v index 0 returns first vertical child' );
+ assert.equal( Reveal.getSlideBackground( 1, 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(3)' ), 'v index 1 returns second vertical child' );
assert.strictEqual( Reveal.getSlideBackground( 100 ), undefined, 'undefined when out of horizontal bounds' );
assert.strictEqual( Reveal.getSlideBackground( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
@@ -523,8 +523,8 @@ Reveal.addEventListener( 'ready', function() {
var imageSource2 = Reveal.getSlide( 1, 0 ).getAttribute( 'data-background' );
// check that the images are applied to the background elements
- assert.ok( Reveal.getSlideBackground( 0 ).style.backgroundImage.indexOf( imageSource1 ) !== -1, 'data-background-image worked' );
- assert.ok( Reveal.getSlideBackground( 1, 0 ).style.backgroundImage.indexOf( imageSource2 ) !== -1, 'data-background worked' );
+ assert.ok( Reveal.getSlideBackground( 0 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource1 ) !== -1, 'data-background-image worked' );
+ assert.ok( Reveal.getSlideBackground( 1, 0 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource2 ) !== -1, 'data-background worked' );
});