mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-22 03:32:46 +00:00
f5de8ee108
* eslint-config-wikimedia: 0.27.0 → 0.28.0 The following rules are failing and were disabled: * modules: * no-mixed-spaces-and-tabs * no-jquery/no-extend * implicit-arrow-linebreak * tests/qunit: * no-jquery/no-extend * grunt-stylelint: 0.19.0 → 0.20.0 * stylelint-config-wikimedia: 0.16.1 → 0.17.1 Change-Id: I3fd3c4a2cbb03d3aa4c8efb658e33d14d24cd518
55 lines
1.2 KiB
JavaScript
55 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
describe( 'RevisionSlider pointers', () => {
|
|
|
|
before( async () => {
|
|
await DiffPage.prepareSimpleTests( 3 );
|
|
} );
|
|
|
|
beforeEach( async () => {
|
|
DiffPage.ready();
|
|
await DiffPage.openSlider();
|
|
} );
|
|
|
|
afterEach( async () => {
|
|
await browser.refresh();
|
|
} );
|
|
|
|
it( ' can be dragged', async () => {
|
|
assert(
|
|
await DiffPage.isOlderPointerOn( 2 ),
|
|
'older pointer should be on previous revision'
|
|
);
|
|
assert(
|
|
await DiffPage.isNewerPointerOn( 3 ),
|
|
'newer pointer should be on current revision'
|
|
);
|
|
|
|
await DiffPage.dragOlderPointerTo( 1 );
|
|
await DiffPage.waitUntilLoaded();
|
|
|
|
await DiffPage.dragNewerPointerTo( 2 );
|
|
await DiffPage.waitUntilLoaded();
|
|
|
|
assert(
|
|
await DiffPage.isOlderPointerOn( 1 ),
|
|
'older pointer should be on revision 1'
|
|
);
|
|
assert(
|
|
await DiffPage.isNewerPointerOn( 2 ),
|
|
'newer pointer should be on revision 2'
|
|
);
|
|
assert(
|
|
await DiffPage.showsOlderSummary( 1 ),
|
|
'revision 1 should be loaded on the left of the diff'
|
|
);
|
|
assert(
|
|
await DiffPage.showsNewerSummary( 2 ),
|
|
'revision 2 should be loaded on the right of the diff'
|
|
);
|
|
} );
|
|
} );
|