Skip to content

Commit 9c7daad

Browse files
committed
chore: fix integration tests
Signed-off-by: Stephane Bouchet <[email protected]>
1 parent 44ee1a3 commit 9c7daad

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
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
@@ -148,6 +148,7 @@ public void setProjectSdkIfAvailable(String targetSdkName) {
148148
try {
149149
waitFor(Duration.ofSeconds(10), Duration.ofMillis(250), "HeavyWeightWindow still visible.", this::noHeavyWeightWindowVisible);
150150
} catch (WaitForConditionTimeoutException e) {
151+
ScreenshotUtils.takeScreenshot(remoteRobot, "HeavyWeightWindow still visible." + targetSdkName);
151152
popupOpenedPermanently = true;
152153
}
153154
if (!popupOpenedPermanently) {

src/main/java/com/redhat/devtools/intellij/commonuitest/utils/screenshot/ScreenshotUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static File takeScreenshot(RemoteRobot remoteRobot, String comment) {
5555
Files.createDirectory(path);
5656
}
5757
String screenshotFilename = getTimeNow();
58-
String screenshotComment = comment == null || comment.isEmpty() ? "" : "_" + comment;
58+
String screenshotComment = comment == null || comment.isEmpty() ? "" : "_" + comment.replace(" ", "_");
5959
String screenshotPathname = SCREENSHOT_LOCATION + screenshotFilename + screenshotComment + "." + FILETYPE;
6060
File screenshotFile = new File(screenshotPathname);
6161
ImageIO.write(screenshotBufferedImage, FILETYPE, screenshotFile);

0 commit comments

Comments
 (0)