CreateAccountPage = require( '../pageobjects/createaccount.page' ),
PreferencesPage = require( '../pageobjects/preferences.page' ),
UserLoginPage = require( 'wdio-mediawiki/LoginPage' ),
- Api = require( 'wdio-mediawiki/Api' );
+ Api = require( 'wdio-mediawiki/Api' ),
+ Util = require( 'wdio-mediawiki/Util' );
describe( 'User', function () {
var password,
beforeEach( function () {
browser.deleteCookie();
- username = `User-${Math.random().toString()}`;
- password = Math.random().toString();
+ username = Util.getTestString( 'User-' );
+ password = Util.getTestString();
} );
it( 'should be able to create account', function () {
assert.strictEqual( CreateAccountPage.heading.getText(), `Welcome, ${username}!` );
} );
- it( 'should be able to log in', function () {
+ it( 'should be able to log in @daily', function () {
// create
browser.call( function () {
return Api.createAccount( username, password );
assert.strictEqual( UserLoginPage.userPage.getText(), username );
} );
- it( 'should be able to change preferences', function () {
- var realName = Math.random().toString();
+ // Disabled due to flakiness (T199446)
+ it.skip( 'should be able to change preferences', function () {
+ var realName = Util.getTestString();
// create
browser.call( function () {