ember-css-modules
ember-css-modules copied to clipboard
How to use in tests?
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?
@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.