mediawiki-extensions-Visual.../tests/selenium/pageobjects/edit.page.js
Esther Akinloose 1e030bcde5 selenium: Check if content editable is editable
Bug: T296187
Change-Id: I7a7808bf5cabdccc3f0a01ccecfdadeb7fdc9b91
2022-05-02 13:11:57 +01:00

23 lines
565 B
JavaScript

'use strict';
const Page = require( 'wdio-mediawiki/Page' );
class EditPage extends Page {
get toolbar() { return $( '.ve-init-mw-desktopArticleTarget-toolbar-open' ); }
get veRootNode() { return $( '.ve-ce-rootNode[role="textbox"]' ); }
openForEditing( title ) {
super.openTitle( title, { veaction: 'edit', vehidebetadialog: 1, hidewelcomedialog: 1 } );
}
activationComplete() {
return browser.executeAsync( function ( done ) {
mw.hook( 've.activationComplete' ).add( function () {
done();
} );
} );
}
}
module.exports = new EditPage();