From 65c8cf7b19da383b849d933b38d99feca4896301 Mon Sep 17 00:00:00 2001 From: Mari Baburina Date: Fri, 17 Nov 2017 20:59:04 +0300 Subject: [PATCH] [gui-test] added CLion GUI test infrastructure --- .../src/com/intellij/testGuiFramework/impl/GuiTestRule.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestRule.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestRule.kt index e9d08705934a..6749b0afd88b 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestRule.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestRule.kt @@ -65,6 +65,8 @@ import java.util.concurrent.TimeUnit class GuiTestRule : TestRule { + var CREATE_NEW_PROJECT_ACTION_NAME = "Create New Project" + private val myRobotTestRule = RobotTestRule() private val myFatalErrorsFlusher = FatalErrorsFlusher() private var myProjectPath: File? = null @@ -156,12 +158,12 @@ class GuiTestRule : TestRule { } private fun returnToTheFirstStepOfWelcomeFrame() { - val welcomeFrameFixture = WelcomeFrameFixture.find(robot()); + val welcomeFrameFixture = WelcomeFrameFixture.find(robot()) val tenSec = org.fest.swing.timing.Timeout.timeout(10, TimeUnit.SECONDS) fun isFirstStep(): Boolean { return try { - val actionLinkFixture = ActionLinkFixture.findActionLinkByName("Create New Project", robot(), welcomeFrameFixture.target(), tenSec) + val actionLinkFixture = ActionLinkFixture.findActionLinkByName(CREATE_NEW_PROJECT_ACTION_NAME, robot(), welcomeFrameFixture.target(), tenSec) actionLinkFixture.target().isShowing } catch (componentLookupException: ComponentLookupException) { false