X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fselenium%2Fspecs%2Frollback.js;h=2a79467f25089329d9a4e7e1e9c42f03142bf482;hb=1d1bb122942d2ca6e557dc13e2d198276ce65ba6;hp=648e52f600e5435e5d428e97d3e61d9d7b34793e;hpb=7f2f49ad2368ae27f2d4db69b44c5f997197725e;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/selenium/specs/rollback.js b/tests/selenium/specs/rollback.js index 648e52f600..2a79467f25 100644 --- a/tests/selenium/specs/rollback.js +++ b/tests/selenium/specs/rollback.js @@ -16,14 +16,7 @@ describe( 'Rollback with confirmation', function () { // Enable rollback confirmation for admin user // Requires user to log in again, handled by deleteCookie() call in beforeEach function UserLoginPage.loginAdmin(); - - browser.pause( 300 ); - browser.execute( function () { - return ( new mw.Api() ).saveOption( - 'showrollbackconfirmation', - '1' - ); - } ); + HistoryPage.toggleRollbackConfirmationSetting( true ); } ); beforeEach( function () { @@ -51,19 +44,19 @@ describe( 'Rollback with confirmation', function () { it( 'should offer a way to cancel rollbacks', function () { HistoryPage.rollback.click(); - browser.pause( 300 ); + HistoryPage.rollbackConfirmableNo.waitForVisible( 5000 ); HistoryPage.rollbackConfirmableNo.click(); - browser.pause( 500 ); + browser.pause( 1000 ); // Waiting to ensure we are NOT redirected and stay on the same page assert.strictEqual( HistoryPage.heading.getText(), 'Revision history of "' + name + '"' ); } ); - it( 'should perform rollbacks after confirming intention', function () { + it.skip( 'should perform rollbacks after confirming intention', function () { HistoryPage.rollback.click(); - browser.pause( 300 ); + HistoryPage.rollbackConfirmableYes.waitForVisible( 5000 ); HistoryPage.rollbackConfirmableYes.click(); @@ -103,14 +96,7 @@ describe( 'Rollback without confirmation', function () { // Disable rollback confirmation for admin user // Requires user to log in again, handled by deleteCookie() call in beforeEach function UserLoginPage.loginAdmin(); - - browser.pause( 300 ); - browser.execute( function () { - return ( new mw.Api() ).saveOption( - 'showrollbackconfirmation', - '0' - ); - } ); + HistoryPage.toggleRollbackConfirmationSetting( false ); } ); beforeEach( function () {