mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
5f8dbcf2dd
Bug: T296187 Change-Id: I705d4d3e8a0135b500ec63749f519f7b86855a2f
40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
'use strict';
|
|
const assert = require( 'assert' );
|
|
const EditPage = require( '../pageobjects/edit.page' );
|
|
const Util = require( 'wdio-mediawiki/Util' );
|
|
|
|
describe( 'Toolbar', function () {
|
|
|
|
let name;
|
|
|
|
beforeEach( async function () {
|
|
name = Util.getTestString();
|
|
await EditPage.openForEditing( name );
|
|
await EditPage.toolbar.waitForDisplayed( { timeout: 20000 } );
|
|
} );
|
|
|
|
afterEach( async function () {
|
|
// T269566: Popup with text
|
|
// 'Leave site? Changes that you made may not be saved. Cancel/Leave'
|
|
// appears after the browser tries to leave the page with the preview.
|
|
await browser.reloadSession();
|
|
} );
|
|
|
|
it( 'should open notices popup as soon as it loads', async function () {
|
|
assert( await EditPage.notices.isDisplayed() );
|
|
} );
|
|
|
|
it( 'should open switch editor', async function () {
|
|
await EditPage.switchEditorElement.click();
|
|
|
|
assert( await EditPage.switchEditorPopup.isDisplayed() );
|
|
} );
|
|
|
|
it( 'should open help popup', async function () {
|
|
await EditPage.helpElement.click();
|
|
|
|
assert( await EditPage.helpPopup.isDisplayed() );
|
|
} );
|
|
|
|
} );
|