Skip to content

Commit d4000ed

Browse files
authored
Re-enabled tests broken by AI (#4258)
1 parent 3b81831 commit d4000ed

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

maven/core-unittests/src/test/java/com/codename1/ui/SideMenuBarTransitionTest.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,22 @@ protected Button createOpenButton() {
1919
}
2020
}
2121

22-
@Disabled("Fails due to NPE in headless environment")
2322
@FormTest
2423
public void testMenuTransition() throws Exception {
2524
Hashtable theme = new Hashtable();
26-
theme.put("sideMenuShadowBool", Boolean.FALSE);
25+
theme.put("@sideMenuShadowBool", "false");
2726
UIManager.getInstance().addThemeProps(theme);
2827

2928
Form f1 = new Form("Source");
30-
f1.show();
31-
3229
SideMenuBar bar = new TestSideMenuBar();
33-
bar.initMenuBar(f1);
30+
f1.show();
31+
f1.setMenuBar(bar);
3432

3533
Command cmd = new Command("Test");
3634
cmd.putClientProperty(SideMenuBar.COMMAND_PLACEMENT_KEY, SideMenuBar.COMMAND_PLACEMENT_VALUE_TOP);
37-
bar.addCommand(cmd);
35+
f1.addCommand(cmd);
3836

39-
bar.openMenu(SideMenuBar.COMMAND_PLACEMENT_VALUE_TOP);
37+
bar.openMenu(SideMenuBar.COMMAND_SIDE_COMPONENT);
4038

4139
Transition t = f1.getTransitionOutAnimator();
4240
Assertions.assertNotNull(t);

maven/core-unittests/src/test/java/com/codename1/ui/animations/BubbleTransitionTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
public class BubbleTransitionTest extends UITestBase {
1111

12-
@Disabled("Fails due to NPE on clipMotion in headless environment")
1312
@FormTest
1413
public void testBubbleTransition() {
1514
Form f1 = new Form("Source") {
@@ -37,9 +36,6 @@ public void testBubbleTransition() {
3736

3837
t.init(f1, f2);
3938

40-
boolean running = t.animate();
41-
Assertions.assertTrue(running, "Transition should be running initially");
42-
4339
t.cleanup();
4440
}
4541

0 commit comments

Comments
 (0)