File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -25,4 +25,29 @@ def simple_editor_code
25
25
}
26
26
EOF
27
27
end
28
+
29
+ scenario "using the Monaco editor" do
30
+ in_config_menu { select ( "monaco" ) }
31
+
32
+ editor = page . find ( '.monaco-editor' )
33
+
34
+ # Click on the last line as that will replace the entire content
35
+ editor . find ( '.view-line:last-child' ) . click
36
+ t = editor . find ( 'textarea' , visible : false )
37
+ t . set ( monaco_editor_code , clear : :backspace )
38
+
39
+ click_on ( "Run" )
40
+
41
+ within ( :output , :stdout ) do
42
+ expect ( page ) . to have_content 'Monaco editor'
43
+ end
44
+ end
45
+
46
+ # Missing indentation and closing curly braces as those are auto-inserted
47
+ def monaco_editor_code
48
+ <<~EOF
49
+ fn main() {
50
+ println!("Using the Monaco editor");
51
+ EOF
52
+ end
28
53
end
You can’t perform that action at this time.
0 commit comments