ember-material-design icon indicating copy to clipboard operation
ember-material-design copied to clipboard

ember click test helper doesn't work with buttons

Open jonblack opened this issue 9 years ago • 1 comments

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>

jonblack avatar May 24 '15 16:05 jonblack

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

mike-north avatar May 25 '15 00:05 mike-north