I have a component test that fails because it cannot find partial that the template is rendering. The specific error is "Error statement: it is not possible to find a partial with the name" component / list-element-element-content-element ".
My test file is mainly created by ember-cli by default:
import {
moduleForComponent,
test
} from 'ember-qunit';
moduleForComponent('activity-list-item', 'ActivityListComponent', {
needs: ['helper:format-date']
});
test('it renders', function() {
expect(2);
var component = this.subject();
equal(component._state, 'preRender');
this.append();
equal(component._state, 'inDOM');
});
and a component template that looks like this:
{{#if activity.momentId}}
{{#link-to 'moment' momentId class='close-dropdown'}}
{{partial 'components/activity-list-item-content'}}
{{/link-to}}
{{else}}
{{partial 'components/activity-list-item-content'}}
{{/if}}
My application works fine without any errors, so I wonder if something is missing in my test setup. I also tried adding it to the array needsand getting the same error:
needs: ['helper:format-date', 'template:components/-activity-list-item-content']
How do I get my tests to find partial?
Update
@GJK , . , , , :
DEPRECATION: . "myapp-ember/templates/components/-activity-list-item-content", . "myapp-ember/templates/components/_activity-list-item-content" "myapp-ember/templates/components/-activity-list-item-content".