const assert = require( 'assert' ),
- BlankPage = require( 'wdio-mediawiki/BlankPage' ),
HistoryPage = require( '../pageobjects/history.page' ),
UserLoginPage = require( 'wdio-mediawiki/LoginPage' ),
Util = require( 'wdio-mediawiki/Util' );
name;
before( function () {
- // disable VisualEditor welcome dialog
- browser.deleteCookie();
- BlankPage.open();
- browser.localStorage( 'POST', { key: 've-beta-welcome-dialog', value: '1' } );
+ browser.deleteAllCookies();
// Enable rollback confirmation for admin user
// Requires user to log in again, handled by deleteCookie() call in beforeEach function
} );
beforeEach( function () {
- browser.deleteCookie();
+ browser.deleteAllCookies();
content = Util.getTestString( 'beforeEach-content-' );
name = Util.getTestString( 'BeforeEach-name-' );
it.skip( 'should offer a way to cancel rollbacks', function () {
HistoryPage.rollback.click();
- HistoryPage.rollbackConfirmableNo.waitForVisible( 5000 );
+ HistoryPage.rollbackConfirmableNo.waitForDisplayed( 5000 );
HistoryPage.rollbackConfirmableNo.click();
it.skip( 'should perform rollbacks after confirming intention', function () {
HistoryPage.rollback.click();
- HistoryPage.rollbackConfirmableYes.waitForVisible( 5000 );
+ HistoryPage.rollbackConfirmableYes.waitForDisplayed( 5000 );
HistoryPage.rollbackConfirmableYes.click();
name;
before( function () {
- // disable VisualEditor welcome dialog
- browser.deleteCookie();
- BlankPage.open();
- browser.localStorage( 'POST', { key: 've-beta-welcome-dialog', value: '1' } );
+ browser.deleteAllCookies();
// Disable rollback confirmation for admin user
// Requires user to log in again, handled by deleteCookie() call in beforeEach function
} );
beforeEach( function () {
- browser.deleteCookie();
+ browser.deleteAllCookies();
content = Util.getTestString( 'beforeEach-content-' );
name = Util.getTestString( 'BeforeEach-name-' );
// waitUntil indirectly asserts that the content we are looking for is present
browser.waitUntil( function () {
- return HistoryPage.headingText === 'Action complete';
+ return HistoryPage.heading.getText() === 'Action complete';
}, 5000, 'Expected rollback page to appear.' );
} );