Explicitly specify the primary mouse button on click test
when simulating events, mixin optional attrs before event creation, to allow button property to be passed in properly
Added sanity checks into layout computation