[rdct-tests] GTW-8615 fix wrong modality state on opening the editor

GitOrigin-RevId: 82ed93e50722cda2aeafc09f98304485b1a906fe
This commit is contained in:
Anastasia Katsman
2024-05-03 10:00:48 +00:00
committed by intellij-monorepo-bot
parent 96068ab7a2
commit 9443e180c5
@@ -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<FileEditorManager>(project).getSelectedTextEditor()?.getVirtualFile()
}
},
checker = { virtualFile ->
virtualFile != null &&
virtualFile.getPath().contains(relativePath)
})!!
},
checker = { virtualFile ->
virtualFile != null &&
virtualFile.getPath().contains(relativePath)
})!!
}
}
waitForCodeAnalysis(file = openedFile)
}