Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discuss where we see the value of hooks during testing #54

Open
juwara0 opened this issue Jan 20, 2017 · 3 comments
Open

Discuss where we see the value of hooks during testing #54

juwara0 opened this issue Jan 20, 2017 · 3 comments

Comments

@juwara0
Copy link
Contributor

juwara0 commented Jan 20, 2017

Right now, we are getting a hook set on icon:

<div class='frost-info-bar-icon' data-test={{hook (concat hook '-icon')}}>

Does this provide the value we want?

Would a tester rather be setting a hook on the icon component

which gets applied to the <svg>.

@juwara0 juwara0 changed the title Discuss removing default hook name Discuss where we see the value of hooks during testing Jan 20, 2017
@juwara0
Copy link
Contributor Author

juwara0 commented Jan 20, 2017

Another area we should evaluate updating:

<div class='primary-title' data-test={{hook (concat hook '-title')}}>
{{#if (type-of title 'object')}}
{{component title}}
{{else}}
{{title}}
{{/if}}
</div>

{{#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}}

@job13er
Copy link

job13er commented Jun 8, 2017

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.

@notmessenger
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants