2020-11-06 11:49:07 +00:00
|
|
|
'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 () {
|
2021-05-21 11:53:05 +00:00
|
|
|
browser.setWindowSize( 400, 600 );
|
2020-11-09 14:34:06 +00:00
|
|
|
DiffPage.prepareSimpleTests( 9 );
|
2020-11-06 11:49:07 +00:00
|
|
|
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'
|
|
|
|
);
|
|
|
|
} );
|
|
|
|
} );
|