ember-material-design
ember-material-design copied to clipboard
ember click test helper doesn't work with buttons
The ember click
helper doesn't work with buttons. For example, the following button:
{{#md-button class="md-raised md-primary" type="submit"}}
Log In
{{/md-button}}
...and the following test...
click('button[type="submit"]');
...produce the error:
Acceptance | login: users can log in
✘ Error: Element button[type="submit"] not found.
expected true
Replacing the ember-material-design button with the following works:
<button type="submit">Log In</button>
If you put something like this immediately before you invoke the click helper, what do you get?
console.log(Ember.$('*[type="submit"]'));
Setting a breakpoint right before the location of test failure and inspecting the DOM is a good first step