X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fselenium%2Fpageobjects%2Frestore.page.js;h=47ad145f65e49b1719c99216ee536a708fc85b91;hb=ed0193f1fb662d5af7db8bf81ca8aa34c979063e;hp=ef47438e7f48d2b49ae4fc9638b77592bc7c1610;hpb=12ff4dec05ff8bb1a1910bf6745155b93e1912b5;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/selenium/pageobjects/restore.page.js b/tests/selenium/pageobjects/restore.page.js index ef47438e7f..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 ) { - browser.url( '/index.php?title=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();