X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fselenium%2Fpageobjects%2Frestore.page.js;h=47ad145f65e49b1719c99216ee536a708fc85b91;hb=18a6b556b3c595bd0ced99316280094e77ab4a7e;hp=071f7f9883a13cc2355b0bf810af3670df2aa411;hpb=6c1cd929cb1c1fe0bcbde9fea59a1ff9bc2d9c6f;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/selenium/pageobjects/restore.page.js b/tests/selenium/pageobjects/restore.page.js index 071f7f9883..47ad145f65 100644 --- a/tests/selenium/pageobjects/restore.page.js +++ b/tests/selenium/pageobjects/restore.page.js @@ -1,21 +1,19 @@ -'use strict'; -const Page = require( './page' ); +const Page = require( 'wdio-mediawiki/Page' ); class RestorePage extends Page { - get reason() { return browser.element( '#wpComment' ); } get submit() { return browser.element( '#mw-undelete-submit' ); } get displayedContent() { return browser.element( '#mw-content-text' ); } - open( name ) { - super.open( 'Special:Undelete/' + name ); + open( subject ) { + super.openTitle( 'Special:Undelete/' + subject ); } - restore( name, reason ) { - this.open( name ); + restore( subject, reason ) { + this.open( subject ); this.reason.setValue( reason ); this.submit.click(); } - } + module.exports = new RestorePage();