From 7c103f83971765cc663fc6fb9e2ea4b30911c138 Mon Sep 17 00:00:00 2001 From: Sergey Karashevich Date: Tue, 5 Feb 2019 17:29:56 +0300 Subject: [PATCH] [gui-test] fix for the returning on the first step of Welcome Frame (GUI-240) Previously we checked that welcome frame is just showing, not a create new project action link. --- .../src/com/intellij/testGuiFramework/impl/GuiTestRule.kt | 4 ++-- 1 file changed, 2 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 cde5ea82c24b..64506083dc8f 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestRule.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestRule.kt @@ -220,9 +220,9 @@ class GuiTestRule : TestRule { //find first page with such actions like "Create New Project" without timeout private fun isWelcomeFrameFirstStep(timeout: org.fest.swing.timing.Timeout = Timeouts.seconds01): Boolean { val createNewProjectAction = GuiTestUtilKt.ignoreComponentLookupException { - WelcomeFrameFixture.find(robot(), timeout).apply { robot().finder().find(this@apply.target() as Container) { it is ActionLink && it.text.contains("New Project") } } + WelcomeFrameFixture.find(robot(), timeout).let { robot().finder().find(it.target() as Container) { it is ActionLink && it.text.contains("New Project") } } } - return createNewProjectAction?.target()?.isShowing ?: false + return createNewProjectAction?.isShowing ?: false }