Open juwara0 opened 7 years ago
Another area we should evaluate updating: https://github.com/ciena-frost/ember-frost-info-bar/blob/21648cdc15f8fa46afc54f860a3f8de14c66f35a/addon/templates/components/frost-info-bar.hbs#L10-L16
{{#if (type-of title 'object')}}
<div class='primary-title'>
{{component title}}
</div>
{{else}}
<div class='primary-title' data-test={{hook (concat hook '-title')}}>
{{title}}
</div>
{{/if}}
Discussed in slack and @sglanzer agrees, the components should be getting hooks set on them. I'm opening an issue to that effect right now.
While the consumer probably doesn't care about some of the hooks, the component itself might care. For instance, if the frost-icon
needs to be wrapped by a <div>
with a particular class set on it, this component's tests should be able to grab that <div>
with a hook.
Right now, we are getting a hook set on icon: https://github.com/ciena-frost/ember-frost-info-bar/blob/21648cdc15f8fa46afc54f860a3f8de14c66f35a/addon/templates/components/frost-info-bar.hbs#L3
Does this provide the value we want?
Would a tester rather be setting a hook on the icon component https://github.com/ciena-frost/ember-frost-info-bar/blob/21648cdc15f8fa46afc54f860a3f8de14c66f35a/addon/templates/components/frost-info-bar.hbs#L4 which gets applied to the
<svg>
.