mediawiki-extensions-Revisi.../tests/selenium/specs/difflinks.js
WMDE-Fisch 5537fb963b Merge methods waiting for loaded slider
Change-Id: I06009d372c0691d2db8356e8cd7e7e8653ff51a0
2020-11-09 12:36:35 +01:00

37 lines
971 B
JavaScript

'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();
DiffPage.waitUntilLoaded();
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();
DiffPage.waitUntilLoaded();
DiffPage.rsEditNewerButton.click();
DiffPage.waitUntilLoaded();
assert( DiffPage.isOlderPointerOn( 3 ) );
assert( DiffPage.isNewerPointerOn( 4 ) );
assert( DiffPage.showsOlderSummary( 3 ) );
assert( DiffPage.showsNewerSummary( 4 ) );
} );
} );