Author: vpakan(a)redhat.com
Date: 2010-02-19 05:30:11 -0500 (Fri, 19 Feb 2010)
New Revision: 20383
Modified:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java
Log:
Close Welcome screen properly
Modified:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java
===================================================================
---
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java 2010-02-19
10:29:11 UTC (rev 20382)
+++
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java 2010-02-19
10:30:11 UTC (rev 20383)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.struts.ui.bot.test;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.jboss.tools.struts.ui.bot.test.smoke.AddRemoveStrutsCapabilities;
import org.jboss.tools.struts.ui.bot.test.smoke.CreateNewStrutsProjectTest;
import org.jboss.tools.struts.ui.bot.test.smoke.ImportStrutsProjectTest;
@@ -37,19 +39,25 @@
AddRemoveStrutsCapabilities.class,
ImportStrutsProjectTest.class,
RenameStrutsConfigXmlFile.class,
- RenameTldFile.class})
+ RenameTldFile.class
+ })
public class StrutsAllBotTests extends SWTTestExt {
public static final String STRUTS_PROJECT_NAME = "strutsTest";
@BeforeClass
- public static void setUp() {
+ public static void setUpTest() {
properties = util.loadProperties(Activator.PLUGIN_ID);
- if(eclipse.getBot().viewByTitle(IDELabel.View.WELCOME)!=null) {
- eclipse.closeView(IDELabel.View.WELCOME);
+ try{
+ SWTBotView welcomeView = eclipse.getBot().viewByTitle(IDELabel.View.WELCOME);
+ welcomeView.close();
+ } catch (WidgetNotFoundException wnfe){
+ // Do nothing ignore this error
}
+
}
@AfterClass
- public static void tearDown() {
+ public static void tearDownTest() {
// Ready for later usage
}
+
}
\ No newline at end of file
Show replies by date