[gui-test] Reuse invokeAction from GuiTestCase

This commit is contained in:
Maxim.Kolmakov
2017-06-09 18:02:34 +02:00
parent 17fc4d1efe
commit 741a681c52
2 changed files with 4 additions and 8 deletions
@@ -112,10 +112,6 @@ open class GuiTestCase : GuiTestBase() {
func(dialog(title, timeout))
}
fun message(title: String? = null, timeout: Long = defaultTimeout, func: JDialogFixture.() -> Unit) {
func(dialog(title, timeout))
}
fun simpleProject(func: IdeFrameFixture.() -> Unit) {
func(importSimpleProject())
}
@@ -227,7 +223,7 @@ open class GuiTestCase : GuiTestBase() {
fun shortcut(keyStroke: String) = GuiTestUtil.invokeActionViaShortcut(myRobot, keyStroke)
// fun invokeAction(actionName: String) = GuiTestUtil.invokeAction(myRobot, actionName)
fun invokeAction(actionName: String) = GuiTestUtil.invokeAction(myRobot, actionName)
fun screenshot(component: Component, screenshotName: String): Unit {
@@ -48,7 +48,7 @@ public class SimpleGitTest extends GitGuiTestCase {
projectPane.selectByPath(projectName, "src");
//invoke "New..." action
invokeAction(myRobot, "NewElement");
invokeAction("NewElement");
//select first element (Java class)
myRobot.pressAndReleaseKey(KeyEvent.VK_ENTER);
@@ -67,13 +67,13 @@ public class SimpleGitTest extends GitGuiTestCase {
() -> currentFileFixture.getVcsStatus().equals(FileStatus.UNKNOWN),
THIRTY_SEC_TIMEOUT);
invokeAction(myRobot, "ChangesView.AddUnversioned");
invokeAction("ChangesView.AddUnversioned");
pause("Wait when file will be marked as added",
() -> currentFileFixture.getVcsStatus().equals(FileStatus.ADDED),
THIRTY_SEC_TIMEOUT);
invokeAction(myRobot, "CheckinProject");
invokeAction("CheckinProject");
JDialogFixture commitJDialogFixture = JDialogFixture.find(myRobot, VcsBundle.message("commit.dialog.title"));
myRobot.enterText("initial commit");