Bug 1321516 - Remove incorrect click/scroll test draft
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 17 Apr 2017 18:39:12 +0100
changeset 567224 5518500366c7d2468535898bf4f676d47e6429c5
parent 567223 9563fc23ebb3a4c78d9d679718074798fca00b65
child 567225 c7d9de311c18b16905dab59fe0cd069cfdcdb844
push id55475
push userbmo:ato@mozilla.com
push dateMon, 24 Apr 2017 14:23:53 +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];")