mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-23 14:53:44 +02:00
refactored tests
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Auto-Animate</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -62,11 +58,15 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
QUnit.config.reorder = false;
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
const slides = Array.prototype.map.call( document.querySelectorAll( '.slides section' ), slide => {
|
||||
return {
|
||||
@@ -77,9 +77,11 @@
|
||||
};
|
||||
} );
|
||||
|
||||
Reveal.initialize().then( async () => {
|
||||
QUnit.module( 'Auto-Animate' );
|
||||
|
||||
QUnit.module( 'Auto-Animate' );
|
||||
Reveal.initialize().then( () => {
|
||||
|
||||
QUnit.start();
|
||||
|
||||
QUnit.test( 'Adds data-auto-animate-target', assert => {
|
||||
Reveal.slide(1);
|
||||
@@ -111,7 +113,7 @@
|
||||
});
|
||||
|
||||
QUnit.test( 'Slide specific data-auto-animate-duration', assert => {
|
||||
assert.timeout( 400 );
|
||||
assert.timeout( 2000 );
|
||||
assert.expect( 1 );
|
||||
|
||||
return new Promise( resolve => {
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Async Dependencies</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -26,13 +22,19 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
var externalScriptSequence = '';
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
window.externalScriptSequence = '';
|
||||
|
||||
var scriptCount = 0;
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
QUnit.module( 'Async Dependencies' );
|
||||
|
||||
QUnit.test( 'Async scripts are loaded', function( assert ) {
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Dependencies</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -26,8 +22,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
window.externalScriptSequence = '';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Dependencies</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -29,8 +25,11 @@
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import Reveal from '../dist/reveal.mjs'
|
||||
import Markdown from '../dist/plugin/markdown.mjs'
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
import Markdown from 'reveal.js/plugin/markdown';
|
||||
|
||||
QUnit.module( 'Destroy' );
|
||||
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Grid</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -38,8 +34,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
QUnit.config.autostart = false;
|
||||
QUnit.module( 'Grid Navigation' );
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Iframe Backgrounds</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -31,8 +27,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Iframes</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -31,8 +27,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Markdown</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -315,9 +311,12 @@
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import Reveal from '../js';
|
||||
import Markdown from '../plugin/markdown'
|
||||
import Highlight from '../plugin/highlight'
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
import Markdown from 'reveal.js/plugin/markdown'
|
||||
import Highlight from 'reveal.js/plugin/highlight'
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Iframes</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -36,9 +32,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script src="../dist/plugin/zoom.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
import RevealZoom from 'reveal.js/plugin/zoom';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
QUnit.module( 'Multiple reveal.js instances' );
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Iframes</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -37,9 +33,11 @@
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
|
||||
import Reveal from '../js';
|
||||
import Zoom from '../plugin/zoom';
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
import Zoom from 'reveal.js/plugin/zoom';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
QUnit.module( 'Multiple reveal.js instances' );
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test PDF exports</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -73,8 +69,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Plugins</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -26,8 +22,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
QUnit.module( 'Plugins' );
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test Scroll View</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -43,11 +39,15 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
QUnit.config.reorder = false;
|
||||
QUnit.config.autostart = false;
|
||||
|
||||
function getScrollHeight() {
|
||||
return Reveal.getViewportElement().scrollHeight;
|
||||
@@ -57,9 +57,11 @@
|
||||
return Reveal.getViewportElement().offsetHeight;
|
||||
}
|
||||
|
||||
QUnit.module( 'Scroll View' );
|
||||
|
||||
Reveal.initialize({ view: 'scroll' }).then( async () => {
|
||||
|
||||
QUnit.module( 'Scroll View' );
|
||||
QUnit.start();
|
||||
|
||||
QUnit.test( 'Activates', assert => {
|
||||
assert.ok( getScrollHeight() > getViewportHeight(), 'Is overflowing' );
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Test State</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -36,8 +32,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
Reveal.initialize();
|
||||
|
||||
|
@@ -5,10 +5,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Tests</title>
|
||||
|
||||
<link rel="stylesheet" href="../dist/reveal.css">
|
||||
<link rel="stylesheet" href="../node_modules/qunit/qunit/qunit.css">
|
||||
<script src="../node_modules/qunit/qunit/qunit.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="overflow: auto;">
|
||||
@@ -81,8 +77,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import 'reveal.css';
|
||||
import 'qunit/qunit/qunit.css';
|
||||
import QUnit from 'qunit';
|
||||
import Reveal from 'reveal.js';
|
||||
|
||||
QUnit.config.testTimeout = 30000;
|
||||
|
||||
window.location.hash = '';
|
||||
|
Reference in New Issue
Block a user