From 467549d18569cd7b114af1f535a9589f5b2a4567 Mon Sep 17 00:00:00 2001 From: Sergey Karashevich Date: Tue, 9 Oct 2018 15:45:39 +0300 Subject: [PATCH] [gui-test] improve frames switching for Windows, wait for text sync in editor (GUI-167) --- .../tests/community/SaveFilesOnFrameDeactivationGuiTest.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/community-guitests/testSrc/com/intellij/testGuiFramework/tests/community/SaveFilesOnFrameDeactivationGuiTest.kt b/community-guitests/testSrc/com/intellij/testGuiFramework/tests/community/SaveFilesOnFrameDeactivationGuiTest.kt index 568919b86266..fff87bde073d 100644 --- a/community-guitests/testSrc/com/intellij/testGuiFramework/tests/community/SaveFilesOnFrameDeactivationGuiTest.kt +++ b/community-guitests/testSrc/com/intellij/testGuiFramework/tests/community/SaveFilesOnFrameDeactivationGuiTest.kt @@ -109,6 +109,7 @@ class SaveFilesOnFrameDeactivationGuiTest : GuiTestCase() { shortcut(CONTROL + A, META + A) typeText(text) } + waitUntil("text in editor will match entered text", Timeouts.seconds05) { editor.getCurrentFileContents(false) == text } } private fun dummyUiApp(): ProcessBuilder { @@ -118,10 +119,6 @@ class SaveFilesOnFrameDeactivationGuiTest : GuiTestCase() { return ProcessBuilder("java", "-classpath", classpath, DummyUIApp::class.java.name).apply { inheritIO() } } - private fun switchApp() { - shortcut(CONTROL + TAB, META + TAB) - } - private fun ensureSaveFilesOnFrameDeactivation() { val preferences = if (SystemInfo.isMac()) "Preferences" else "Settings" @@ -155,7 +152,7 @@ class SaveFilesOnFrameDeactivationGuiTest : GuiTestCase() { private fun IdeFrameFixture.switchFrameTo() { if (this.target().isActive) return when { - isWin() -> shortcut(ALT + TAB) + isWin() -> shortcut(CONTROL + ALT + OPEN_BRACKET) isMac() -> shortcut(META + BACK_QUOTE) isUnix() -> shortcut(ALT + BACK_QUOTE) }