lib/capybara/poltergeist/client/node.coffee in poltergeist-1.7.0 vs lib/capybara/poltergeist/client/node.coffee in poltergeist-1.8.0

- old
+ new

@@ -1,12 +1,13 @@ # Proxy object for forwarding method calls to the node object inside the page. class Poltergeist.Node @DELEGATES = ['allText', 'visibleText', 'getAttribute', 'value', 'set', 'setAttribute', 'isObsolete', 'removeAttribute', 'isMultiple', 'select', 'tagName', 'find', 'getAttributes', - 'isVisible', 'position', 'trigger', 'parentId', 'parentIds', 'mouseEventTest', - 'scrollIntoView', 'isDOMEqual', 'isDisabled', 'deleteText', 'containsSelection', 'path'] + 'isVisible', 'isInViewport', 'position', 'trigger', 'parentId', 'parentIds', 'mouseEventTest', + 'scrollIntoView', 'isDOMEqual', 'isDisabled', 'deleteText', 'containsSelection', + 'path', 'getProperty'] constructor: (@page, @id) -> parent: -> new Poltergeist.Node(@page, this.parentId()) @@ -29,11 +30,12 @@ } mouseEvent: (name) -> this.scrollIntoView() - pos = this.mouseEventPosition() + pos = this.mouseEventPosition() + test = this.mouseEventTest(pos.x, pos.y) if test.status == 'success' if name == 'rightclick' @page.mouseEvent('click', pos.x, pos.y, 'right') @@ -66,5 +68,6 @@ @page.mouseEvent('mouseup', final_pos.x, final_pos.y) isEqual: (other) -> @page == other.page && this.isDOMEqual(other.id) +