lib/capybara/poltergeist/client/node.coffee in poltergeist-1.0.3 vs lib/capybara/poltergeist/client/node.coffee in poltergeist-1.1.0
- old
+ new
@@ -26,17 +26,17 @@
{
x: middle(pos.left, pos.right, viewport.width),
y: middle(pos.top, pos.bottom, viewport.height)
}
- click: ->
+ click: (event = 'click') ->
this.scrollIntoView()
pos = this.clickPosition()
test = this.clickTest(pos.x, pos.y)
if test.status == 'success'
- @page.mouseEvent('click', pos.x, pos.y)
+ @page.mouseEvent(event, pos.x, pos.y)
pos
else
throw new Poltergeist.ClickFailed(test.selector, pos)
dragTo: (other) ->