Cannot read property 'id' of null (destination)
Hey there - when running in a test environment, this bit of code is run to find the right destination:
_getDestinationId: function _getDestinationId() {
var config = Ember.getOwner(this).resolveRegistration('config:environment');
if (config.environment === 'test') {
return document.querySelector('#ember-testing > .ember-view').id;
}
return config['ember-basic-dropdown'] && config['ember-basic-dropdown'].destination || 'ember-basic-dropdown-wormhole';
}
The problem is that #ember-testing > .ember-view is consistently returning null, since there's no .ember-view div present. Looks like it's breaking every acceptance test that navigates to a route containing an instance of the dropdown.
I was able to fix the problem by changing the method from selecting #ember-testing > .ember-view to just #ember-testing. My guess is that this is an ember 3 thing?
@cameronblandford
I got error like you. can you share how to fix this error ???
Same issue.
Not sure what error you are encountering but I had accidentally removed these two lines from the config/environments.js file. After reverting everything worked fine again.
if (environment === 'test') {
ENV.APP.rootElement = '#ember-testing';
ENV.APP.autoboot = false;
}
I am running Ember 3.3
Same issue, Ember: 2.9.1
Closing this old issue as the mentioned code part was changed in newer versions and the initial issue was reported on a old, not anymore supported ember version