Bug 1317386 - Check pointer interactability upon interaction; r?automatedtester draft
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 14 Nov 2016 21:07:42 +0000
changeset 441072 0eead2f40ec0ff4f80a4b33defb68eb64357c9dc
parent 441071 322f093a70848489c6f5e82d9510655ae9793852
child 441073 c879557542fcd0f010fa1c3fc76eece3f33328f0
push id36351
push userbmo:ato@mozilla.com
push dateFri, 18 Nov 2016 10:30:51 +0000
reviewersautomatedtester
bugs1317386
milestone53.0a1
Bug 1317386 - Check pointer interactability upon interaction; r?automatedtester Checking for general interactability will also consider keyboard interactability, which has not yet been implemented. On interacting with an element by clicking, we should only test for pointer interactability. MozReview-Commit-ID: BUCs7zHppRm
testing/marionette/interaction.js
--- a/testing/marionette/interaction.js
+++ b/testing/marionette/interaction.js
@@ -117,20 +117,20 @@ interaction.clickElement = function*(el,
 
   let visibilityCheckEl  = el;
   if (el.localName == "option") {
     visibilityCheckEl = interaction.getSelectForOptionElement(el);
   }
 
   let interactable = false;
   if (specCompat) {
-    if (!element.isInteractable(visibilityCheckEl)) {
-      el.scrollIntoView(false);
+    if (!element.isPointerInteractable(visibilityCheckEl)) {
+      element.scrollIntoView(el);
     }
-    interactable = element.isInteractable(visibilityCheckEl);
+    interactable = element.isPointerInteractable(visibilityCheckEl);
   } else {
     interactable = element.isVisible(visibilityCheckEl);
   }
   if (!interactable) {
     throw new ElementNotVisibleError();
   }
 
   if (!atom.isElementEnabled(el)) {