
module.exports = {
  'Login Page Initial Render': function( _browser ) {
    _browser
      .url('http://dev.matthewroach.me/login/')
      .waitForElementVisible( 'body', 1000 )
      .verify.visible('#username')
      .verify.visible('#password')
      .verify.value( 'input[type=submit]', 'Log In' )
      .verify.elementNotPresent('.error')
  },



  'Try to login with no username or password': function( _browser ) {
    _browser
      .click('input[type=submit]')
      .pause(1000)
      .verify.visible('.error')
      .verify.containsText( '.error', 'Username and Password is empty' )
      .verify.valueContains( '#username', '' )
      .verify.valueContains( '#password', '' )
  },



  'Try to login with a username and no password': function( _browser ) {
    _browser
      .setValue( '#username', 'abc' )
      .click('input[type=submit]')
      .pause(1000)
      .verify.visible('.error')
      .verify.containsText( '.error', 'Password is empty' )
      .verify.valueContains( '#username', '' )
      .verify.valueContains( '#password', '' )
  },



  'Try to login with a password and no username': function( _browser ) {
    _browser
      .setValue( '#password', 'test' )
      .click('input[type=submit]')
      .pause(1000)
      .verify.visible('.error')
      .verify.containsText( '.error', 'Username is empty' )
      .verify.valueContains( '#username', '' )
      .verify.valueContains( '#password', '' )
  },



  'Enter wrong username and password': function( _browser ) {
    _browser
      .setValue( '#username', 'abc' )
      .setValue( '#password', '123' )
      .click('input[type=submit]')
      .pause(1000)
      .verify.visible('.error')
      .verify.containsText( '.error', 'Invalid Username and/or Password' )
      .verify.valueContains( '#username', '' )
      .verify.valueContains( '#password', '' )
      .end();
  }


}

@@ -53,34 +53,31 @@
 unction(
- _
 browser
- 
 ) %7B%0A    
 _browser
@@ -60,33 +60,32 @@
 (browser) %7B%0A    
-_
 browser%0A      .u
@@ -399,34 +399,31 @@
 unction(
- _
 browser
- 
 ) %7B%0A    
 _browser
@@ -406,33 +406,32 @@
 (browser) %7B%0A    
-_
 browser%0A      .c
@@ -742,34 +742,31 @@
 unction(
- _
 browser
- 
 ) %7B%0A    
 _browser
@@ -749,33 +749,32 @@
 (browser) %7B%0A    
-_
 browser%0A      .s
@@ -1110,34 +1110,31 @@
 unction(
- _
 browser
- 
 ) %7B%0A    
 _browser
@@ -1117,33 +1117,32 @@
 (browser) %7B%0A    
-_
 browser%0A      .s
@@ -1472,26 +1472,23 @@
 ion(
- _
 browser
- 
 ) %7B%0A    
 _bro
@@ -1487,9 +1487,8 @@
     
-_
 brow
@@ -1842,10 +1842,11 @@
 ;%0A  %7D%0A%0A%0A
-
 %7D
+;
 %0A

Tidy up test file