2020-11-11 15:20:52 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const assert = require( 'assert' ),
|
|
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
describe( 'RevisionSlider revision tooltips', () => {
|
2020-11-11 15:20:52 +00:00
|
|
|
|
2024-06-08 04:13:35 +00:00
|
|
|
before( async () => {
|
2023-03-29 20:23:48 +00:00
|
|
|
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-06-08 04:13:35 +00:00
|
|
|
it( 'appears and remains on hovering it', async () => {
|
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
|
|
|
);
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
} );
|