mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-18 10:10:48 +00:00
119483bdd8
Bug: T198652 Change-Id: Ic43883d7092499386df35e6fe049863cbffbe635
39 lines
1,004 B
JavaScript
39 lines
1,004 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( '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.' );
|
|
} );
|
|
} );
|