mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-23 04:02:50 +00:00
8a53d056be
WebdriverIO has dropped support of sync mode, hence changed to async. Update npm packages: @wdio/*, wdio-mediawiki because async mode needs at least @wdio v7.9. Remove npm packages: @wdio/dot-reporter and @wdio/sync. Bug: T300798 Change-Id: I053ea6b5fbfdcff279f4eb10cf2429155690bd72
56 lines
1.1 KiB
JavaScript
56 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
DiffPage = require( '../pageobjects/diff.page' );
|
|
|
|
describe( 'RevisionSlider revision tooltips', function () {
|
|
|
|
before( async function () {
|
|
await DiffPage.prepareSimpleTests( 2 );
|
|
} );
|
|
|
|
beforeEach( async function () {
|
|
DiffPage.ready();
|
|
await DiffPage.openSlider();
|
|
} );
|
|
|
|
afterEach( async function () {
|
|
await browser.refresh();
|
|
} );
|
|
|
|
it( 'should appear on hover', async function () {
|
|
|
|
await DiffPage.dwellRevision( 1 );
|
|
|
|
await DiffPage.dwellRevision( 2 );
|
|
|
|
assert(
|
|
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should appear'
|
|
);
|
|
|
|
assert(
|
|
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should not appear'
|
|
);
|
|
|
|
} );
|
|
|
|
it( 'appears and remains on hover', async function () {
|
|
|
|
await DiffPage.dwellRevision( 1 );
|
|
await DiffPage.getTooltip( 1 ).moveTo();
|
|
|
|
await DiffPage.dwellRevision( 2 );
|
|
await DiffPage.getTooltip( 2 ).moveTo();
|
|
|
|
assert(
|
|
await DiffPage.getTooltip( 2 ).isDisplayed(), 'tooltip 2 should appear'
|
|
);
|
|
|
|
assert(
|
|
!await DiffPage.getTooltip( 1 ).isDisplayed(), 'tooltip 1 should not appear'
|
|
);
|
|
|
|
} );
|
|
|
|
} );
|