mike1o1 / ember-material-design

Ember implementation of Google's Material Design
http://mike1234.com/ember-material-design
MIT License
121 stars 15 forks source link

ember click test helper doesn't work with buttons #27

Open jonblack opened 9 years ago

jonblack commented 9 years ago

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>
mike-north commented 9 years ago

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