Skip to content

Commit f9cd413

Browse files
committed
chore: fix integration tests
Signed-off-by: Stephane Bouchet <[email protected]>
1 parent dcf0bb5 commit f9cd413

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ public void setProjectSdkIfAvailable(String targetSdkName) {
167167
String label = foundItems.values().stream().findFirst().get();
168168
System.out.println("About to click on "+label);
169169
projectSdkList.jList().clickItem(label, true);
170+
ScreenshotUtils.takeScreenshot(remoteRobot, "After click on "+ label);
170171
} else {
171172
System.out.println("No SDK found starting with "+targetSdkName);
172173
ScreenshotUtils.takeScreenshot(remoteRobot);

src/main/java/com/redhat/devtools/intellij/commonuitest/utils/texttranformation/TextUtils.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.redhat.devtools.intellij.commonuitest.exceptions.UITestException;
1515

1616
import java.util.List;
17+
import java.util.stream.Collectors;
1718

1819
/**
1920
* Static utilities that assist and simplify data conversion and transformation
@@ -32,11 +33,9 @@ private TextUtils() {
3233
* @return String containing a concatenation of all the labels in the 'data' List
3334
*/
3435
public static String listOfRemoteTextToString(List<RemoteText> data) {
35-
List<String> listOfStrings = data
36+
return data
3637
.stream()
3738
.map(RemoteText::getText)
38-
.toList();
39-
40-
return String.join("", listOfStrings);
39+
.collect(Collectors.joining(" "));
4140
}
4241
}

src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ private void setProjectSDKVersion(String version) {
354354
String currentlySelectedProjectSdk = listOfRemoteTextToString(projectJdkComboBox.findAllText());
355355
Optional<String> optional = Arrays.stream(currentlySelectedProjectSdk.split(" ")).filter(s ->
356356
s.startsWith(version)).findFirst();
357-
assertTrue(optional.isPresent(), "Selected project SDK should be Java 11 but is '" + currentlySelectedProjectSdk + "'");
357+
assertTrue(optional.isPresent(), "Selected project SDK should be Java " + version + " but is '" + currentlySelectedProjectSdk + "'");
358358
}
359359

360360
@Test

0 commit comments

Comments
 (0)