var expect = chai.expect; // Run before each test case. beforeEach(function () { // Put the application into a known state, and destroy the defaultStore. // Be careful about DS.Model instances stored in App; they'll be invalid // after this. // This is broken in some versions of Ember and Ember Data, see: // https://github.com/emberjs/data/issues/847 Ember.run(function () { App.reset(); }); // Display an error if asynchronous operations are queued outside of // Ember.run. You need this if you want to stay sane. Ember.testing = true; }); // Run after each test case. afterEach(function () { Ember.testing = false; }); describe('Test URL navigation', function () { it('policymaker should display panel', function (done) { visit('/map/policy').then(function () { expect(find('h2:contains("PolicyMaker")')).to.be.ok; done(); }); }); it('CAI Survey page should have title', function (done) { visit('/survey').then(function () { expect(find('h2:contains("CAI Survey")')).to.be.ok; done(); }); }); });