File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
src/test/java/boundingboxeditor Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ dependencies {
6161
6262javafx {
6363 version = ' 14'
64+ // javafx.swing necessary for screenshot capturing in tests
6465 modules = [' javafx.controls' , ' javafx.swing' ]
6566}
6667
8081ci {
8182 githubactions {
8283 test {
83- jvmArgs . remove( ' -Dprim.forceGPU= true' )
84+ systemProperty " fullScreenTests " , true
8485 }
8586 }
8687}
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ public class BoundingBoxEditorTestBase {
5454 private static final String STYLESHEET_PATH = "/stylesheets/css/styles.css" ;
5555 private static final Path SCREENSHOT_PATH = Paths .get ("" ).toAbsolutePath ().resolve (
5656 "build/test-screenshots/" );
57+ private static final String FULL_SCREEN_TESTS_SYSTEM_PROPERTY_NAME = "fullScreenTests" ;
5758 protected static int TIMEOUT_DURATION_IN_SEC = 30 ;
5859 protected static String TEST_IMAGE_FOLDER_PATH_1 = "/testimages/1" ;
5960 protected static String TEST_IMAGE_FOLDER_PATH_2 = "/testimages/2" ;
@@ -169,6 +170,10 @@ protected void onStart(Stage stage) {
169170 // To make sure that the window is on top of all other windows at the start.
170171 stage .setAlwaysOnTop (true );
171172
173+ if (Boolean .getBoolean (FULL_SCREEN_TESTS_SYSTEM_PROPERTY_NAME )) {
174+ stage .setMaximized (true );
175+ }
176+
172177 final Scene scene = createSceneFromParent (mainView );
173178 scene .getStylesheets ().add (getClass ().getResource (STYLESHEET_PATH ).toExternalForm ());
174179
You can’t perform that action at this time.
0 commit comments