File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs
test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test
mainidewindow/idestatusbar Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 2222import com .redhat .devtools .intellij .commonuitest .fixtures .dialogs .settings .pages .NotificationsPage ;
2323import com .redhat .devtools .intellij .commonuitest .utils .constants .ButtonLabels ;
2424import com .redhat .devtools .intellij .commonuitest .utils .constants .XPathDefinitions ;
25+ import com .redhat .devtools .intellij .commonuitest .utils .project .CreateCloseUtils ;
2526import com .redhat .devtools .intellij .commonuitest .utils .runner .IntelliJVersion ;
2627import com .redhat .devtools .intellij .commonuitest .utils .steps .SharedSteps ;
2728import org .apache .commons .io .FileUtils ;
@@ -100,12 +101,12 @@ public void clickOnLink(String label) {
100101 public void clearWorkspace () {
101102 // Remove projects on disk
102103 try {
103- String pathToDirToMakeEmpty = System . getProperty ( "user.home" ) + File . separator + "IdeaProjects" ;
104+ String pathToDirToMakeEmpty = CreateCloseUtils . PROJECT_LOCATION ;
104105 boolean doesProjectDirExists = Files .exists (Paths .get (pathToDirToMakeEmpty ));
105106 if (doesProjectDirExists ) {
106107 FileUtils .cleanDirectory (new File (pathToDirToMakeEmpty ));
107108 } else {
108- Files .createDirectory (Paths .get (pathToDirToMakeEmpty ));
109+ Files .createDirectories (Paths .get (pathToDirToMakeEmpty ));
109110 }
110111 } catch (IOException e ) {
111112 LOGGER .log (Level .SEVERE , e .getMessage (), e );
Original file line number Diff line number Diff line change @@ -45,7 +45,9 @@ public static void prepareProject() {
4545
4646 if (UITestRunner .getIdeaVersionInt () >= 20221 ) {
4747 newProjectFirstPage .selectNewProjectType ("New Project" );
48+ newProjectFirstPage .getProjectNameTextField ().click (); // Click to gain focus on newProjectFirstPage
4849 newProjectFirstPage .setProjectName (PROJECT_NAME );
50+ newProjectFirstPage .setProjectLocation (CreateCloseUtils .PROJECT_LOCATION );
4951 newProjectFirstPage .setLanguage ("Java" );
5052 newProjectFirstPage .setBuildSystem ("IntelliJ" );
5153 newProjectFirstPage .setProjectSdkIfAvailable ("11" );
Original file line number Diff line number Diff line change @@ -50,7 +50,10 @@ public void prepareProject() {
5050 NewProjectFirstPage newProjectFirstPage = newProjectDialogWizard .find (NewProjectFirstPage .class , Duration .ofSeconds (10 ));
5151
5252 if (UITestRunner .getIdeaVersionInt () >= 20221 ) {
53+ newProjectFirstPage .selectNewProjectType ("New Project" );
54+ newProjectFirstPage .getProjectNameTextField ().click (); // Click to gain focus on newProjectFirstPage
5355 newProjectFirstPage .setProjectName (PROJECT_NAME );
56+ newProjectFirstPage .setProjectLocation (CreateCloseUtils .PROJECT_LOCATION );
5457 newProjectFirstPage .selectNewProjectType ("New Project" );
5558 newProjectFirstPage .setBuildSystem ("Maven" );
5659 } else {
You can’t perform that action at this time.
0 commit comments