Error running test in AngularJS tutorial, step-3
angularjs, karma-runner
Solution
Update your angular-phonecat/config/testacular-e2e.conf.js proxy to this:
proxies = {
'/': 'http://localhost:3000/angular-phonecat/'
};
The tests in angular-phonecat/test/e2e/scenarios.js are expecting to be able to reach:
http://localhost:3000/app/index.html
Updating the proxy to the above configuration will fix this (or you could move all the files from /Users/paul/rails_projects/angularjs/public/angular-phonecat/* directly into your public folder)
Problem
I get the following when trying to run the end-to-end test in the angular tutorial (http://docs.angularjs.org/tutorial/step_03)... I did "git checkout -f step-3" so it's straight from the repo... ``` [2013-04-05 07:17:07.774] [WARN] config - "/" is proxied, you should probably change urlRoot to avoid conflicts INFO [testacular]: Testacular server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome INFO [Chrome 26.0 (Mac)]: Connected on socket id CamYxe8MuPk52Agq6g5L WARN [proxy]: failed to proxy /app/index.html (Error: connect ECONNREFUSED) WARN [proxy]: failed to proxy /app/index.html (Error: connect ECONNREFUSED) ``` I'm running the app inside a Rails app, which is being served by WEBrick on port 3000. So I change the testacula config to... ``` proxies = { '/': 'http://localhost:3000/' }; ``` ...then the test runs but fails with ``` Chrome 26.0 (Mac) PhoneCat App Phone list view should filter the phone list as user types into the search box FAILED expect repeater '.phones li' count toBe 3 /Users/paul/rails_projects/angularjs/public/angular-phonecat/test/e2e/scenarios.js:15:7: expected 3 but was 0 ``` So it seems it's not navigating to the page correctly. Anyone have any ideas? Cheers