Author: lzoubek(a)redhat.com
Date: 2010-05-05 04:01:05 -0400 (Wed, 05 May 2010)
New Revision: 21900
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
Log:
SWTBotExt : added prepare views requirement
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2010-05-04
21:06:50 UTC (rev 21899)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ConfiguredState.java 2010-05-05
08:01:05 UTC (rev 21900)
@@ -9,21 +9,23 @@
* this class represents state of running test suite. Properties of this object
* should be changed only by classed extending {@link RequirementBase} class.
*
- * @author lzoubek
+ * @author lzoubek(a)redhat.com
*
*/
public class ConfiguredState {
private List<String> jreList = new Vector<String>();
private Server server = new Server();
private Seam seam = new Seam();
- private boolean welcomeViewVisible = true;
+ private ESB esb = new ESB();
- public boolean isWelcomeViewVisible() {
- return welcomeViewVisible;
+ private boolean viewsPrepared = false;
+
+ public boolean isViewsPrepared() {
+ return viewsPrepared;
}
- public void setWelcomeViewVisible(boolean welcomeViewVisible) {
- this.welcomeViewVisible = welcomeViewVisible;
+ public void setViewsPrepared(boolean viewsPrepared) {
+ this.viewsPrepared = viewsPrepared;
}
/**
@@ -53,6 +55,15 @@
return server;
}
+ /**
+ * gets configured esb
+ *
+ * @return
+ */
+ public ESB getEsb() {
+ return esb;
+ }
+
public class Server {
/**
* is server runtime & server added?
@@ -95,4 +106,19 @@
*/
public String name = null;
}
+
+ public class ESB {
+ /**
+ * version of ESB runtime
+ */
+ public String version = null;
+ /**
+ * is configured?
+ */
+ public boolean isConfiured = false;
+ /**
+ * name of added runtime
+ */
+ public String name = null;
+ }
}
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java 2010-05-05
08:01:05 UTC (rev 21900)
@@ -0,0 +1,47 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import java.util.List;
+import java.util.Vector;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.gen.IView;
+
+/**
+ * this is a special requirement which should run only once, main aim of this is to
prepare
+ * and setup views behavior (e.g. force Console View not to steal focus)
+ * @author lzoubek(a)redhat.com
+ *
+ */
+public class PrepareViews extends RequirementBase {
+
+ @Override
+ public boolean checkFulfilled() {
+ return SWTTestExt.configuredState.isViewsPrepared();
+ }
+
+ @Override
+ public void handle() {
+ SWTTestExt.open.viewClose(new IView(){
+ public List<String> getGroupPath() {
+ // TODO Auto-generated method stub
+ return new Vector<String>();
+ }
+ public String getName() {
+ // TODO Auto-generated method stub
+ return "Welcome";
+ }});
+
+ // force console view not to steal focus when something happens
+ try {
+ SWTBotView consoleView = SWTTestExt.console.show();
+ consoleView.toolbarToggleButton("Show Console When Standard Out
Changes").deselect();
+ consoleView.toolbarToggleButton("Show Console When Standard Error
Changes").deselect();
+ } catch (Exception ex) {
+ // do nothing since buttons must not always be available
+ }
+ SWTTestExt.configuredState.setViewsPrepared(true);
+
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Show replies by date