diff --git a/README.md b/README.md index 39cd0b4d..6fc5f0f8 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ launch IDEA on remote machines or in Docker containers to check your plugin with ### Setup -The last version of the Remote-Robot is `0.11.22`. +The last version of the Remote-Robot is `0.11.23`. In the test project: diff --git a/ui-test-example/build.gradle b/ui-test-example/build.gradle index 75526b03..4764b64d 100644 --- a/ui-test-example/build.gradle +++ b/ui-test-example/build.gradle @@ -15,7 +15,7 @@ repositories { } -def remoteRobotVersion = "0.11.22" +def remoteRobotVersion = "0.11.23" kotlin { jvmToolchain(17) diff --git a/ui-test-example/src/test/java/org/intellij/examples/simple/plugin/CreateCommandLineJavaTest.java b/ui-test-example/src/test/java/org/intellij/examples/simple/plugin/CreateCommandLineJavaTest.java index ffff50f2..60c3d730 100644 --- a/ui-test-example/src/test/java/org/intellij/examples/simple/plugin/CreateCommandLineJavaTest.java +++ b/ui-test-example/src/test/java/org/intellij/examples/simple/plugin/CreateCommandLineJavaTest.java @@ -6,6 +6,7 @@ import com.intellij.remoterobot.RemoteRobot; import com.intellij.remoterobot.fixtures.*; import com.intellij.remoterobot.search.locators.Locator; +import com.intellij.remoterobot.steps.CommonSteps; import com.intellij.remoterobot.utils.Keyboard; import org.assertj.swing.core.MouseButton; import org.intellij.examples.simple.plugin.pages.IdeaFrame; @@ -51,14 +52,7 @@ public void waitForIde() { @AfterEach public void closeProject(final RemoteRobot remoteRobot) { step("Close the project", () -> { - if (remoteRobot.isMac()) { - keyboard.hotKey(VK_SHIFT, VK_META, VK_A); - keyboard.enterText("Close Project"); - keyboard.enter(); - } else { - actionMenu(remoteRobot, "File").click(); - actionMenuItem(remoteRobot, "Close Project").click(); - } + new CommonSteps(remoteRobot).closeProject(); }); } diff --git a/ui-test-example/src/test/java/org/intellij/examples/simple/plugin/steps/JavaExampleSteps.java b/ui-test-example/src/test/java/org/intellij/examples/simple/plugin/steps/JavaExampleSteps.java index ec995a70..156f7fbf 100644 --- a/ui-test-example/src/test/java/org/intellij/examples/simple/plugin/steps/JavaExampleSteps.java +++ b/ui-test-example/src/test/java/org/intellij/examples/simple/plugin/steps/JavaExampleSteps.java @@ -38,7 +38,6 @@ public void createNewCommandLineProject() { welcomeFrame.createNewProjectLink().click(); final DialogFixture newProjectDialog = welcomeFrame.find(DialogFixture.class, DialogFixture.byTitle("New Project"), Duration.ofSeconds(20)); - newProjectDialog.find(JListFixture.class, byXpath("//div[@class='JBList']")).clickItem("New Project", true); newProjectDialog.findText("Java").click(); newProjectDialog.button("Create").click(); }); @@ -60,10 +59,10 @@ public void closeTipOfTheDay() { public void autocomplete(String text) { step("Autocomplete '" + text + "'", () -> { - final Locator completionMenu = byXpath("//div[@class='HeavyWeightWindow']"); + final Locator completionMenu = byXpath("//div[@class='HeavyWeightWindow']//div[@class='LookupList']"); final Keyboard keyboard = new Keyboard(remoteRobot); keyboard.enterText(text); - waitFor(ofSeconds(5), () -> hasSingleComponent(remoteRobot, completionMenu)); + waitFor(ofSeconds(10), () -> hasSingleComponent(remoteRobot, completionMenu)); remoteRobot.find(ComponentFixture.class, completionMenu) .findText(contains(text)) .click(); diff --git a/ui-test-example/src/test/kotlin/org/intellij/examples/simple/plugin/CreateCommandLineKotlinTest.kt b/ui-test-example/src/test/kotlin/org/intellij/examples/simple/plugin/CreateCommandLineKotlinTest.kt index 1a370168..5574f0e9 100644 --- a/ui-test-example/src/test/kotlin/org/intellij/examples/simple/plugin/CreateCommandLineKotlinTest.kt +++ b/ui-test-example/src/test/kotlin/org/intellij/examples/simple/plugin/CreateCommandLineKotlinTest.kt @@ -7,6 +7,7 @@ import com.intellij.remoterobot.RemoteRobot import com.intellij.remoterobot.fixtures.CommonContainerFixture import com.intellij.remoterobot.fixtures.ContainerFixture import com.intellij.remoterobot.search.locators.byXpath +import com.intellij.remoterobot.steps.CommonSteps import com.intellij.remoterobot.stepsProcessing.step import com.intellij.remoterobot.utils.keyboard import com.intellij.remoterobot.utils.waitFor @@ -37,17 +38,7 @@ class CreateCommandLineKotlinTest { @AfterEach fun closeProject(remoteRobot: RemoteRobot) = with(remoteRobot) { - idea { - if (remoteRobot.isMac()) { - keyboard { - hotKey(VK_SHIFT, VK_META, VK_A) - enterText("Close Project") - enter() - } - } else { - menuBar.select("File", "Close Project") - } - } + CommonSteps(remoteRobot).closeProject() } @Test