diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/generators/Generators.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/generators/Generators.kt index 56ecd82c6f38..63875109481f 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/generators/Generators.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/generators/Generators.kt @@ -126,6 +126,7 @@ class JBListGenerator : ComponentCodeGenerator> { val cellText = getCellText(cmp, cp).orEmpty() if (cmp.isPopupList()) return "popupClick(\"$cellText\")" if (me.button == MouseEvent.BUTTON2) return "jList(\"$cellText\").item(\"$cellText\").rightClick()" + if (me.clickCount == 2) return "jList(\"$cellText\").doubleClickItem(\"$cellText\")" return "jList(\"$cellText\").clickItem(\"$cellText\")" } } diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt index dffe2ea5ea1b..993b73b49967 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt @@ -378,6 +378,10 @@ open class GuiTestCase : GuiTestBase() { //*********SOME EXTENSION FUNCTIONS FOR FIXTURES + fun JListFixture.doubleClickItem(itemName: String) { + this.item(itemName).doubleClick() + } + //necessary only for Windows fun getScaleSuffix(): String? { val scaleEnabled: Boolean = (GuiTestUtil.getSystemPropertyOrEnvironmentVariable("sun.java2d.uiScale.enabled")?.toLowerCase().equals(