Author: psuchy
Date: 2012-10-11 07:22:41 -0400 (Thu, 11 Oct 2012)
New Revision: 44427
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/RuntimeDetectionTestCase.java
Log:
Test debugging on jenkins (MacOS) - open preferences dialog problem
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java 2012-10-11
10:27:33 UTC (rev 44426)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/RuntimeDetectionPreferencesDialog.java 2012-10-11
11:22:41 UTC (rev 44427)
@@ -30,6 +30,8 @@
public SearchingForRuntimesDialog addPath(final String path){
RuntimeUIActivator.getDefault().getModel().addRuntimePath(new RuntimePath(path));
+
+ // ↓ MacOSX cannot open preferences dialog for the first time - trying to resolve
new WaitWhile(new JobIsRunning());
cancel();
new WaitWhile(new JobIsRunning());
@@ -40,6 +42,7 @@
open();
}
new WaitWhile(new JobIsRunning());
+
return new SearchingForRuntimesDialog();
}
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/RuntimeDetectionTestCase.java
===================================================================
---
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/RuntimeDetectionTestCase.java 2012-10-11
10:27:33 UTC (rev 44426)
+++
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/template/RuntimeDetectionTestCase.java 2012-10-11
11:22:41 UTC (rev 44427)
@@ -4,9 +4,14 @@
import static org.hamcrest.Matchers.is;
import org.jboss.reddeer.eclipse.wst.server.ui.RuntimePreferencePage;
+import org.jboss.reddeer.swt.condition.JobIsRunning;
+import org.jboss.reddeer.swt.exception.WidgetNotAvailableException;
+import org.jboss.reddeer.swt.wait.WaitWhile;
import
org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences.RuntimeDetectionPreferencesDialog;
import org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences.SeamPreferencesDialog;
import
org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences.SearchingForRuntimesDialog;
+import org.jboss.tools.runtime.core.model.RuntimePath;
+import org.jboss.tools.runtime.ui.RuntimeUIActivator;
/**
* Provides useful methods that can be used by its descendants.
@@ -24,7 +29,18 @@
protected SearchingForRuntimesDialog addPath(String path){
runtimeDetectionPreferences = new RuntimeDetectionPreferencesDialog();
- runtimeDetectionPreferences.open();
+ RuntimeUIActivator.getDefault().getModel().addRuntimePath(new RuntimePath(path));
+
+ // ↓ MacOSX cannot open preferences dialog for the first time - trying to resolve
+ new WaitWhile(new JobIsRunning());
+ try{
+ runtimeDetectionPreferences.open();
+ }catch(WidgetNotAvailableException ex){
+ new WaitWhile(new JobIsRunning());
+ runtimeDetectionPreferences.open();
+ }
+ new WaitWhile(new JobIsRunning());
+
runtimeDetectionPreferences.addPath(path);
return runtimeDetectionPreferences.search();
}
Show replies by date