X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fselenium%2Fspecs%2Fuser.js;h=85e71efeb5e0f3bda456e4e5c3410f7f4c832f90;hp=6746c5b5d91a2cfe5013f820c2f048c14d1ab3f2;hb=4d286ad40c11fd4b7bdcf774a660c2cd4a35045d;hpb=f3400d2195359b48088ef91f95b436442b0b8f3b diff --git a/tests/selenium/specs/user.js b/tests/selenium/specs/user.js index 6746c5b5d9..85e71efeb5 100644 --- a/tests/selenium/specs/user.js +++ b/tests/selenium/specs/user.js @@ -1,21 +1,28 @@ 'use strict'; const assert = require( 'assert' ), CreateAccountPage = require( '../pageobjects/createaccount.page' ), - UserLoginPage = require( '../pageobjects/userlogin.page' ), - UserLogoutPage = require( '../pageobjects/userlogout.page' ), - PreferencesPage = require( '../pageobjects/preferences.page' ); + PreferencesPage = require( '../pageobjects/preferences.page' ), + UserLoginPage = require( '../pageobjects/userlogin.page' ); describe( 'User', function () { var password, username; + before( function () { + // disable VisualEditor welcome dialog + UserLoginPage.open(); + browser.localStorage( 'POST', { key: 've-beta-welcome-dialog', value: '1' } ); + } ); + beforeEach( function () { + browser.deleteCookie(); username = `User-${Math.random().toString()}`; password = Math.random().toString(); } ); - it( 'should be able to create account', function () { + // Disable due to broken/flakiness (T247580) + it.skip( 'should be able to create account', function () { // create CreateAccountPage.createAccount( username, password ); @@ -25,13 +32,13 @@ describe( 'User', function () { } ); - it( 'should be able to log in', function () { + // Disable due to broken/flakiness (T247580) + it.skip( 'should be able to log in', function () { // create - CreateAccountPage.createAccount( username, password ); - - // logout - UserLogoutPage.open(); + browser.call( function () { + return CreateAccountPage.apiCreateAccount( username, password ); + } ); // log in UserLoginPage.login( username, password ); @@ -41,14 +48,19 @@ describe( 'User', function () { } ); - it( 'should be able to change preferences', function () { - + // Disabled due to flakiness (T199446) + it.skip( 'should be able to change preferences', function () { var realName = Math.random().toString(); // create - CreateAccountPage.createAccount( username, password ); + browser.call( function () { + return CreateAccountPage.apiCreateAccount( username, password ); + } ); + + // log in + UserLoginPage.login( username, password ); - // change real name + // change PreferencesPage.changeRealName( realName ); // check