I have Acceptance tests working with the root url i.e. visit(‘/’) fine.
But when I try to visit another url, both Chrome and Phantomjs give me - “Error: Assertion Failed: You have turned on testing mode, which disabled the run-loop’s autorun. You will need to wrap any code with asynchronous side-effects in an run at http://localhost:7357/assets/vendor.js, line 17159”.
import Ember from "ember";
import startApp from '../helpers/start-app';
var App;
module('AcceptanceGear', {
setup: function() {
App = startApp();
},
teardown: function() {
Ember.run(App, App.destroy);
}
});
//this gives the error
test('GearTest', function() {
visit('/gear');
andThen(function() {
equal(currentPath(), 'gear');
});
});
//this works mostly fine
test('GearListMenu', function() {
visit('/');
andThen(function() {
equal(currentPath(), 'index', 'path is root index');
var gearNav = $('nav li a').filter("a:contains('Gear')");
//gives a current path as 'loading' in Phantomjs, fine in Chrome
click(gearNav);
andThen(function() {
equal(currentPath(), 'equipment.index', 'path is equipment.index');
});
});
});
Ember: 1.8.1 Ember-cli version: 0.2.0 node: 0.10.37 npm: 2.7.0