mediawiki-extensions-Popups/tests/selenium/specs/page_previews.js
WMDE-Fisch 69caa6ec3d Add browser tests for quickly hovering links
Bug: T219434
Change-Id: I3597b8025f7a12db0cf5d83cce5a77abace9bae3
2019-08-23 08:21:14 +00:00

32 lines
813 B
JavaScript

const assert = require( 'assert' ),
page = require( '../pageobjects/popups.page' );
describe( 'Dwelling on a valid page link', function () {
before( function () {
page.setup();
} );
beforeEach( function () {
page.open();
page.ready();
} );
it( 'I should see a page preview', function () {
page.dwellPageLink();
assert( page.seePagePreview(), 'Page preview is shown.' );
} );
it( 'Abandoning link hides page preview', function () {
page.dwellPageLink();
page.abandonLink();
assert( page.doNotSeePagePreview(), 'Page preview is kept hidden.' );
} );
it( 'Quickly hovering, abandoning and re-hovering a link shows page preview', function () {
page.hoverPageLink();
page.abandonLink();
page.dwellPageLink();
assert( page.seePagePreview(), 'Page preview is shown.' );
} );
} );