Ember CLI testing complicated model relationships

If you are using Ember default ‘Ember-QUnit’ then you have to list all the models in needs. But there is an alternative for testing which I am using i.e. ember-data-factory-guy. This is used to create factory instead of fixture data when testing Model, component, controller etc. You can go through it. https://github.com/danielspaniel/ember-data-factory-guy

Getting “Uncaught Error: Assertion Failed: Ember Views require jQuery between 1.7 and 2.1” with app created through ember-cli

This is a bug due to a new version of jQuery which ember is not yet able to handle. For now you can change the following line in your bower.json file. Then run bower install and it should work. “jquery”: “^1.11.3”, to “jquery”: “1.11.3”, A new version of ember.js is imminent which should fix this.

Violating Content Security Policy directive after ember-cli 0.0.47 upgrade

After reading some docs at http://content-security-policy.com/ and https://github.com/rwjblue/ember-cli-content-security-policy, I added some policies to my config/environment.js file like so: module.exports = function(environment) { var ENV = { contentSecurityPolicy: { ‘default-src’: “‘none'”, ‘script-src’: “‘self’ ‘unsafe-inline’ ‘unsafe-eval’ use.typekit.net connect.facebook.net maps.googleapis.com maps.gstatic.com”, ‘font-src’: “‘self’ data: use.typekit.net”, ‘connect-src’: “‘self'”, ‘img-src’: “‘self’ www.facebook.com p.typekit.net”, ‘style-src’: “‘self’ ‘unsafe-inline’ use.typekit.net”, ‘frame-src’: “s-static.ak.facebook.com static.ak.facebook.com … Read more

Recommended way to include bootstrap library in Ember.JS ember-cli App

BASH: bower install –save bootstrap Brocfile.js: app.import(‘vendor/bootstrap/dist/js/bootstrap.js’); app.import(‘vendor/bootstrap/dist/css/bootstrap.css’); The JS will be added to the app.js, which is linked by default, and the CSS will be added to assets/vendor.css, which as of May 14th, is also added by default. For reference: http://www.ember-cli.com/#managing-dependencies In response to @Joe’s question surrounding fonts and other assets, I was unable … Read more

ember-cli-code-coverage mocha showing 0% coverage when there are tests

Few well integrated tools to establish accurate code coverage for ember-cli apps exist. (something like Istanbul for everything in app/) We ended up avoiding ember-cli-blanket and writing a rudimentary istanbul 78 integration with testem. Basically, it calls the istanbul cli against the single JS file output by ember build. Imprecise but consistent. We’ve used in … Read more