Bug 1321516 - Remove incorrect click/scroll test draft
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 17 Apr 2017 18:39:12 +0100
changeset 565898 127e3efe83a01d5df0f4dfb41776a881e7429fb9
parent 565897 8291f120dc37813b27767e552fe50a80cd7b7c95
child 565899 765ebc29a3962e94c7d51f4473388f82a14aec46
push id55051
push userbmo:ato@mozilla.com
push dateThu, 20 Apr 2017 17:08:50 +0000
bugs1321516
milestone55.0a1
Bug 1321516 - Remove incorrect click/scroll test The test assumes the click point is the centre of the element, whereas WebDriver uses the _in-view_ centre point to perform a click. This means that 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. MozReview-Commit-ID: 137rOoQNAnI
testing/marionette/harness/marionette_harness/tests/unit/test_click_scrolling.py
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_click_scrolling.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_click_scrolling.py
@@ -77,31 +77,16 @@ class TestClickScrolling(MarionetteTestC
 
     def test_should_be_able_to_click_radio_button_scrolled_into_view(self):
         test_html = self.marionette.absolute_url("scroll4.html")
         self.marionette.navigate(test_html)
 
         # 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")
 
         for s in ["top", "right", "bottom", "left"]:
             for p in ["50", "30"]:
                 self.marionette.navigate(test_html)
                 scroll = self.marionette.execute_script("return [window.scrollX, window.scrollY];")