mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 01:47:31 +09:00
moebius#195: DOM - PointerEvent - improvements
https://github.com/MoonchildProductions/moebius/pull/195
This commit is contained in:
parent
3d237024d5
commit
a968f1d6c2
10 changed files with 228 additions and 20 deletions
|
|
@ -252,3 +252,20 @@ class TestClick(TestLegacyClick):
|
|||
with self.assertRaises(errors.ElementClickInterceptedException):
|
||||
obscured.click()
|
||||
self.assertFalse(self.marionette.execute_script("return window.clicked", sandbox=None))
|
||||
|
||||
def test_pointer_events_none(self):
|
||||
self.marionette.navigate(inline("""
|
||||
<button style="pointer-events: none">click me</button>
|
||||
<script>
|
||||
window.clicked = false;
|
||||
let button = document.querySelector("button");
|
||||
button.addEventListener("click", () => window.clicked = true);
|
||||
</script>
|
||||
"""))
|
||||
button = self.marionette.find_element(By.TAG_NAME, "button")
|
||||
self.assertEqual("none", button.value_of_css_property("pointer-events"))
|
||||
|
||||
with self.assertRaisesRegexp(errors.ElementClickInterceptedException,
|
||||
"does not have pointer events enabled"):
|
||||
button.click()
|
||||
self.assertFalse(self.marionette.execute_script("return window.clicked", sandbox=None))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue