This is an automated email from the ASF dual-hosted git repository.

bamaer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new 34d9738b0a Issue #9124 : Remove the UI test that compares variable 
icon positions (#9184)
34d9738b0a is described below

commit 34d9738b0a19d27b69b5e9b4183597f27bcaf83e
Author: Ankur Kotwal <[email protected]>
AuthorDate: Sat Oct 31 01:06:22 2026 -0700

    Issue #9124 : Remove the UI test that compares variable icon positions 
(#9184)
    
    theVariableIconsLineUpWithTheProvider compared screen positions of the
    variable icons, which depend on the GTK theme and fails on some Linux
    desktops (WSL2 Ubuntu 24.04). It doesn't test functionality, so it goes,
    with its helper.
    
    Generated-by: Claude Opus 5.5
---
 .../ai/config/HopAiConfigOptionPluginUiTest.java   | 42 ----------------------
 1 file changed, 42 deletions(-)

diff --git 
a/plugins/tech/ai/src/test/java/org/apache/hop/ai/config/HopAiConfigOptionPluginUiTest.java
 
b/plugins/tech/ai/src/test/java/org/apache/hop/ai/config/HopAiConfigOptionPluginUiTest.java
index b77d73e21b..3857765a45 100644
--- 
a/plugins/tech/ai/src/test/java/org/apache/hop/ai/config/HopAiConfigOptionPluginUiTest.java
+++ 
b/plugins/tech/ai/src/test/java/org/apache/hop/ai/config/HopAiConfigOptionPluginUiTest.java
@@ -39,9 +39,7 @@ import 
org.apache.hop.ui.hopgui.perspective.configuration.tabs.ConfigPluginOptio
 import org.apache.hop.ui.testing.SwtBotTestBase;
 import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Link;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
@@ -167,36 +165,6 @@ class HopAiConfigOptionPluginUiTest extends SwtBotTestBase 
{
         });
   }
 
-  @Test
-  void theVariableIconsLineUpWithTheProvider() {
-    AtomicReference<GuiCompositeWidgets> widgets = new AtomicReference<>();
-    withScene(
-        shell -> widgets.set(build(shell)),
-        bot -> {
-          int provider = onUi(() -> 
iconX(providerLine(widgets.get()).getwCombo()));
-          int notes =
-              onUi(
-                  () ->
-                      iconX(
-                          (Composite)
-                              widgets
-                                  .get()
-                                  .getWidgetsMap()
-                                  
.get(HopAiConfigOptionPlugin.WIDGET_EXTRA_CONTEXT)));
-          int files =
-              onUi(
-                  () ->
-                      iconX(
-                          (Composite)
-                              widgets
-                                  .get()
-                                  .getWidgetsMap()
-                                  
.get(HopAiConfigOptionPlugin.WIDGET_CONTEXT_FILES)));
-          assertTrue(Math.abs(provider - notes) <= 1, provider + " vs " + 
notes);
-          assertTrue(Math.abs(provider - files) <= 1, provider + " vs " + 
files);
-        });
-  }
-
   // Helpers
 
   /** The page as ConfigPluginOptionsTab builds it, without the listener that 
saves changes. */
@@ -234,16 +202,6 @@ class HopAiConfigOptionPluginUiTest extends SwtBotTestBase 
{
         
widgets.getWidgetsMap().get(HopAiConfigOptionPlugin.WIDGET_DEFAULT_PROVIDER_WARNING);
   }
 
-  /** Where on the screen the variable icon of a field starts. */
-  private static int iconX(Composite field) {
-    for (Control child : field.getChildren()) {
-      if (child instanceof Label label && label.getImage() != null) {
-        return label.toDisplay(0, 0).x;
-      }
-    }
-    throw new AssertionError("no variable icon in " + field);
-  }
-
   private static <T> T onUi(Supplier<T> supplier) {
     AtomicReference<T> result = new AtomicReference<>();
     Display.getDefault().syncExec(() -> result.set(supplier.get()));

Reply via email to