diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b965b4a..4d6b2855 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: with: name: dependency-reports path: build/reports/dependency-verification/* - if: always() + if: failure() run_on_linux: runs-on: ubuntu-latest diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e2bf8fcc..48547c5a 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,9 +1,11 @@ -name: Validate +name: Validate against IJ versions + on: - workflow_run: - workflows: [Java CI with Gradle] - types: - - completed + push: + branches: [ main ] + pull_request: + branches: [ main ] + jobs: validate_versions: runs-on: ubuntu-latest diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java index 2dd666cf..35d0a19e 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/UITestRunner.java @@ -33,9 +33,9 @@ import java.util.logging.Level; import java.util.logging.Logger; +import static com.intellij.remoterobot.search.locators.Locators.byXpath; import static com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step; import static com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor; -import static com.intellij.remoterobot.search.locators.Locators.byXpath; /** * Basic methods for starting and quiting the IntelliJ Idea IDE for UI tests @@ -49,41 +49,39 @@ public class UITestRunner { private static final Logger LOGGER = Logger.getLogger(UITestRunner.class.getName()); private static final String OS_NAME = System.getProperty("os.name").toLowerCase(); private static final String USER_HOME = System.getProperty("user.home"); - private static RemoteRobot remoteRobot = null; - private static Process ideProcess; - private static IntelliJVersion ideaVersion; private static final String NEW_ITEM_PROPERTY = "New-ItemProperty"; private static final String NAME_PARAM = "-Name"; private static final String VALUE_PARAM = "-Value"; + private static RemoteRobot remoteRobot = null; + private static Process ideProcess; + private static IntelliJVersion ideaVersion; private UITestRunner() {} /** * Start the given version of IntelliJ Idea listening on the given port * - * @param ideaVersion version of the IntelliJ Idea to start - * @param port port number on which will the IntelliJ Idea be listening + * @param ideaVersionUnderTest version of the IntelliJ Idea to start + * @param port port number on which will the IntelliJ Idea be listening * @return instance of the RemoteRobot */ - public static RemoteRobot runIde(IntelliJVersion ideaVersion, int port) { + public static RemoteRobot runIde(IntelliJVersion ideaVersionUnderTest, int port) { StepWorker.registerProcessor(new StepLogger()); + ideaVersion = ideaVersionUnderTest; + if (ideaVersionUnderTest.equals(IntelliJVersion.UNSUPPORTED)) { + LOGGER.severe("Cannot run Idea. Version is unsupported"); + return null; + } - return step("Start IntelliJ Idea ('" + ideaVersion.toString() + "') listening on port " + port, () -> { + return step("Start IntelliJ Idea ('" + ideaVersion + "') listening on port " + port, () -> { System.setProperty("uitestlib.idea.version", Integer.toString(ideaVersion.toInt())); - UITestRunner.ideaVersion = ideaVersion; acceptAllTermsAndConditions(); String fileExtension = OS_NAME.contains("windows") ? ".bat" : ""; - String[] platformTypeVersion = generatePlatformTypeVersion(); - - ProcessBuilder pb; + String platformVersion = generatePlatformVersion(); - if (ideaVersion.toInt() < 20242) { - pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-PideaVersion=" + platformTypeVersion[1], "-Drobot-server.port=" + port); - } else { - pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-Drobot-server.port=" + port, "-PplatformType=" + platformTypeVersion[0], "-PplatformVersion=" + platformTypeVersion[1]); - } + ProcessBuilder pb = new ProcessBuilder("." + File.separator + "gradlew" + fileExtension, "runIdeForUiTests", "-PideaVersion=" + platformVersion, "-Drobot-server.port=" + port); boolean isDebugOn = Boolean.parseBoolean(System.getProperty("intellij_debug", "false")); // For more info on intellij_debug please check README if (isDebugOn) { redirectProcessOutputs(pb); @@ -154,7 +152,7 @@ public static RemoteRobot getRemoteRobot() { public static RemoteRobot getRemoteRobotConnection(int port) { return step("Create an instance of the RemoteRobot listening on port " + port, () -> { RemoteRobot remoteRobot = new RemoteRobot("http://127.0.0.1:" + port); - SharedSteps.waitForComponentByXpath(remoteRobot,30, 200, byXpath(XPathDefinitions.FLAT_WELCOME_FRAME)); + SharedSteps.waitForComponentByXpath(remoteRobot, 30, 200, byXpath(XPathDefinitions.FLAT_WELCOME_FRAME)); return remoteRobot; }); } @@ -311,15 +309,15 @@ private static void redirectProcessOutputs(ProcessBuilder pb) { } /** - * Generate platformType and platformVersion based on ideaVersion + * Generate platformVersion based on complete ideaVersion * - * @return platformTypeVersion string array + * @return platformVersion */ - private static String[] generatePlatformTypeVersion() { + private static String generatePlatformVersion() { String[] platformTypeVersion = ideaVersion.toString().split("-", 2); if (2 > platformTypeVersion.length) { throw new UITestException("ideaVersion is not recognized."); } - return platformTypeVersion; + return platformTypeVersion[1]; } } diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/information/CodeWithMeDialog.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/information/CodeWithMeDialog.java index 8907ca56..49e0a9f9 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/information/CodeWithMeDialog.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/information/CodeWithMeDialog.java @@ -16,6 +16,7 @@ import com.intellij.remoterobot.fixtures.DefaultXpath; import com.intellij.remoterobot.fixtures.FixtureName; import com.intellij.remoterobot.utils.WaitForConditionTimeoutException; +import com.redhat.devtools.intellij.commonuitest.UITestRunner; import com.redhat.devtools.intellij.commonuitest.utils.constants.ButtonLabels; import com.redhat.devtools.intellij.commonuitest.utils.constants.XPathDefinitions; import org.jetbrains.annotations.NotNull; @@ -24,6 +25,8 @@ import java.util.logging.Level; import java.util.logging.Logger; +import static com.intellij.remoterobot.search.locators.Locators.byXpath; + /** * Code With Me dialog fixture * @@ -45,8 +48,13 @@ public CodeWithMeDialog(@NotNull RemoteRobot remoteRobot, @NotNull RemoteCompone */ public static void closeCodeWithMePopupIfItAppears(RemoteRobot remoteRobot) { CodeWithMeDialog codeWithMeDialog; + int ideaVersionInt = UITestRunner.getIdeaVersionInt(); try { - codeWithMeDialog = remoteRobot.find(CodeWithMeDialog.class, Duration.ofSeconds(10)); + if (ideaVersionInt <= 20231) { + codeWithMeDialog = remoteRobot.find(CodeWithMeDialog.class, byXpath("//div[@class='Wrapper']//div[@class='JPanel']"), Duration.ofSeconds(10)); + } else { + codeWithMeDialog = remoteRobot.find(CodeWithMeDialog.class, Duration.ofSeconds(10)); + } } catch (WaitForConditionTimeoutException e) { LOGGER.log(Level.INFO, "Code With Me popup not found, nothing to close."); return; diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/navigation/SearchEverywherePopup.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/navigation/SearchEverywherePopup.java index 3c755894..e5750b96 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/navigation/SearchEverywherePopup.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/navigation/SearchEverywherePopup.java @@ -70,16 +70,16 @@ public void invokeCmd(String cmdToEnter) { invokeSearch(cmdToEnter, true); } - public void searchText(String searchString){ + public void searchText(String searchString) { invokeSearch(searchString, false); } - private void invokeSearch(String searchText, boolean invoke){ + private void invokeSearch(String searchText, boolean invoke) { JTextFieldFixture searchField = textField(JTextFieldFixture.Companion.byType(), Duration.ofSeconds(2)); searchField.click(); searchField.setText(searchText); waitFor(Duration.ofSeconds(30), Duration.ofSeconds(1), "the search dialog in the Search Everywhere popup to load in 30 seconds.", () -> didSearchFinish(searchText)); - if(invoke){ + if (invoke) { new Keyboard(remoteRobot).hotKey(KeyEvent.VK_ENTER); } } diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/AbstractNewProjectFinalPage.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/AbstractNewProjectFinalPage.java index c1305012..c6dca6a8 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/AbstractNewProjectFinalPage.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/AbstractNewProjectFinalPage.java @@ -88,7 +88,7 @@ public String getProjectLocation() { */ public void setProjectLocation(String projectLocation) { if (ideaVersionInt >= 20221) { - find(JTextFieldFixture.class, byXpath(XPathDefinitions.EXTENDABLE_TEXT_FIELD )).setText(projectLocation); + find(JTextFieldFixture.class, byXpath(XPathDefinitions.EXTENDABLE_TEXT_FIELD)).setText(projectLocation); } else { textFields(JTextFieldFixture.Companion.byType()).get(1).setText(projectLocation); } diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/JavaNewProjectFinalPage.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/JavaNewProjectFinalPage.java index 4821bd4c..fa4ae54e 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/JavaNewProjectFinalPage.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/JavaNewProjectFinalPage.java @@ -75,8 +75,7 @@ public void closeMoreSettings() { public String getModuleName() { if (ideaVersionInt >= 20242) { return find(JTextFieldFixture.class, byXpath(XPathDefinitions.GET_SET_MODULE_NAME_2024_2_AND_NEWER)).getText(); - } - else if (ideaVersionInt >= 20221) { + } else if (ideaVersionInt >= 20221) { return find(JTextFieldFixture.class, byXpath(XPathDefinitions.GET_SET_MODULE_NAME)).getText(); } else { return textField("Module name:", true).getText(); @@ -91,8 +90,7 @@ else if (ideaVersionInt >= 20221) { public void setModuleName(String moduleName) { if (ideaVersionInt >= 20242) { find(JTextFieldFixture.class, byXpath(XPathDefinitions.GET_SET_MODULE_NAME_2024_2_AND_NEWER)).setText(moduleName); - } - else if (ideaVersionInt >= 20221) { + } else if (ideaVersionInt >= 20221) { find(JTextFieldFixture.class, byXpath(XPathDefinitions.GET_SET_MODULE_NAME)).setText(moduleName); } else { textField("Module name:", true).setText(moduleName); diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java index 6f9cfad8..c36bdc17 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/dialogs/project/pages/NewProjectFirstPage.java @@ -47,8 +47,8 @@ @FixtureName(name = "New Project Dialog") public class NewProjectFirstPage extends AbstractNewProjectFinalPage { protected final RemoteRobot remoteRobot; - private boolean isProjectSdkItemsLoaded = false; private final int ideaVersionInt = UITestRunner.getIdeaVersionInt(); + private boolean isProjectSdkItemsLoaded = false; public NewProjectFirstPage(@NotNull RemoteRobot remoteRobot, @NotNull RemoteComponent remoteComponent) { super(remoteRobot, remoteComponent); diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/MainIdeWindow.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/MainIdeWindow.java index ba9ed694..367a5b9b 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/MainIdeWindow.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/MainIdeWindow.java @@ -18,17 +18,17 @@ import com.intellij.remoterobot.fixtures.FixtureName; import com.intellij.remoterobot.utils.Keyboard; import com.intellij.remoterobot.utils.WaitForConditionTimeoutException; +import com.redhat.devtools.intellij.commonuitest.UITestRunner; import com.redhat.devtools.intellij.commonuitest.fixtures.dialogs.FlatWelcomeFrame; import com.redhat.devtools.intellij.commonuitest.fixtures.dialogs.navigation.SearchEverywherePopup; import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.menubar.MenuBar; import com.redhat.devtools.intellij.commonuitest.utils.constants.XPathDefinitions; +import com.redhat.devtools.intellij.commonuitest.utils.internalerror.IdeInternalErrorUtils; import org.jetbrains.annotations.NotNull; import java.awt.event.KeyEvent; import java.time.Duration; -import com.redhat.devtools.intellij.commonuitest.utils.internalerror.IdeInternalErrorUtils; - import static com.intellij.remoterobot.search.locators.Locators.byXpath; /** @@ -52,14 +52,14 @@ public MainIdeWindow(@NotNull RemoteRobot remoteRobot, @NotNull RemoteComponent public void maximizeIdeWindow() { if (remoteRobot.isWin()) { runJs(""" - const width = component.getWidth(); - const height = component.getHeight(); - const horizontal_offset = width-72; - robot.click(component, new Point(horizontal_offset, 14), MouseButton.LEFT_BUTTON, 1); - const width_after = component.getWidth(); - const height_after = component.getHeight(); - const horizontal_offset_after = width_after-72; - if (width > width_after || height > height_after) { robot.click(component, new Point(horizontal_offset_after, 14), MouseButton.LEFT_BUTTON, 1); }"""); + const width = component.getWidth(); + const height = component.getHeight(); + const horizontal_offset = width-72; + robot.click(component, new Point(horizontal_offset, 14), MouseButton.LEFT_BUTTON, 1); + const width_after = component.getWidth(); + const height_after = component.getHeight(); + const horizontal_offset_after = width_after-72; + if (width > width_after || height > height_after) { robot.click(component, new Point(horizontal_offset_after, 14), MouseButton.LEFT_BUTTON, 1); }"""); } else { runJs(""" @@ -78,14 +78,14 @@ public void maximizeIdeWindow() { * Close the currently opened project */ public void closeProject() { - if (remoteRobot.isMac()) { + if (UITestRunner.getIdeaVersionInt() == 20233 && remoteRobot.isLinux()) { invokeCmdUsingSearchEverywherePopup("Close Project"); } else { new MenuBar(remoteRobot).navigateTo("File", "Close Project"); } IdeInternalErrorUtils.clearWindowsErrorsIfTheyAppear(remoteRobot); remoteRobot.find(FlatWelcomeFrame.class, Duration.ofSeconds(10)).runJs("const horizontal_offset = component.getWidth()/2;\n" + - "robot.click(component, new Point(horizontal_offset, 10), MouseButton.LEFT_BUTTON, 1);"); + "robot.click(component, new Point(horizontal_offset, 10), MouseButton.LEFT_BUTTON, 1);"); } /** @@ -94,13 +94,7 @@ public void closeProject() { * @param cmdToInvoke String representation of command which will be executed using the Search Everywhere popup */ public void invokeCmdUsingSearchEverywherePopup(String cmdToInvoke) { - SearchEverywherePopup searchEverywherePopup = openSearchEverywherePopup(); - searchEverywherePopup.invokeCmd(cmdToInvoke); - } - - public void searchEverywhere(String searchString) { - SearchEverywherePopup searchEverywherePopup = openSearchEverywherePopup(); - searchEverywherePopup.searchText(searchString); + openSearchEverywherePopup().invokeCmd(cmdToInvoke); } private SearchEverywherePopup openSearchEverywherePopup() { @@ -121,4 +115,5 @@ private SearchEverywherePopup openSearchEverywherePopup() { return searchEverywherePopup; } } + } \ No newline at end of file diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/menubar/MenuBar.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/menubar/MenuBar.java index 176dede6..3a70588a 100755 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/menubar/MenuBar.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/menubar/MenuBar.java @@ -13,20 +13,16 @@ import com.intellij.remoterobot.RemoteRobot; import com.intellij.remoterobot.fixtures.ActionButtonFixture; import com.intellij.remoterobot.fixtures.CommonContainerFixture; -import com.intellij.remoterobot.fixtures.ComponentFixture; import com.intellij.remoterobot.fixtures.JButtonFixture; import com.intellij.remoterobot.fixtures.JPopupMenuFixture; -import com.intellij.remoterobot.fixtures.dataExtractor.RemoteText; import com.intellij.remoterobot.utils.WaitForConditionTimeoutException; import com.redhat.devtools.intellij.commonuitest.UITestRunner; -import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.MainIdeWindow; import com.redhat.devtools.intellij.commonuitest.utils.constants.XPathDefinitions; -import com.redhat.devtools.intellij.commonuitest.utils.screenshot.ScreenshotUtils; import org.jetbrains.annotations.NotNull; import java.time.Duration; import java.util.List; -import java.util.Optional; +import java.util.logging.Logger; import static com.intellij.remoterobot.search.locators.Locators.byXpath; import static com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor; @@ -37,12 +33,12 @@ * @author zcervink@redhat.com */ public class MenuBar { + private static final Logger LOGGER = Logger.getLogger(MenuBar.class.getName()); private final RemoteRobot remoteRobot; private final int ideaVersionInt = UITestRunner.getIdeaVersionInt(); public MenuBar(RemoteRobot remoteRobot) { this.remoteRobot = remoteRobot; - checkVisibility(); } /** @@ -58,6 +54,11 @@ public void navigateTo(String... path) { remoteRobot.find(ActionButtonFixture.class, byXpath(XPathDefinitions.MAIN_MENU)).click(); } + if (!isVisible()) { + LOGGER.severe("Main Menu is not visible."); + return; + } + JButtonFixture mainMenuFirstItem = mainMenuItem(path[0]); if (mainMenuFirstItem != null) { if (ideaVersionInt >= 20242) { @@ -111,22 +112,13 @@ public CommonContainerFixture getMainMenu() { return cf; } - private void checkVisibility() { + public boolean isVisible() { // check menu already visible try { getMainMenu(); + return true; } catch (WaitForConditionTimeoutException e) { - // not visible - MainIdeWindow mainIdeWindow = remoteRobot.find(MainIdeWindow.class, Duration.ofSeconds(5)); - mainIdeWindow.searchEverywhere("Appearance"); - ComponentFixture appearanceDialog = remoteRobot.find(ComponentFixture.class, byXpath("//div[@class='SearchEverywhereUI']")); - List items = appearanceDialog.findAllText(); - Optional item = items.stream().filter(remoteText -> remoteText.getText().equals("View | Appearance: Main Menu")).findFirst(); - if (item.isPresent()) { - item.get().click(); - } else { - ScreenshotUtils.takeScreenshot(remoteRobot, "Can't find 'Appearance' Main menu item"); - } + return false; } } } \ No newline at end of file diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/toolwindowspane/AbstractToolWinPane.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/toolwindowspane/AbstractToolWinPane.java index 09b19fb8..ec42012d 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/toolwindowspane/AbstractToolWinPane.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/toolwindowspane/AbstractToolWinPane.java @@ -124,8 +124,8 @@ private boolean isPaneOpened(Class fixtureClass) { private void clickOnStripeButton(String label, boolean isPaneOpened) { waitFor(Duration.ofSeconds(30), Duration.ofSeconds(2), - "The '" + label + "' stripe button is not available.", - () -> isStripeButtonAvailable(label, isPaneOpened)); + "The '" + label + "' stripe button is not available.", + () -> isStripeButtonAvailable(label, isPaneOpened)); if (ideaVersionInt >= 20242) { // For IntelliJ IDEA 2024.2 and newer @@ -175,6 +175,6 @@ private boolean isStripeButtonAvailable(String label, boolean isPaneOpened) { private boolean isRightToolbarButton(String label) { return label.equals(ButtonLabels.MAVEN_STRIPE_BUTTON_LABEL) || - label.equals(ButtonLabels.GRADLE_STRIPE_BUTTON_LABEL); + label.equals(ButtonLabels.GRADLE_STRIPE_BUTTON_LABEL); } } diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/toolwindowspane/buildtoolpane/MavenBuildToolPane.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/toolwindowspane/buildtoolpane/MavenBuildToolPane.java index af148270..3ad11234 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/toolwindowspane/buildtoolpane/MavenBuildToolPane.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/fixtures/mainidewindow/toolwindowspane/buildtoolpane/MavenBuildToolPane.java @@ -75,8 +75,8 @@ public void buildProject(String goal, String projectName) { JTreeFixture tree = mavenTargetTree(); // below workaround due to https://github.com/JetBrains/intellij-ui-test-robot/issues/459 tree.doubleClickRowWithText(projectName, true); // expand root - tree.doubleClickRowWithText("Lifecycle" ,true); // expand Lifecycle - tree.doubleClickRowWithText(goal,true); + tree.doubleClickRowWithText("Lifecycle", true); // expand Lifecycle + tree.doubleClickRowWithText(goal, true); if (ideaVersionInt >= 20221) { remoteRobot.find(ToolWindowPane.class).find(BuildView.class).waitUntilBuildHasFinished(); } else { diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/internalerror/IdeInternalErrorUtils.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/internalerror/IdeInternalErrorUtils.java index c5d65f90..52559aa3 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/internalerror/IdeInternalErrorUtils.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/internalerror/IdeInternalErrorUtils.java @@ -30,6 +30,7 @@ */ public class IdeInternalErrorUtils { protected static final Logger LOGGER = Logger.getLogger(IdeInternalErrorUtils.class.getName()); + private IdeInternalErrorUtils() {} /** diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/project/CreateCloseUtils.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/project/CreateCloseUtils.java index e9f4d978..1843d790 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/project/CreateCloseUtils.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/project/CreateCloseUtils.java @@ -39,8 +39,6 @@ */ public class CreateCloseUtils { - static final int ideaVersionInt = UITestRunner.getIdeaVersionInt(); - /** * Create new project with given project name according to given project type * @@ -51,7 +49,7 @@ public class CreateCloseUtils { public static void createNewProject(RemoteRobot remoteRobot, String projectName, NewProjectType newProjectType) { NewProjectDialogWizard newProjectDialogWizard = openNewProjectDialogFromWelcomeDialog(remoteRobot); NewProjectFirstPage newProjectFirstPage = newProjectDialogWizard.find(NewProjectFirstPage.class, Duration.ofSeconds(10)); - + int ideaVersionInt = UITestRunner.getIdeaVersionInt(); if (ideaVersionInt >= 20221) { newProjectFirstPage.selectNewProjectType("New Project"); newProjectFirstPage.setLanguage("Java"); @@ -94,8 +92,8 @@ public static void createNewProject(RemoteRobot remoteRobot, String projectName, /** * Create new empty type project with given project name * - * @param remoteRobot reference to the RemoteRobot instance - * @param projectName name of new project + * @param remoteRobot reference to the RemoteRobot instance + * @param projectName name of new project */ public static void createEmptyProject(RemoteRobot remoteRobot, String projectName) { NewProjectDialogWizard newProjectDialogWizard = openNewProjectDialogFromWelcomeDialog(remoteRobot); @@ -119,7 +117,7 @@ public static void createEmptyProject(RemoteRobot remoteRobot, String projectNam public static void waitAfterOpeningProject(RemoteRobot remoteRobot) { IdeStatusBar ideStatusBar = remoteRobot.find(IdeStatusBar.class, Duration.ofSeconds(10)); ideStatusBar.waitUntilProjectImportIsComplete(); - if (ideaVersionInt > 20233) { + if (UITestRunner.getIdeaVersionInt() > 20233) { MainIdeWindow mainIdeWindow = remoteRobot.find(MainIdeWindow.class, Duration.ofSeconds(5)); mainIdeWindow.maximizeIdeWindow(); } @@ -182,7 +180,7 @@ public static AbstractNewProjectFinalPage getFinalPage(NewProjectDialogWizard ne /** * Ensures that the Empty Project page is opened by checking for specific text on the page. - * If verification fails, it waits for dialogs to disappear and reselects the Empty Project type. + * If verification fails, it waits for dialogs to disappear and re-selects the Empty Project type. * * @param newProjectFirstPage the first page of the new project dialog * @param remoteRobot reference to the RemoteRobot instance @@ -209,19 +207,19 @@ private static void ensureEmptyProjectPageIsOpened(NewProjectFirstPage newProjec * If any other dialogs are open, it waits for them to disappear. * * @param remoteRobot the RemoteRobot instance - * @param timeout the maximum duration to wait for the other dialogs to disappear + * @param timeout the maximum duration to wait for the other dialogs to disappear */ private static void waitForDialogsToDisappear(RemoteRobot remoteRobot, Duration timeout) { waitFor( - timeout, - Duration.ofSeconds(2), - "Waiting for only the New Project dialog to remain open", - () -> "Extra dialogs did not disappear within the timeout", - () -> { - List allDialogs = remoteRobot.findAll(ComponentFixture.class, byXpath(XPathDefinitions.MY_DIALOG)); - // Proceed if only one dialog is open, assumed to be the New Project dialog - return allDialogs.size() == 1; - } + timeout, + Duration.ofSeconds(2), + "Waiting for only the New Project dialog to remain open", + () -> "Extra dialogs did not disappear within the timeout", + () -> { + List allDialogs = remoteRobot.findAll(ComponentFixture.class, byXpath(XPathDefinitions.MY_DIALOG)); + // Proceed if only one dialog is open, assumed to be the New Project dialog + return allDialogs.size() == 1; + } ); } diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/runner/IntelliJVersion.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/runner/IntelliJVersion.java index e6842691..d1e07587 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/runner/IntelliJVersion.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/runner/IntelliJVersion.java @@ -16,6 +16,7 @@ * * @author zcervink@redhat.com */ public enum IntelliJVersion { + UNSUPPORTED("unsupported.version"), COMMUNITY_V_2020_2("IC-2020.2"), COMMUNITY_V_2020_3("IC-2020.3"), COMMUNITY_V_2021_1("IC-2021.1"), @@ -36,9 +37,12 @@ public enum IntelliJVersion { IntelliJVersion(String ideaVersionStringRepresentation) { this.ideaVersionStringRepresentation = ideaVersionStringRepresentation; - - String ideaVersionString = this.ideaVersionStringRepresentation.substring(3).replace(".", ""); - this.ideaVersionIntRepresentation = Integer.parseInt(ideaVersionString); + if (ideaVersionStringRepresentation.equals("unsupported.version")) { + this.ideaVersionIntRepresentation = 0; + } else { + String ideaVersionString = this.ideaVersionStringRepresentation.substring(3).replace(".", ""); + this.ideaVersionIntRepresentation = Integer.parseInt(ideaVersionString); + } } public static IntelliJVersion getFromStringVersion(String aVersion) { diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/screenshot/ScreenshotUtils.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/screenshot/ScreenshotUtils.java index 66f14d60..f27033cb 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/screenshot/ScreenshotUtils.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/screenshot/ScreenshotUtils.java @@ -43,7 +43,7 @@ private ScreenshotUtils() { * Take screenshot of the entire screen and save it on disk * * @param remoteRobot reference to the RemoteRobot instance - * @param comment message to add at the end of the screenshot's filename + * @param comment message to add at the end of the screenshot's filename * @return the screenshot as a File object */ public static File takeScreenshot(RemoteRobot remoteRobot, String comment) { @@ -55,7 +55,7 @@ public static File takeScreenshot(RemoteRobot remoteRobot, String comment) { Files.createDirectory(path); } String screenshotFilename = getTimeNow(); - String screenshotComment = comment == null || comment.isEmpty() ? "" : "_" + comment.replace(" ", "_"); + String screenshotComment = comment == null || comment.isEmpty() ? "" : "_" + comment.replace(" ", "_"); String screenshotPathname = SCREENSHOT_LOCATION + screenshotFilename + screenshotComment + "." + FILETYPE; File screenshotFile = new File(screenshotPathname); ImageIO.write(screenshotBufferedImage, FILETYPE, screenshotFile); diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/steps/SharedSteps.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/steps/SharedSteps.java index 31cbabea..60044a72 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/steps/SharedSteps.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/steps/SharedSteps.java @@ -13,7 +13,9 @@ import com.intellij.remoterobot.RemoteRobot; import com.intellij.remoterobot.fixtures.ComponentFixture; import com.intellij.remoterobot.search.locators.Locator; + import java.time.Duration; + import static com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor; /** @@ -31,9 +33,9 @@ private SharedSteps() {} * @param interval The interval at which to check the component's visibility, in milliseconds. * @param xpath The XPath locator used to find the component within the UI hierarchy. */ - public static void waitForComponentByXpath(RemoteRobot robot, int duration, int interval , Locator xpath) { + public static void waitForComponentByXpath(RemoteRobot robot, int duration, int interval, Locator xpath) { waitFor(Duration.ofSeconds(duration), Duration.ofMillis(interval), () -> robot.findAll(ComponentFixture.class, xpath) - .stream() - .anyMatch(ComponentFixture::isShowing)); + .stream() + .anyMatch(ComponentFixture::isShowing)); } } diff --git a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/texttranformation/TextUtils.java b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/texttranformation/TextUtils.java index 983d17b5..6aeb4fd1 100644 --- a/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/texttranformation/TextUtils.java +++ b/src/main/java/com/redhat/devtools/intellij/commonuitest/utils/texttranformation/TextUtils.java @@ -34,8 +34,8 @@ private TextUtils() { */ public static String listOfRemoteTextToString(List data) { return data - .stream() - .map(RemoteText::getText) - .collect(Collectors.joining(" ")); + .stream() + .map(RemoteText::getText) + .collect(Collectors.joining(" ")); } } \ No newline at end of file diff --git a/src/main/resources/prefs_xml/2021_3_and_older/prefs.xml b/src/main/resources/prefs_xml/2021_3_and_older/prefs.xml index c2347f60..6a744469 100644 --- a/src/main/resources/prefs_xml/2021_3_and_older/prefs.xml +++ b/src/main/resources/prefs_xml/2021_3_and_older/prefs.xml @@ -1,6 +1,6 @@ - - + + diff --git a/src/main/resources/prefs_xml/2022_1/prefs.xml b/src/main/resources/prefs_xml/2022_1/prefs.xml index 9ee1d03d..9a7c0a38 100644 --- a/src/main/resources/prefs_xml/2022_1/prefs.xml +++ b/src/main/resources/prefs_xml/2022_1/prefs.xml @@ -1,5 +1,5 @@ - + diff --git a/src/main/resources/prefs_xml/ultimate_all/prefs.xml b/src/main/resources/prefs_xml/ultimate_all/prefs.xml index 62f22f49..e6c62b60 100644 --- a/src/main/resources/prefs_xml/ultimate_all/prefs.xml +++ b/src/main/resources/prefs_xml/ultimate_all/prefs.xml @@ -1,6 +1,6 @@ - - + + diff --git a/src/test-project/build.gradle.kts b/src/test-project/build.gradle.kts index 3703fab1..c2658b1b 100644 --- a/src/test-project/build.gradle.kts +++ b/src/test-project/build.gradle.kts @@ -75,14 +75,13 @@ val runIdeForUiTests by intellijPlatformTesting.runIde.registering { task { jvmArgumentProviders += CommandLineArgumentProvider { listOf( - "-Dide.mac.message.dialogs.as.sheets=false", "-Djb.privacy.policy.text=", "-Djb.consents.confirmation.enabled=false", - "-Dide.mac.file.chooser.native=false", - "-DjbScreenMenuBar.enabled=false", - "-Dapple.laf.useScreenMenuBar=false", "-Didea.trust.all.projects=true", "-Dide.show.tips.on.startup.default.value=false", + "-Dide.mac.message.dialogs.as.sheets=false", + "-Dide.mac.file.chooser.native=false", + "-Dapple.laf.useScreenMenuBar=false", ) } } diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/AbstractLibraryBaseTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/AbstractLibraryBaseTest.java index edc6982a..f3d86268 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/AbstractLibraryBaseTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/AbstractLibraryBaseTest.java @@ -35,13 +35,12 @@ public abstract class AbstractLibraryBaseTest { protected static RemoteRobot remoteRobot; protected static int ideaVersionInt; private static boolean intelliJHasStarted = false; - private static final int TEST_RUNNER_PORT = 8580; @BeforeAll static void startIntelliJ() { - if (!intelliJHasStarted) { + if (!intelliJHasStarted) { ideaVersionInt = communityIdeaVersion.toInt(); - remoteRobot = UITestRunner.runIde(communityIdeaVersion, TEST_RUNNER_PORT); + remoteRobot = UITestRunner.runIde(communityIdeaVersion); intelliJHasStarted = true; Runtime.getRuntime().addShutdownHook(new CloseIntelliJBeforeQuit()); diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/information/TipDialogTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/information/TipDialogTest.java index 9f9c0171..f01d9ed3 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/information/TipDialogTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/information/TipDialogTest.java @@ -71,7 +71,7 @@ void dontShowTipsCheckBoxTest() { tipDialog.dontShowTipsCheckBox().setValue(!checkboxStateBefore); boolean checkboxStateAfter = tipDialog.dontShowTipsCheckBox().isSelected(); assertNotEquals(checkboxStateAfter, checkboxStateBefore, - "The checkbox value should be '" + !checkboxStateBefore + "' but is '" + checkboxStateAfter + "'."); + "The checkbox value should be '" + !checkboxStateBefore + "' but is '" + checkboxStateAfter + "'."); tipDialog.dontShowTipsCheckBox().setValue(checkboxStateBefore); tipDialog.close(); } diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java index 6d95a714..d3d7ae17 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/project_manipulation/NewProjectDialogTest.java @@ -10,7 +10,12 @@ ******************************************************************************/ package com.redhat.devtools.intellij.commonuitest.fixtures.test.dialogs.project_manipulation; -import com.intellij.remoterobot.fixtures.*; +import com.intellij.remoterobot.fixtures.ActionButtonFixture; +import com.intellij.remoterobot.fixtures.ComboBoxFixture; +import com.intellij.remoterobot.fixtures.ComponentFixture; +import com.intellij.remoterobot.fixtures.ContainerFixture; +import com.intellij.remoterobot.fixtures.JLabelFixture; +import com.intellij.remoterobot.fixtures.JListFixture; import com.intellij.remoterobot.utils.WaitForConditionTimeoutException; import com.redhat.devtools.intellij.commonuitest.AbstractLibraryBaseTest; import com.redhat.devtools.intellij.commonuitest.UITestRunner; @@ -283,7 +288,7 @@ void previousButtonTest() { newProjectFirstPage.selectNewProjectType(CreateCloseUtils.NewProjectType.PLAIN_JAVA.toString()); newProjectFirstPage.setProjectSdkIfAvailable("11"); assertThrows(UITestException.class, () -> - newProjectDialogWizard.previous(), "The 'UITestException' should be thrown because the 'Previous' button is not enabled on the first page of the 'New Project'."); + newProjectDialogWizard.previous(), "The 'UITestException' should be thrown because the 'Previous' button is not enabled on the first page of the 'New Project'."); newProjectDialogWizard.next(); boolean isCommandLineAppTextPresent = listOfRemoteTextToString(newProjectFirstPage.findAllText()).contains("Command Line App"); assertTrue(isCommandLineAppTextPresent, "The 'Command Line App' text should be present on the second page of the 'New Project' wizard for java project."); @@ -305,7 +310,7 @@ void nextButtonTest() { assertTrue(isCommandLineAppTextPresent, "The 'Command Line App' text should be present on the second page of the 'New Project' wizard for java project."); newProjectDialogWizard.next(); assertThrows(UITestException.class, () -> - newProjectDialogWizard.next(), "The 'UITestException' should be thrown because the 'Next' button is not available on the last page of the 'New Project' wizard."); + newProjectDialogWizard.next(), "The 'UITestException' should be thrown because the 'Next' button is not available on the last page of the 'New Project' wizard."); } @Test @@ -314,13 +319,13 @@ void finishButtonTest() { newProjectFirstPage.selectNewProjectType(CreateCloseUtils.NewProjectType.PLAIN_JAVA.toString()); newProjectFirstPage.setProjectSdkIfAvailable("17"); assertThrows(UITestException.class, () -> - newProjectDialogWizard.finish(), "The 'UITestException' should be thrown because the 'Finish' button is not available on the first page of the 'New Project' wizard for java project."); + newProjectDialogWizard.finish(), "The 'UITestException' should be thrown because the 'Finish' button is not available on the first page of the 'New Project' wizard for java project."); newProjectDialogWizard.next(); newProjectDialogWizard.next(); } assertThrows(UITestException.class, () -> - newProjectDialogWizard.next(), "The 'UITestException' should be thrown because the 'Next' button is not available on the last page of the 'New Project' wizard."); + newProjectDialogWizard.next(), "The 'UITestException' should be thrown because the 'Next' button is not available on the last page of the 'New Project' wizard."); newProjectDialogWizard.find(JavaNewProjectFinalPage.class, Duration.ofSeconds(10)).setProjectName(PLAIN_JAVA_PROJECT_NAME); newProjectDialogWizard.finish(); mainIdeWindow = remoteRobot.find(MainIdeWindow.class, Duration.ofSeconds(10)); @@ -369,7 +374,7 @@ void selectNewProjectTypeTest() { isEmptyProjectPageDisplayed = newProjectFirstPage.hasText("Simple project with one module"); } else { // For IntelliJ IDEA version 2021.2 and older isEmptyProjectPageDisplayed = !newProjectFirstPage.findAll( - JListFixture.class, byXpath(XPathDefinitions.EMPTY_PROJECT) + JListFixture.class, byXpath(XPathDefinitions.EMPTY_PROJECT) ).isEmpty(); } assertTrue(isEmptyProjectPageDisplayed, "The 'Empty Project' page should be displayed but is not."); diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/settings/SettingsDialogTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/settings/SettingsDialogTest.java index 81fdca85..871adb45 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/settings/SettingsDialogTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/dialogs/settings/SettingsDialogTest.java @@ -38,10 +38,10 @@ * @author zcervink@redhat.com */ class SettingsDialogTest extends AbstractLibraryBaseTest { - private static FlatWelcomeFrame flatWelcomeFrame; - private SettingsDialog settingsDialog = null; private static final String APPEARANCE_AND_BEHAVIOR = "Appearance & Behavior"; private static final String NOTIFICATIONS = "Notifications"; + private static FlatWelcomeFrame flatWelcomeFrame; + private SettingsDialog settingsDialog = null; @BeforeAll static void openSettingsDialog() { diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/menubar/MenuBarTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/menubar/MenuBarTest.java index 9d54e84e..a15d6324 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/menubar/MenuBarTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/menubar/MenuBarTest.java @@ -25,7 +25,6 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; - import java.time.Duration; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -50,6 +49,9 @@ static void closeCurrentProject() { @Test void openTipDialogUsingMenuBarTest() { + if (UITestRunner.getIdeaVersionInt() == 20233 && remoteRobot.isLinux()) { + return; // known issue, no menu bar in GHA for 2023.3 + } if (remoteRobot.isWin() || remoteRobot.isLinux()) { new MenuBar(remoteRobot).navigateTo("Help", "Tip of the Day"); assertTrue(isTipDialogVisible(remoteRobot), "The 'Tip of the Day' dialog should be visible but is not"); diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/BuildViewTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/BuildViewTest.java index fb629d6a..17a2899a 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/BuildViewTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/BuildViewTest.java @@ -11,7 +11,6 @@ package com.redhat.devtools.intellij.commonuitest.fixtures.test.mainidewindow.toolwindowspane; import com.redhat.devtools.intellij.commonuitest.AbstractLibraryBaseTest; -import com.redhat.devtools.intellij.commonuitest.UITestRunner; import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.AbstractToolWinPane; import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.BuildView; import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.ToolWindowPane; @@ -38,7 +37,7 @@ class BuildViewTest extends AbstractLibraryBaseTest { @BeforeAll static void prepareProject() { CreateCloseUtils.createNewProject(remoteRobot, PROJECT_NAME, CreateCloseUtils.NewProjectType.MAVEN); - if (UITestRunner.getIdeaVersionInt() >= 20221) { + if (ideaVersionInt >= 20221) { toolWinPane = remoteRobot.find(ToolWindowPane.class, Duration.ofSeconds(10)); } else { toolWinPane = remoteRobot.find(ToolWindowsPane.class, Duration.ofSeconds(10)); diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/ProjectExplorerTest.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/ProjectExplorerTest.java index 7c09f3f1..1160d0fb 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/ProjectExplorerTest.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/ProjectExplorerTest.java @@ -125,8 +125,8 @@ void selectOpenedFileTest() { projectExplorer.selectOpenedFile(); SharedSteps.waitForComponentByXpath(remoteRobot, 3, 200, byXpath(XPathDefinitions.MY_ICON_LOCATE_SVG)); assertTrue(projectExplorer.projectViewTree().isPathSelected( - projectExplorer.projectViewTree().getValueAtRow(0), "src", "Main"), - "The file 'Main' should be selected but is not." + projectExplorer.projectViewTree().getValueAtRow(0), "src", "Main"), + "The file 'Main' should be selected but is not." ); } diff --git a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/openclose/AbstractToolWinPane.java b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/openclose/AbstractToolWinPane.java index e3cb7ff2..ec675d8f 100644 --- a/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/openclose/AbstractToolWinPane.java +++ b/src/test-project/src/test/java/com/redhat/devtools/intellij/commonuitest/fixtures/test/mainidewindow/toolwindowspane/openclose/AbstractToolWinPane.java @@ -100,6 +100,6 @@ protected boolean isStripeButtonAvailable(String label) { private boolean isRightToolbarButton(String label) { // Determine if the stripe button is on the right toolbar return label.equals(ButtonLabels.MAVEN_STRIPE_BUTTON_LABEL) || - label.equals(ButtonLabels.GRADLE_STRIPE_BUTTON_LABEL); + label.equals(ButtonLabels.GRADLE_STRIPE_BUTTON_LABEL); } } \ No newline at end of file