forked from EFForg/https-everywhere
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_options.py
More file actions
30 lines (24 loc) · 806 Bytes
/
test_options.py
File metadata and controls
30 lines (24 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from time import sleep
from util import ExtensionTestCase
class OptionsTest(ExtensionTestCase):
def load_options(self):
self.driver.get(self.shim.options_url)
def test_options(self):
self.load_options()
self.assertEqual(self.driver.current_url, self.shim.options_url)
def test_show_counter(self):
selector = '#showCounter'
self.load_options()
sleep(3)
el = self.query_selector(selector)
self.assertTrue(el.is_selected())
el.click()
self.driver.refresh()
sleep(3)
el = self.query_selector(selector)
self.assertFalse(el.is_selected())
el.click()
self.driver.refresh()
sleep(3)
el = self.query_selector(selector)
self.assertTrue(el.is_selected())