[gui-test] improve frames switching for Windows, wait for text sync in editor (GUI-167)

This commit is contained in:
Sergey Karashevich
2018-10-09 15:58:20 +03:00
parent 9d8d934558
commit 467549d185
@@ -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)
}