Bug 1414322 - Update Marionette accessibility tests for non keyboard-interactable elements. r=yzen, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Tue, 28 Nov 2017 17:18:37 +0100
changeset 445162 9a6aa369b0d6b532a6ad64ca7d80f6566da0e8bd
parent 445161 1ae1021cec72e2f745c936adac114025be2fcc4b
child 445163 13dcd46fb2867118359c0dadcf23530139749aa2
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzen, test-only
bugs1414322
milestone58.0
Bug 1414322 - Update Marionette accessibility tests for non keyboard-interactable elements. r=yzen, a=test-only Because with webdriver interactability checks turned on, accessability checks are done afterward, and like in this case would even never run due to <h1> is not a keyboard-interactability element, which causes an ElementNotInteractableException. As such those obsolete tests can be removed now. MozReview-Commit-ID: 6pw5TCgMb7l
testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py
@@ -210,26 +210,14 @@ class TestAccessibility(MarionetteTestCa
         # No exception should be raised
         self.run_element_test(self.disabled_elementIDs, lambda element: element.is_enabled())
 
     def test_send_keys_raises_no_exception(self):
         self.setup_accessibility()
         # Sending keys to valid input should not raise any exceptions
         self.run_element_test(['input1'], lambda element: element.send_keys("a"))
 
-        self.setup_accessibility(False, False)
-        # Sending keys to invalid element should not raise any exceptions when raising accessibility
-        # exceptions is disabled
-        self.run_element_test(['button5'], lambda element: element.send_keys("abc"))
-
-    def test_send_keys_raises_element_not_accessible(self):
-        self.setup_accessibility()
-        # Sending keys to invalid element should raise an exception
-        self.run_element_test(['button5'],
-                              lambda element: self.assertRaises(ElementNotAccessibleException,
-                                                                element.send_keys))
-
     def test_is_selected_raises_no_exception(self):
         self.setup_accessibility()
         # No exception should be raised for valid options
         self.run_element_test(self.valid_option_elementIDs, lambda element: element.is_selected())
         # No exception should be raised for non-selectable elements
         self.run_element_test(self.valid_elementIDs, lambda element: element.is_selected())