scotch / angular-brunch-seed

AngularJS + Brunch
Other
228 stars 78 forks source link

got e2e testing working #42

Closed es128 closed 11 years ago

es128 commented 11 years ago

The main issue was needing to set a urlRoot different from / in the testacular-e2e.conf.js so that the testacular path doesn't override the proxy binding. This discussion thread provided helpful guidance.

Beyond that there was another problem with the manual bootstrapping of angular not working smoothly with the scenario-runner. I wasn't sure why manual bootstrapping was being used, and one solution that worked was to remove the init.coffee and add ng-app="app" to the html tag in index.jade. In this commit I left the manual bootstrapping alone and used javascript to set that attribute, which also fixed the problem (related discussion here).

Converted scenarios code to coffeescript for consistency with the unit tests and because it is my personal preference. And finally, I wrote a handful of tests that exercise the todo functionality. Any feedback would be appreciated.

kylefinley commented 11 years ago

@es128,

Excellent!! Thank you for doing this.

I wasn't sure why manual bootstrapping was being used, and one solution that worked was to remove the init.coffee and add ng-app="app" to the html tag in index.jade.

I believe it was necessary at one point, but it's been so long ago I can't remember the details. Thank you for the suggestion, I have removed the init.coffee file, and added ng-app="app" to the html tag

Converted scenarios code to coffeescript for consistency with the unit tests and because it is my personal preference. And finally, I wrote a handful of tests that exercise the todo functionality. Any feedback would be appreciated.

Everything looks great. Thanks again for taking the time to submit this pull request. If you have any other suggestions in the future please let me know.

Kyle