From 2c83403cb054f0a3c5da2ddb2ba4115fb8811116 Mon Sep 17 00:00:00 2001
From: Alex Plate <aleksei.plate@jetbrains.com>
Date: Fri, 14 Mar 2025 13:55:07 +0200
Subject: [PATCH] Add waiting for SDK detectors on PyCharm tests

---
 tests/ui-py-tests/src/test/kotlin/PyCharmTest.kt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/ui-py-tests/src/test/kotlin/PyCharmTest.kt b/tests/ui-py-tests/src/test/kotlin/PyCharmTest.kt
index 4e31d1b18..5fd6d9580 100644
--- a/tests/ui-py-tests/src/test/kotlin/PyCharmTest.kt
+++ b/tests/ui-py-tests/src/test/kotlin/PyCharmTest.kt
@@ -69,6 +69,10 @@ class PyCharmTest {
   private fun RemoteRobot.startNewProject() {
     welcomeFrame {
       createNewProjectLink.click()
+      waitFor {
+        // Waiting till the SDK will be detected by PyCharm
+        findAllText("detected in the system").isNotEmpty()
+      }
       button("Create").click()
     }
   }