mediawiki-extensions-Popups/tests/selenium/specs/reference_previews.js
Jon Robson 3d627fe731 Skip flakey Selenium test for now
This test is failing regularly on the daily build. I manually
checked and could see no problems with the functionality:
https://integration.wikimedia.org/ci/job/selenium-daily-beta-Popups/

Bug: T341763
Change-Id: Id3a3a1c16c400796467496d8934fdff7a14be9fb
2023-07-13 15:15:34 +00:00

58 lines
1.9 KiB
JavaScript

'use strict';
const assert = require( 'assert' ),
page = require( '../pageobjects/popups.page' ),
UserLoginPage = require( 'wdio-mediawiki/LoginPage' );
describe( 'Dwelling on a valid reference link', function () {
before( function () {
page.setupReferencePreviews();
// TODO Remove or adjust when not in Beta any more
UserLoginPage.loginAdmin();
page.shouldUseReferencePopupsBetaFeature( true );
} );
beforeEach( function () {
page.openReferencePopupsTest();
page.ready();
} );
it( 'I should see a reference preview', function () {
if ( !page.hasReferencePopupsEnabled() ) {
this.skip();
}
page.dwellReferenceLink( 1 );
assert( page.seeReferencePreview(), 'Reference preview is shown.' );
assert( !page.seeScrollableReferencePreview(), 'Reference preview is not scrollable.' );
assert( !page.seeFadeoutOnReferenceText(), 'Reference preview has no fading effect' );
} );
it( 'Abandoning link hides reference preview', function () {
if ( !page.hasReferencePopupsEnabled() ) {
this.skip();
}
page.dwellReferenceLink( 1 );
page.abandonLink();
assert( page.doNotSeeReferencePreview(), 'Reference preview is kept hidden.' );
} );
// Skipped due to T341763
it.skip( 'References with lots of text are scrollable and fades', function () {
if ( !page.hasReferencePopupsEnabled() ) {
this.skip();
}
page.dwellReferenceLink( 2 );
assert( page.seeScrollableReferencePreview(), 'Reference preview is scrollable' );
assert( page.seeFadeoutOnReferenceText(), 'Reference preview has a fading effect' );
} );
it( 'Dwelling references links inside reference previews does not close the popup ', function () {
if ( !page.hasReferencePopupsEnabled() ) {
this.skip();
}
page.dwellReferenceLink( 3 );
page.dwellReferenceInceptionLink();
assert( page.seeReferenceInceptionPreview(), 'The reference preview is still showing.' );
} );
} );