mediawiki-extensions-Revisi.../tests/selenium/specs/timeline.js
WMDE-Fisch 69bf1e0dea Try with a minimum set of revisions for timeline test
Reducing the width further leads to a strange behavior were it fails.

Locally this test is about 30% faster this way.

Change-Id: I5f950041ccf0f2f326ad6d9023d300e6a344f902
2020-11-09 15:34:06 +01:00

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'
);
} );
} );