From 8ce3f51a25fa4144545e4aac9f18b050aa91ddb9 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Tue, 8 Apr 2025 21:17:29 +0300 Subject: [PATCH 01/12] "Remove contributor section from README.md --- README.md | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/README.md b/README.md index 85a5ae4ef..288c9d783 100644 --- a/README.md +++ b/README.md @@ -12,36 +12,8 @@ PhpStorm IDE Plugin for a better Magento 2 development workflow. - - - Version 2025.0.0 - Contributors - - - - - - Yevhen Zvieriev -
- Yevhen Zvieriev -
- - - - Mykola Silin -
- Mykola Silin -
- - - - Vitalii Boiko -
- Vitalii Boiko -
- - From 1fda3364ee90803a899d409c0ccdba57ef560782 Mon Sep 17 00:00:00 2001 From: Sergey Yarmolich Date: Tue, 29 Apr 2025 16:23:14 +0300 Subject: [PATCH 02/12] add app/design path --- .../magento/packages/Package.java | 1 + .../magento/IsFileInEditableModuleUtil.java | 4 +++- .../util/magento/MagentoPathUrlUtil.java | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/magento/idea/magento2plugin/magento/packages/Package.java b/src/main/java/com/magento/idea/magento2plugin/magento/packages/Package.java index 9ed340294..d031f591f 100644 --- a/src/main/java/com/magento/idea/magento2plugin/magento/packages/Package.java +++ b/src/main/java/com/magento/idea/magento2plugin/magento/packages/Package.java @@ -8,6 +8,7 @@ public class Package { //NOPMD public static final String V_FILE_SEPARATOR = "/"; public static String packagesRoot = "app/code"; + public static String packagesDesignRoot = "app/design"; public static String libWebRoot = "lib/web"; public static String frameworkRootComposer = "vendor/magento/framework"; public static String frameworkRootGit = "lib/internal/Magento/Framework"; diff --git a/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java b/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java index a9f789fef..d4f335663 100644 --- a/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java +++ b/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java @@ -39,10 +39,12 @@ public static boolean execute(final Project project, final VirtualFile virtualFi final Settings settings = Settings.getInstance(project); List magentoToFolders = settings.getMagentoFolders(); final String magentoPathUrl = MagentoPathUrlUtil.execute(project); + final String magentoDesignUrl = MagentoPathUrlUtil.getDesignPath(project); if (magentoPathUrl != null) { if (magentoToFolders == null) { magentoToFolders = List.of( - magentoPathUrl + magentoPathUrl, + magentoDesignUrl ); } else { magentoToFolders.add( diff --git a/src/main/java/com/magento/idea/magento2plugin/util/magento/MagentoPathUrlUtil.java b/src/main/java/com/magento/idea/magento2plugin/util/magento/MagentoPathUrlUtil.java index bc808c2c2..7f1a081e1 100644 --- a/src/main/java/com/magento/idea/magento2plugin/util/magento/MagentoPathUrlUtil.java +++ b/src/main/java/com/magento/idea/magento2plugin/util/magento/MagentoPathUrlUtil.java @@ -31,4 +31,24 @@ public static String execute(Project project) { return null; } + + /** + * Constructs a file URL for the Magento packages root, based on the project settings. + * + * @param project the project instance + * @return the constructed file URL + */ + public static String getDesignPath(Project project) { + String magentoPath = Settings.getMagentoPath(project); + if (magentoPath != null) { + return VirtualFileManager.constructUrl( + "file", + magentoPath + + File.separator + + Package.packagesDesignRoot + ); + } + + return null; + } } From 5404d114662d0e37ea24df8439c83633f7f8464c Mon Sep 17 00:00:00 2001 From: vitaliy Date: Tue, 29 Apr 2025 20:35:16 +0300 Subject: [PATCH 03/12] 2527: Fix Magento folder handling and update plugin version. Refactored logic to handle Magento folder paths more robustly, ensuring design paths are added without overwriting existing ones. Updated plugin version to 2025.1.1 and added relevant changelog entry for bug fix #2527. Incremental version changes made in plugin metadata and build properties. --- CHANGELOG.md | 6 ++++ gradle.properties | 2 +- .../magento/IsFileInEditableModuleUtil.java | 36 +++++++++---------- src/main/resources/META-INF/plugin.xml | 2 +- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f3dd4858..628fd8ccd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). +## 2025.1.1 + +### Fixed + +- The themes select is empty [#2527](https://github.com/magento/magento2-phpstorm-plugin/pull/2527) + ## 2025.1.0 ### Added diff --git a/gradle.properties b/gradle.properties index 934860abb..c14a88efe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ pluginGroup = com.magento.idea.magento2plugin pluginName = Magento PhpStorm pluginRepositoryUrl = https://github.com/magento/magento2-phpstorm-plugin -pluginVersion = 2025.1.0 +pluginVersion = 2025.1.1 pluginSinceBuild = 243.3 pluginUntilBuild = 258.* platformType = PS diff --git a/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java b/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java index d4f335663..da2d02ba4 100644 --- a/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java +++ b/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java @@ -9,6 +9,7 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiFile; import com.magento.idea.magento2plugin.project.Settings; +import java.util.ArrayList; import java.util.List; public final class IsFileInEditableModuleUtil { @@ -37,31 +38,26 @@ public static boolean execute(final PsiFile file) { */ public static boolean execute(final Project project, final VirtualFile virtualFile) { final Settings settings = Settings.getInstance(project); - List magentoToFolders = settings.getMagentoFolders(); - final String magentoPathUrl = MagentoPathUrlUtil.execute(project); - final String magentoDesignUrl = MagentoPathUrlUtil.getDesignPath(project); - if (magentoPathUrl != null) { - if (magentoToFolders == null) { - magentoToFolders = List.of( - magentoPathUrl, - magentoDesignUrl - ); - } else { - magentoToFolders.add( - magentoPathUrl - ); - } - } + List editablePaths = settings.getMagentoFolders(); + final String magentoRootPath = MagentoPathUrlUtil.execute(project); + final String magentoDesignPath = MagentoPathUrlUtil.getDesignPath(project); + if (magentoRootPath == null) { + return false; + } + if (editablePaths == null) { + editablePaths = new ArrayList<>(); + } - if (magentoToFolders == null) { - return false; + editablePaths.add(magentoRootPath); + if (magentoDesignPath != null) { + editablePaths.add(magentoDesignPath); } - final String filePath = virtualFile.getUrl(); - for (final String editablePath : magentoToFolders) { - if (normalizeUrl(filePath).startsWith(normalizeUrl(editablePath))) { + final String currentFilePath = virtualFile.getUrl(); + for (final String editablePath : editablePaths) { + if (normalizeUrl(currentFilePath).startsWith(normalizeUrl(editablePath))) { return true; } } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index ac35da6e7..efca82d10 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -7,7 +7,7 @@ com.magento.idea.magento2plugin Magento PhpStorm - 2025.1.0 + 2025.1.1 Magento Inc. Date: Tue, 29 Apr 2025 20:43:10 +0300 Subject: [PATCH 04/12] 2527: static fix --- .../magento2plugin/util/magento/IsFileInEditableModuleUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java b/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java index da2d02ba4..6e48db8f1 100644 --- a/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java +++ b/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java @@ -30,7 +30,7 @@ public static boolean execute(final PsiFile file) { } /** - * Validates if a given virtual file is located within editable paths defined by Magento project structure. + * Validates if a given virtual file is located within editable paths. * * @param project the current project containing the virtual file * @param virtualFile the file to check against editable module directories From 0a5dac6f11340706ba93a36c7d6843227428f2e4 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sat, 17 May 2025 19:08:04 +0300 Subject: [PATCH 05/12] Update click action to use specific point coordinates Modified the `click()` method in `SharedSteps.kt` to include specific point coordinates, ensuring accurate interaction with the 'New Project' button. This change prevents potential misclicks and improves test reliability. --- .../kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt b/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt index 414109ffc..77b7a1850 100644 --- a/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt +++ b/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt @@ -35,7 +35,7 @@ class SharedSteps(private val remoteRobot: RemoteRobot) { ContainerFixture::class.java, byXpath("//div[@visible_text='New Project']") ) - newProjectButton.click() + newProjectButton.click(Point(15, -15)) Thread.sleep(2_000) val jTextFieldFixture = find(byXpath("//div[@class='TextFieldWithBrowseButton']")) From 20ec7d1b51ad5f544b215030dfe7e158253081e3 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sat, 17 May 2025 19:24:46 +0300 Subject: [PATCH 06/12] Refactor utility classes and fix configuration inconsistencies Refactored utility classes to improve structure and clarity by adding proper encapsulation and final declarations. Fixed group ID inconsistencies in plugin XML to align with intended usage. Re-enabled commented-out steps in `uitests.yml` for capturing and uploading artifacts on test failures. --- .github/workflows/uitests.yml | 25 +++++++++---------- .../magento/IsFileInEditableModuleUtil.java | 7 +++--- .../util/magento/MagentoPathUrlUtil.java | 17 +++++++++---- src/main/resources/META-INF/plugin.xml | 4 +-- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index 580447f58..c4334123c 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -70,16 +70,15 @@ jobs: # Uncomment if investigation is needed: -# - name: Capture Test Artifacts on Failure -# if: failure() && matrix.os == 'windows-latest' -# run: tar -cvzf video.tgz ./video -# shell: bash -# -# - name: Upload Test Video Artifact -# if: failure() && matrix.os == 'windows-latest' -# uses: actions/upload-artifact@v4 -# with: -# name: latest-test-video -# path: video.tgz -# overwrite: true - + - name: Capture Test Artifacts on Failure + if: failure() && matrix.os == 'windows-latest' + run: tar -cvzf video.tgz ./video + shell: bash + + - name: Upload Test Video Artifact + if: failure() && matrix.os == 'windows-latest' + uses: actions/upload-artifact@v4 + with: + name: latest-test-video + path: video.tgz + overwrite: true diff --git a/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java b/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java index 6e48db8f1..bdd996976 100644 --- a/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java +++ b/src/main/java/com/magento/idea/magento2plugin/util/magento/IsFileInEditableModuleUtil.java @@ -37,20 +37,19 @@ public static boolean execute(final PsiFile file) { * @return true if the file is in an editable module directory, false otherwise */ public static boolean execute(final Project project, final VirtualFile virtualFile) { - final Settings settings = Settings.getInstance(project); - List editablePaths = settings.getMagentoFolders(); final String magentoRootPath = MagentoPathUrlUtil.execute(project); - final String magentoDesignPath = MagentoPathUrlUtil.getDesignPath(project); - if (magentoRootPath == null) { return false; } + final Settings settings = Settings.getInstance(project); + List editablePaths = settings.getMagentoFolders(); if (editablePaths == null) { editablePaths = new ArrayList<>(); } editablePaths.add(magentoRootPath); + final String magentoDesignPath = MagentoPathUrlUtil.getDesignPath(project); if (magentoDesignPath != null) { editablePaths.add(magentoDesignPath); } diff --git a/src/main/java/com/magento/idea/magento2plugin/util/magento/MagentoPathUrlUtil.java b/src/main/java/com/magento/idea/magento2plugin/util/magento/MagentoPathUrlUtil.java index 7f1a081e1..41327833e 100644 --- a/src/main/java/com/magento/idea/magento2plugin/util/magento/MagentoPathUrlUtil.java +++ b/src/main/java/com/magento/idea/magento2plugin/util/magento/MagentoPathUrlUtil.java @@ -11,15 +11,22 @@ import com.magento.idea.magento2plugin.magento.packages.Package; import com.magento.idea.magento2plugin.project.Settings; -public class MagentoPathUrlUtil { +public final class MagentoPathUrlUtil { + + /** + * Private constructor to prevent instantiation of utility class. + */ + private MagentoPathUrlUtil() { + } + /** * Constructs a file URL for the Magento packages root, based on the project settings. * * @param project the project instance * @return the constructed file URL */ - public static String execute(Project project) { - String magentoPath = Settings.getMagentoPath(project); + public static String execute(final Project project) { + final String magentoPath = Settings.getMagentoPath(project); if (magentoPath != null) { return VirtualFileManager.constructUrl( "file", @@ -38,8 +45,8 @@ public static String execute(Project project) { * @param project the project instance * @return the constructed file URL */ - public static String getDesignPath(Project project) { - String magentoPath = Settings.getMagentoPath(project); + public static String getDesignPath(final Project project) { + final String magentoPath = Settings.getMagentoPath(project); if (magentoPath != null) { return VirtualFileManager.constructUrl( "file", diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index efca82d10..2011ea5f0 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -176,10 +176,10 @@ - + - + From 6716a062e23bb5d3ac2864baf1f1de30c7aab54c Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sat, 17 May 2025 19:32:35 +0300 Subject: [PATCH 07/12] Fix PS.MarkRootGroup registration and update UI test artifacts Registered PS.MarkRootGroup to correctly add the action, addressing a missing functionality. Changed test artifact capture condition from Windows to Ubuntu for consistency with the testing environment. --- .github/workflows/uitests.yml | 4 ++-- CHANGELOG.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index c4334123c..54c775886 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -71,12 +71,12 @@ jobs: # Uncomment if investigation is needed: - name: Capture Test Artifacts on Failure - if: failure() && matrix.os == 'windows-latest' + if: failure() && matrix.os == 'ubuntu-latest' run: tar -cvzf video.tgz ./video shell: bash - name: Upload Test Video Artifact - if: failure() && matrix.os == 'windows-latest' + if: failure() && matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: name: latest-test-video diff --git a/CHANGELOG.md b/CHANGELOG.md index 628fd8ccd..cbb5bac18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0). ### Fixed - The themes select is empty [#2527](https://github.com/magento/magento2-phpstorm-plugin/pull/2527) +- PS.MarkRootGroup isn't registered so the action won't be added to it [#2527](https://github.com/magento/magento2-phpstorm-plugin/pull/2527) ## 2025.1.0 From ecec4396c9d9958f10c3d89dc823d35118f0a0b4 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sat, 17 May 2025 19:41:39 +0300 Subject: [PATCH 08/12] Add step to terminate Chrome processes in UI test workflow This ensures no lingering Chrome or Chromium processes interfere with test execution, improving reliability. The step is added both before and during test execution for Ubuntu environments. --- .github/workflows/uitests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index 54c775886..761e72e85 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -57,6 +57,13 @@ jobs: max-attempts: 15 retry-delay: 30s + # Kill any running Chrome processes + - name: Kill Chrome Processes + run: | + pkill -f chrome || true + pkill -f chromium || true + echo "Chrome processes killed" + # Run tests - name: Tests if: matrix.os != 'ubuntu-latest' @@ -66,6 +73,8 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | export DISPLAY=:99.0 + pkill -f chrome || true + pkill -f chromium || true ./gradlew test -PexcludeTests="**/reference/**,**/linemarker/**,**/inspections/**,**/completion/**,**/actions/**" # Uncomment if investigation is needed: From bdfe02dbac259ddff8cde0b7a14ded870bd01ef8 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sat, 17 May 2025 19:43:08 +0300 Subject: [PATCH 09/12] Remove redundant Chrome process termination in UI tests The step to kill Chrome processes was unnecessary and has been removed to simplify the workflow. This change reduces redundancy and ensures the workflow remains focused on essential tasks. --- .github/workflows/uitests.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index 761e72e85..544a258ec 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -57,13 +57,6 @@ jobs: max-attempts: 15 retry-delay: 30s - # Kill any running Chrome processes - - name: Kill Chrome Processes - run: | - pkill -f chrome || true - pkill -f chromium || true - echo "Chrome processes killed" - # Run tests - name: Tests if: matrix.os != 'ubuntu-latest' From 9abe02089868aebe224c4cfbd12df03e2de80128 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sat, 17 May 2025 19:52:53 +0300 Subject: [PATCH 10/12] Fix browser handling and add Chrome termination on Linux Ensure browsers are properly closed in all scenarios by invoking `closeBrowser()` in the appropriate locations. Additionally, include termination of Chrome processes on Linux systems for better cleanup. --- .../com/magento/idea/magento2plugin/steps/SharedSteps.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt b/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt index 77b7a1850..fb6da3f33 100644 --- a/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt +++ b/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt @@ -115,6 +115,7 @@ class SharedSteps(private val remoteRobot: RemoteRobot) { DialogFixture::class.java, byXpath("//div[@class='MyDialog']") ) dialog.button("Close").click() + closeBrowser() try { Thread.sleep(10000) @@ -122,9 +123,8 @@ class SharedSteps(private val remoteRobot: RemoteRobot) { Thread.currentThread().interrupt() throw RuntimeException(e) } - - closeBrowser() } else { + closeBrowser() val dialog = remoteRobot.find( DialogFixture::class.java, byXpath("//div[@class='MyDialog']") ) @@ -196,6 +196,7 @@ class SharedSteps(private val remoteRobot: RemoteRobot) { } else if (os.contains("nix") || os.contains("nux")) { // For Linux-based systems: Kill typical browser processes Runtime.getRuntime().exec("killall -9 firefox") + Runtime.getRuntime().exec("killall -9 chrome") } } catch (e: IOException) { e.printStackTrace() From 675f88c34aaee3a02df38b3e53b50f3ca455f12d Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sat, 17 May 2025 20:31:11 +0300 Subject: [PATCH 11/12] Fix browser handling and add Chrome termination on Linux Ensure browsers are properly closed in all scenarios by invoking `closeBrowser()` in the appropriate locations. Additionally, include termination of Chrome processes on Linux systems for better cleanup. --- .github/workflows/uitests.yml | 2 -- .../magento/idea/magento2plugin/pages/IdeaFrame.kt | 12 +++++++++++- .../magento/idea/magento2plugin/steps/SharedSteps.kt | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index 544a258ec..54c775886 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -66,8 +66,6 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | export DISPLAY=:99.0 - pkill -f chrome || true - pkill -f chromium || true ./gradlew test -PexcludeTests="**/reference/**,**/linemarker/**,**/inspections/**,**/completion/**,**/actions/**" # Uncomment if investigation is needed: diff --git a/src/test/kotlin/com/magento/idea/magento2plugin/pages/IdeaFrame.kt b/src/test/kotlin/com/magento/idea/magento2plugin/pages/IdeaFrame.kt index 6a14a83d6..adf3af637 100644 --- a/src/test/kotlin/com/magento/idea/magento2plugin/pages/IdeaFrame.kt +++ b/src/test/kotlin/com/magento/idea/magento2plugin/pages/IdeaFrame.kt @@ -9,6 +9,9 @@ import com.intellij.remoterobot.RemoteRobot import com.intellij.remoterobot.data.RemoteComponent import com.intellij.remoterobot.fixtures.* import com.intellij.remoterobot.search.locators.byXpath +import com.intellij.remoterobot.utils.keyboard +import java.awt.event.KeyEvent.VK_ALT +import java.awt.event.KeyEvent.VK_1 import java.time.Duration @@ -25,7 +28,14 @@ class IdeaFrame(remoteRobot: RemoteRobot, remoteComponent: RemoteComponent) : get() = actionLink(byXpath("//div[@accessiblename='Enable Magento support for this project?' and @class='JEditorPane']")) val projectViewTree - get() = find(byXpath("//div[@class='ProjectViewTree']")) + get() = try { + find(byXpath("//div[@class='ProjectViewTree']")) + } catch (e: Exception) { + keyboard { + hotKey(VK_ALT, VK_1) + } + find(byXpath("//div[@class='ProjectViewTree']")) + } fun isProjectViewVisible(): Boolean { return try { diff --git a/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt b/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt index fb6da3f33..3c7286ed0 100644 --- a/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt +++ b/src/test/kotlin/com/magento/idea/magento2plugin/steps/SharedSteps.kt @@ -35,7 +35,7 @@ class SharedSteps(private val remoteRobot: RemoteRobot) { ContainerFixture::class.java, byXpath("//div[@visible_text='New Project']") ) - newProjectButton.click(Point(15, -15)) + newProjectButton.click() Thread.sleep(2_000) val jTextFieldFixture = find(byXpath("//div[@class='TextFieldWithBrowseButton']")) From 115b4b06899b92b6bd77289f938b118c21e59ac8 Mon Sep 17 00:00:00 2001 From: vitaliy Date: Sat, 17 May 2025 20:38:21 +0300 Subject: [PATCH 12/12] Disable test artifact capture and upload on failure. Commented out steps for capturing and uploading test artifacts in the UI test workflow. This change likely aims to streamline the workflow and reduce unnecessary artifact handling during test failures. --- .github/workflows/uitests.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index 54c775886..1e3cb8e49 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -69,16 +69,16 @@ jobs: ./gradlew test -PexcludeTests="**/reference/**,**/linemarker/**,**/inspections/**,**/completion/**,**/actions/**" # Uncomment if investigation is needed: - - - name: Capture Test Artifacts on Failure - if: failure() && matrix.os == 'ubuntu-latest' - run: tar -cvzf video.tgz ./video - shell: bash - - - name: Upload Test Video Artifact - if: failure() && matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v4 - with: - name: latest-test-video - path: video.tgz - overwrite: true +# +# - name: Capture Test Artifacts on Failure +# if: failure() && matrix.os == 'ubuntu-latest' +# run: tar -cvzf video.tgz ./video +# shell: bash +# +# - name: Upload Test Video Artifact +# if: failure() && matrix.os == 'ubuntu-latest' +# uses: actions/upload-artifact@v4 +# with: +# name: latest-test-video +# path: video.tgz +# overwrite: true