Skip to content

Commit

Permalink
Reduce timeout for guirobot to wait
Browse files Browse the repository at this point in the history
  • Loading branch information
irvinlim committed Nov 5, 2016
1 parent c2b98ed commit 839a873
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ConsoleHandle extends GuiHandle {

private static final String CONSOLE_INPUT_ID = "#consoleInputTextField";
private static final String CONSOLE_TEXT_ID = "#consoleTextArea";
private static final int COMMAND_WAIT_TIME = 500;
private static final int COMMAND_WAIT_TIME = 100;

public ConsoleHandle(GuiRobot guiRobot, Stage primaryStage, String stageTitle) {
super(guiRobot, primaryStage, stageTitle);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/seedu/todo/guitests/guihandles/GuiHandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ protected String getTextAreaText(String filedName) {
protected void setTextField(String textFieldId, String newText) {
guiRobot.clickOn(textFieldId);
((TextField) guiRobot.lookup(textFieldId).tryQuery().get()).setText(newText);
guiRobot.sleep(500); // so that the texts stays visible on the GUI for a short period
guiRobot.sleep(20); // so that the texts stays visible on the GUI for a short period
}

public void pressEnter() {
guiRobot.type(KeyCode.ENTER).sleep(500);
guiRobot.type(KeyCode.ENTER);
}

protected String getStringFromText(String fieldId, Node parentNode) {
Expand Down

0 comments on commit 839a873

Please sign in to comment.