mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-25 21:23:02 +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
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', () => {
|
|
|
|
afterEach( async () => {
|
|
await browser.refresh();
|
|
} );
|
|
|
|
it( ' should be disabled with 3 revisions', async () => {
|
|
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 () => {
|
|
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'
|
|
);
|
|
} );
|
|
} );
|