Fix unit tests
Basic button detection

It's a bit lame, but use the selector returned by jQuery to detect
button type.