Skip to content

Commit

Permalink
Changed quarkus project location due to updates in test-library 0.4.2
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Korniienko <[email protected]>
  • Loading branch information
olkornii authored and angelozerr committed Oct 22, 2024
1 parent db1d488 commit fec9bb1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/it/java/org/jboss/tools/intellij/quarkus/tests/BasicTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
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;
Expand Down Expand Up @@ -115,6 +121,20 @@ private void createQuarkusProject(RemoteRobot remoteRobot, String projectName, B

QuarkusNewProjectFinalPage quarkusNewProjectFinalPage = newProjectDialogWizard.find(QuarkusNewProjectFinalPage.class, Duration.ofSeconds(10));
quarkusNewProjectFinalPage.setProjectName(projectName);

String QUARKUS_PROJECT_LOCATION = CreateCloseUtils.PROJECT_LOCATION + File.separator + projectName;
Path quarkusProjectDir = Paths.get(QUARKUS_PROJECT_LOCATION);
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(QUARKUS_PROJECT_LOCATION);

newProjectDialogWizard.finish();

minimizeProjectImportPopupIfItAppears();
Expand Down

0 comments on commit fec9bb1

Please sign in to comment.