mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-14 19:25:33 +00:00
606475f80e
Includes a bit untangling of the reference and page previews tests and simplifies the setup. Bug: T337862 Change-Id: Ia92cccb90fd79d10c5b33744520cb963a65db046
39 lines
1 KiB
JavaScript
39 lines
1 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
page = require( '../pageobjects/popups.page' );
|
|
|
|
describe( 'Dwelling on a valid page link', function () {
|
|
before( function () {
|
|
page.setupPagePreviews();
|
|
} );
|
|
|
|
beforeEach( function () {
|
|
page.openPagePopupsTest();
|
|
page.ready();
|
|
} );
|
|
|
|
it( 'I should see a page preview', function () {
|
|
page.dwellPageLink();
|
|
assert( page.seePagePreview(), 'Page preview is shown.' );
|
|
} );
|
|
|
|
it( 'I should not see a page preview on hash fragment', function () {
|
|
page.dwellPageFragment();
|
|
assert( page.doNotSeePagePreview(), 'Page preview is not 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.' );
|
|
} );
|
|
} );
|