[jbosstools-commits] JBoss Tools SVN: r43992 - trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Tue Sep 25 09:15:36 EDT 2012
Author: ljelinko
Date: 2012-09-25 09:15:35 -0400 (Tue, 25 Sep 2012)
New Revision: 43992
Modified:
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/PreferencesDialog.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
trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java
Log:
Fixed issues with Preferences not closing
Modified: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/PreferencesDialog.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/PreferencesDialog.java 2012-09-25 13:13:22 UTC (rev 43991)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/PreferencesDialog.java 2012-09-25 13:15:35 UTC (rev 43992)
@@ -1,8 +1,10 @@
package org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
+import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.Preference;
import org.jboss.tools.ui.bot.ext.gen.IPreference;
@@ -21,6 +23,9 @@
}
public void ok(){
+ SWTBotShell preferencesShell = SWTBotFactory.getBot().shell("Preferences");
+ preferencesShell.activate();
+ SWTBotFactory.getBot().waitWhile(new NonSystemJobRunsCondition());
SWTBotFactory.getBot().button("OK").click();
}
}
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-09-25 13:13:22 UTC (rev 43991)
+++ 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-09-25 13:15:35 UTC (rev 43992)
@@ -1,9 +1,9 @@
package org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.tableHasRows;
+
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.waits.ICondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.jboss.tools.runtime.core.model.RuntimePath;
@@ -39,6 +39,7 @@
table.click(0, 0);
bot.button("Remove").click();
}
+ bot.waitUntil(tableHasRows(table, 0), TaskDuration.NORMAL.getTimeout());
}
public SearchingForRuntimesDialog search(){
Modified: trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java 2012-09-25 13:13:22 UTC (rev 43991)
+++ trunk/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SearchingForRuntimesDialog.java 2012-09-25 13:15:35 UTC (rev 43992)
@@ -1,8 +1,11 @@
package org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
+
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
@@ -26,7 +29,9 @@
}
public void ok(){
+ SWTBotShell shell = SWTBotFactory.getBot().activeShell();
SWTBotFactory.getBot().button("OK").click();
+ SWTBotFactory.getBot().waitUntil(shellCloses(shell));
}
public void cancel(){
More information about the jbosstools-commits
mailing list