mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-21 03:02:45 +00:00
8a53d056be
WebdriverIO has dropped support of sync mode, hence changed to async. Update npm packages: @wdio/*, wdio-mediawiki because async mode needs at least @wdio v7.9. Remove npm packages: @wdio/dot-reporter and @wdio/sync. Bug: T300798 Change-Id: I053ea6b5fbfdcff279f4eb10cf2429155690bd72
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
describe( 'RevisionSlider diff links', function () {
|
|
|
|
beforeEach( async function () {
|
|
await DiffPage.prepareSimpleTests( 3 );
|
|
DiffPage.ready();
|
|
await DiffPage.openSlider();
|
|
} );
|
|
|
|
it( ' older edit diff link can be clicked', async function () {
|
|
await DiffPage.rsEditOlderButton.click();
|
|
await DiffPage.waitUntilLoaded();
|
|
|
|
assert( await DiffPage.isOlderPointerOn( 1 ) );
|
|
assert( await DiffPage.isNewerPointerOn( 2 ) );
|
|
assert( await DiffPage.showsOlderSummary( 1 ) );
|
|
assert( await DiffPage.showsNewerSummary( 2 ) );
|
|
} );
|
|
|
|
it( ' newer edit diff link can be clicked', async function () {
|
|
await DiffPage.rsEditOlderButton.click();
|
|
await DiffPage.waitUntilLoaded();
|
|
|
|
await DiffPage.rsEditNewerButton.click();
|
|
await DiffPage.waitUntilLoaded();
|
|
|
|
assert( await DiffPage.isOlderPointerOn( 2 ) );
|
|
assert( await DiffPage.isNewerPointerOn( 3 ) );
|
|
assert( await DiffPage.showsOlderSummary( 2 ) );
|
|
assert( await DiffPage.showsNewerSummary( 3 ) );
|
|
} );
|
|
} );
|