mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gui-test] add doubleClickItem(item) extension function for JListFixture to GuiTestCase and Generators
This commit is contained in:
@@ -126,6 +126,7 @@ class JBListGenerator : ComponentCodeGenerator<JBList<*>> {
|
||||
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\")"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user