OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
13 stars 26 forks source link

Intelij: 2024.2 Update Test Automation in Mac #1066

Open vaisakhkannan opened 2 weeks ago

vaisakhkannan commented 2 weeks ago

Update UI test automation on Mac to support IntelliJ 2024.2.

staicy123 commented 1 week ago

Hi @TrevCraw , I am currently working on resolving the UI test failures related to the changes introduced in version 2024.2, specifically for the Mac platform. My focus is on fixing the SingleModMPProjectTestCommon class. I have started the necessary updates and am actively continuing my work on it to ensure that the tests pass successfully.

Thanks

staicy123 commented 1 week ago

SingleModNLTRestProjectTestCommon.java

Screenshot 2024-11-14 at 3 00 24 PM
staicy123 commented 5 days ago

Hi @TrevCraw, As you are aware, the UI for menu items has changed in the 2024.2 release on macOS compared to Windows and Linux. The main challenge here is that we need to first interact with the main menu icon (the one with 4 horizontal lines) before being able to click on the menu items (e.g., File, Edit, Window, Navigate, etc.).

Currently, our approach involves locating the XPath for each menu item, fetching the entire menu list, and then clicking on the desired item. While I am able to locate and click on the main menu icon using the XPath locator, I am unable to reliably locate or interact with the individual menu items (such as the "File" menu) using the XPath.

Here are the potential classes and components that we can use to locate the File menu, as shown below:

Screenshot 2024-11-12 at 11 17 54 AM

![Uploading Screenshot 2024-11-12 at 11.17.34 AM.png…]()

Unfortunately, none of these attributes or components allow me to perform the click or mouse hover actions on the menu items. I have tried several approaches, such as accessing parent classes, foreground/background colors, accessible names, JPanel, MyComponent, etc., but to no avail. I am obtaining these component names by using the Ctrl + Option + Click on the mouse.

As a workaround, I have found that I can interact with the menu items via the search window. By accessing the search window, I am able to directly get the menu actions and click on the desired menu item, verifying that the correct one is selected.

Could you please review this approach and advise whether it is a suitable solution or if we should explore another method? Thanks

staicy123 commented 3 days ago

SingleModLibertyLSTestCommon

staicy123 commented 3 days ago

SingleModJakartaLSTestCommon

staicy123 commented 3 days ago

SingleModMPLSTestCommon

staicy123 commented 3 days ago

SingleModMPProjectTestCommon