diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/MenuFixture.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/MenuFixture.kt index 414f5c57aad3..5b19b590cd38 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/MenuFixture.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/MenuFixture.kt @@ -98,6 +98,7 @@ class MenuFixture internal constructor(private val myRobot: Robot, private val m private fun menuItemMatcher(pathIsRegex: Boolean, segment: String): GenericTypeMatcher { return typeMatcher(JMenuItem::class.java) { + it.width != 0 && it.height != 0 && if (pathIsRegex) it.text.matches(segment.toRegex()) else segment == it.text }