helpers.js
function (credentials) {
            return function () {
                return this.thenOpen(globals.adminUrl).then(function () {
                    this.fill('#login-form', credentials || globals.credentials, true);
                }).waitForResource(/login/).thenEvaluate(function () {
                    localStorage.clear();
                });
            };
        }
function (credentials) {
            return function () {
                return this.thenOpen(globals.adminUrl).then(function () {
                    this.fill('#login-form', credentials || globals.credentials, true);
                }).waitForResource(/login/).thenEvaluate(function () {
                    localStorage.clear();
                });
            };
        }
function ( credentials ) { return function ( ) { return this . thenOpen ( globals . adminUrl ) . then ( function ( ) { this . fill ( '#login-form' , credentials || globals . credentials , true ) ; } ) . waitForResource ( / login / ) . thenEvaluate ( function ( ) { localStorage . clear ( ) ; } ) ; } ; }
Logs in with the given parameters

@param {Object} [credentials=globals.credentials]
@param {String} credentials.username
@param {String} credentials.password
@returns {Function}
Logs in with the given parameters