mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-11 15:06:19 +00:00
cfac82978c
Change-Id: I283228cc03dcc64107720f9092a2f41483f74853
22 lines
744 B
JavaScript
22 lines
744 B
JavaScript
( function ( mw ) {
|
|
var SliderView = mw.libs.revisionSlider.SliderView,
|
|
Slider = mw.libs.revisionSlider.Slider,
|
|
Revision = mw.libs.revisionSlider.Revision,
|
|
RevisionList = mw.libs.revisionSlider.RevisionList;
|
|
|
|
QUnit.module( 'ext.RevisionSlider.SliderView' );
|
|
|
|
QUnit.test( 'render', function ( assert ) {
|
|
var $container = $( '<div/>' ),
|
|
view = new SliderView( new Slider( new RevisionList( [
|
|
new Revision( { size: 5, comment: 'Comment1', user: 'User1' } ),
|
|
new Revision( { size: 21, comment: 'Comment2', user: 'User2' } ),
|
|
new Revision( { size: 13, comment: 'Comment3', user: 'User3' } )
|
|
] ) ) );
|
|
|
|
view.render( $container );
|
|
assert.ok( $container.find( '.revision-slider' ).length > 0 );
|
|
} );
|
|
|
|
} )( mediaWiki );
|