Skip to content

Commit

Permalink
#295 - Changing window location to fix Swing tests frame.setLocationB…
Browse files Browse the repository at this point in the history
…yPlatform(true);
  • Loading branch information
starnowski committed Nov 7, 2023
1 parent 9f6a146 commit ef2a6af
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ public void setUp() {
factory = mock(YamlSharedSchemaContextFactory.class);
PosmultenApp frame = GuiActionRunner.execute(() -> new PosmultenApp(factory));
//Hack to fix issue for ubuntu and xvfb : org.assertj.swing.exception.ActionFailedException: The component to click is out of the boundaries of the screen
frame.setLocation(0, 0);
// frame.setLocation(0, 0);
String osName = System.getProperty("os.name");
if (osName != null && osName.toLowerCase().contains("linux")) {
// frame.setLocationByPlatform(true);
frame.setLocation(-100, 0);
// frame.setLocation(-100, 0);
//Hack to fix issue for ubuntu and xvfb : org.assertj.swing.exception.ActionFailedException: The component to click is out of the boundaries of the screen
// frame.setUndecorated(true);
}
frame.setLocationByPlatform(true);
window = new FrameFixture(frame);
window.show(); // shows the frame to test
}
Expand Down

0 comments on commit ef2a6af

Please sign in to comment.