2020-11-11 15:20:52 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const assert = require( 'assert' ),
|
|
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
|
|
|
|
describe( 'RevisionSlider revision tooltips', function () {
|
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
before( async function () {
|
|
|
|
await DiffPage.prepareSimpleTests( 2 );
|
2020-11-11 15:20:52 +00:00
|
|
|
DiffPage.ready();
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.openSlider();
|
2020-11-11 15:20:52 +00:00
|
|
|
} );
|
|
|
|
|
2024-02-02 15:53:02 +00:00
|
|
|
it( 'appears and remains on hovering it', async function () {
|
2020-11-11 15:20:52 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.dwellRevision( 1 );
|
2020-11-11 15:20:52 +00:00
|
|
|
|
|
|
|
assert(
|
2024-02-02 15:53:02 +00:00
|
|
|
await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should appear'
|
2020-11-11 15:20:52 +00:00
|
|
|
);
|
|
|
|
assert(
|
2024-02-02 15:53:02 +00:00
|
|
|
!await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should not appear'
|
2020-11-11 15:20:52 +00:00
|
|
|
);
|
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.dwellRevision( 2 );
|
2020-11-11 15:20:52 +00:00
|
|
|
|
|
|
|
assert(
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should appear'
|
2020-11-11 15:20:52 +00:00
|
|
|
);
|
2024-02-02 15:53:02 +00:00
|
|
|
assert(
|
|
|
|
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should vanish'
|
|
|
|
);
|
|
|
|
|
|
|
|
await DiffPage.getTooltip( 2 ).moveTo();
|
2020-11-11 15:20:52 +00:00
|
|
|
|
|
|
|
assert(
|
2024-02-02 15:53:02 +00:00
|
|
|
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should still be visible'
|
2020-11-11 15:20:52 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
} );
|