From 77d0c3f785c7a81065636cc03e35680935dda5f3 Mon Sep 17 00:00:00 2001 From: Sergey Karashevich Date: Tue, 27 Dec 2016 21:24:04 +0300 Subject: [PATCH] [gui-test] revert invokeAction intersection in SimpleGitTest; mute AddActionToolbarTest (cause it Mac dependent) --- .../src/com/intellij/testGuiFramework/impl/GuiTestCase.kt | 2 +- .../com/intellij/testGuiFramework/tests/SimpleGitTest.java | 6 +++--- .../tests/samples/AddActionToolbarInKotlinTest.kt | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt index b7c08a7bb526..697a7564af5c 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/impl/GuiTestCase.kt @@ -151,7 +151,7 @@ open class GuiTestCase : GuiTestBase() { //*********COMMON FUNCTIONS WITHOUT CONTEXT fun typeText(text: String) = GuiTestUtil.typeText(text, myRobot, 10) - fun invokeAction(keyStroke: String) = GuiTestUtil.invokeActionViaShortcut(myRobot, keyStroke) + fun shortcut(keyStroke: String) = GuiTestUtil.invokeActionViaShortcut(myRobot, keyStroke) fun ideFrame() = findIdeFrame()!! diff --git a/platform/testGuiFramework/testSrc/com/intellij/testGuiFramework/tests/SimpleGitTest.java b/platform/testGuiFramework/testSrc/com/intellij/testGuiFramework/tests/SimpleGitTest.java index 8d24084869f0..4901c2f7036c 100644 --- a/platform/testGuiFramework/testSrc/com/intellij/testGuiFramework/tests/SimpleGitTest.java +++ b/platform/testGuiFramework/testSrc/com/intellij/testGuiFramework/tests/SimpleGitTest.java @@ -48,7 +48,7 @@ public class SimpleGitTest extends GuiTestCase { projectPane.selectByPath(projectName, "src"); //invoke "New..." action - invokeAction("NewElement"); + invokeAction(myRobot, "NewElement"); //select first element (Java class) myRobot.pressAndReleaseKey(KeyEvent.VK_ENTER); @@ -66,13 +66,13 @@ public class SimpleGitTest extends GuiTestCase { () -> currentFileFixture.getVcsStatus().equals(FileStatus.UNKNOWN), THIRTY_SEC_TIMEOUT); - invokeAction("ChangesView.AddUnversioned"); + invokeAction(myRobot, "ChangesView.AddUnversioned"); pause("Wait when file will be marked as added", () -> currentFileFixture.getVcsStatus().equals(FileStatus.ADDED), THIRTY_SEC_TIMEOUT); - invokeAction("CheckinProject"); + invokeAction(myRobot, "CheckinProject"); JDialogFixture commitJDialogFixture = JDialogFixture.find(myRobot, VcsBundle.message("commit.dialog.title")); myRobot.enterText("initial commit"); diff --git a/platform/testGuiFramework/testSrc/com/intellij/testGuiFramework/tests/samples/AddActionToolbarInKotlinTest.kt b/platform/testGuiFramework/testSrc/com/intellij/testGuiFramework/tests/samples/AddActionToolbarInKotlinTest.kt index 5c5d75e55749..bb5cfac4dbc3 100644 --- a/platform/testGuiFramework/testSrc/com/intellij/testGuiFramework/tests/samples/AddActionToolbarInKotlinTest.kt +++ b/platform/testGuiFramework/testSrc/com/intellij/testGuiFramework/tests/samples/AddActionToolbarInKotlinTest.kt @@ -17,19 +17,20 @@ package com.intellij.testGuiFramework.tests.samples import com.intellij.ide.ui.UISettings import com.intellij.testGuiFramework.impl.GuiTestCase +import org.junit.Ignore import org.junit.Test class AddActionToolbarInKotlinTestTest : GuiTestCase() { - @Test + @Test @Ignore @Throws(Exception::class) fun testAddActionToolbar() { simpleProject { if (!UISettings.getInstance().SHOW_MAIN_TOOLBAR) invokeMenuPath("View", "Toolbar") - invokeAction(keyStroke = "meta comma") + shortcut(keyStroke = "meta comma") dialog("Preferences") { jTree("Appearance & Behavior").clickPath("Appearance & Behavior/Menus and Toolbars")