TryGhost/Ghost — pull request #2978 by ErisDS (2014-06-16 21:41:17+00:00)
Title: [WIP] Functional tests for Ember

Thought I'd PR this to demonstrate that it is coming along.

Main things outstanding:
- The ember editor doesn't work under test conditions at present
- Need to finish converting the settings tests

I'm really not sure what's happening with the Editor. When run under the casper tests the `bind` method is undefined on [this line](https://github.com/TryGhost/Ghost/blob/master/core/client/components/gh-codemirror.js#L40) and [this line](https://github.com/TryGhost/Ghost/blob/master/core/client/components/gh-codemirror.js#L8) causing an error which means the editor doesn't initialise.

If I comment out those lines it sort of works but obviously the functionality they pertain to breaks. I'm not sure what's happening to cause bind to be undefined, I've tried adding a massive delay (weird casper test issues are usually timing errors), but that didn't help. I'm wondering if the libraries are loading in the wrong order or something. Have just done a google search (I was working without the internet) and found [this](http://stackoverflow.com/questions/22666866/casperjs-not-working-with-javascript-app-page) which I'll investigate further tomorrow.