9
9
TIMEOUT = 30
10
10
11
11
class TestAlerts (SeleniumTestCase ):
12
-
12
+
13
13
@pytest .fixture (scope = "class" , autouse = True )
14
14
def create_test_project (self , tester_login ):
15
15
"""Makes sure we are logged in and have a project open before
@@ -22,7 +22,7 @@ def test_alert(self):
22
22
" the codebender plugin." in operation_output .text
23
23
24
24
def test_remove_sketch (self ):
25
- self .delete_project (TEST_PROJECT_NAME )
25
+ self .delete_project (TEST_PROJECT_NAME )
26
26
27
27
def test_library_example (self , tester_logout ):
28
28
self .open ('/libraries' )
@@ -40,9 +40,9 @@ def test_library_example(self, tester_logout):
40
40
if flash_btn .is_enabled ():
41
41
assert False
42
42
else :
43
- pass
43
+ pass
44
44
45
- def test_embeded_view (self , tester_logout ):
45
+ def test_embeded_view (self , tester_logout ):
46
46
self .open ('/embed/microview_test' )
47
47
output = self .driver .find_element_by_id ('cb_cf_operation_output' )
48
48
assert "To program your Arduino from your browser, install" \
@@ -51,31 +51,31 @@ def test_embeded_view(self, tester_logout):
51
51
if microview_test .is_enabled ():
52
52
assert False
53
53
else :
54
- pass
54
+ pass
55
55
56
- def test_walkthrough_page_2 (self , tester_logout ):
56
+ def test_walkthrough_page_2 (self , tester_logout ):
57
57
self .open ('/static/walkthrough/page/2' )
58
58
output = self .driver .find_element_by_id ('cb_cf_operation_output' )
59
59
assert "To program your Arduino from your browser, install" \
60
60
" the codebender plugin." in output .text
61
61
62
- def test_walkthrough_page_3 (self , tester_logout ):
62
+ def test_walkthrough_page_3 (self , tester_logout ):
63
63
self .open ('/static/walkthrough/page/3' )
64
64
WebDriverWait (self .driver , TIMEOUT ).until (
65
65
expected_conditions .text_to_be_present_in_element (
66
- (By .CSS_SELECTOR , "#mycontainer h1 small" ),
66
+ (By .CSS_SELECTOR , "#mycontainer h1 small" ),
67
67
"Page 2 of 5"
68
68
)
69
69
)
70
70
current_url = urlparse (self .driver .current_url )
71
71
assert current_url .path == '/static/walkthrough/page/2'
72
72
73
73
74
- def test_walkthrough_page_4 (self , tester_logout ):
74
+ def test_walkthrough_page_4 (self , tester_logout ):
75
75
self .open ('/static/walkthrough/page/4' )
76
76
WebDriverWait (self .driver , TIMEOUT ).until (
77
77
expected_conditions .text_to_be_present_in_element (
78
- (By .CSS_SELECTOR , "#mycontainer h1 small" ),
78
+ (By .CSS_SELECTOR , "#mycontainer h1 small" ),
79
79
"Page 2 of 5"
80
80
)
81
81
)
0 commit comments