How does one include classes from external files that one has written themselves? For example if I have
/login_page.coffee
class LoginPage
constructor: (@browser) ->
I want to include the LoginPage class from the login_page.coffee file in this test
/when_submitting_the_form_without_the_first_name.coffee
require './login_page.coffee' #Do I do this?
@test.comment("when submitting the form without the first name")
casper.thenClick '.login', ->
login = new LoginPage(@)
login.login('username', 'password')
when I use require and run the tests using casper test .... I get an error that the 'LoginPage' variable is undefined. What am I doing wrong?
Aeden