8
8
from selenium .webdriver .support .ui import WebDriverWait
9
9
import pytest
10
10
11
+ from codebender_testing .config import TEST_PROJECT_NAME
11
12
from codebender_testing .utils import SeleniumTestCase
12
13
13
14
@@ -52,7 +53,7 @@ def test_boards_dropdown(self):
52
53
assert boards_dropdown .first_selected_option .text == TEST_BOARD
53
54
54
55
def test_ports_dropdown (self ):
55
- """Ensures that the ports dropdown exists."""
56
+ """Tests that the ports dropdown exists."""
56
57
self .get_element (By .ID , "ports" )
57
58
58
59
def test_run_with_no_port (self ):
@@ -63,3 +64,15 @@ def test_run_with_no_port(self):
63
64
WebDriverWait (self .driver , FLASH_TIMEOUT ).until (
64
65
expected_conditions .text_to_be_present_in_element (
65
66
(By .ID , "operation_output" ), "Please select a valid port or enable the plugin!!" ))
67
+
68
+ def test_speeds_dropdown (self ):
69
+ """Tests that the speeds dropdown exists."""
70
+ self .get_element (By .ID , "baudrates" )
71
+
72
+ def test_clone_project (self ):
73
+ """Tests that clicking the 'Clone Project' link brings us to a new
74
+ sketch with the title 'test_project clone'."""
75
+ clone_link = self .get_element (By .LINK_TEXT , 'Clone Project' )
76
+ clone_link .click ()
77
+ project_name = self .get_element (By .ID , 'editor_heading_project_name' )
78
+ assert project_name .text .startswith ("%s copy" % TEST_PROJECT_NAME )
0 commit comments