mediawiki-extensions-Popups/tests/selenium/specs/page_previews.js
Ed Sanders 536470c01d build: Update eslint-config-wikimedia to 0.16.2
Change-Id: Icb65074fe64993314bbb28f690ce3ce0f89fb57c
2020-06-26 17:05:56 +01:00

34 lines
828 B
JavaScript

'use strict';
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.' );
} );
} );