Skip to content

chore: bump common-ui-tests to 0.4.5-SNAPSHOT #1453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f6d2f07
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet May 12, 2025
a72ff61
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 10, 2025
3b28ddb
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 23, 2025
53a7725
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 24, 2025
190e34a
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 24, 2025
a4190a9
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 24, 2025
042b4b3
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 25, 2025
ad84775
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 25, 2025
400fc6c
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 25, 2025
d8159a9
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 25, 2025
b9c4c1d
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 25, 2025
7d85126
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 25, 2025
985a22a
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 25, 2025
fc2eb2c
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
aef1a4d
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
f64eb38
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
0f4030b
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
91867d5
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
e46a29c
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
882b95d
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
77415b1
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
3ca03d2
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
8c8549f
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 26, 2025
508929c
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
1ce2a18
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
87e23da
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
e805a6a
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
9c5ab41
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
9836d35
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
0098bcc
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
0109f2d
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
a5b3e7f
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 27, 2025
ffe3d86
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jun 30, 2025
3659e3e
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jul 4, 2025
e532df1
chore: bump common-ui-tests to 0.4.5-SNAPSHOT
sbouchet Jul 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/itests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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=<!--999.999-->",
"-Djb.consents.confirmation.enabled=false",
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand All @@ -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());

Expand All @@ -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);
}

}
133 changes: 0 additions & 133 deletions src/it/java/org/jboss/tools/intellij/quarkus/tests/BasicTest.java

This file was deleted.

49 changes: 49 additions & 0 deletions src/it/java/org/jboss/tools/intellij/quarkus/tests/GradleTest.java
Original file line number Diff line number Diff line change
@@ -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.");
}

}
Loading
Loading