Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public void collapseAll() {
*
* @param goal name of the Lifecycle goal you want to invoke (clean, validate, compile, test, package, verify, install, site, deploy)
*/
public void buildProject(String goal) {
public void buildProject(String goal, String projectName) {
waitFor(Duration.ofSeconds(30), Duration.ofSeconds(2), "The Maven target tree did not appear in 30 seconds.", this::isMavenTreeVisible);
JTreeFixture tree = mavenTargetTree();
// below workaround due to https://github.com/JetBrains/intellij-ui-test-robot/issues/459
tree.doubleClickRow(0); // expand root
tree.doubleClickRowWithText(projectName, true); // expand root
tree.doubleClickRowWithText("Lifecycle" ,true); // expand Lifecycle
tree.doubleClickRowWithText(goal,true);
if (ideaVersionInt >= 20221) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void closeCurrentProject() {
@Test
void waitForSuccessfulBuildTest() {
toolWinPane.openMavenBuildToolPane();
toolWinPane.find(MavenBuildToolPane.class, Duration.ofSeconds(10)).buildProject("verify");
toolWinPane.find(MavenBuildToolPane.class, Duration.ofSeconds(10)).buildProject("verify", PROJECT_NAME);
BuildView buildView = toolWinPane.find(BuildView.class, Duration.ofSeconds(10));
buildView.waitUntilBuildHasFinished();
assertTrue(buildView.isBuildSuccessful(), "The build should be successful but is not.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ void createToolWindowsPaneFixture() {
void mavenBuildTest() {
toolWinPane.openMavenBuildToolPane();
MavenBuildToolPane mavenBuildToolPane = toolWinPane.find(MavenBuildToolPane.class, Duration.ofSeconds(10));
mavenBuildToolPane.buildProject("verify");
mavenBuildToolPane.buildProject("verify", PROJECT_NAME);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void closeCurrentProject() {

@Test
void buildProjectTest() {
mavenBuildToolPane.buildProject("verify");
mavenBuildToolPane.buildProject("verify", PROJECT_NAME);
boolean isBuildSuccessful = toolWinPane.find(BuildView.class, Duration.ofSeconds(10)).isBuildSuccessful();
assertTrue(isBuildSuccessful, "The build should be successful but is not.");
}
Expand Down
Loading