Skip to content

Commit

Permalink
[se-edu#459] Remove unnecessary pauses after pressing keys with GuiRo…
Browse files Browse the repository at this point in the history
…bot (se-edu#572)

guiRobot#type(...) and guiRobot#push(...) internally pauses after
pressing the given keys.

We do not need to call guiRobot#pauseForHuman() ourselves after calling
these two key pressing methods.

Let's remove the redundant guiRobot#pauseForHuman() calls.
  • Loading branch information
yamgent authored Jul 20, 2017
1 parent 801bae8 commit 48d5acc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/java/guitests/guihandles/CommandBoxHandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public boolean run(String command) {
guiRobot.pauseForHuman();

guiRobot.type(KeyCode.ENTER);
guiRobot.pauseForHuman();

return !getStyleClass().contains(CommandBox.ERROR_STYLE_CLASS);
}

Expand Down
1 change: 0 additions & 1 deletion src/test/java/guitests/guihandles/MainMenuHandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public void openHelpWindowUsingMenu() {
*/
public void openHelpWindowUsingAccelerator() {
guiRobot.push(KeyCode.F1);
guiRobot.pauseForHuman();
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/test/java/seedu/address/ui/CommandBoxTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public void commandBox_handleKeyPress() {
assertEquals(errorStyleOfCommandBox, commandBoxHandle.getStyleClass());

guiRobot.push(KeyCode.A);
guiRobot.pauseForHuman();
assertEquals(defaultStyleOfCommandBox, commandBoxHandle.getStyleClass());
}

Expand Down

0 comments on commit 48d5acc

Please sign in to comment.