Based on this excellent screencast and example, I've been able to unit test my Ember (RC7) app successfully, writing to model objects and such. I'm having trouble with integration testing. I even tried the most basic sort of test, as seen below, but to no avail. Any tips on what I'm doing wrong?
I'm getting this error from the console:
LOG: 'App ready'
INFO: 'generated -> route:application', Object{fullName: 'route:application'}
LOG: 'NeedsAuthMixin: user not authenticated (1).'
INFO: 'Rendering application with ', Object{fullName: 'view:application'}
INFO: 'Rendering login with ', Object{fullName: 'view:login'}
LOG: 'Transitioned into 'login''
LOG: 'testing... login screen loads OK 1'
LOG: 'Transitioned into 'login''
Chrome 28.0.1500 (Mac OS X 10.6.8) Integration Tests - load login page FAILED Expected 1 assertions, but 0 were run
Background: As you can see, as my app loads, it checks for user authentication, whereupon it transitions to a login page if user isn't authenticated.
This is the code that calls the test (generated from coffeescript):
asyncTest("test: load login page", function() {
expect(1);
console.log("testing... login screen loads OK 1");
return visit("/login").then(function() {
return ok(1 === 1, "Value equal 1.");
});
});
My Karma config file is here.
Bryan