diff --git a/.github/workflows/itests.yml b/.github/workflows/itests.yml index 5cc3d34ac..4d050b775 100644 --- a/.github/workflows/itests.yml +++ b/.github/workflows/itests.yml @@ -74,7 +74,7 @@ jobs: distribution: temurin java-version: 17 - name: Run integration tests - run: .\gradlew.bat integrationTest + run: .\gradlew.bat integrationTest --warning-mode none shell: powershell - uses: actions/upload-artifact@v4 with: diff --git a/build.gradle.kts b/build.gradle.kts index e7d197e95..ba1407c09 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -39,7 +39,8 @@ repositories { mavenLocal() mavenCentral() maven { url = uri("https://raw.githubusercontent.com/redhat-developer/quarkus-ls/maven/") } - maven { url = uri("https://repository.jboss.org/nexus/content/groups/public") } + maven { url = uri("https://raw.githubusercontent.com/redhat-developer/intellij-common-ui-test-library/repository/snapshots") } + maven { url = uri("https://raw.githubusercontent.com/redhat-developer/intellij-common-ui-test-library/repository/releases") } maven { url = uri("https://repo.eclipse.org/content/repositories/lsp4mp-snapshots") } maven { url = uri("https://repo.eclipse.org/content/repositories/lsp4mp-releases") } intellijPlatform { @@ -325,7 +326,6 @@ val runIdeForUiTests by intellijPlatformTesting.runIde.registering { task { jvmArgumentProviders += CommandLineArgumentProvider { listOf( - "-Drobot-server.port=8580", "-Dide.mac.message.dialogs.as.sheets=false", "-Djb.privacy.policy.text=", "-Djb.consents.confirmation.enabled=false", diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 34049bad1..ebc251154 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,15 +1,15 @@ [versions] # libraries junit = "4.13.2" -junit-platform = "1.11.3" -junit-jupiter = "5.11.3" -devtools-common-ui-test = "0.4.4-SNAPSHOT" +junit-platform = "1.12.2" +junit-jupiter = "5.12.2" +devtools-common-ui-test = "0.4.5-SNAPSHOT" # plugins testlogger = "4.0.0" kotlin = "2.0.20" changelog = "2.2.0" -gradleIntelliJPlugin = "2.5.0" +gradleIntelliJPlugin = "2.6.0" [libraries] junit = { group = "junit", name = "junit", version.ref = "junit" } diff --git a/src/it/java/org/jboss/tools/intellij/quarkus/fixtures/dialogs/project/pages/QuarkusNewProjectFirstPage.java b/src/it/java/org/jboss/tools/intellij/quarkus/fixtures/dialogs/project/pages/QuarkusNewProjectFirstPage.java index 51878463b..99af57f89 100644 --- a/src/it/java/org/jboss/tools/intellij/quarkus/fixtures/dialogs/project/pages/QuarkusNewProjectFirstPage.java +++ b/src/it/java/org/jboss/tools/intellij/quarkus/fixtures/dialogs/project/pages/QuarkusNewProjectFirstPage.java @@ -38,7 +38,7 @@ public QuarkusNewProjectFirstPage(@NotNull RemoteRobot remoteRobot, @NotNull Rem @Override public ComboBoxFixture getProjectJdkComboBox() { - if (UITestRunner.getIdeaVersionInt() >= 20241) { + if (UITestRunner.getIdeaVersionInt() >= 20233) { return comboBox(byXpath(XPathDefinitions.PROJECT_SDK_COMBOBOX_PROJECT_WIZARD), Duration.ofSeconds(10)); } throw new UnsupportedOperationException("Get Project SDK ComboBox is not supported yet for IDEA version " + UITestRunner.getIdeaVersionInt()); diff --git a/src/it/java/org/jboss/tools/intellij/quarkus/tests/AbstractQuarkusTest.java b/src/it/java/org/jboss/tools/intellij/quarkus/tests/AbstractQuarkusTest.java index 06954b608..344a93c83 100644 --- a/src/it/java/org/jboss/tools/intellij/quarkus/tests/AbstractQuarkusTest.java +++ b/src/it/java/org/jboss/tools/intellij/quarkus/tests/AbstractQuarkusTest.java @@ -11,15 +11,36 @@ package org.jboss.tools.intellij.quarkus.tests; import com.intellij.remoterobot.RemoteRobot; +import com.intellij.remoterobot.fixtures.ComponentFixture; +import com.intellij.remoterobot.fixtures.JTextFieldFixture; import com.redhat.devtools.intellij.commonuitest.UITestRunner; import com.redhat.devtools.intellij.commonuitest.fixtures.dialogs.FlatWelcomeFrame; +import com.redhat.devtools.intellij.commonuitest.fixtures.dialogs.project.NewProjectDialogWizard; +import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.idestatusbar.IdeStatusBar; +import com.redhat.devtools.intellij.commonuitest.utils.constants.ProjectLocation; +import com.redhat.devtools.intellij.commonuitest.utils.project.CreateCloseUtils; import com.redhat.devtools.intellij.commonuitest.utils.runner.IntelliJVersion; import com.redhat.devtools.intellij.commonuitest.utils.testextension.ScreenshotAfterTestFailExtension; +import org.jboss.tools.intellij.quarkus.fixtures.dialogs.project.pages.QuarkusNewProjectFinalPage; +import org.jboss.tools.intellij.quarkus.fixtures.dialogs.project.pages.QuarkusNewProjectFirstPage; +import org.jboss.tools.intellij.quarkus.fixtures.dialogs.project.pages.QuarkusNewProjectSecondPage; +import org.jboss.tools.intellij.quarkus.fixtures.dialogs.project.pages.QuarkusNewProjectThirdPage; +import org.jboss.tools.intellij.quarkus.utils.BuildTool; +import org.jboss.tools.intellij.quarkus.utils.EndpointURLType; +import org.jboss.tools.intellij.quarkus.utils.XPathDefinitions; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.extension.ExtendWith; +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.time.Duration; +import static com.intellij.remoterobot.search.locators.Locators.byXpath; + /** * Abstract test class * @@ -30,10 +51,13 @@ public abstract class AbstractQuarkusTest { protected static RemoteRobot remoteRobot; private static boolean intelliJHasStarted = false; + AbstractQuarkusTest() { + } + @BeforeAll protected static void startIntelliJ() { if (!intelliJHasStarted) { - remoteRobot = UITestRunner.runIde(IntelliJVersion.COMMUNITY_V_2024_3, 8580); + remoteRobot = UITestRunner.runIde(IntelliJVersion.COMMUNITY_V_2023_3); intelliJHasStarted = true; Runtime.getRuntime().addShutdownHook(new CloseIntelliJBeforeQuit()); @@ -49,4 +73,50 @@ public void run() { UITestRunner.closeIde(); } } + + @AfterEach + protected void clearWorkspace() { + CreateCloseUtils.closeProject(remoteRobot); + FlatWelcomeFrame flatWelcomeFrame = remoteRobot.find(FlatWelcomeFrame.class, Duration.ofSeconds(10)); + flatWelcomeFrame.clearExceptions(); + flatWelcomeFrame.clearWorkspace(); + } + + protected void createQuarkusProject(RemoteRobot remoteRobot, String projectName, BuildTool buildTool, EndpointURLType endpointURLType, String javaVersion) throws IOException { + remoteRobot.find(FlatWelcomeFrame.class, Duration.ofSeconds(10)).createNewProject(); + NewProjectDialogWizard newProjectDialogWizard = remoteRobot.find(NewProjectDialogWizard.class, Duration.ofSeconds(10)); + QuarkusNewProjectFirstPage quarkusNewProjectFirstPage = newProjectDialogWizard.find(QuarkusNewProjectFirstPage.class, Duration.ofSeconds(10)); + quarkusNewProjectFirstPage.selectNewProjectType("Quarkus"); + if (endpointURLType == EndpointURLType.CUSTOM) { + ComponentFixture customEndpointURLJBRadioButton = remoteRobot.findAll(ComponentFixture.class, byXpath(XPathDefinitions.CUSTOM_ENDPOINT_URL_RADIO_BUTTON)).get(0); + customEndpointURLJBRadioButton.click(); + JTextFieldFixture customEndpointURLJTextField = remoteRobot.findAll(JTextFieldFixture.class, byXpath(XPathDefinitions.CUSTOM_ENDPOINT_URL_TEXT_FIELD)).get(0); + customEndpointURLJTextField.setText("https://code.quarkus.io"); + } + quarkusNewProjectFirstPage.setProjectSdkIfAvailable(javaVersion); + newProjectDialogWizard.next(); + + QuarkusNewProjectSecondPage quarkusNewProjectSecondPage = newProjectDialogWizard.find(QuarkusNewProjectSecondPage.class, Duration.ofSeconds(10)); + quarkusNewProjectSecondPage.setBuildTool(buildTool); + quarkusNewProjectSecondPage.setJavaVersion(javaVersion); + newProjectDialogWizard.next(); + + newProjectDialogWizard.find(QuarkusNewProjectThirdPage.class, Duration.ofSeconds(10)); // wait for third page to be loaded + newProjectDialogWizard.next(); + + QuarkusNewProjectFinalPage quarkusNewProjectFinalPage = newProjectDialogWizard.find(QuarkusNewProjectFinalPage.class, Duration.ofSeconds(10)); + quarkusNewProjectFinalPage.setProjectName(projectName); + String quarkusProjectLocation = ProjectLocation.PROJECT_LOCATION + File.separator + projectName; + Path quarkusProjectDir = Paths.get(quarkusProjectLocation); + boolean doesProjectDirExists = Files.exists(quarkusProjectDir); + if (!doesProjectDirExists) { + Files.createDirectories(quarkusProjectDir); // create project directory with project name to prevent "Directory does not exist. It will be created by Intellij. Create/Cancel" popup + } + quarkusNewProjectFinalPage.setProjectLocation(quarkusProjectLocation); + newProjectDialogWizard.finish(); + + IdeStatusBar ideStatusBar = remoteRobot.find(IdeStatusBar.class, Duration.ofSeconds(10)); + ideStatusBar.waitUntilAllBgTasksFinish(500); + } + } \ No newline at end of file diff --git a/src/it/java/org/jboss/tools/intellij/quarkus/tests/BasicTest.java b/src/it/java/org/jboss/tools/intellij/quarkus/tests/BasicTest.java deleted file mode 100644 index 611607ffb..000000000 --- a/src/it/java/org/jboss/tools/intellij/quarkus/tests/BasicTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2022 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at https://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package org.jboss.tools.intellij.quarkus.tests; - -import com.intellij.remoterobot.RemoteRobot; -import com.intellij.remoterobot.fixtures.ComponentFixture; -import com.intellij.remoterobot.fixtures.JTextFieldFixture; -import com.redhat.devtools.intellij.commonuitest.fixtures.dialogs.FlatWelcomeFrame; -import com.redhat.devtools.intellij.commonuitest.fixtures.dialogs.project.NewProjectDialogWizard; -import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.MainIdeWindow; -import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.idestatusbar.IdeStatusBar; -import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.BuildView; -import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.ToolWindowPane; -import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.buildtoolpane.GradleBuildToolPane; -import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.buildtoolpane.MavenBuildToolPane; -import com.redhat.devtools.intellij.commonuitest.utils.constants.ProjectLocation; -import com.redhat.devtools.intellij.commonuitest.utils.project.CreateCloseUtils; -import org.jboss.tools.intellij.quarkus.fixtures.dialogs.project.pages.QuarkusNewProjectFinalPage; -import org.jboss.tools.intellij.quarkus.fixtures.dialogs.project.pages.QuarkusNewProjectFirstPage; -import org.jboss.tools.intellij.quarkus.fixtures.dialogs.project.pages.QuarkusNewProjectSecondPage; -import org.jboss.tools.intellij.quarkus.fixtures.dialogs.project.pages.QuarkusNewProjectThirdPage; -import org.jboss.tools.intellij.quarkus.utils.BuildTool; -import org.jboss.tools.intellij.quarkus.utils.EndpointURLType; -import org.jboss.tools.intellij.quarkus.utils.XPathDefinitions; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Test; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.time.Duration; - -import static com.intellij.remoterobot.search.locators.Locators.byXpath; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Basic Quarkus tests - * - * @author zcervink@redhat.com - */ -public class BasicTest extends AbstractQuarkusTest { - private final String NEW_QUARKUS_MAVEN_PROJECT_NAME = "code-with-quarkus-maven"; - private final String NEW_QUARKUS_GRADLE_PROJECT_NAME = "code-with-quarkus-gradle"; - private final String JAVA_VERSION_FOR_QUARKUS_PROJECT = "17"; - - @AfterEach - public void finishTestRun() { - CreateCloseUtils.closeProject(remoteRobot); - FlatWelcomeFrame flatWelcomeFrame = remoteRobot.find(FlatWelcomeFrame.class, Duration.ofSeconds(10)); - flatWelcomeFrame.clearExceptions(); - flatWelcomeFrame.clearWorkspace(); - } - - @Test - public void createBuildQuarkusMavenTest() { - createQuarkusProject(remoteRobot, NEW_QUARKUS_MAVEN_PROJECT_NAME, BuildTool.MAVEN, EndpointURLType.DEFAULT); - ToolWindowPane toolWindowPane = remoteRobot.find(ToolWindowPane.class, Duration.ofSeconds(10)); - toolWindowPane.openMavenBuildToolPane(); - MavenBuildToolPane mavenBuildToolPane = toolWindowPane.find(MavenBuildToolPane.class, Duration.ofSeconds(10)); - mavenBuildToolPane.buildProject("verify"); - boolean isBuildSuccessful = toolWindowPane.find(BuildView.class, Duration.ofSeconds(10)).isBuildSuccessful(); - assertTrue(isBuildSuccessful, "The build should be successful but is not."); - } - - @Test - public void createBuildQuarkusGradleTest() { - createQuarkusProject(remoteRobot, NEW_QUARKUS_GRADLE_PROJECT_NAME, BuildTool.GRADLE, EndpointURLType.DEFAULT); - ToolWindowPane toolWindowPane = remoteRobot.find(ToolWindowPane.class, Duration.ofSeconds(10)); - toolWindowPane.openGradleBuildToolPane(); - GradleBuildToolPane gradleBuildToolPane = toolWindowPane.find(GradleBuildToolPane.class, Duration.ofSeconds(10)); - - gradleBuildToolPane.buildProject(); - - boolean isBuildSuccessful = toolWindowPane.find(BuildView.class, Duration.ofSeconds(10)).isBuildSuccessful(); - assertTrue(isBuildSuccessful, "The build should be successful but is not."); - } - - private void createQuarkusProject(RemoteRobot remoteRobot, String projectName, BuildTool buildTool, EndpointURLType endpointURLType) { - remoteRobot.find(FlatWelcomeFrame.class, Duration.ofSeconds(10)).createNewProject(); - NewProjectDialogWizard newProjectDialogWizard = remoteRobot.find(NewProjectDialogWizard.class, Duration.ofSeconds(10)); - QuarkusNewProjectFirstPage quarkusNewProjectFirstPage = newProjectDialogWizard.find(QuarkusNewProjectFirstPage.class, Duration.ofSeconds(10)); - quarkusNewProjectFirstPage.selectNewProjectType("Quarkus"); - if (endpointURLType == EndpointURLType.CUSTOM) { - ComponentFixture customEndpointURLJBRadioButton = remoteRobot.findAll(ComponentFixture.class, byXpath(XPathDefinitions.CUSTOM_ENDPOINT_URL_RADIO_BUTTON)).get(0); - customEndpointURLJBRadioButton.click(); - JTextFieldFixture customEndpointURLJTextField = remoteRobot.findAll(JTextFieldFixture.class, byXpath(XPathDefinitions.CUSTOM_ENDPOINT_URL_TEXT_FIELD)).get(0); - customEndpointURLJTextField.setText("https://code.quarkus.io"); - } - quarkusNewProjectFirstPage.setProjectSdkIfAvailable(JAVA_VERSION_FOR_QUARKUS_PROJECT); - newProjectDialogWizard.next(); - - QuarkusNewProjectSecondPage quarkusNewProjectSecondPage = newProjectDialogWizard.find(QuarkusNewProjectSecondPage.class, Duration.ofSeconds(10)); - quarkusNewProjectSecondPage.setBuildTool(buildTool); - quarkusNewProjectSecondPage.setJavaVersion(JAVA_VERSION_FOR_QUARKUS_PROJECT); - newProjectDialogWizard.next(); - - newProjectDialogWizard.find(QuarkusNewProjectThirdPage.class, Duration.ofSeconds(10)); // wait for third page to be loaded - newProjectDialogWizard.next(); - - QuarkusNewProjectFinalPage quarkusNewProjectFinalPage = newProjectDialogWizard.find(QuarkusNewProjectFinalPage.class, Duration.ofSeconds(10)); - quarkusNewProjectFinalPage.setProjectName(projectName); - String quarkusProjectLocation = ProjectLocation.PROJECT_LOCATION + File.separator + projectName; - Path quarkusProjectDir = Paths.get(quarkusProjectLocation); - boolean doesProjectDirExists = Files.exists(quarkusProjectDir); - if (!doesProjectDirExists) { - try { - Files.createDirectories(quarkusProjectDir); // create project directory with project name to prevent "Directory does not exist. It will be created by Intellij. Create/Cancel" popup - } catch (IOException e) { - throw new RuntimeException(e); - } - } - quarkusNewProjectFinalPage.setProjectLocation(quarkusProjectLocation); - newProjectDialogWizard.finish(); - - IdeStatusBar ideStatusBar = remoteRobot.find(IdeStatusBar.class, Duration.ofSeconds(10)); - ideStatusBar.waitUntilProjectImportIsComplete(); - ideStatusBar.waitUntilAllBgTasksFinish(); - - MainIdeWindow mainIdeWindow = remoteRobot.find(MainIdeWindow.class, Duration.ofSeconds(5)); - mainIdeWindow.maximizeIdeWindow(); - } - -} \ No newline at end of file diff --git a/src/it/java/org/jboss/tools/intellij/quarkus/tests/GradleTest.java b/src/it/java/org/jboss/tools/intellij/quarkus/tests/GradleTest.java new file mode 100644 index 000000000..052b77603 --- /dev/null +++ b/src/it/java/org/jboss/tools/intellij/quarkus/tests/GradleTest.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2022 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, + * and is available at https://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.intellij.quarkus.tests; + +import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.BuildView; +import com.redhat.devtools.intellij.commonuitest.utils.build.BuildUtils; +import org.jboss.tools.intellij.quarkus.utils.BuildTool; +import org.jboss.tools.intellij.quarkus.utils.EndpointURLType; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.Duration; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Basic Gradle Quarkus tests + */ +public class GradleTest extends AbstractQuarkusTest { + private static final String NEW_QUARKUS_GRADLE_PROJECT_NAME = "code-with-quarkus-gradle"; + private static final String NEW_QUARKUS_GRADLE_KOTLIN_PROJECT_NAME = "code-with-quarkus-gradle-kotlin"; + private static final String JAVA_VERSION = "17"; + + @Test + public void createBuildQuarkusGradleTest() throws IOException { + runTest(NEW_QUARKUS_GRADLE_PROJECT_NAME, BuildTool.GRADLE); + } + + @Test + public void createBuildQuarkusGradleKotlinTest() throws IOException { + runTest(NEW_QUARKUS_GRADLE_KOTLIN_PROJECT_NAME, BuildTool.GRADLE_WITH_KOTLIN); + } + + private void runTest(String projectName, BuildTool buildTool) throws IOException { + createQuarkusProject(remoteRobot, projectName, buildTool, EndpointURLType.DEFAULT, JAVA_VERSION); + BuildUtils.buildMavenProjectAndWaitForFinish(remoteRobot, projectName, "verify"); + BuildView buildView = remoteRobot.find(BuildView.class, Duration.ofSeconds(10)); + assertTrue(buildView.isBuildSuccessful(), "The build should be successful but is not."); + } + +} \ No newline at end of file diff --git a/src/it/java/org/jboss/tools/intellij/quarkus/tests/MavenTest.java b/src/it/java/org/jboss/tools/intellij/quarkus/tests/MavenTest.java new file mode 100644 index 000000000..53e632748 --- /dev/null +++ b/src/it/java/org/jboss/tools/intellij/quarkus/tests/MavenTest.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2022 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, + * and is available at https://www.eclipse.org/legal/epl-v20.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.intellij.quarkus.tests; + +import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.BuildView; +import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.ToolWindowPane; +import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.buildtoolpane.MavenBuildToolPane; +import org.jboss.tools.intellij.quarkus.utils.BuildTool; +import org.jboss.tools.intellij.quarkus.utils.EndpointURLType; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.time.Duration; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Basic Maven Quarkus tests + * + * @author zcervink@redhat.com + */ +public class MavenTest extends AbstractQuarkusTest { + private static final String NEW_QUARKUS_MAVEN_PROJECT_NAME = "code-with-quarkus-maven"; + private static final String JAVA_VERSION_FOR_QUARKUS_PROJECT = "17"; + + @Test + public void createBuildQuarkusMavenTest() throws IOException { + createQuarkusProject(remoteRobot, NEW_QUARKUS_MAVEN_PROJECT_NAME, BuildTool.MAVEN, EndpointURLType.DEFAULT, JAVA_VERSION_FOR_QUARKUS_PROJECT); + ToolWindowPane toolWindowPane = remoteRobot.find(ToolWindowPane.class, Duration.ofSeconds(10)); + toolWindowPane.openMavenBuildToolPane(); + MavenBuildToolPane mavenBuildToolPane = toolWindowPane.find(MavenBuildToolPane.class, Duration.ofSeconds(10)); + mavenBuildToolPane.buildProject("verify", "code-with-quarkus"); + BuildView buildView = remoteRobot.find(BuildView.class, Duration.ofSeconds(10)); + buildView.waitUntilBuildHasFinished(); + assertTrue(buildView.isBuildSuccessful(), "The build should be successful but is not."); + } + + +} \ No newline at end of file diff --git a/src/it/java/org/jboss/tools/intellij/quarkus/utils/BuildTool.java b/src/it/java/org/jboss/tools/intellij/quarkus/utils/BuildTool.java index ff71f5a97..40e415da7 100644 --- a/src/it/java/org/jboss/tools/intellij/quarkus/utils/BuildTool.java +++ b/src/it/java/org/jboss/tools/intellij/quarkus/utils/BuildTool.java @@ -18,9 +18,10 @@ */ public enum BuildTool { MAVEN("Maven"), - GRADLE("Gradle"); + GRADLE("Gradle"), + GRADLE_WITH_KOTLIN("Gradle with Kotlin DSL"),; - private String textRepresentation; + private final String textRepresentation; BuildTool(String textRepresentation) { this.textRepresentation = textRepresentation; diff --git a/src/it/java/org/jboss/tools/intellij/quarkus/utils/XPathDefinitions.java b/src/it/java/org/jboss/tools/intellij/quarkus/utils/XPathDefinitions.java index fc3522309..45caccfaa 100644 --- a/src/it/java/org/jboss/tools/intellij/quarkus/utils/XPathDefinitions.java +++ b/src/it/java/org/jboss/tools/intellij/quarkus/utils/XPathDefinitions.java @@ -34,4 +34,5 @@ public class XPathDefinitions { @Language("XPath") public static final String PROJECT_SDK_COMBOBOX_PROJECT_WIZARD = "//div[@class='JdkComboBox']"; + private XPathDefinitions() {} }