Commit 97c7e5d0 authored by Alex Catarineu's avatar Alex Catarineu
Browse files

Fix failing security level UI test

parent f88d60d9
......@@ -2,12 +2,21 @@ from marionette_driver import Wait, expected
from marionette_harness import MarionetteTestCase
class Test(MarionetteTestCase):
# Starting 84, opening the security level panel by clicking the button
# started to fail (the panel was not visible). Opening via JavaScript
# seems to still work for 84 and 78.
def open_security_level_panel(self):
m = self.marionette
with m.using_context('chrome'):
def test_security_level_ui(self):
custom_pref = 'javascript.options.wasm'
m = self.marionette
m.timeout.implicit = 5
with m.using_context('chrome'):
m.find_element('id', 'security-level-button').click()
'id', 'securityLevel-advancedSecuritySettings').click()
with m.using_context('content'):
......@@ -49,7 +58,7 @@ class Test(MarionetteTestCase):
m.get_url() in ["", ""])
# Test Learn More link from panel
m.find_element('id', 'security-level-button').click()
m.find_element('id', 'securityLevel-learnMore').click()
Wait(m, timeout=m.timeout.page_load).until(
lambda _: len(m.window_handles) > 2)
......@@ -64,7 +73,7 @@ class Test(MarionetteTestCase):
m.set_pref(custom_pref, False)
elem = m.find_element('id', 'securityLevel-restoreDefaults')
self.assertEqual(elem.is_displayed(), False)
m.find_element('id', 'security-level-button').click()
self.assertEqual(elem.is_displayed(), True)
self.assertEqual(True, m.get_pref(custom_pref))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment