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
|
|
|
} );
|
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
beforeEach( async function () {
|
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
|
|
|
} );
|
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
afterEach( async function () {
|
|
|
|
await browser.refresh();
|
2020-11-11 15:20:52 +00:00
|
|
|
} );
|
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
it( 'should appear on hover', 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
|
|
|
|
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
|
|
|
);
|
|
|
|
|
|
|
|
assert(
|
2023-03-29 20:23:48 +00:00
|
|
|
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should not appear'
|
2020-11-11 15:20:52 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
it( 'appears and remains on hover', async function () {
|
2020-11-11 15:20:52 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.dwellRevision( 1 );
|
|
|
|
await DiffPage.getTooltip( 1 ).moveTo();
|
2020-11-11 15:20:52 +00:00
|
|
|
|
2023-03-29 20:23:48 +00:00
|
|
|
await DiffPage.dwellRevision( 2 );
|
|
|
|
await DiffPage.getTooltip( 2 ).moveTo();
|
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
|
|
|
);
|
|
|
|
|
|
|
|
assert(
|
2023-03-29 20:23:48 +00:00
|
|
|
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should not appear'
|
2020-11-11 15:20:52 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
} );
|