forked from EFForg/https-everywhere
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_options.py
More file actions
33 lines (27 loc) · 925 Bytes
/
test_options.py
File metadata and controls
33 lines (27 loc) · 925 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
31
32
33
import unittest
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):
if self.shim.browser_type == 'chrome':
raise unittest.SkipTest('broken on chrome')
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())