mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
1e030bcde5
Bug: T296187 Change-Id: I7a7808bf5cabdccc3f0a01ccecfdadeb7fdc9b91
34 lines
933 B
JavaScript
34 lines
933 B
JavaScript
'use strict';
|
|
const assert = require( 'assert' );
|
|
const EditPage = require( '../pageobjects/edit.page' );
|
|
const Util = require( 'wdio-mediawiki/Util' );
|
|
const LoginPage = require( 'wdio-mediawiki/LoginPage' );
|
|
|
|
describe( 'Content Editable', function () {
|
|
|
|
it( 'should load when an url is opened', async function () {
|
|
await LoginPage.loginAdmin();
|
|
const name = Util.getTestString();
|
|
|
|
await EditPage.openForEditing( name );
|
|
|
|
await EditPage.activationComplete();
|
|
assert( await EditPage.toolbar.isDisplayed() );
|
|
|
|
} );
|
|
|
|
it( 'should be editable', async function () {
|
|
await LoginPage.loginAdmin();
|
|
|
|
const name = Util.getTestString();
|
|
const content = Util.getTestString();
|
|
await EditPage.openForEditing( name );
|
|
await EditPage.activationComplete();
|
|
await EditPage.veRootNode.setValue( content );
|
|
|
|
const expectedContent = await EditPage.veRootNode.getText();
|
|
assert.equal( expectedContent, content );
|
|
} );
|
|
|
|
} );
|