mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-12-04 20:18:23 +00:00
b218a77ca4
The extension is out of beta and will be enabled by default now. Leaving some hints if we decide to also remove the feature flag. Bug: T282999 Bug: T351708 Change-Id: I1556b2f3592294d094770ede2c276eddeef8bbe9
42 lines
1.6 KiB
JavaScript
42 lines
1.6 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
page = require( '../pageobjects/popups.page' );
|
|
|
|
describe( 'Dwelling on a valid reference link', function () {
|
|
before( async function () {
|
|
await page.setupReferencePreviews();
|
|
} );
|
|
|
|
beforeEach( async function () {
|
|
await page.openReferencePopupsTest();
|
|
await page.ready();
|
|
} );
|
|
|
|
it( 'I should see a reference preview', async function () {
|
|
await page.dwellReferenceLink( 'cite_ref-1' );
|
|
assert( await page.seeReferencePreview(), 'Reference preview is shown.' );
|
|
assert( !( await page.seeScrollableReferencePreview() ), 'Reference preview is not scrollable.' );
|
|
assert( !( await page.seeFadeoutOnReferenceText() ), 'Reference preview has no fading effect' );
|
|
} );
|
|
|
|
it( 'Abandoning link hides reference preview', async function () {
|
|
await page.dwellReferenceLink( 'cite_ref-1' );
|
|
await page.abandonLink();
|
|
assert( await page.doNotSeeReferencePreview(), 'Reference preview is kept hidden.' );
|
|
} );
|
|
|
|
// Skipped due to T341763
|
|
it.skip( 'References with lots of text are scrollable and fades', async function () {
|
|
await page.dwellReferenceLink( 'cite_ref-2' );
|
|
assert( await page.seeScrollableReferencePreview(), 'Reference preview is scrollable' );
|
|
assert( await page.seeFadeoutOnReferenceText(), 'Reference preview has a fading effect' );
|
|
} );
|
|
|
|
it.skip( 'Dwelling references links inside reference previews does not close the popup ', async function () {
|
|
await page.dwellReferenceLink( 'cite_ref-3' );
|
|
await page.dwellReferenceInceptionLink();
|
|
assert( await page.seeReferenceInceptionPreview(), 'The reference preview is still showing.' );
|
|
} );
|
|
} );
|