I am using Ember 1.8.1 and I updated my code from
{{view Ember.Select content=items}}
to
{{view "select" content=items}}
The problem now is that my tests fail and I get this error:
Error: Assertion Failed: select must be a subclass or an instance of Ember.View, not
at new Error (native)
at Error.EmberError (http://0.0.0.0:4201/assets/vendor.js:27425:23)
at Object.Ember.assert (http://0.0.0.0:4201/assets/vendor.js:17039:15)
at handlebarsGetView (http://0.0.0.0:4201/assets/vendor.js:20093:13)
at EmberObject.create.helper (http://0.0.0.0:4201/assets/vendor.js:22801:19)
at viewHelper (http://0.0.0.0:4201/assets/vendor.js:23051:25)
at Object.anonymous (nea-client/templates/components/modal-workflow-create.js:18:54)
at http://0.0.0.0:4201/assets/vendor.js:10863:33
at CoreView.extend.render (http://0.0.0.0:4201/assets/vendor.js:55473:20)
at EmberRenderer_createElement [as createElement] (http://0.0.0.0:4201/assets/vendor.js:52700:16)
Any ideas how to fix this? If I revert the code to the old style the tests pass but I get a deprecation notice.
In your test do this:
import Ember from 'ember';
moduleForComponent('my-foobar', 'MyFoobarComponent', {
setup: function() {
this.container.register('view:select', Ember.Select);
}
}
Doing this type of thing moves us a bit closer to integration tests. There is talk about how to improve the current state of things here: https://github.com/rwjblue/ember-qunit/issues/74
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With