2020-11-05 17:34:38 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const assert = require( 'assert' ),
|
|
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
|
|
|
|
describe( 'RevisionSlider diff links', function () {
|
|
|
|
|
|
|
|
beforeEach( function () {
|
|
|
|
DiffPage.prepareSimpleTests( 4 );
|
|
|
|
DiffPage.ready();
|
|
|
|
DiffPage.openSlider();
|
|
|
|
} );
|
|
|
|
|
|
|
|
it( ' older edit diff link can be clicked', function () {
|
|
|
|
DiffPage.rsEditOlderButton.click();
|
2020-11-09 11:36:35 +00:00
|
|
|
DiffPage.waitUntilLoaded();
|
2020-11-05 17:34:38 +00:00
|
|
|
|
|
|
|
assert( DiffPage.isOlderPointerOn( 2 ) );
|
|
|
|
assert( DiffPage.isNewerPointerOn( 3 ) );
|
|
|
|
assert( DiffPage.showsOlderSummary( 2 ) );
|
|
|
|
assert( DiffPage.showsNewerSummary( 3 ) );
|
|
|
|
} );
|
|
|
|
|
|
|
|
it( ' newer edit diff link can be clicked', function () {
|
|
|
|
DiffPage.rsEditOlderButton.click();
|
2020-11-09 11:36:35 +00:00
|
|
|
DiffPage.waitUntilLoaded();
|
2020-11-05 17:34:38 +00:00
|
|
|
|
|
|
|
DiffPage.rsEditNewerButton.click();
|
2020-11-09 11:36:35 +00:00
|
|
|
DiffPage.waitUntilLoaded();
|
2020-11-05 17:34:38 +00:00
|
|
|
|
|
|
|
assert( DiffPage.isOlderPointerOn( 3 ) );
|
|
|
|
assert( DiffPage.isNewerPointerOn( 4 ) );
|
|
|
|
assert( DiffPage.showsOlderSummary( 3 ) );
|
|
|
|
assert( DiffPage.showsNewerSummary( 4 ) );
|
|
|
|
} );
|
|
|
|
} );
|