diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/common/popups/SearchEverywherePopupUI.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/common/popups/SearchEverywherePopupUI.kt index 547a546d664a..40adb4083e5c 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/common/popups/SearchEverywherePopupUI.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/common/popups/SearchEverywherePopupUI.kt @@ -75,6 +75,12 @@ open class SearchEverywherePopupUI(data: ComponentData) : PopupUiComponent(data) typeFilterButton.click() } + fun clickNoneButtonInTypeFilters() { + typeFilterButton.click() + searchEverywhereTypeFilterPopup().button("None").click() + typeFilterButton.click() + } + private fun invokeActionWithShortcut(shortcut: String, chooser: (List) -> AnAction? = { it.singleOrNull() }) { val action = driver.utility(ActionUtils::class).getActions(searchEverywhereUi.component).filter { it.getShortcutSet().getShortcuts().singleOrNull()?.toString() == shortcut diff --git a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/TakeScreenshotCommand.kt b/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/TakeScreenshotCommand.kt index 35ee9da6d18a..5e157a4533c2 100644 --- a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/TakeScreenshotCommand.kt +++ b/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/TakeScreenshotCommand.kt @@ -15,12 +15,15 @@ import java.awt.* import java.awt.image.BufferedImage import java.io.File import java.io.IOException +import java.util.concurrent.atomic.AtomicInteger import javax.imageio.ImageIO import kotlin.time.Duration.Companion.seconds private val LOG: Logger get() = logger() +private val screenshotSequence = AtomicInteger(1) + /** * Command takes screenshot. * Takes JPG screenshot of current screen to subfolder @@ -92,14 +95,9 @@ suspend fun captureComponent(component: Component, file: File) { } fun getNextFolder(base: File): File { - var counter = 0 - var folder = base - - while (folder.exists()) { - counter++ - val name = "${base.name}_$counter" - folder = File(base.parentFile, name) - } + val counter = "%03d".format(screenshotSequence.getAndIncrement()) + val name = "${counter}_${base.name}" + val folder = File(base.parentFile, name) folder.mkdirs() return folder