test-markdown-attributes.*, new default separator
- Reformat. - Change default separator test 'slide: x=y'
This commit is contained in:
parent
f2097417da
commit
d4e04b82dc
@ -13,9 +13,9 @@
|
|||||||
<body style="overflow: auto;">
|
<body style="overflow: auto;">
|
||||||
|
|
||||||
<div id="qunit"></div>
|
<div id="qunit"></div>
|
||||||
<div id="qunit-fixture"></div>
|
<div id="qunit-fixture"></div>
|
||||||
|
|
||||||
<div class="reveal" style="display: true;">
|
<div class="reveal" style="display: none;">
|
||||||
|
|
||||||
<div class="slides">
|
<div class="slides">
|
||||||
|
|
||||||
@ -66,11 +66,11 @@
|
|||||||
|
|
||||||
|
|
||||||
## Slide 2 Def
|
## Slide 2 Def
|
||||||
<!-- slide-attributes: id="slide2def" data-transition="concave" data-background="#A7C66B" -->
|
<!-- .slide: id="slide2def" data-transition="concave" data-background="#A7C66B" -->
|
||||||
|
|
||||||
|
|
||||||
## Slide 2.1 Def
|
## Slide 2.1 Def
|
||||||
<!-- slide-attributes: data-background="#f70000" data-transition="page" -->
|
<!-- .slide: data-background="#f70000" data-transition="page" -->
|
||||||
|
|
||||||
|
|
||||||
## Slide 2.2 Def
|
## Slide 2.2 Def
|
||||||
@ -79,7 +79,7 @@
|
|||||||
|
|
||||||
|
|
||||||
## Slide 3 Def
|
## Slide 3 Def
|
||||||
<!-- slide-attributes: data-transition="concave" data-background="#C7916B" -->
|
<!-- .slide: data-transition="concave" data-background="#C7916B" -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -87,30 +87,30 @@
|
|||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section data-markdown>
|
<section data-markdown>
|
||||||
<script type="text/template">
|
<script type="text/template">
|
||||||
<!-- slide-attributes: data-background="#ff0000" -->
|
<!-- .slide: data-background="#ff0000" -->
|
||||||
## Hello world
|
## Hello world
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section data-markdown>
|
<section data-markdown>
|
||||||
<script type="text/template">
|
<script type="text/template">
|
||||||
## Hello world
|
## Hello world
|
||||||
<!-- slide-attributes: data-background="#ff0000" -->
|
<!-- .slide: data-background="#ff0000" -->
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section data-markdown>
|
<section data-markdown>
|
||||||
<script type="text/template">
|
<script type="text/template">
|
||||||
## Hello world
|
## Hello world
|
||||||
|
|
||||||
Test
|
Test
|
||||||
<!-- slide-attributes: data-background="#ff0000" -->
|
<!-- .slide: data-background="#ff0000" -->
|
||||||
|
|
||||||
More Test
|
More Test
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -2,44 +2,44 @@
|
|||||||
|
|
||||||
Reveal.addEventListener( 'ready', function() {
|
Reveal.addEventListener( 'ready', function() {
|
||||||
|
|
||||||
QUnit.module( 'Markdown' );
|
QUnit.module( 'Markdown' );
|
||||||
|
|
||||||
test( 'Vertical separator', function() {
|
test( 'Vertical separator', function() {
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' );
|
||||||
});
|
});
|
||||||
|
|
||||||
test( 'Id on slide', function() {
|
test( 'Id on slide', function() {
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' );
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' );
|
||||||
});
|
});
|
||||||
|
|
||||||
test( 'data-background attributes', function() {
|
test( 'data-background attributes', function() {
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
|
||||||
});
|
});
|
||||||
|
|
||||||
test( 'data-transition attributes', function() {
|
test( 'data-transition attributes', function() {
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' );
|
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() {
|
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="#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>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"' );
|
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() {
|
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="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>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"' );
|
strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' );
|
||||||
});
|
});
|
||||||
|
|
||||||
test( 'data-transition attributes with inline content', function() {
|
test( 'data-transition attributes with inline content', function() {
|
||||||
strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' );
|
strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' );
|
||||||
});
|
});
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user