9
9
TIMEOUT = 30
10
10
11
11
class TestHowItWorks (SeleniumTestCase ):
12
-
12
+
13
13
@pytest .fixture (scope = "class" )
14
14
def skip_button_display (self ):
15
15
skip_button = self .driver .find_element_by_id ('skip-all-steps-button' )
@@ -22,7 +22,7 @@ def test_how_it_works(self, tester_logout):
22
22
23
23
def test_skip_button (self ):
24
24
skip_button = self .driver .find_element_by_id ('skip-all-steps-button' )
25
- skip_button .send_keys ( Keys . ENTER )
25
+ skip_button .click ( )
26
26
WebDriverWait (self .driver , TIMEOUT ).until (
27
27
expected_conditions .text_to_be_present_in_element (
28
28
(By .CSS_SELECTOR , ".popover-title" ), "That's all for now."
@@ -36,67 +36,67 @@ def test_skip_button (self):
36
36
def test_how_it_works_page_1 (self , skip_button_display ):
37
37
WebDriverWait (self .driver , TIMEOUT ).until (
38
38
expected_conditions .text_to_be_present_in_element (
39
- (By .CSS_SELECTOR , "#hiw-one .popover-title" ),
39
+ (By .CSS_SELECTOR , "#hiw-one .popover-title" ),
40
40
"Awesome editor (1/6)"
41
41
)
42
- )
42
+ )
43
43
next_button = self .find ('#hiw-one .popover-content .btn-primary' )
44
44
next_button .click ()
45
45
46
46
def test_how_it_works_page_2 (self , skip_button_display ):
47
47
WebDriverWait (self .driver , TIMEOUT ).until (
48
48
expected_conditions .text_to_be_present_in_element (
49
- (By .CSS_SELECTOR , "#hiw-two .popover-title" ),
49
+ (By .CSS_SELECTOR , "#hiw-two .popover-title" ),
50
50
"Helpful utilities (2/6)"
51
51
)
52
- )
52
+ )
53
53
next_button = self .find ('#hiw-two .popover-content .btn-primary' )
54
54
next_button .click ()
55
-
55
+
56
56
def test_how_it_works_page_3 (self , skip_button_display ):
57
57
WebDriverWait (self .driver , TIMEOUT ).until (
58
58
expected_conditions .text_to_be_present_in_element (
59
- (By .CSS_SELECTOR , "#hiw-three .popover-title" ),
59
+ (By .CSS_SELECTOR , "#hiw-three .popover-title" ),
60
60
"Compile & Upload (3/6)"
61
61
)
62
- )
62
+ )
63
63
verify_button = self .find ('#cb_cf_verify_btn' )
64
64
verify_button .click ()
65
65
66
66
def test_how_it_works_page_4 (self , skip_button_display ):
67
67
WebDriverWait (self .driver , TIMEOUT ).until (
68
68
expected_conditions .text_to_be_present_in_element (
69
- (By .CSS_SELECTOR , "#hiw-four .popover-title" ),
69
+ (By .CSS_SELECTOR , "#hiw-four .popover-title" ),
70
70
"Better error output (4/6)"
71
71
)
72
72
)
73
73
insert_text = """
74
74
var cursor_position = editor.aceEditor.getCursorPosition();
75
75
editor.aceEditor.getSession().insert(cursor_position, ';')
76
76
"""
77
- self .execute_script (insert_text , "editor" )
77
+ self .execute_script (insert_text , "editor" )
78
78
verify_button = self .find ('#cb_cf_verify_btn' )
79
79
verify_button .click ()
80
80
81
81
82
82
def test_how_it_works_page_5 (self , skip_button_display ):
83
83
WebDriverWait (self .driver , TIMEOUT ).until (
84
84
expected_conditions .text_to_be_present_in_element (
85
- (By .CSS_SELECTOR , "#hiw-five .popover-title" ),
85
+ (By .CSS_SELECTOR , "#hiw-five .popover-title" ),
86
86
"Share (5/6)"
87
87
)
88
- )
88
+ )
89
89
next_button = self .find ('#hiw-five .popover-content .btn-primary' )
90
90
next_button .click ()
91
91
92
92
93
93
def test_how_it_works_page_6 (self , skip_button_display ):
94
94
WebDriverWait (self .driver , TIMEOUT ).until (
95
95
expected_conditions .text_to_be_present_in_element (
96
- (By .CSS_SELECTOR , "#hiw-six .popover-title" ),
96
+ (By .CSS_SELECTOR , "#hiw-six .popover-title" ),
97
97
"Collaborate (6/6)"
98
98
)
99
- )
99
+ )
100
100
finish_button = self .find ('.popover-content .btn-primary' )
101
101
finish_button .click ()
102
102
@@ -105,8 +105,8 @@ def test_how_it_works_page_7 (self):
105
105
skip_button .is_displayed () == False
106
106
WebDriverWait (self .driver , TIMEOUT ).until (
107
107
expected_conditions .text_to_be_present_in_element (
108
- (By .CSS_SELECTOR ,
109
- '.navbar .popover:nth-child(3) .popover-title' ),
108
+ (By .CSS_SELECTOR ,
109
+ '.navbar .popover:nth-child(3) .popover-title' ),
110
110
"That's all for now."
111
111
)
112
112
)
0 commit comments