Skip to content
Snippets Groups Projects
Commit 3752f5aa authored by Andreas Tolfsen's avatar Andreas Tolfsen
Browse files

Bug 1359043 - Remove incorrect click/scroll test r=whimboo

The test assumes the click point is the centre of the element, whereas
WebDriver uses the _in-view_ centre point to perform clicks.

If parts of the element is rendered outside the viewport, the click
point is calculated from visible portion of the element that is seen in
the viewport.

This means that if any portion of an element is within the boundaries of
the viewport, it is clickable.  If it is not, then it is not interactable.

This change is unfortunately not accompanied with any
implementation changes, but prepares Marionette for the changes
to the Element Click implementation that will come as part of
https://bugzilla.mozilla.org/show_bug.cgi?id=1321516.

MozReview-Commit-ID: Kh0zzRrtmJ4

--HG--
extra : rebase_source : 63cc463a11d5ca085e7a96ea84dcadbe3bb90204
parent b4f2234e
No related branches found
No related tags found
No related merge requests found
......@@ -82,21 +82,6 @@ class TestClickScrolling(MarionetteTestCase):
# If we dont throw we are good
self.marionette.find_element(By.ID, "radio").click()
def test_should_scroll_elements_if_click_point_is_out_of_view_but_element_is_in_view(self):
test_html = self.marionette.absolute_url("element_outside_viewport.html")
for s in ["top", "bottom"]:
self.marionette.navigate(test_html)
scroll_y = self.marionette.execute_script("return window.scrollY;")
self.marionette.find_element(By.ID, "{}-70".format(s)).click()
self.assertNotEqual(scroll_y, self.marionette.execute_script("return window.scrollY;"))
for s in ["left", "right"]:
self.marionette.navigate(test_html)
scroll_x = self.marionette.execute_script("return window.scrollX;")
self.marionette.find_element(By.ID, "{}-70".format(s)).click()
self.assertNotEqual(scroll_x, self.marionette.execute_script("return window.scrollX;"))
@skip_if_mobile("Bug 1293855 - Lists differ: [70, 70] != [70, 120]")
def test_should_not_scroll_elements_if_click_point_is_in_view(self):
test_html = self.marionette.absolute_url("element_outside_viewport.html")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment