From 9443e180c56fcf124e45e5fdcfa3b99f0290c043 Mon Sep 17 00:00:00 2001 From: Anastasia Katsman Date: Thu, 2 May 2024 16:15:14 +0200 Subject: [PATCH] [rdct-tests] GTW-8615 fix wrong modality state on opening the editor GitOrigin-RevId: 82ed93e50722cda2aeafc09f98304485b1a906fe --- .../src/com/intellij/driver/sdk/editors.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/editors.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/editors.kt index 4b408109f427..7c8f81c48e56 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/editors.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/editors.kt @@ -68,17 +68,17 @@ fun Driver.openFile(relativePath: String, project: Project = singleProject()) = } else { val service = service(GuestNavigationService::class, project) - service.navigateViaBackend(relativePath, 0) - waitFor(errorMessage = "Fail to open file $relativePath", duration = 30.seconds, - getter = { - withContext(OnDispatcher.EDT) { + withContext(OnDispatcher.EDT) { + service.navigateViaBackend(relativePath, 0) + waitFor(errorMessage = "Fail to open file $relativePath", duration = 30.seconds, + getter = { service(project).getSelectedTextEditor()?.getVirtualFile() - } - }, - checker = { virtualFile -> - virtualFile != null && - virtualFile.getPath().contains(relativePath) - })!! + }, + checker = { virtualFile -> + virtualFile != null && + virtualFile.getPath().contains(relativePath) + })!! + } } waitForCodeAnalysis(file = openedFile) } \ No newline at end of file