Page MenuHomeWickedGov Phorge

mmv.ui.canvasButtons.test.js
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

mmv.ui.canvasButtons.test.js

/*
* This file is part of the MediaWiki extension MediaViewer.
*
* MediaViewer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* MediaViewer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MediaViewer. If not, see <http://www.gnu.org/licenses/>.
*/
const { CanvasButtons } = require( 'mmv' );
( function () {
QUnit.module( 'mmv.ui.CanvasButtons', QUnit.newMwEnvironment() );
QUnit.test( 'Prev/Next', ( assert ) => {
const $qf = $( '#qunit-fixture' );
const buttons = new CanvasButtons( $qf, $( '<div>' ), $( '<div>' ) );
buttons.on( 'next', () => {
assert.true( true, 'Switched to next image' );
} );
buttons.on( 'prev', () => {
assert.true( true, 'Switched to prev image' );
} );
buttons.$next.trigger( 'click' );
buttons.$prev.trigger( 'click' );
} );
}() );

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 22, 06:11 (2 d, 3 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e1/c6/524ee3c800644597be6f78512960
Default Alt Text
mmv.ui.canvasButtons.test.js (1 KB)

Event Timeline