Skip to content

Commit

Permalink
fix: Maven & Gradle tool windows wouldnt close on Intellij 2023.2
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Szuc <[email protected]>
  • Loading branch information
martinszuc committed Jan 23, 2024
1 parent df72496 commit 44e7c2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public void closeGradleBuildToolPane() {
public JButtonFixture stripeButton(String label, boolean isPaneOpened) {
if (isPaneOpened) {
if (label.equals(ButtonLabels.MAVEN_STRIPE_BUTTON_LABEL) || label.equals(ButtonLabels.GRADLE_STRIPE_BUTTON_LABEL)) {
return button(byXpath(XPathDefinitions.toolWindowSvg(label)), Duration.ofSeconds(2));
if (UITestRunner.getIdeaVersionInt() >= 20232) {
return button(byXpath(XPathDefinitions.toolWindowButton(label)), Duration.ofSeconds(2));
} else {
return button(byXpath(XPathDefinitions.toolWindowSvg(label)), Duration.ofSeconds(2));
}
} else if (label.equals(ButtonLabels.PROJECT_STRIPE_BUTTON_LABEL)) {
return button(byXpath(XPathDefinitions.TOOLTIP_TEXT_PROJECT), Duration.ofSeconds(2));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,8 @@ public static String nonOpaquePanel(String label) {
public static String toolWindowSvg(String label) {
return "//div[@disabledicon='toolWindow" + label + ".svg']";
}

public static String toolWindowButton(String label) {
return "//div[@tooltiptext='" + label + "']";
}
}

0 comments on commit 44e7c2a

Please sign in to comment.