File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
src/test/java/com/openfin/desktop Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ public static void teardown() throws Exception {
5959 TestUtils .teardownDesktopConnection (desktopConnection );
6060 }
6161
62+ @ Ignore ("for now" )
6263 @ Test
6364 public void saveWindowStateWithRuntimeRestart () throws Exception {
6465 int repeat = 30 ;
@@ -74,9 +75,26 @@ public void saveWindowStateWithRuntimeRestart() throws Exception {
7475 }
7576 }
7677
78+ @ Test
79+ public void defaultWindowPsition () throws Exception {
80+ int repeat = 30 ;
81+ String value = java .lang .System .getProperty ("com.openfin.desktop.WindowPositionTest.repeat" );
82+ if (value != null ) {
83+ repeat = Integer .parseInt (value );
84+ }
85+ logger .debug (String .format ("Running test %d times" , repeat ));
86+ for (int i = 0 ; i < repeat ; i ++) {
87+ appUuid = UUID .randomUUID ().toString ();
88+ defaultTop = getRandomNumber ();
89+ defaultLeft = getRandomNumber ();
90+ defaultHeight = getRandomNumber () + 38 ; // chromium enforces 140/38 as min height/width
91+ defaultWidth = getRandomNumber () + 140 ;
92+ runAndClose ();
93+ }
94+ }
95+
7796 private void runAndClose () throws Exception {
7897 ApplicationOptions options = TestUtils .getAppOptions (appUuid , null );
79- options .getMainWindowOptions ().setSaveWindowState (true );
8098 options .getMainWindowOptions ().setDefaultHeight (defaultHeight );
8199 options .getMainWindowOptions ().setDefaultWidth (defaultWidth );
82100 options .getMainWindowOptions ().setDefaultTop (defaultTop );
You can’t perform that action at this time.
0 commit comments