mediawiki-extensions-Popups/tests/selenium/specs/page_previews.js
WMDE-Fisch b3a58a6dd3 Move browser tests loading steps to beforeEach
- test page loading and waiting for the scripts moved to beforeEach
- removed unnecessary abondonLink call
- removed unnecessary browser.pause()

Change-Id: I28eb7b9b48f105315bf41f7a41e5a1e6ec21cb2b
2019-04-05 15:56:16 +00:00

25 lines
582 B
JavaScript

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( 'Abandoning link hides page preview', function () {
page.dwellPageLink();
page.abandonLink();
assert( page.doNotSeePagePreview(), 'Page preview is kept hidden.' );
} );
} );