Merge "HTML escape parameter 'text' of hook 'SkinEditSectionLinks'"
[lhc/web/wiklou.git] / tests / selenium / specs / rollback.js
index 51a1fc6..2a79467 100644 (file)
@@ -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();
-
-               UserLoginPage.waitForScriptsToBeReady();
-               browser.execute( function () {
-                       return ( new mw.Api() ).saveOption(
-                               'showrollbackconfirmation',
-                               '1'
-                       );
-               } );
+               HistoryPage.toggleRollbackConfirmationSetting( true );
        } );
 
        beforeEach( function () {
@@ -60,7 +53,7 @@ describe( 'Rollback with confirmation', function () {
                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();
 
                HistoryPage.rollbackConfirmableYes.waitForVisible( 5000 );
@@ -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();
-
-               UserLoginPage.waitForScriptsToBeReady();
-               browser.execute( function () {
-                       return ( new mw.Api() ).saveOption(
-                               'showrollbackconfirmation',
-                               '0'
-                       );
-               } );
+               HistoryPage.toggleRollbackConfirmationSetting( false );
        } );
 
        beforeEach( function () {