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

How to use in tests? #196

Open
brunomacf opened this issue May 13, 2020 · 1 comment
Open

How to use in tests? #196

brunomacf opened this issue May 13, 2020 · 1 comment

Comments

@brunomacf
Copy link

Is there a way to test if a component got some local class in my own app tests? Suppose i have a component like this:

<div local-class="container {{if isLoaded 'loaded'}}">
   test
</div>

How can i implement a test that check if loaded class is in place?

@arenoir
Copy link

arenoir commented Jul 2, 2020

@brunomacf

I have started testing this condition by importing the styles object directly from the components module css.

import styles from 'my-app-name/components/my-component/styles.css';

assert.dom('.' + styles['loaded']).exists();

It would be nice if the styles object had something like a toSelector() function.

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

No branches or pull requests

2 participants