Skip to content

Commit 37f5315

Browse files
committed
Added test for GUI (Reduce Indent)
1 parent dbbee51 commit 37f5315

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package processing.app;
2+
3+
import static org.junit.Assert.assertEquals;
4+
5+
import org.fest.swing.fixture.JMenuItemFixture;
6+
import org.junit.Test;
7+
8+
import processing.app.helpers.JEditTextAreaFixture;
9+
10+
public class ReduceIndentWith1CharOnLastLineTest extends AbstractGUITest {
11+
12+
@Test
13+
public void shouldJustCloseTheDialog() throws Exception {
14+
JMenuItemFixture menuDecreaseIndent = window.menuItem("menuDecreaseIndent");
15+
16+
JEditTextAreaFixture editor = window.jEditTextArea("editor");
17+
editor.setText("void loop()\n{\n Serial.begin(9600)\n}");
18+
19+
editor.selectAll();
20+
21+
menuDecreaseIndent.requireEnabled();
22+
menuDecreaseIndent.click();
23+
24+
EditorConsole console = (EditorConsole) window.scrollPane("console").component();
25+
26+
assertEquals("", console.consoleDoc.getText(0, console.consoleDoc.getLength()));
27+
}
28+
}

0 commit comments

Comments
 (0)