Given the following component integration test:
test('it has the correct tagName of aside', function(assert){
this.render(hbs`{{my-component}}`);
assert.equal(this.$().prop('tagName'), 'ASIDE');
});
It fails saying the tagName
is a div
despite me changing the tagName
in the component:
export default Ember.Component.extend({
tagName: 'aside',
...
});
Looking at the page source, it is infact an aside
, but the intergation test doesn't see it.
A similar failure happens if I try to test for class
attribute as well. I'm appending a class name to the classNames
collection in the component, but all that's returned when I query it is ember-view
.
What is the proper way to test this?
Aucun commentaire:
Enregistrer un commentaire