Skip to content

Commit 5b1d584

Browse files
Merge intellij-2025.3-support feature branch into main (#1478)
* Add intellij-2025.3-support branch to CI workflow * Update Gradle and IntelliJ plugin versions * Update IntelliJ platform version * Update IntelliJ platform and build versions * change to macos 14 (#1452) * eap prompt (#1453) * Downgrade platform version (#1455) * Run the UI tests as groups to prevent timeout error. (#1456) * test breakdown * clearer names * Update build.yaml * Update run.sh Update run.sh * Updated accessibleName of files in the UI tests (#1461) * Update SingleModLibertyLSTestCommon.java * Update SingleModMPLSTestCommon.java * Update SingleModMPProjectTestCommon.java * Update UIBotTestUtils.java * copyright year update * editor tab name change revert * modified equals() to startsWith() * Update SingleModLibertyLSTestCommon.java * Update SingleModLibertyLSTestCommon.java * modified to use starts-with() * Update SingleModLibertyLSTestCommon.java Revert "Update SingleModLibertyLSTestCommon.java" This reverts commit e678a1a. Update SingleModMPLSTestCommon.java * remove intellij-2025.3-support from yaml file (#1476)
1 parent 715eab2 commit 5b1d584

File tree

7 files changed

+69
-20
lines changed

7 files changed

+69
-20
lines changed

.github/workflows/build.yaml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,25 +93,61 @@ jobs:
9393
build:
9494
needs: fetch_merge_commit_sha_from_lsp4ij_PR
9595
runs-on: ${{ matrix.os }}
96+
name: ${{ matrix.runtime }} - ${{ matrix.test-group }}
9697
strategy:
9798
fail-fast: false
9899
matrix:
99100
runtime: [ linux, mac, windows ]
101+
test-group: [ LSP4Jakarta-Unit, Maven-MicroProfile, Gradle-MicroProfile, Maven-Custom-Liberty-Install, Gradle-Custom-Liberty-Install, Maven-MP-Config, Gradle-MP-Config, Maven-MP-SID, Gradle-MP-SID, Maven-NLT-REST, Gradle-NLT-REST, Gradle-Language-Server, Gradle-MP-Language-Server, Gradle-Jakarta-Language-Server, Maven-Multi-Module-MP ]
102+
exclude:
103+
# Exclude LSP4Jakarta-Unit from mac and windows - only run on linux
104+
- runtime: mac
105+
test-group: LSP4Jakarta-Unit
106+
- runtime: windows
107+
test-group: LSP4Jakarta-Unit
100108
include:
101109
- runtime: linux
102110
os: ubuntu-latest
103-
reportName: linux-test-report
104111
- runtime: mac
105-
os: macOS-latest
106-
reportName: mac-test-report
112+
os: macOS-14
107113
- runtime: windows
108114
os: windows-latest
109-
reportName: windows-test-report
115+
- test-group: Maven-MicroProfile
116+
test-class: io.openliberty.tools.intellij.it.MavenSingleModMPProjectTest
117+
- test-group: Gradle-MicroProfile
118+
test-class: io.openliberty.tools.intellij.it.GradleSingleModMPProjectTest
119+
- test-group: Maven-Custom-Liberty-Install
120+
test-class: io.openliberty.tools.intellij.it.MavenSingleModCustomWLPInstallProjectTest
121+
- test-group: Gradle-Custom-Liberty-Install
122+
test-class: io.openliberty.tools.intellij.it.GradleSingleModCustomWLPInstallProjectTest
123+
- test-group: Maven-MP-Config
124+
test-class: io.openliberty.tools.intellij.it.MavenSingleModMPCfgProjectTest
125+
- test-group: Gradle-MP-Config
126+
test-class: io.openliberty.tools.intellij.it.GradleSingleModMPCfgProjectTest
127+
- test-group: Maven-MP-SID
128+
test-class: io.openliberty.tools.intellij.it.MavenSingleModMPSIDProjectTest
129+
- test-group: Gradle-MP-SID
130+
test-class: io.openliberty.tools.intellij.it.GradleSingleModMPSIDProjectTest
131+
- test-group: Maven-NLT-REST
132+
test-class: io.openliberty.tools.intellij.it.MavenSingleModNLTRestProjectTest
133+
- test-group: Gradle-NLT-REST
134+
test-class: io.openliberty.tools.intellij.it.GradleSingleModNLTRestProjectTest
135+
- test-group: Gradle-Language-Server
136+
test-class: io.openliberty.tools.intellij.it.GradleSingleModLSTest
137+
- test-group: Gradle-MP-Language-Server
138+
test-class: io.openliberty.tools.intellij.it.GradleSingleModMPLSTest
139+
- test-group: Gradle-Jakarta-Language-Server
140+
test-class: io.openliberty.tools.intellij.it.GradleSingleModJakartaLSTest
141+
- test-group: Maven-Multi-Module-MP
142+
test-class: io.openliberty.tools.intellij.it.MavenMPMultipleProjectTest
143+
- test-group: LSP4Jakarta-Unit
144+
test-class: "io.openliberty.tools.intellij.lsp4jakarta.it.*"
110145
env:
111146
USE_LOCAL_PLUGIN: ${{ inputs.useLocalPlugin || false }}
112147
REF_LSP4IJ: ${{ needs.fetch_merge_commit_sha_from_lsp4ij_PR.outputs.pr_details }}
113148
LSP4IJ_BRANCH: ${{ needs.fetch_merge_commit_sha_from_lsp4ij_PR.outputs.checkout_name }}
114149
REF_LTI_TAG: ${{ inputs.refLTITag }}
150+
TEST_CLASS: ${{ matrix.test-class }}
115151
steps:
116152
- name: Configure pagefile
117153
if: contains(matrix.os, 'windows')
@@ -152,7 +188,7 @@ jobs:
152188
working-directory: ./liberty-tools-intellij
153189
run: bash ./gradlew buildPlugin -PuseLocal=${{ env.USE_LOCAL_PLUGIN }}
154190
- name: 'Archive artifacts'
155-
if: ${{ runner.os == 'Linux' && !failure() }}
191+
if: ${{ runner.os == 'Linux' && matrix.test-group == 'LSP4Jakarta-Unit' && !failure() }}
156192
uses: actions/[email protected]
157193
with:
158194
name: liberty-tools-intellij-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH || 'default' }}
@@ -161,14 +197,14 @@ jobs:
161197
./**/libs/*liberty-tools-intellij*.jar
162198
if-no-files-found: warn
163199
retention-days: 7
164-
- name: 'Run UI integration tests'
200+
- name: 'Run tests'
165201
id: run_tests
166202
working-directory: ./liberty-tools-intellij
167203
run: bash ./src/test/resources/ci/scripts/run.sh
168204
- name: 'Archive Test logs and reports'
169205
if: ${{ failure() && steps.run_tests.conclusion == 'failure' }}
170206
uses: actions/[email protected]
171207
with:
172-
name: ${{ matrix.reportName }}-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH || 'default' }}
208+
name: ${{ matrix.runtime }}-${{ matrix.test-group }}-test-report-LTI-${{ env.REF_LTI_TAG || 'default' }}-LSP4IJ-${{ env.LSP4IJ_BRANCH || 'default' }}
173209
path: |
174210
liberty-tools-intellij/build/reports/

build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
44
plugins {
55
id 'java'
6-
id 'org.jetbrains.intellij.platform' version '2.7.2'
6+
id 'org.jetbrains.intellij.platform' version '2.10.1'
77
id 'org.jetbrains.kotlin.jvm' version '2.0.20'
88
}
99

@@ -178,7 +178,7 @@ task copyDeps(type: Copy) {
178178
intellijPlatformTesting.runIde {
179179
runIdeLocally {
180180
version = providers.gradleProperty("ideTargetVersion")
181-
type = IntelliJPlatformType.IntellijIdeaCommunity
181+
type = IntelliJPlatformType.IntellijIdea
182182
task {
183183
jvmArgumentProviders.add({
184184
[
@@ -203,7 +203,7 @@ test {
203203
intellijPlatformTesting.runIde {
204204
runIdeForUiTests {
205205
version = providers.gradleProperty("ideTargetVersion")
206-
type = IntelliJPlatformType.IntellijIdeaCommunity
206+
type = IntelliJPlatformType.IntellijIdea
207207
task {
208208
jvmArgumentProviders.add({
209209
[
@@ -216,6 +216,8 @@ intellijPlatformTesting.runIde {
216216
"-Dide.mac.file.chooser.native=false",
217217
"-DjbScreenMenuBar.enabled=false",
218218
"-Dapple.laf.useScreenMenuBar=false",
219+
// This disables the EAP login prompt:
220+
"-Deap.require.license=release"
219221
]
220222
} as CommandLineArgumentProvider)
221223
systemProperty("ide.native.launcher", "true")

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
useLocal=false
22
pluginSinceBuild=243
3-
pluginUntilBuild=252.*
3+
pluginUntilBuild=253.*
44

55
javaVersion=21
66

77
# Target IntelliJ Community by default
8-
platformType=IC
8+
platformType=IU
99
platformVersion=2024.3.6
10-
ideTargetVersion=2025.2.1
10+
ideTargetVersion=253.27864.23
1111

1212
# Example: platformBundledPlugins = com.intellij.java
1313
platformBundledPlugins=com.intellij.java, org.jetbrains.idea.maven, com.intellij.gradle, org.jetbrains.plugins.terminal, com.intellij.properties

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ public static void clickOnFileTab(RemoteRobot remoteRobot, String fileName) {
744744
ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofSeconds(10));
745745

746746
try {
747-
String xPath = "//div[@accessiblename='" + fileName + "' and @class='EditorTabLabel']";
747+
String xPath = "//div[starts-with(@accessiblename, '" + fileName + "') and @class='EditorTabLabel']";
748748
ComponentFixture actionButton = projectFrame.getActionButton(xPath, "10");
749749
actionButton.click();
750750

@@ -780,7 +780,7 @@ public static void hoverInAppServerCfgFile(RemoteRobot remoteRobot, String hover
780780
// Find the target text on the editor and move the move to it.
781781
editorNew.findText(contains(hoverTarget)).moveMouse();
782782
// clear and "lightbulb" icons?
783-
if (!hoverFile.equals("server.xml")) {
783+
if (!hoverFile.startsWith("server.xml")) {
784784
keyboard.hotKey(VK_ESCAPE);
785785
}
786786

@@ -2069,6 +2069,11 @@ public static void createLibertyConfiguration(RemoteRobot remoteRobot, String cf
20692069
ActionButtonFixture addCfgButton = addProjectDialog.actionButton(addButtonLocator);
20702070
addCfgButton.click();
20712071

2072+
// Click on the Collapse All button.
2073+
Locator collapseButtonLocator = byXpath("//div[@accessiblename='Collapse All']");
2074+
ActionButtonFixture collapseButton = addProjectDialog.actionButton(collapseButtonLocator);
2075+
collapseButton.click();
2076+
20722077
// Look for the Liberty entry in the Add New configuration window and create a new configuration.
20732078
ComponentFixture pluginCfgTree = addProjectDialog.getMyTree();
20742079
RepeatUtilsKt.waitFor(Duration.ofSeconds(10),
@@ -2400,7 +2405,7 @@ public static void selectConfigUsingMenu(RemoteRobot remoteRobot, String cfgName
24002405
public static void runConfigUsingIconOnToolbar(RemoteRobot remoteRobot, ExecMode execMode) {
24012406
ProjectFrameFixture projectFrame = remoteRobot.find(ProjectFrameFixture.class, Duration.ofSeconds(10));
24022407

2403-
Locator locator = byXpath("//div[@class='ActionButton' and @myaction='Run (Run selected configuration)']");
2408+
Locator locator = byXpath("//div[@class='ActionButton' and @myaction='Run (Run the selected configuration)']");
24042409
if (execMode == ExecMode.DEBUG) {
24052410
locator = byXpath("//div[@class='ActionButton' and @myicon='debug.svg']");
24062411
}

src/test/java/io/openliberty/tools/intellij/it/fixtures/ProjectFrameFixture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public static void clickMenuOption(ProjectFrameFixture projectFrame, String text
251251
public ComponentFixture getInplaceButton(String... xpathVars) {
252252
String name = xpathVars[0];
253253
String waitTime = xpathVars[1];
254-
Locator locator = byXpath("//div[@accessiblename='" + name + "' and @class='EditorTabLabel']//div[@class='InplaceButton']");
254+
Locator locator = byXpath("//div[starts-with(@accessiblename, '" + name + "') and @class='EditorTabLabel']//div[@class='InplaceButton']");
255255
return find(ComponentFixture.class, locator, Duration.ofSeconds(Integer.parseInt(waitTime)));
256256
}
257257

src/test/resources/ci/scripts/run.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,15 @@ main() {
258258
for restartCount in {1..5}; do
259259
startIDE
260260
# Run the tests
261-
echo -e "\n$(${currentTime[@]}): INFO: Running tests..."
262261
set -o pipefail # using tee requires we use this setting to gather the rc of gradlew
263-
./gradlew test -PuseLocal=$USE_LOCAL_PLUGIN | tee "$JUNIT_OUTPUT_TXT"
262+
if [ -n "$TEST_CLASS" ]; then
263+
echo -e "\n$(${currentTime[@]}): INFO: Running specific test class: $TEST_CLASS"
264+
test_args=(--tests "$TEST_CLASS")
265+
else
266+
echo -e "\n$(${currentTime[@]}): INFO: Running all tests..."
267+
test_args=()
268+
fi
269+
./gradlew test "${test_args[@]}" -PuseLocal="$USE_LOCAL_PLUGIN" | tee "$JUNIT_OUTPUT_TXT"
264270
testRC=$? # gradlew test only returns 0 or 1, not the return code from JUnit
265271
set +o pipefail # reset this option
266272
grep -i "SocketTimeoutException" "$JUNIT_OUTPUT_TXT" && testRC=23

0 commit comments

Comments
 (0)