mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-22 11:42:44 +00:00
95540a313c
No need to build up two test here with refreshing the page. Change-Id: I9bc5b44e2b92704b896edaaa03affac216b9dbce
43 lines
958 B
JavaScript
43 lines
958 B
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
describe( 'RevisionSlider revision tooltips', function () {
|
|
|
|
before( async function () {
|
|
await DiffPage.prepareSimpleTests( 2 );
|
|
DiffPage.ready();
|
|
await DiffPage.openSlider();
|
|
} );
|
|
|
|
it( 'appears and remains on hovering it', async function () {
|
|
|
|
await DiffPage.dwellRevision( 1 );
|
|
|
|
assert(
|
|
await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should appear'
|
|
);
|
|
assert(
|
|
!await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should not appear'
|
|
);
|
|
|
|
await DiffPage.dwellRevision( 2 );
|
|
|
|
assert(
|
|
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should appear'
|
|
);
|
|
assert(
|
|
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should vanish'
|
|
);
|
|
|
|
await DiffPage.getTooltip( 2 ).moveTo();
|
|
|
|
assert(
|
|
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should still be visible'
|
|
);
|
|
|
|
} );
|
|
|
|
} );
|