From 59f6ee86715e4be3a540c1bcb0d357548d3dd517 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Mon, 29 Jun 2020 16:57:51 -0600 Subject: [PATCH] FIXUP: Test needed to be corrected for adding the MapWithAI preferences to the data menu Signed-off-by: Taylor Smock --- .../josm/plugins/mapwithai/MapWithAIPluginTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPluginTest.java b/test/unit/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPluginTest.java index ec2270c..86bf2a4 100644 --- a/test/unit/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPluginTest.java +++ b/test/unit/org/openstreetmap/josm/plugins/mapwithai/MapWithAIPluginTest.java @@ -86,7 +86,8 @@ public class MapWithAIPluginTest { throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { Field menuEntries = MapWithAIPlugin.class.getDeclaredField("MENU_ENTRIES"); menuEntries.setAccessible(true); - final int addedMenuItems = ((Map) menuEntries.get(plugin)).size(); + // + 1 comes from the preferences panel + final int addedMenuItems = ((Map) menuEntries.get(plugin)).size() + 1; final JMenu dataMenu = MainApplication.getMenu().dataMenu; final int dataMenuSize = dataMenu.getMenuComponentCount(); plugin = new MapWithAIPlugin(info);