From 7ef2475544441972f2f65fae453bd94bf1d6fff4 Mon Sep 17 00:00:00 2001 From: Artem Gainanov Date: Wed, 30 May 2018 20:11:57 +0700 Subject: [PATCH] [gui-test] improve finding root node in jTree --- .../fixtures/extended/ExtendedTreeFixture.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/extended/ExtendedTreeFixture.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/extended/ExtendedTreeFixture.kt index 8d04c4b24a0b..057fe5bdd53c 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/extended/ExtendedTreeFixture.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/extended/ExtendedTreeFixture.kt @@ -60,7 +60,8 @@ open class ExtendedTreeFixture(val robot: Robot, val tree: JTree) : JTreeFixture fun clickPath(pathStrings: List, mouseClickInfo: MouseClickInfo): Unit = myDriver.clickPath(tree, pathStrings, mouseClickInfo) - fun clickPath(vararg pathStrings: String, mouseClickInfo: MouseClickInfo): Unit = myDriver.clickPath(tree, pathStrings.toList(), mouseClickInfo) + fun clickPath(vararg pathStrings: String, mouseClickInfo: MouseClickInfo): Unit = myDriver.clickPath(tree, pathStrings.toList(), + mouseClickInfo) fun clickPath(pathStrings: List, button: MouseButton = MouseButton.LEFT_BUTTON, times: Int = 1): Unit = myDriver.clickPath(tree, pathStrings, @@ -163,13 +164,7 @@ open class ExtendedTreeFixture(val robot: Robot, val tree: JTree) : JTreeFixture currentNode = currentNode.parent as DefaultMutableTreeNode result.add(0, currentNode.toString()) } - //Test tool window JTree has root="[root]" - //Settings JTree has root="" - if (tree.model.root.toString() == "[root]") { - result[0] = "Test Results" - }else if (tree.model.root.toString() == ""){ - result.removeAt(0) - } + result[0] = this.valueAt(0)!! return result }