2020-11-05 17:34:38 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const assert = require( 'assert' ),
|
|
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
describe( 'RevisionSlider diff links', () => {
|
2020-11-05 17:34:38 +00:00
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
beforeEach( async () => {
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.prepareSimpleTests( 3 );
|
2020-11-05 17:34:38 +00:00
|
|
|
DiffPage.ready();
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.openSlider();
|
2020-11-05 17:34:38 +00:00
|
|
|
} );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
it( ' older edit diff link can be clicked', async () => {
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.rsEditOlderButton.click();
|
|
|
|
await DiffPage.waitUntilLoaded();
|
2020-11-05 17:34:38 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
assert( await DiffPage.isOlderPointerOn( 1 ) );
|
|
|
|
assert( await DiffPage.isNewerPointerOn( 2 ) );
|
|
|
|
assert( await DiffPage.showsOlderSummary( 1 ) );
|
|
|
|
assert( await DiffPage.showsNewerSummary( 2 ) );
|
2020-11-05 17:34:38 +00:00
|
|
|
} );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
it( ' newer edit diff link can be clicked', async () => {
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.rsEditOlderButton.click();
|
|
|
|
await DiffPage.waitUntilLoaded();
|
2020-11-05 17:34:38 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.rsEditNewerButton.click();
|
|
|
|
await DiffPage.waitUntilLoaded();
|
2020-11-05 17:34:38 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
assert( await DiffPage.isOlderPointerOn( 2 ) );
|
|
|
|
assert( await DiffPage.isNewerPointerOn( 3 ) );
|
|
|
|
assert( await DiffPage.showsOlderSummary( 2 ) );
|
|
|
|
assert( await DiffPage.showsNewerSummary( 3 ) );
|
2020-11-05 17:34:38 +00:00
|
|
|
} );
|
|
|
|
} );
|