// 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 () {
HistoryPage.open( name );
} );
- it( 'should offer rollback options for admin users', function () {
+ it.skip( 'should offer rollback options for admin users', function () {
assert.strictEqual( HistoryPage.rollback.getText(), 'rollback 1 edit' );
HistoryPage.rollback.click();
assert.strictEqual( HistoryPage.rollbackConfirmableNo.getText(), 'Cancel' );
} );
- it( 'should offer a way to cancel rollbacks', function () {
+ it.skip( '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();
+
+ HistoryPage.rollbackConfirmableYes.waitForVisible( 5000 );
+
HistoryPage.rollbackConfirmableYes.click();
// waitUntil indirectly asserts that the content we are looking for is present
}, 5000, 'Expected rollback page to appear.' );
} );
- it( 'should verify rollbacks via GET requests are confirmed on a follow-up page', function () {
+ it.skip( 'should verify rollbacks via GET requests are confirmed on a follow-up page', function () {
var rollbackActionUrl = HistoryPage.rollbackLink.getAttribute( 'href' );
browser.url( rollbackActionUrl );
// 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 () {
}, 5000, 'Expected rollback page to appear.' );
} );
- it( 'should perform rollback via GET request without asking the user to confirm', function () {
+ it.skip( 'should perform rollback via GET request without asking the user to confirm', function () {
var rollbackActionUrl = HistoryPage.rollbackLink.getAttribute( 'href' );
browser.url( rollbackActionUrl );