From bc2547a30302949a571426cde975be30d68b06ef Mon Sep 17 00:00:00 2001 From: Danil Tereshchenko Date: Tue, 2 Dec 2025 19:45:53 +0000 Subject: [PATCH] BAZEL-2722 [bazel] align tests with master branch contains the following manual changes: update [bazel]: modify test repository URL and commit hash in `BazelTestCases` for `ProtobufResolve` refactor [bazel]: replace `findAndKillProcesses` with `ProcessKiller` API in integration tests for improved process management commits from master: [bazel][Platform UI] IJPL-196093 Search Everywhere: UI tests for LabelSearchEverywhereContributor (cherry picked from commit e5ee0dd7d05b93b3184b2a99212e56640fef887d) refactor [performancePlugin]: change screenshots folder creation logic; When any screenshot folder is created, they get assigned an incrementing counter in front of it. This will allow sorting all the screenshots folders in order they were made. Merge-request: IJ-MR-182352 Merged-by: Danil Tereshchenko (cherry picked from commit 803ca46defce9304a9d0e661504e36049decf0db) refactor [bazel]: remove "build and sync" parameter in `syncBazelProject`ImportBazelSyncTest (cherry picked from commit 6c1d7b46787edf2b54be948abca97c4013f8a953) refactor [bazel]: wrap `MoveKotlinFileTest` commands in `ideFrame` to improve test stability and avoid race conditions (cherry picked from commit c224c58fb339fd804e93c0fe2f36d803f1b85553) maintenance [bazel]: add ImportBazelSyncTest to verify project import and sync on Hirschgarten (cherry picked from commit 35de9d9b1ee7e74813b80d697190f66de8a1fd2d) refactor [bazel] refactor integration tests to use `syncBazelProject` and `waitForIndicators` with explicit 10-minute timeout (cherry picked from commit 31f67ef862badeb5bf76902ffc4f788dac92ae3d) [bazel] refactor GolandSyncTest to use `syncBazelProject`; replace `waitForBazelSync` and add explicit indicator timeout (cherry picked from commit f7ba2f28232d727910c8f2cb5d2b6dc0b2a305fd) [bazel] refactor BazelVersionUpdateTest to use `syncBazelProject` and wrap it in ideFrame to avoid race conditions (cherry picked from commit bc248c82da8d46c9f8527e00367abc7883194000) BAZEL-2658 [bazel] update PyCharm test to use `syncBazelProjectCloseDialog`; improve Git dialog handling Merge-request: IJ-MR-182198 Merged-by: Danil Tereshchenko (cherry picked from commit 760c95e81324fe215914f5df8b8839f621b60102) [bazel] split pycharm test into three to avoid bug with "add file to VCS" Created by Danil Tereshchenko (Danil.Tereshchenko) via Patronus Merge-request: IJ-MR-182195 Merged-by: Danil Tereshchenko (cherry picked from commit a8ba87da73f00db45ee8f451e48d1f518db87bd3) [bazel] fix performance test race condition; move commandChain commands into explicit execution inside ideFrame to avoid race condition, where test incorrectly detects import finish on IDE opening. Merge-request: IJ-MR-182194 Merged-by: Danil Tereshchenko (cherry picked from commit ef75aa0d34f2a7508fcbc054cc90fb003a08c87d) BAZEL-2636 [bazel] update pycharm e2e tests with action to close "add file" dialog (cherry picked from commit d3d8b65cb4d89b6beec1d55c02e8463255e8998d) [bazel][maintenance] Add `tearDown` method to clean up Bazel server processes in IDE tests Merge-request: IJ-MR-180571 Merged-by: Danil Tereshchenko (cherry picked from commit b47af046008dfe6dd8ff81ba2cbe824135256950) Co-authored-by: Tatiana Elfimova Merge-request: IJ-MR-184432 Merged-by: Danil Tereshchenko GitOrigin-RevId: c82378fa28d635f49cf7495b8e859f8e24948b8f --- .../common/popups/SearchEverywherePopupUI.kt | 6 ++++++ .../commands/TakeScreenshotCommand.kt | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) 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