mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-24 12:43:32 +00:00
69bf1e0dea
Reducing the width further leads to a strange behavior were it fails. Locally this test is about 30% faster this way. Change-Id: I5f950041ccf0f2f326ad6d9023d300e6a344f902
54 lines
1.1 KiB
JavaScript
54 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
describe( 'RevisionSlider timeline arrows', function () {
|
|
|
|
afterEach( function () {
|
|
browser.refresh();
|
|
} );
|
|
|
|
it( ' should be disabled with 3 revisions', function () {
|
|
DiffPage.prepareSimpleTests( 3 );
|
|
DiffPage.ready();
|
|
DiffPage.openSlider();
|
|
|
|
assert(
|
|
DiffPage.isBackwardsArrowDisabled(),
|
|
'backwards arrow should be disabled'
|
|
);
|
|
assert(
|
|
DiffPage.isForwardsArrowDisabled(),
|
|
'forwards arrow should be disabled'
|
|
);
|
|
} );
|
|
|
|
it( ' should be enabled with adequate revisions', function () {
|
|
browser.setWindowSize( 80, 600 );
|
|
DiffPage.prepareSimpleTests( 9 );
|
|
DiffPage.ready();
|
|
DiffPage.openSlider();
|
|
|
|
DiffPage.backwardsArrow.click();
|
|
DiffPage.waitForSliding();
|
|
|
|
assert(
|
|
!DiffPage.isForwardsArrowDisabled(),
|
|
'forwards arrow should be enabled'
|
|
);
|
|
|
|
DiffPage.forwardsArrow.click();
|
|
DiffPage.waitForSliding();
|
|
|
|
assert(
|
|
!DiffPage.isBackwardsArrowDisabled(),
|
|
'backwards arrow should be enabled'
|
|
);
|
|
assert(
|
|
DiffPage.isForwardsArrowDisabled(),
|
|
'forwards arrow should be disabled'
|
|
);
|
|
} );
|
|
} );
|