mediawiki-extensions-Popups/tests/selenium/specs/reference_previews.js

29 lines
711 B
JavaScript
Raw Normal View History

const assert = require( 'assert' ),
page = require( '../pageobjects/popups.page' );
describe( 'Dwelling on a valid reference link', () => {
before( () => {
page.setup();
} );
it( 'I should see a reference preview', function () {
if ( !page.hasReferencePopupsEnabled() ) {
this.skip();
}
page.open();
page.dwellReferenceLink();
assert( page.seeReferencePreview(), 'Reference preview is shown.' );
} );
it( 'Abandoning link hides reference preview', function () {
if ( !page.hasReferencePopupsEnabled() ) {
this.skip();
}
page.open();
page.dwellReferenceLink();
page.abandonLink();
assert( page.doNotSeeReferencePreview(), 'Reference preview is kept hidden.' );
} );
} );