mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-19 10:20:53 +00:00
8fe657e90e
Due to some change in the test setup, possibly related to the new Vector skin, the slider now has more space and the need to scroll triggers at a later point. Change-Id: I5411d5a31714761434135e65d916f57f1e437003
54 lines
1.2 KiB
JavaScript
54 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
describe( 'RevisionSlider timeline arrows', function () {
|
|
|
|
afterEach( async function () {
|
|
await browser.refresh();
|
|
} );
|
|
|
|
it( ' should be disabled with 3 revisions', async function () {
|
|
await DiffPage.prepareSimpleTests( 3 );
|
|
DiffPage.ready();
|
|
await DiffPage.openSlider();
|
|
|
|
assert(
|
|
await DiffPage.isBackwardsArrowDisabled(),
|
|
'backwards arrow should be disabled'
|
|
);
|
|
assert(
|
|
await DiffPage.isForwardsArrowDisabled(),
|
|
'forwards arrow should be disabled'
|
|
);
|
|
} );
|
|
|
|
it( ' should be enabled with adequate revisions', async function () {
|
|
await browser.setWindowSize( 400, 600 );
|
|
await DiffPage.prepareSimpleTests( 20 );
|
|
DiffPage.ready();
|
|
await DiffPage.openSlider();
|
|
|
|
await DiffPage.backwardsArrow.click();
|
|
await DiffPage.waitForSliding();
|
|
|
|
assert(
|
|
!await DiffPage.isForwardsArrowDisabled(),
|
|
'forwards arrow should be enabled'
|
|
);
|
|
|
|
await DiffPage.forwardsArrow.click();
|
|
DiffPage.waitForSliding();
|
|
|
|
assert(
|
|
!await DiffPage.isBackwardsArrowDisabled(),
|
|
'backwards arrow should be enabled'
|
|
);
|
|
assert(
|
|
await DiffPage.isForwardsArrowDisabled(),
|
|
'forwards arrow should be disabled'
|
|
);
|
|
} );
|
|
} );
|